2

I have a rather long document (approx. 300 pages) which I have started to create with pdfLaTeX and Libertine, but now I have switched to XeLaTeX and Libertinus for several reasons (mostly math and unicode related).

If I understand correctly, both engines and both fonts should produce the same output as Libertinus is said to be a metric aquivalent replacement for Libertine.

However, the result with XeLaTex and Libertinus is typographically not as good as pdfLaTeX and Libertine. Inter alia

  • XeLaTeX and Libertinus create more hyphenated words
  • XeLaTeX and Libertinus put less words into a single line
  • XeLaTeX and Libertinus create more underful boxes (cp. item before)
  • Regarding vertical spacing: XeLaTeX sometimes puts less lines and paragaphs onto a single page causing really big and unpleasant vertical spaces between the remaining paragraphs

All in all, with XeLaTeX and Libertinus the document is 4 pages longer and visually not as pleasing as with pdfLaTeX.

Unfortunately, it is a little bit difficult to create a MWE, because the really ugly things happen after tenth of pages. However, some of the effects are already visible in the abstract:

MWE for pdfLaTeX:

\documentclass[
  a4paper,
  fontsize=11pt,
  version=last,
  BCOR=15mm,
  DIV=12,
  american%
]{scrbook}

\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[final]{microtype}

\begin{document}
\addchap{Abstract pdfLaTeX with Libertine}

In numerous user-centric, cyber-physical systems, point collection and redemption mechanisms are a core component.
Loosely speaking, this component or building block may be viewed as personal ``piggy bank'' that allows users to deposit and disburse points.
Depending on the context, points might be interpreted in numerous ways:
monetary units (e.g.\@ Euro cents), loyality rating points, reliability credits, etc.
This thesis deals with the problem of \emph{anonymous} point collection.

First and foremost, this thesis is unarguably the most comprehensive treatment of anonymous point collection as a generic building block in a formally precise manner with a rigorous security model and proof.
Cryptography does not only deal with the confidentiality or authenticity of messages, but also with the provable security of complex systems.
Cryptography has shown that---in principle---any computable function whose inputs might be distributed across mutual distrustful parties can be securely evaluated using so-called secure multi-party computation (MPC).
However, generic MPC techniques are too inefficient for real-world applications and also come with a number of other drawbacks.
Hence, research on the intersection between IT security and cryptography considers tailor-made building blocks which allow both a practically efficient realization but are also provably secure with respect to a precise definition.
To this end, a definition of anonymous point collection is carved out which significantly improves on previous attemps.
\end{document}

MWE for XeLaTeX:

\documentclass[
  a4paper,
  fontsize=11pt,
  version=last,
  BCOR=15mm,
  DIV=12,
  american%
]{scrbook}

\usepackage[defaultfeatures={Ligatures={TeX,Common,Contextual,Required,Rare}}]{libertinus}
\usepackage{babel}
\usepackage[final]{microtype}

\begin{document}
\addchap{Abstract XeLaTeX with Libertinus}

In numerous user-centric, cyber-physical systems, point collection and redemption mechanisms are a core component.
Loosely speaking, this component or building block may be viewed as personal ``piggy bank'' that allows users to deposit and disburse points.
Depending on the context, points might be interpreted in numerous ways:
monetary units (e.g.\@ Euro cents), loyality rating points, reliability credits, etc.
This thesis deals with the problem of \emph{anonymous} point collection.

First and foremost, this thesis is unarguably the most comprehensive treatment of anonymous point collection as a generic building block in a formally precise manner with a rigorous security model and proof.
Cryptography does not only deal with the confidentiality or authenticity of messages, but also with the provable security of complex systems.
Cryptography has shown that---in principle---any computable function whose inputs might be distributed across mutual distrustful parties can be securely evaluated using so-called secure multi-party computation (MPC).
However, generic MPC techniques are too inefficient for real-world applications and also come with a number of other drawbacks.
Hence, research on the intersection between IT security and cryptography considers tailor-made building blocks which allow both a practically efficient realization but are also provably secure with respect to a precise definition.
To this end, a definition of anonymous point collection is carved out which significantly improves on previous attemps.
\end{document}

Result for pdfLaTeX:

pdfLaTeX

Result for XeLaTeX:

XeLaTeX

What is causing these differences? How can I get the same result with XeLaTeX and Libertinus? Or is this expected behavior and do I have to accept the differences?

2
  • 2
    Have you tried with luatex? microtype support for xetex is limited (there is no font expansion, for example). Feb 9, 2020 at 20:44
  • 2
    >Libertinus is said to be a metric equivalent replacement for Libertine. No. libertinus is libertine with some corrections. You should be comparing libertine under pdflatex and xelatex OR libertinus under pdflatex and xelatex.
    – user22108
    Feb 9, 2020 at 21:21

1 Answer 1

4

I've processed your two MWEs with both pdflatex (without microtype) and xelatex (without defaultfeatures options) and all the outputs are identical. What you are observing are differences created by using features like microtype and defaultfeatures that are not available for the other processor. You'll just have to decide which you prefer.

3
  • Indeed, it is the mircrotype package which has only partial support for XeTeX. I have switched to LuaTeX now.
    – nagmat84
    Feb 11, 2020 at 19:43
  • @nagmat84 and the microtype issue is fixed?
    – pluton
    Jun 19, 2020 at 6:07
  • 1
    @pluton Yes and no. As user22108 writes, the set of features how microtype can adjust the spacing depends on the used engine. See the manual of microtype which features are available for what engine. The manual has a comparison chart. In general, one can say that XeLaTeX has the least support. The visual outcome between pdfLateX and LuaLaTeX still differs, because they also use different font formats (Type1 vs. OpenType) and LuaLaTex uses more ligatures. Hence, the outcome cannot be the same. However, the overall result with LuaLaTex looks more pleasant and well-balanced than XeLaTex.
    – nagmat84
    Jun 19, 2020 at 14:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .