welcome: please sign in
location: Diff for "Computer/Latex/Recommended"
Differences between revisions 1 and 2
Revision 1 as of 2022-04-22 12:15:52
Size: 859
Editor: leif
Comment:
Revision 2 as of 2022-04-26 08:56:17
Size: 2055
Editor: leif
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
Using standard cross-referencing in LaTeX only produces the label number, a name describing the label such as figure, chapter or equation has to be added manually. The cleveref package overcomes this limitation by automatically producing the label name and number. Recommended options: Using standard cross-referencing in LaTeX only produces the label number, a name describing the label such as figure, chapter or equation has to be added manually. The cleveref package overcomes this limitation by automatically producing the label name and number. The reference commands should be {{{\cref}}} in most cases, and {{{\Cref}}} for beginning-of-sentence references. Recommended options:
Line 15: Line 15:
 {{{[xxx]}}}  {{{[nameinlink]}}} When using the package {{{{hyperref}}}} (see below), all cross references will be turned into hyperlinks. By default, only the number is a clickable link. With this option, the entire reference (like 'Figure 3.2') will be a link. Recommended.

'''Customizing the cross refence types'''<<BR>>
The cross-reference name for a given cross-reference type is customised using the {{{\crefname}}} and {{{\Crefname}}} commands:
  {{{\crefname{}}}<''type''>{{{}{}}}<''singular''>{{{}{}}}<''plural''>{{{}}}}

  {{{\Crefname{}}}<''type''>{{{}{}}}<''singular''>{{{}{}}}<''plural''>{{{}}}}
In most cases you don't need this, because the names are already reasonable, but there is one change that is recommended. The package author has chosen equation references to look like 'Equation (3.2)', but the common convention in our field is just '(3.2)'. You should therefore include the statement
  {{{\crefname{equation}{}{}}}}
in the preamble. Note that you should not change {{{\Crefname}}}, because beginning-of-sentence references should be the default full form 'Equation 3.2'.

Recommended LaTeX packages

This section describes packages that are recommended as extra packages in a thesis at the department. In all cases, check the original documentation using the command

  • texdoc <package name>

in a terminal window.

\usepackage{cleveref}

Using standard cross-referencing in LaTeX only produces the label number, a name describing the label such as figure, chapter or equation has to be added manually. The cleveref package overcomes this limitation by automatically producing the label name and number. The reference commands should be \cref in most cases, and \Cref for beginning-of-sentence references. Recommended options:

  • [capitalize] capitalizes the cross-reference name, i.e. Figure 3.2 and not figure 3.2, in all positions. Recommended.

    [noabbrev] use the unabbreviated forms of the cross reference, i.e. Figure 3.2 and not Fig. 3.2 in all positions. Recommended.

    [nameinlink] When using the package {hyperref} (see below), all cross references will be turned into hyperlinks. By default, only the number is a clickable link. With this option, the entire reference (like 'Figure 3.2') will be a link. Recommended.

Customizing the cross refence types
The cross-reference name for a given cross-reference type is customised using the \crefname and \Crefname commands:

  • \crefname{<type>}{<singular>}{<plural>}

    \Crefname{<type>}{<singular>}{<plural>}

In most cases you don't need this, because the names are already reasonable, but there is one change that is recommended. The package author has chosen equation references to look like 'Equation (3.2)', but the common convention in our field is just '(3.2)'. You should therefore include the statement

  • \crefname{equation}{}{}

in the preamble. Note that you should not change \Crefname, because beginning-of-sentence references should be the default full form 'Equation 3.2'.

Computer/Latex/Recommended (last edited 2022-06-01 12:49:09 by leif)