-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture newlines as \obeyedline in ltcmd #1304
Conversation
deff42b
to
259640f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only minor stuff in comments
Documentation for verb is extended here. This is a breaking change - so needs good notice. The l3doc patch will need to be transferred back to the full release.
915ab9d
to
8a87203
Compare
I shall look again at documentation to check that it explains that the whole of the content, with these line delimiters, is placed in the argument for further processing. Maybe at some stage this needs some examples of how to make use of it for various purposes. |
any characters have been made \enquote{special} and are not listed in | ||
\cs{dospecials}, an error will arise (see below). | ||
|
||
Characters are grabbed two identical delimiters: in contrast to \cs{verb}, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grabbed "between" two identical delimiters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe in full:
The characters that are grabbed as the argument are all those between two identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of relatively small suggestions.
Plus maybe some deletions, movements and better signposting needed.
|
||
When grabbing a \texttt{v}-type argument, \LaTeX{} first uses the kernel | ||
command \cs{dospecials} to turn off the \enquote{special} nature of characters. | ||
It then makes both spaces and tabs \enquote{active}, so they can be given a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better: . . . , so that they . . .
any characters have been made \enquote{special} and are not listed in | ||
\cs{dospecials}, an error will arise (see below). | ||
|
||
Characters are grabbed two identical delimiters: in contrast to \cs{verb}, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe in full:
The characters that are grabbed as the argument are all those between two identical
\cs{dospecials}, an error will arise (see below). | ||
|
||
Characters are grabbed two identical delimiters: in contrast to \cs{verb}, the | ||
characters \texttt{\textbackslash}, |{|, |}| and |%| \emph{cannot be used}. If |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better: . . . cannot be used as the delimiter character}.
any of the grabbed tokens have \enquote{special} meaning, an error will be | ||
issued. | ||
|
||
For the \texttt{+v}-type argument, which allows line breaks in input, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“input” is very misleading here:
. . . line breaks within the argument, . . .
\begin{verbatim} | ||
\renewcommand*\obeyedline{\mbox{}\par} | ||
\end{verbatim} | ||
along with other setting that may be appropriate (e.g., using a monospaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this last bit relevant here? Probably needs a new sentence explaining (roughly) that other setup may also be needed since, for example, by default no font change is inserted.
Better to end with something like this:
More information about using these arguments in typesetting is in the following subsection.
|
||
\subsection{Typesetting verbatim-like material} | ||
|
||
In contrast to \cs{verb}, the \texttt{v}-type argument is only about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this refer also explicitly to verbatim and v+ ? (Even if v-type implies these.)
The \cs{verb} command also selects a monotype font: this is not intrinsic | ||
to verbatim material, so will need to be set up using for example \cs{ttfamily}. | ||
Similarly, the \texttt{verbatim} environment sets up the meaning of \cs{par} | ||
suitable for breaking lines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe need to add:
. . . , so this may also need to be set up (see example above) ??
@@ -794,6 +794,59 @@ \subsection{Commands at the start of tabular cells} | |||
\end{tabular} | |||
\end{verbatim} | |||
|
|||
\subsection{Using the verbatim argument types} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall comment on this subsection and the next.
It is a bit confusing so that working out where useful information appears, and exactly what it applies to (v, and/or v+).
issued. | ||
|
||
For the \texttt{+v}-type argument, which allows line breaks in input, | ||
newline characters are converted into \cs{obeyedline} commands. This means that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to explain the normal meaning of “obeyedline” here, thus:
Since \cs{obeyedline} is b default defined as . . . . , this allows . . . to be used directly . . .
In contrast to \cs{verb}, the \texttt{v}-type argument is only about | ||
\emph{grabbing} the argument, not \emph{typesetting} it. As such, features that | ||
users often associate with \enquote{verbatim} are not automatically activated, | ||
e.g., a monospaced font. Material grabbed by the \texttt{v}-type argument does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. . . e.g., selecting a monospaced . . .
Maybe the large difference (one does typesetting, the other simply prepares/processes the content of an argument) between verb/verbatim and these “v-type” args needs to be presented more definitely upfront; rather than by multiple references throughout. |
READ ME FIRST: Please understand that in most cases we will not be able to merge a pull request because there are a lot of internal activities needed when updating the LaTeX2e sources. If you have a code suggestion please discuss it with the team first.
Pull requests in this repository are intended for LaTeX Team members only.
Internal housekeeping
Status of pull request
Checklist of required changes before merge will be approved
\changes
entries in source includedchanges.txt
updatedltnewsX.tex
(and/orlatexchanges.tex
) updated