Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mikeshulman
Copy link
Contributor

No description provided.

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.
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor

@JasonGross JasonGross May 24, 2023

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

Suggested change
\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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants