TransWikia.com

Different outputs for documents built on different Texlive versions

TeX - LaTeX Asked on April 25, 2021

With this minimal example:

documentclass{article}
usepackage{parskip}
usepackage{titlesec}

titlespacing*{section}{0pt}{1ex plus .2ex minus 0.1ex}{1ex plus .2ex minus 0.1ex}
titlespacing*{subsection}{0pt}{1ex plus .2ex minus 0.1ex}{1ex plus .2ex minus 0.1ex}

begin{document}
section{Foo}
Lorem.
subsection{Foobar}
Ipsum.
section{Bar}
Dolor.
end{document}

I don’t get the same output with two different Docker images. With one build the spacings before and after the titles are bigger. I am using these two docker images. I noticed the issue when my CI generated a 3 pages document when I was generating a 2 pages document locally.

$ docker images --digests | grep nowox/latex
nowox/latex 1.0    sha256:4743340934972f31e0bbfaeafda1202c0c94f442251595c9c91f83a7aa02bd5f 2 weeks ago    1.9GB
nowox/latex <none> sha256:252e2811d18e8b69dbe036a789c109cbfa72e4a9397eaa84e07fb0cc12cdc10d 12 months ago  2.43GB

To run LaTeX I use :

docker run -v$(pwd)/home -w/home <image-id> xelatex test.tex

Is there an issue with my way of setting the spacing or is there an issue with these packages?

Here the listfiles for the latter version:

$ docker run -v$(pwd):/home -w/home 019287608dc1 xelatex tutu.tex
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Debian) 
 restricted write18 enabled.
entering extended mode

LaTeX2e <2018-12-01>
...
 *File List*
 article.cls    2018/09/03 v1.4i Standard LaTeX document class
  size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
titlesec.sty    2016/03/21 v2.10.2 Sectioning titles
 parskip.sty    2019-01-16 v2.0c non-zero parskip adjustments
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
etoolbox.sty    2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
 ***********

The the output for the former one:

$ docker run -v$(pwd):/home -w/home 2d2b58e23f53 xelatex tutu.tex
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/Debian) 
 restricted write18 enabled.
entering extended mode

LaTeX2e <2017-04-15>
...    
 *File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
titlesec.sty    2016/03/21 v2.10.2 Sectioning titles
 parskip.sty    2001/04/09 non-zero parskip adjustments
 ***********

I realized I made a change to my Dockerfile without changing its tag, so the latter version has this Dockerfile:

FROM ubuntu:bionic
LABEL maintainer="Yves Chevallier <[email protected]>"

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y make
RUN apt-get install -y texlive-xetex
RUN apt-get install -y texlive-lang-french
RUN apt-get install -y texlive-fonts-extra
RUN apt-get install -y latexmk

RUN rm -rf /var/lib/apt/lists/*
ENV USER=latex

And I think the former one should differ only by the version of ubuntu used.

One Answer

As you can tell from the versions of the loaded packages, the parskip package has been updated recently. One of the things it does is remove extra space in titles that the previous version (which dates back to 2001) did. To quote from the new documentation:

If the package is used without any options or just with the option parfill it behaves like the earlier version, except that now the spacing around headings is also adjusted (not adding extra parskip).

You can replicate the older version behaviour with the new version by specifying an explicit release version when loading the package:

usepackage{parskip}[=v1]

You can't replicate the new behaviour with the old package, but you could install the newer version into the local texmf folder of the older image.

Correct answer by Alan Munn on April 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP