Template talk:Superimpose-text
From Wikipedia, the free encyclopedia
This template makes text apperar over an image. It may not be very usefull for articles but i think many users will like something like this in their own userpages, like backgrounds or something like that. I named the parameters with "easy" names so even the newest wikipedians can use this template. --Argentino (talk/cont.) 02:18, 1 May 2006 (UTC)
Contents |
[edit] How
I used the Template:Superimpose as my starting point, and a refference on how should this look like. The parameters are "text"; "x"; "y"; "Image name"; "pixel width" and "caption"
[edit] text
Basicaly, the words you want to write over the image, but you can write wikisintax too.
[edit] x
This parameter is the distance at wich the text will be located. Is is in pixels, from the left side of the image. You have to try a couple of times until you find which is the best distance for you
[edit] y
Simmilar to x, it is the distance in pixels from the top of the main image.
[edit] Image name
The name of the image you want to have under the taxt. Dont write "Image:", the template does it for you.
[edit] pixel width
The width of the image, and, as the name of the parameter says, it is in pixels.
[edit] caption
The text you want to be like a title for your creation.
[edit] Examples
[edit] Normal
{{
Template: Superimpose-text
|x=0
|y=0
|text=This is my flag
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=the flag of my homeland
}}
[edit] with wikilinks
{{
Template: Superimpose-text
|x=0
|y=0
|text=This is my [[Flag of Argentina|flag]]
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=the flag of my homeland
}}
[edit] Bold and italics
{{ Template: Superimpose-text
|x=0
|y=0
|text='''This is my flag'''<br>''It is beautiful''
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=the flag of my homeland
}}
[edit] Colour
{{
Template: Superimpose-text
|x=0
|y=0
|text='''This is my flag'''<br><font color="blue">''It is beautiful''</font color>
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=the flag of my homeland
}}
[edit] Math formulae
The common sintax to write formulae is TeX, wich forces the creation of a PNG image (i.e. simbols over a white, non-transparent backgroung) so if you really need to superimpose a formula over an image, you have to use HTML sintax. Honestly i don't know HTML, and copied the example from Help:Formula. This is how it'd look like:
{{
Template: Superimpose-text
|x=0
|y=0
|text=√(1-''e''²)
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=Superimposing formulas
}}
[edit] External links
{{
Template: Superimpose-text
|x=0
|y=0
|text=[http://es.wikipedia.org Spanish Wikipedia]
|Image name=Flag of Argentina.svg
|pixel width=250
|caption=the flag of my homeland
}}
[edit] Added several parameters
To support a potential use of this in stylized sports uniforms, I added several parameters here, including:
- font: probably should be one of sans-serif, serif, monospace or script though it can follow typical for the CSS attribute.
- text-size: some percentage of the default (e.g., "75").
- textcolor: the color of the text. A hex string (e.g., "FFFFFF" for white, "FF0000" for red, etc.).
- backcolor: the color of the background. Useful with images supporting transparency.
{{Superimpose-text |x=48 |y=-3 |text=B |Image name=Kit_baseball_cap.png |backcolor=005 |textcolor=e11 |textsize=60 |font=script}} |
I realize there may be some problems with this (e.g., the text size should probably be in pixels, not in relative sizes), but I thought it might be fun to play with. Cheers. Rolando 02:58, 12 February 2007 (UTC)