Open main menu

Wikimedia Commons β

Template:Image generation

(Redirected from Template:Igen)
Inkscape Logo.svg
This vector image was created with Inkscape.
Documentation icon Documentationviewedithistorypurge

This documentation is transcluded from Template:Image generation/doc.


Dialog-warning-orange.svg Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
  • Editing a template causes all pages that use the template to be re-rendered. If the template is used often, this can put a lot of load on the servers since it fills up the job queue.
  • Keep in mind that templates that are used on file description pages also show up on other wikis.
  • This page has been protected from editing to prevent vandalism. Only administrators can edit it. Get their attention by placing {{edit protected}} at the talk page.

Short notation for the SVG created with ... templates and Created with ... templates, helps to display

  • SVG tool
  • W3C validation
  • optional: Code used for creation
    WWWWWand a great number of other taggings

formatted within one single line.

The template automatically sets the following categories: depending on tool name and validation

Usage

{{Image generation}}

Or use the shorthand {{Igen |… parameters as described …}} (like magyarul "igen" = "yes")

See also the template {{Creation}} for simple usages within the Information box.

Script support

A user-script has been developed to help you maintaining the file description. Simply paste the following three lines into your common.js (or other MediaWiki skin related) JavaScript page. You can also edit this (script page) per user-preferences:
// [[File:User:Perhelion/simpleSVGcheck.js]] (workaround for [[phab:T35355]])
if( mw.config.get('wgNamespaceNumber') === 6 && /SVG/i.test( mw.config.get('wgTitle').slice( -3 ) ) )
	importScript('User:Perhelion/simpleSVGcheck.js');

The offered script support enables users - even novice users! - to use the template without knowing all details of its parametrizing.

The script cares for the most essential settings, and does a lot of standardizing the file descriptions when they are in need of being tidied up.
Expert users can complete the suggestions made from the script (e.g. by adding more tags) before saving the script's changes of the file description page.

Other tags

can be set either by a shorthand notation, or expressed like in the following examples

{{Projet Blasons}},
{{Projekt Wappen}}

Parameter settings

The flexibility of parameter definition allows to use the template with high efficiency. The same result can be achieved by different settings.
All parameters are optional; if used, unnamed

  • parameter #1 0 contains either
  • tool name abbreviation letter (default: I for Inkscape)
  • tool name
  • parameters %, ~, !, ?, §, <, ^, > or sign $, +, -
  • parameter #2 0 contains either
  • v, n, s, numeric error count, parameters %, ~, !, ?, §, <, ^, > or sign $, +, -. See also Parameter 2
  • parameter #3 to #9 contains each one either
  • parameters %, ~, !, ?, §, <, ^, > or sign $, +, -

Template parameters

Parameter Description Default Status
1 Abbreviation of tool name,
or
  • ... Name of the tool (case sensitive)

Note: "Im" abbreviates {{Inkscape|...|IMPORTANT=yes}}

00"ItB" abbreviates {{Inkscape to Bitmap}}
Inkscape optional
2 either character "v" or "n". If absent, v is assumed
or   the numeric error count from W3C validation ("0" ≘ "v")
or   character "s" to suppress the W3C-box for SVG files (with error count e= !)
See the detailed information for parameter #2 and suppress W3C
v optional
3[1] a "-" (minus sign) to terminate the left-floating with {{Clr}}
Can be necessary if the template is used outside the {{Information}} box
empty optional
4[1] a "+" (plus sign) when used in |Other fields or |Other fields 1. In this case

Note: when a field name is specified, parameter "+" is implied and can be omitted;

Note2: otherwise the field name "development" is nationalized by {{I18n/COA}}
empty optional
5[1] a "$" (dollar sign) when "Commonist.svg uploaded with Commonist" should be added. In this case
  • parameter cu= may specify a user, e.g. {{U|user}}
  • parameter cl= may specify a logo (☭), e.g. [[File:xyz.svg|20px]]
  • parameter ct= may specify a text, e.g. &nbsp; explanation
  • parameter cc= may specify a category, e.g. [[Category:Othercat| ]]
  • parameter cf= may specify a linefeed, e.g. <br>, none = n (default: {{Clear}})
If any one of these five parameters is specified the "$" is implied and can be omitted.
empty optional
6[1][2] For additional parametrizing see individual information
  • a "%" (percent sign) or "%v" to insert the {{Translate}} tag, "%s" when option <switch>.
  • a "~" (squiggle sign) to insert the {{pgf-Cdata}} tag.
  • an "!" (exclamation mark) to insert the {{BadSVG}} tag.
  • a "?" (question mark) to insert the {{SVGbug}} tag.
  • a "§" ("section" sign) to insert the {{TracedSVG}} tag.
  • a "<" ("less" sign) to insert the {{Path text SVG}} tag.
  • a "^" (circumflex sign) to insert the {{Quality image}} tag.
  • a ">" ("greater" sign) to inhibit for large SVG the "show source" option of the W3C validator.
empty optional
e[rr] when invalid SVG: error count from W3C validation ("0" means: valid)
(has precedence over any numeric argument of parameter 2)
empty optional
m[ore] optional additional text (use M= to precede that text with a space) . optional
c[at][3] category/categories, complete with the brackets; suppress with c=-
If plain text without brackets, it trails the boxes (like t=)
empty optional
C the tincture can be defined empty optional
s[ub][3] suffix to the category name for diffusion but also an information for subtemplates
  • sub= is used only for category diffusion (use sub=- for no diffusion)
  • S= (upper case) like sub=, with the insertion of an inbetween space
  • s= (lower case) can be used instead, or in addition to sub= or S=;
With a one-letter-code for s= the topics-subcategory may be defined, as
:CoA, :Diagrams, :Flags, :Icons, :Logos, :Maps, :Signs, :Unicode, :Trigonometry,
When sub/S and s are both defined, sub/S is used for subcategorizing,
and s is used as an information for several subtemplates
Select the best fitting subcategory, or create an appropriate new one
empty optional
k[ey] key for sorting within the category (use K= for the insertion of a preceding space)
key is used e.g. for category sorting, and in HandSVG for subkategorizing
empty optional
v[t[xt]] additional text for Valid/Invalid SVG box (use V= to precede that text with a space) empty optional
o[pt] to set or overwrite the display source option for ValidSVG/InvalidSVG empty optional
n[ame] a tool name or a description for {{Other tool}}
Note: when n[ame] is specified, Other tools is implied and parameter 1 can be omitted
empty optional
u[ser] user name, or other text. May be coded e.g. with {{U}}, {{Uc}}, {{Ud}}, {{Ut}}, …
Use U= to create the user link: U=xyz{{U|xyz}}.
empty optional
code
c1
display of the code used for generation. In this case
  • parameter l1= or syntax= may specify or change the code language (syntax)
  • parameter e1= or expl= may specify explanatory text preceding the code block
  • parameter h1= or title= may specify another headline, or suppress "none"
  • parameter f1= or format= may specify format style options
  • parameter s1= or collapse= may specify a title text for collapsability headline
  • parameter n1= for a trailing note below of the code block
More parameters with suffices "2" and "3" can be used for more codes:
  • c2=, l2= or code2 with syntax2, title2, format2 etc.
  • c3=, l3= or code3 with syntax3, title3, format3 and so on
empty optional
vsub[3] category diffusion of Text editor for HandSVG, Inkscape-Hand, Adobe-hand;
Use Vs= for an inbetween space; set vsub=- to suppress the category diffusion.
s optional
vs[tyle][3] vstyle option: vs=fl for float-left (= same line), vs=- for minimizing, vs= for break fl optional
p additional preceding text; is displayed left of the boxes empty optional
t additional trailing text; is displayed right of the boxes (use T= to precede with <br>)
If tags or secondary tools should appear in another sequence, use
  • t2 (before Commonist}
  • t3 (after Commonist, before code)
  • t4 (immediately after code)
  • t5 (before "Quality image")
  • t6 (after QI, the last advantage tag, before all the disadvantage tags)
empty optional
g[l] specify the national Graphic lab with the ISO 639-1 language code

(uses the topics-subcategory), e.g. gl=it|s=m for the {{Laboratorio grafico mappa}}
Abbreviations: "gd" for "g=de", "ge" for "g=es", "gf" for "g=fr", "gi" for "g=it", but "gl" for "g=en"
Together with s=c/f/m the national heraldry project is achieved (e.g. de, es, fr).
The parameter gs= may be used to specify the style.

See Graphic Lab/statistics for more information.
empty optional
r[3] specify the {{Retouched picture}}, with parameters r= and editor= editoff= orig= origoff=
See Retouched picture for more information.
empty optional
w[hat][3]
topic
With w= the topic can be altered or suppressed
See also the subcategories description
s optional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Localization

This template is not intended to be localized.

The template is intended to be used within the {{Information}} box, e.g. at Other fields=, or anywhere outside

Because the prevalent majority of files belongs to Valid Inkscape, 1=Inkscape and 2=v are the default values

The template uses several specific subtemplates, e.g. {{Nil2}}, {{I18n/COA}}, {{Igen/bug}}, {{Igen/lab}}, {{Igen/qui}}, {{Igen/sub}}, {{Igen/upl}}, {{Igen/2nd}}, {{Igen/top}}, {{TextSVG-s}}, {{Translate-s}}, {{BadSVG-t}}, {{Created with X}} and more. Subtemplating allows swift modifications while the main template is protected.

The template uses several internationalization methods, like {{Autotranslate}} and {{LangSwitch}}.

Additional notes

  1. a b c d Every one of the signs ($, +, -) or parameters (%, ~, !, ?, §, <, ^, >) can be passed in any sequence, each as an argument for one of the unnamed parameters #1 through #9.
  2. Every one of the eight signs can be used either as a positional parameter, or as a named parameter passing the value to the corresponding template; see Named and unnamed parameters.
  3. a b c d e f This parameter allows supression with the parameter value "-"

Because letters are used for the abbreviation of tool names, parameters #1 to #9 use other characters.

Examples

Input Result
{{Igen}}
Inkscape Logo.svg
This vector image was created with Inkscape.
{{Igen|cf=n}}
Inkscape Logo.svg
This vector image was created with Inkscape.
Commonist.svg
This file was uploaded with Commonist.
{{Igen| | 1 }}
{{Igen|+}} see next line how it appears in the Information box
SVG development
Inkscape-yes.svg
This vector image was created with Inkscape.
{{Igen|-}}
Inkscape Logo.svg
This vector image was created with Inkscape.
{{Igen|A}}
Adobe Illustrator Icon (CS6).svg
This vector graphics image was created with Adobe Illustrator.
{{Igen|Im}}
Inkscape Logo.svg
This vector image was created with Inkscape-important.
0 option "IMPORTANT"
{{Igen|A|12|>}}
{{Igen|B}}
Bkchem48.png
This vector image of a structural formula was created with BKChem-Inkscape.
{{Igen|C}}
Chemdraw logo.svg
This chemical image was created with ChemDraw.
{{Igen|D}}
Corel logo initial.svg
This graphic was created with CorelDRAW.
{{Igen|H}}
Inkscape to text.svg
This vector image was created with Inkscape, and then manually edited.
{{Igen|G}}
Lissajous small.svg
This graphic was created with gnuplot.
{{Igen|L|n}}
LibreOffice icon 3.3.1 48 px.svg
This graphic was created with LibreOffice.
0 Raster graphics without W3C
{{Igen|M|s|e=0}}
Metapost-icon.svg
This vector image was created with MetaPost.
0 due to "s" without W3C - set W3C error count!
{{Igen|P|o=n|e=1}}
Pstoeditlogo-large.png
This W3C-invalid vector image was created with pstoedit.
0 due to "opt=n" without W3C - set W3C error count!
{{Igen|Q|17|e=23}}
{{Igen|S|$}}
Sodipodi-logo squirrel.svg
This vector image was created with Sodipodi-Inkscape.
This file was uploaded with Commonist. Commonist.svg
{{Igen|ArcMap}}
Ambox globe.svg
This map was created with ArcMap.
0 name "ArcMap"
{{Igen|GeoGebra|n}}
Created with GeoGebra-logo.svg
This graphic was created with GeoGebra.
0 "GeoGebra" non-SVG

