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
\diffref and \diffrefs now take a comma-separated list of references. #2239
Conversation
How does one determine if they have LaTeX 3? |
@zygoloid Well, if you have the Or just try compiling the PDF. If it works, then you know. :-) |
e3dbfe2
to
1a21a65
Compare
Reviewers: please can you check whether this works for your LaTeX environment? |
@godbyk: 1) please rebase, 2) please check readmes, travises, makefiles etc for whether lists of required packages need to be updated. |
source/compatibility.tex
Outdated
@@ -1151,7 +1151,7 @@ | |||
that interacts with newer \Cpp{} code using regions declared reachable may | |||
have different runtime behavior. | |||
|
|||
\diffrefs{refwrap}{arithmetic.operations}, \ref{comparisons}, | |||
\diffref{refwrap,arithmetic.operations,comparisons}, | |||
\ref{logical.operations}, \ref{bitwise.operations} |
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.
There are additional \ref
s here.
Please also check the other cases, I haven't looked thoroughly.
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.
Good catch! I didn't notice any others.
@tkoeppe Done and done. I updated the packages lists in the README by checking the contents of the packages through each distro's website. I haven't actually tested the build on each distro. |
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.
Works for me.
source/macros.tex
Outdated
@@ -337,8 +337,24 @@ | |||
|
|||
%% Change descriptions | |||
\newcommand{\diffdef}[1]{\hfill\break\textbf{#1:}\space} | |||
\newcommand{\diffref}[1]{\pnum\textbf{Affected subclause:} \ref{#1}} | |||
\newcommand{\diffrefs}[2]{\pnum\textbf{Affected subclauses:} \ref{#1}, \ref{#2}} | |||
\RequirePackage{expl3,xparse} |
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.
I'd prefer this to be \usepackage items in std.tex so that the list of required packages is clearly visible where a (LaTeX 2) person would expect it.
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.
@jensmaurer Done!
Needs rebase again I'm afraid. |
@Eelis Is it a good time to rebase or are there a bunch more merges imminent? |
I'm not sure, sorry. @zygoloid probably knows. |
Since the latest working paper candidate has just been created from these sources, now is probably a good time to rebase. There shouldn't be many large changes that are currently eligible for consideration. |
@zygoloid, can we make progress here, and either take it or leave it? (I like the regularity with the change.) |
Removed list of packages from Makefile as they were outdated and are better documented in the README.
An improvement to #2236: The
\diffref
and\diffrefs
macros now take a single argument, a comma-separated list of references.The only difference in output is that now the word and is inserted prior to the penultimate reference if there are more than one. For example:
\diffrefs{complex.numbers}
Notes
\diffref
and\diffrefs
macros are exactly equivalent and may be used interchangeably. We can also remove one if you prefer.expl3
(LaTeX 3) macros for the comma-separated list processing. While there are other packages we could use, this one provides better functionality and more facilities for improving other macros in the future. I would love to be able to take advantage ofexpl3
, but if you prefer to stick to LaTeX 2-based packages, I can rewrite the code to use one of them instead. (Note that usingexpl3
doesn't require using a newpdflatex
binary. It's just a set of newer macros built atop the existing engines.)