Difference between revisions of "Template:Src"

From Wiki
Jump to navigation Jump to search
(A template for linking to source files)
 
(Switch to source.cg.net)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/{{{1}}} {{{1}}}]
+
<onlyinclude>[https://source.contextgarden.net/tex/context/base/mkiv/{{{1}}} {{{2|{{{1}}}}}}]</onlyinclude><noinclude>
 +
 
 +
----
 +
 
 +
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:
 +
    <nowiki>{{src|strc-num.mkiv#l471}}</nowiki>
 +
    <nowiki>{{src|strc-num.mkiv#l471|strc-num.mkiv}}</nowiki>
 +
 
 +
Resulting code:
 +
    <nowiki>[https://source.contextgarden.net/tex/context/base/mkiv/strc-num.mkiv#l471 strc-num.mkiv#l471]</nowiki>
 +
    <nowiki>[https://source.contextgarden.net/tex/context/base/mkiv/strc-num.mkiv#l471 strc-num.mkiv]</nowiki>
 +
 
 +
Looks like:
 +
: {{src|strc-num.mkiv#l471}}
 +
: {{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.
 +
</noinclude>

Latest revision as of 18:42, 6 October 2019

{{{1}}}


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#l471}}
   {{src|strc-num.mkiv#l471|strc-num.mkiv}}

Resulting code:

   [https://source.contextgarden.net/tex/context/base/mkiv/strc-num.mkiv#l471 strc-num.mkiv#l471]
   [https://source.contextgarden.net/tex/context/base/mkiv/strc-num.mkiv#l471 strc-num.mkiv]

Looks like:

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.