When expressing some more options without expressing them by the shorthand parameters it can become a long line:
{{Image generation|Inkscape|v|+|u={{U|Username}}|s=:Drapeaux created by User:Username|m=-[[Help:Inkscape#Inkscape SVG vs. Plain SVG|''important'']]|t={{Translation possible}}{{Translate|switch=yes}}{{Cdata}}{{BadSVG}}{{SVGbug|description=hairline crack}}{{TracedSVG}}{{Path text SVG}}{{Quality image}}{{RetouchedPicture|1=Translation en → fr|editoff=Username|origoff=Carbon14 with activity labels.svg}}{{Projet Blasons}}{{Atelier graphique}}}}

Parameter table

The table shows for some given simple situations one of several possibilities to set parameters:

  • if the tool needs to be specified, it's only possible with parameter #1
  • an error number can be specified either with parameter #2, or everywhere with err=
  • the n at parameter #2 clarifies that the file is non-SVG
  • to tag a file which is not SVG the n needs to be set with parameter #2
  • when used as argument of Other fields, the + is necessary
  • when used outside the information box, the - may be necessary
placement other fields standalone
parameters p1 p2 p3 p40 p1 p2 p3 p40
valid Inkscape + -
Inkscape 1 error + 1 - 1
valid BKchem B + B -
Gnuplot 4 errors G 4 + G 4 -
Python raster P n + P n -
valid PHP PHP + PHP -
PHP 17 errors PHP 17 + PHP 17 -

Parameter 2

This parameter has historically been the place to specify the file's validation, as in transclusions like {{Inkscape||v}}. Now it may contain one of the following:

  • The character "v" to mark a valid SVG file. Because this is the default for SVG files it is not necessary to be specified and can be omitted.
  • The character "n" to mark a non-SVG file. Because this is the default for non-SVG files it is not necessary to be specified explicitly.
  • The character "s" to mark a SVG file with suppression of the W3C-box. To enable proper category sorting, "e= " must be specified explicitly (except e=0).
  • The W3C error count: either "0" (for a valid SVG) or a number > zero. This error count can also be given with the parameter e=. Default is "0".
  • One of the signs $, +, - or %, ~, !, ?, §, <, ^, >. These can also occur as arguments for any one of the unnamed parameters #1 through #9.

Suppress the W3C-box

Parameter #2 set to "n" for raster graphics avoids the W3C-box and enables correct categorizing.
To suppress the W3C-box for SVG files, set parameter #2 to "s". When the SVG file contains W3C-errors, always set the e= parameter to enable correct categorizing and sorting within the category.

If it seems necessary to tag a file with more than one generation tool, the other tool(s) can be added with e.g. t={{Created with ...|err=...|vo=n}}. The validator option vo set to "n" avoids to show the W3C-box again, while err must specify the error count (or "0") to categorize correctly, including the descending sorting within the category in the case of W3C-errors.

Template SimplSVG

To combine both the advantages of SimplSVG and Image generation it is possible to transclude the first one by the second.

This can be done by setting {{ Igen9 = +10 = Sand then the parameters for SimplSVG, followed by them for Image generation }}.

An example may be {{ Igen9 = +10 = SInkscape3392263l }} plus additional positional and named parameters for SimplSVG,
plus additional positional and named parameters for Igen like e.g. %, vsub= and/or T=.
No conflict can occur with the free-position parameters because SimplSVG uses letters, and Image generation uses other characters.

Subcategory specification

The template offers various possibilities to diffuse a category by subcategories.

  • With sub= a suffix to the category name is specified; it may be necessary to prefix the string with a semicolon ":" or "&#58;" .
  • An uppercase S= does the same but an in-between space is inserted.
  • Recommended is to use the parameter s= which bears several advantages:
  • With a code of one letter (or an abbreviation of some letters) many predefined subcategories are accessable; the subtemplate Igen/sub cares for the expansion.
  • Such a short code is also used as a topic for the description by many other templates; while Igen/sub expands only to English text, the subtemplate Igen/top transposes multilingual.

Only in cases where the required topic differs from the subcategory, or no subcategory should come in effect, another code can be defined to substitute the s= value. This topic letter can be defined with the parameter w= and becomes expanded instead. ("w" for what= because the "t" for topic= had been used for "trailing text").

Topics

When as well s= and sub= or S= are defined, sub/S is used for subcategorizing (or suppression with sub=-) and s= can then be used like w= for topic specification. The topic option can alse be suppressed with w=-, independent from s/sub/S.

As said above, the parameter s can be used for subcategorizing; when no parameter w (or topic=) is specified the value of s is also used for the topic text by the national versions of the Created with ... templates. Except of this defaulting the two parameters can be defined and/or suppressed completely independent from each other.

Named and unnamed parameters

Each one of the following parameter codes can be used either positional to set taggings with extern templates, or they can be used as parameter names to pass an individual information to the templates. The function is like using the templates with the |t= parameter, either without or with an individual information.
Example:

  • (positional) "?" can also be written as "t={{SVGbug}}"
  • (named p.) "?=rendering error" can also be written as "t={{SVGbug|description=rendering error}}"
code template passed individual information
 %
%r
%v
%f
%s
{{Translate-s}} |1={{{%}}}|2=s|s={{{s|}}}

|s={{{s|}}}|v=r
|s={{{s|}}}|v=v
|1=vf|s={{{s|}}}
|1={{{%s}}}|s={{{s|}}}|switch=yes

~ {{Cdata}} |sub={{{~}}}
 ! {{BadSVG}} |1={{{!}}}|subcat={{{s|}}}
 ? {{Rsvg bug}} |description={{{?}}}|sub={{{?s}}}
§ {{TracedSVG}} |1={{{§}}}|s={{{s|}}}
< {{TextSVG-s}} |sub={{{<}}}|s={{{s|}}}
^ {{QI}} |SVG={{{^}}}
> {{SVGvalid}} |opt=<nowiki/>
× {{SimplSVG}} |3={{{000}}}|4={{{×}}}
\ {{Superseded}} |1={{{\}}}|2={{{\r|}}}
{{Convert to SVG}} |1={{{→|{{{w|{{{s|}}}}}}}}}
ge {{THV}} |1={{{k|}}}|2={{{s|}}}

Reference of all parameters

For the setting of parameter #1 and parameter #2 see also #Parameter settings.
The following tables reference all other parameters possibly occurring;

  • when 10=S all the parameters of SimplSVG or HandSVG can occur as well;
  • the many parameters when source code is to display are explained there
000 Created with code 000
code alias description
c1 code the source code
e1 expl explanatory text ahead
f1 style format attributes
h1 title headline
l1 syntax language code
n1 note afterwards
s1 collapse secluded
two more source codes can be shown; all the parameters

are specified like for the first code, but with "2" resp. "3",
e.g. c2 or code2 and so on

code alias description
 %
-%r
-%v
-%f
the file contains translatable plain text; specifications are
"r" for reduced text, with categorizing
"v" for reduced text, no categorizing
"f" for reduced text in same line, no categorizing.
 %s the file contains multilingual text using the switch option
~ the file is bloated by Adobe PGF CDATA blocks
 !
0
the file contains embedded raster graphics
Use !=t when it is only for topographic structures
 ?
00?s
00?h
the file contains SVG bugs
subcategory (one-letter-code, or "?" for "formerly")
subcategory (one-letter-code, or "?" for "huge")
§ the file inadequately vectorized
<
<i
<v
the text has been converted to paths; specifications are
"i" to specify that internationalization is required
"v" for reduced text, no categorizing.
^ the file is considered a Quality image
> the file size is too large to display the source code
× the file is extremly simple and easy to draw manually
$
0
the file was Uploaded with Commonist
subparameters cc, cf, cl, ct, cu may appear
+ to generate the parameter Name= for {{Information field}}
- to generate a final {{clear-linefeed}}
\
0
-\r
the file is Superseded by another one,
or a Bitmap version exists for SVG
the reason for being superseded

{{ Convert to SVG }}
{{ Convert to SVGsimple }}
c cat change or suppress (c=-) category
cc
cf
cl
ct
cu
Commonist category, e.g. [[Category:Othercat| ]]
Commonist linefeed, e.g. cf=n
Commonist logo, e.g. [[File:xyz.svg|20px]]
Commonist text, e.g. &nbsp; explanation
Commonist user, e.g. {{U|user}}
C
-Ct
-Cc
Tinctures
a color for the tincture-"tc" parameter
a category for the tincture-"cat" parameter
e err error count ≥ 0, instead of definition with parameter# 2
editor, editoff parameters for Retouched picture (see r)
fn field name for Information field, instead of the "+"
g
-gb
-gc
-gd
-ge
-gf
-gi
-gw
g=xx
gl
0
0
0
0
0
0
0
0
Graphic Lab; g or gl for "Graphic Lab-en"
or g=bn for "Graphic Lab-bn"
or g=cm for "Graphic Lab-Commons"
or g=de for "Graphic Lab-de"
or g=es for "Graphic Lab-es"
or g=fr for "Graphic Lab-fr"
or g=it for "Graphic Lab-it"
or g=w for "Graphic workshop"
00lfor "Graphic Lab-xx"
gs style for Graphic Lab, either nl (new line) or sx (small text)
k
K
key
0
sort key for category (and for THV)
upper case "K" with space
l L upload info, or categorization info
n
N
name
0
tool name of Other tool
upper case "N" with space
m
M
more
0
additional text
upper case "M" with space
o opt W3C validator option
orig, origoff parameters for Retouched picture (see r)
p preceding text
r
R




{{Retouched picture}} with parameters
(upper case "R" for an advancing clear is not necessary)

r/R= modifications (r=- if modifications unspecified)
editor= / editoff=
orig= / origoff=

s
S
sub
0
subcategory; lower case "s" with expand option
upper case "S" with space
subcat topic for SVG images with embedded raster graphics:Topics
source additional text, currently only used by perl and ItB
t
T

T1...T7
trailing text
upper case "T" with an advancing clear
u
U
user
0
user name
uppercase "U" creates the user name link
vs vstyle vstyle: style option for validator
vsub
Vs
subcategory of Text editor
"Vs" like "vsub" with space
v
V
vt, vtxt
0
additional text
upper case "V" with space
w
topic
what
0
define (if other than s) or suppress (with w=-)
the code for the topic