diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex b/Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex index 6a3a9d122e6..c37c9e24dff 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/source/latex/l3kernel/l3styleguide.tex @@ -89,7 +89,7 @@ few points to highlight: |\(...\)|. \end{itemize} -Line length in the source files should to be under $80$ +Line length in the source files should be under $80$ characters where possible, as this helps keep everything on the screen when editing files. In the \file{dtx} format, documentation lines start with a \texttt{\%}, which is usually followed by a space to leave a @@ -119,11 +119,11 @@ used, as shown in the preceding example. The requirement for less than $80$ characters per line applies to the code itself as well as the surrounding documentation. A number of the general -style principals for \LaTeX3 code apply: these are described in the following +style principles for \LaTeX3 code apply: these are described in the following paragraph and an example is then given. With the exception of simple runs of parameter (|{#1}|, |#1#2|, -\emph{etc.}), everything should divided up using spaces to make the code +\emph{etc.}), everything should be divided up using spaces to make the code more readable. In general, these will be single spaces, but in some places it makes more sense to align parts of the code to emphasise similarity. (Tabs should not be used for introducing white space.) @@ -148,7 +148,7 @@ look like the example: { \module_foo_aux:n { X #2 } } { \module_foo_aux:nn {#1} {#2} - \module_foo_aux:n {#1#2} + \module_foo_aux:n { #1 #2 } } } \end{verbatim*} @@ -174,7 +174,7 @@ which has an \texttt{N}-type first argument: \cs_generate_variant:Nn \foo:Nn { c , cV , co } \end{verbatim} -There are cases where omitting braces from \texttt{o}-type arguments +There may be cases where omitting braces from \texttt{o}-type arguments is desirable for performance reasons. This should only be done if the argument is a single token, thus for example \begin{verbatim} @@ -205,7 +205,7 @@ then written in the form \section{Auxiliary functions} -In general, the team encourage the use of descriptive names in \LaTeX3 code. +In general, the team encourages the use of descriptive names in \LaTeX3 code. Thus many helper functions will have names which describe briefly what they do, rather than simply indicating that they are auxiliary to some higher-level function. However, there are places where one or more \texttt{aux} functions |