-
Notifications
You must be signed in to change notification settings - Fork 360
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
fractional theorem numbers; see #601 #613
base: master
Are you sure you want to change the base?
Conversation
We ask the reader's forgiveness for any such infelicities, and welcome suggestions for improvement. | ||
% | ||
Errata and updated copies are available at \url{http://homotopytypetheory.org/book}; | ||
the copy you are now reading is version \texttt{\OPTversion}and incorporates all errata with prior versions. |
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 there be a space between }
and and
?
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.
Unfortunately, the script that makes version.tex
includes a linebreak in the definition of \OPTversion
. So putting a space here resulted in a double-width space in the output.
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.
Well, how about if we fix the script instead?
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.
Feel free; that's your bailiwick.
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.
If you want to fix the script, here is one possibility (I haven't actually tested it, but I'm pretty sure it'll work):
version.tex:
/bin/echo -n '\newcommand{\OPTversion}{' > version.tex
/bin/echo -n "$$(git describe --always --long)" >> version.tex
/bin/echo -n '}' >> version.tex
\@xtwo=#2 | ||
\multiply\@xtwo by \value{@newthmnum} | ||
\multiply\@xone by \value{@newthmdenom} | ||
\ifnum\@xone>\@xtwo\else\errmessage{Theorem numbers out of order}\fi |
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 don't know if you ever plan on merging this, but if you do, it might be nice to give expect errors like
\ifnum\@xone>\@xtwo\else\errmessage{Theorem numbers out of order}\fi | |
\ifnum\@xone>\@xtwo\else\errmessage{Theorem numbers out of order: #1/#2 <= \arabic{@newthmnum} / \arabic{@newthmdenom}}\fi |
(Or maybe we want \the\value
instead of \arabic
?)
No description provided.