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

Make the spec build correctly with LuaLaTeX and XeLaTeX #249

Open
daira opened this issue Jul 8, 2019 · 4 comments
Open

Make the spec build correctly with LuaLaTeX and XeLaTeX #249

daira opened this issue Jul 8, 2019 · 4 comments

Comments

@daira
Copy link
Collaborator

daira commented Jul 8, 2019

The protocol spec does build under LuaLaTeX and XeLaTeX, using the -lualatex or -xelatex option to latexmk. (XeTeX doesn't support the interpolate option to \includegraphics, but it builds if that is removed.) However the output has some problems:

  • line spacing is consistently too tight;
  • some fonts are substituted (with knock-on effects for spacing);
  • the "square plus" and "diamond plus" operators used for signature key homomorphisms are much too small;
  • some other constructed symbols have positioning problems, e.g. the R that should be above some arrows is too low;
  • \introlist doesn't seem to work;

Building correctly with LuaLaTeX and XeLaTeX is useful not so much for its own sake, but because some (not all) of these issues probably indicate areas where we are relying on bug-for-bug compatibility with pdflatex.

@daira
Copy link
Collaborator Author

daira commented Jul 8, 2019

interpolate no longer seems to make any appreciable difference, so I've removed it. I think that when I originally added it, the images were too low resolution, and/or pdfsizeopt (which is no longer used) was reducing them too much.

@daira
Copy link
Collaborator Author

daira commented Jul 8, 2019

The font substitutions were fixed by adding \fontencoding{T1} to places where I explicitly select the font using \selectfont, a described at https://tex.stackexchange.com/a/426300/78411 . (As pointed out by David Carlisle here, XeLaTeX is designed for use with TU fonts and so T1 works less well for things like hyphenation, but as it happens, I don't need line-breaking anywhere I'm using \selectfont.)

This didn't work for the use of \fontseries{b} in the \textbnx macro, but \textbnx was negligibly different fom \textbf so I replaced it with the latter.

@daira daira changed the title Make the spec build correctly with LuaLaTeX and XeTeX Make the spec build correctly with LuaLaTeX and XeLaTeX Jul 8, 2019
@daira
Copy link
Collaborator Author

daira commented Jul 8, 2019

The rest of the spacing and size issues seem to be due to the main document font, Quattrocento, being given incorrect metrics by the quattrocento package when loaded by LuaLaTeX or XeLaTex. In LuaLaTeX this can be worked around to some extent as described here. I've added a variant of this workaround, and now the spec mostly builds correctly in LuaLaTeX.

daira added a commit that referenced this issue Jul 8, 2019
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
@daira
Copy link
Collaborator Author

daira commented Jul 12, 2019

Further changes (4eed11f) were needed to make this work under TeXLive 2019. (The -lualatex and -xelatex options apparently regressed and no longer work, so alternative options were required.)

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

No branches or pull requests

1 participant