developers:link_shortcuts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
developers:link_shortcuts [2018/05/26 20:44] – [Shortcuts for Web links] Xavier Gonze | developers:link_shortcuts [2019/10/24 00:41] (current) – removed Matteo Giantomassi | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Shortcuts for Web links (Obsolete) ====== | ||
- | |||
- | ** THE INFORMATION ABOUT THE MANAGEMENT OF THE DOCUMENTATION HAS BEEN TRANSFERRED TO THE MAIN ABINIT SITE, AT | ||
- | https:// | ||
- | |||
- | This page concerns the YAML files in ~abinit/ | ||
- | that are processed by the script ~abinit/ | ||
- | to automatically generate HTML files in ~abinit/ | ||
- | |||
- | Thanks to this processing, it has been possible to introduce shortcuts | ||
- | to ease the writing of many different hyperlinks in these YAML files. | ||
- | Also, [[http:// | ||
- | in LaTeX is activated, and the (few) specificities of its usage in the ABINIT doc are explained | ||
- | in the section [[# | ||
- | |||
- | |||
- | ===== Syntax ===== | ||
- | |||
- | The [[wiki: | ||
- | In the simple case, this gives | ||
- | |||
- | [[name]] | ||
- | | ||
- | but, more generally | ||
- | |||
- | [[namespace: | ||
- | | ||
- | where namespace, section and text are optional (in such case, the adequate separator should not be mentioned). The namespace is not echoed in the Web page, while if a " | ||
- | Limitation : do not use parentheses within the pair of double brackets, the whole expression will not be recognized. | ||
- | |||
- | ===== Simple allowed internal links ===== | ||
- | |||
- | When an internal link is recognized, the dokuwiki item is replaced by the adequate HTML link by the script generate_doc.py.\\ | ||
- | Example : | ||
- | |||
- | [[ecut]] becomes <a href=" | ||
- | |||
- | This will point to [[http:// | ||
- | |||
- | There are a couple of names immediately recognized by generate_doc.py : | ||
- | |||
- | * as " | ||
- | * the name of a bibliographical reference (provided it is mentioned in abiref.bib); | ||
- | * the path to a file in a ~abinit/ | ||
- | * the path to a reference output file in a ~abinit/ | ||
- | * the label of a section inside the own file. | ||
- | |||
- | Examples : | ||
- | | ||
- | [[Amadon2008]] becomes <a href=" | ||
- | | ||
- | this will point to [[http:// | ||
- | | ||
- | [[Gonze2016|The last generic ABINIT article]] becomes <a href=" | ||
- | |||
- | this will point to [[http:// | ||
- | | ||
- | [[tests/ | ||
- | | ||
- | and also | ||
- | | ||
- | [[# | ||
- | | ||
- | The script generate_doc.py does a bit of formatting in these examples: it keeps one pair of square brackets in the case of a bibliographic reference, and add " | ||
- | |||
- | ===== Internal links with a namespace ===== | ||
- | |||
- | Other internal links can be recognized thanks a namespace. A first set of allowed internal namespaces | ||
- | are " | ||
- | In such cases, provided there is a corresponding generated HTML file | ||
- | in one of the ~abinit/ | ||
- | that has a name that start with the namespace and end with the name, | ||
- | the link will be established. | ||
- | |||
- | Examples : | ||
- | | ||
- | [[lesson: | ||
- | | ||
- | [[topic: | ||
- | | ||
- | Actually, using the real name of the file without suffix, e.g. lesson_gw1 will also be recognized, although this real name is echoed, instead of the name without namespace. | ||
- | |||
- | [[lesson_gw1]] becomes <a href=" | ||
- | | ||
- | There is an added formatting by generate_doc.py, | ||
- | |||
- | [[help_abinit]] becomes <a href=" | ||
- | |||
- | Also, the input variables for anaddb, optic and aim(bader) will be recognized if they are used with the namespaces " | ||
- | |||
- | [[anaddb: | ||
- | | ||
- | [[dipdip@anaddb]] becomes <a href=" | ||
- | | ||
- | ===== External links ===== | ||
- | |||
- | As for dokuwiki, some [[wiki: | ||
- | * a link that starts with " | ||
- | * the namespaces " | ||
- | |||
- | Examples : | ||
- | | ||
- | [[www.abinit.org]] becomes <a href=" | ||
- | | ||
- | [[https:// | ||
- | | ||
- | ===== MathJax ===== | ||
- | |||
- | Formulas written in LaTeX are interpreted automatically (at visualization time) thanks to the | ||
- | [[http:// | ||
- | * \$...\$ | ||
- | * \$\$...\$\$ yields " | ||
- | * to have the equations numbered, use the display mode above, and (inside the markers) declare your equation with the standard %%\b%%egin{equation} and %%\ %%end{equation} | ||
- | * when a \$ sign is inside a <pre> ... </ | ||
- | * to prevent a real \$ to be interpreted, | ||
- | |||
- | Examples : | ||
- | |||
- | $|\phi \ angle$ | ||
- | $$|\phi \ angle$$ | ||
- | $$\begin{equation} |\phi \ angle \end{equation}$$ | ||
- | |||
developers/link_shortcuts.1527367441.txt.gz · Last modified: 2018/05/26 20:44 by Xavier Gonze