TransWikia.com

How to use mylatexformat to precompile headers with lualatex?

TeX - LaTeX Asked on December 9, 2020

I would like to use mylatexformat to precompile headers without having to put them into a separate preamble.tex.

This works fine with pdflatex – can I do the same with lualatex? This is what I have tried in bug.tex:

documentclass{article}
usepackage{datetime2}
% usepackage{microtype}
% usepackage{tikz}
begin{document}
DTMnow
end{document}

I build this file using

lualatex -ini -jobname="bug" "&lualatex" mylatexformat.ltx bug.tex
lualatex --fmt="bug.fmt" bug.tex

This works fine.

However, enabling various packages leads to very different errors:

  • microtype:
(/home/bers/opt/texlive/2020/texmf-dist/tex/latex/microtype/mt-LatinModernRom
an.cfg[directlua]:1: attempt to index a nil value (global 'microtype')
stack traceback:
        [directlua]:1: in main chunk.
MT@ifstreq ...{microtype.if_str_eq([[#1]],[[#2]])}
                                                  endcsname 
l.105    }
  • tikz:
(/home/bers/opt/texlive/2020/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cf
g)) [1{/home/bers/opt/texlive/2020/texmf-var/fonts/map/pdftex/updmap/pdftex.m
ap}]
! error:  (pdf backend): referenced object has wrong type others; should be obj

!  ==> Fatal error occurred, no output PDF file produced!

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