Difference between revisions of "Template:Src"
Jump to navigation
Jump to search
(Add description to template) |
(Template can now handle optional second parameter with custom link text) |
||
Line 1: | Line 1: | ||
− | <onlyinclude>[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/{{{1}}} {{{1}}}]</onlyinclude><noinclude> | + | <onlyinclude>[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/{{{1}}} {{{2|{{{1}}}}}}]</onlyinclude><noinclude> |
---- | ---- | ||
− | Link to files in the <code>tex/context/base</code> directory. | + | Link to files in the <code>tex/context/base</code> directory. The link text is the filename by default, but you may pass a second parameter if you want some other text. |
Usage: | Usage: | ||
<nowiki>{{src|strc-num.mkiv}}</nowiki> | <nowiki>{{src|strc-num.mkiv}}</nowiki> | ||
+ | <nowiki>{{src|strc-num.mkiv#l471|strc-num.mkiv}}</nowiki> | ||
Resulting code: | Resulting code: | ||
<nowiki>[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-num.mkiv strc-num.mkiv]</nowiki> | <nowiki>[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-num.mkiv strc-num.mkiv]</nowiki> | ||
+ | <nowiki>[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-num.mkiv#l471 strc-num.mkiv]</nowiki> | ||
Looks like: | Looks like: | ||
− | : | + | : {{src|strc-num.mkiv}} |
+ | : {{src|strc-num.mkiv#l471|strc-num.mkiv}} | ||
− | The repository may or may not change in the future; if you must link to a specific repository, don't use this template, but write the link in full. | + | The repository may or may not change in the future; if you must link to a ''specific'' repository, don't use this template, but write the link in full. |
</noinclude> | </noinclude> |
Revision as of 13:31, 2 July 2012
Link to files in the tex/context/base
directory. The link text is the filename by default, but you may pass a second parameter if you want some other text.
Usage:
{{src|strc-num.mkiv}} {{src|strc-num.mkiv#l471|strc-num.mkiv}}
Resulting code:
[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-num.mkiv strc-num.mkiv] [http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-num.mkiv#l471 strc-num.mkiv]
Looks like:
The repository may or may not change in the future; if you must link to a specific repository, don't use this template, but write the link in full.