1
0
Fork 0

tex,flake: ensure pdf-a compat using lualatex

This commit is contained in:
leo 2023-05-23 22:48:29 +02:00
parent f778ff7455
commit 1b60d67d2b
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
2 changed files with 30 additions and 18 deletions

View File

@ -52,7 +52,7 @@
mkdir "$out"
# initial latex compile.
pdflatex -synctex=1 -file-line-error \
lualatex -synctex=1 -file-line-error \
-interaction=nonstopmode -output-directory=$out thesis.tex
# handle bibliography.
@ -64,7 +64,7 @@
-pvc \
-outdir="$out" \
-pdf \
-pdflatex="pdflatex -synctex=1 -file-line-error -interaction=nonstopmode" \
-pdflatex="lualatex -synctex=1 -file-line-error -interaction=nonstopmode" \
-use-make thesis.tex
rm -r "$out"
'';
@ -149,7 +149,7 @@
out=".latexmkout"
mkdir "$out"
pdflatex -synctex=1 -file-line-error \
lualatex -synctex=1 -file-line-error \
-interaction=nonstopmode -output-directory=$out thesis.tex
# handle bibliography.
@ -160,7 +160,7 @@
-pvc \
-outdir="$out" \
-pdf \
-pdflatex="pdflatex -synctex=1 -file-line-error -interaction=nonstopmode" \
-pdflatex="lualatex -synctex=1 -file-line-error -interaction=nonstopmode" \
-use-make thesis.tex
# clean up

View File

@ -42,10 +42,13 @@
% TODO(me):
% have this disabled when building draft documents with Nix - issue with
% everyshi version bundled in TexLive `ms` package that Nix bundles.
% \usepackage{hyperxmp} % Pro aplikaci standardu PDF/A
\usepackage{hyperxmp}[2020/03/01] % Pro aplikaci standardu PDF/A
\usepackage{pdfpages} % include raw PDF files directly
\usepackage{makecell} % multiline table cells
\usepackage{colorprofiles}
% \usepackage[a-2b,mathxmp]{pdfx}[2018/12/22]
% for pdflatex only
%\pdfminorversion=4
%\pdfobjcompresslevel=0
@ -137,7 +140,8 @@
}
\expandafter\convertDate\pdfcreationdate
\pdfminorversion 4
% for pdflatex only
% \pdfminorversion 4
\immediate\pdfobj stream attr{/N 3} file{graphics/sRGBIEC1966-2.1.icm}
\pdfcatalog{%
@ -176,8 +180,8 @@
pdfkeywords={\klicovaslovacz},
%pdfproducer={pdfTeX-1.40.20},
pdflang=la,
% pdfapart=3,
% pdfaconformance=B,
pdfapart=3,
pdfaconformance=B,
pdflang={cz}
% use breaklinks to make have long bibtex urls broken
% otherwise they go over the margin (known issue)
@ -194,20 +198,28 @@
pdfkeywords={\klicovaslovaen},
%pdfproducer={pdfTeX-1.40.20},
pdflang=la,
% pdfapart=3,
% pdfaconformance=B,
pdflang={en},
pdfapart=3,
pdfaconformance=B,
pdflang={en-GB},
% use breaklinks to make have long bibtex urls broken
% otherwise they go over the margin (known issue)
breaklinks=true
}
\fi \fi
% TODO(me):
% include in the final (non-draft version of the document)
% \makeatletter
% \includexmp{tex/pdfa-1b}
% \makeatother
% https://tex.stackexchange.com/questions/42641/can-pdflatex-produce-pdf-a?noredirect=1&lq=1
% https://webpages.tuni.fi/latex/pdfa-guide.pdf
% \begin{filecontents*}[overwrite]{\jobname.xmpdata}
% \Title{\nazeven}
% \Author{\autor}
% \Language{en-GB}
% \Subject{\abstrakten}
% \Keywords{\klicovaslovaen}
% \end{filecontents*}
%
% \makeatletter
% \includexmp{tex/pdfa-1b}
% \makeatother
}
@ -802,7 +814,7 @@
%\addto\captionsczech{\renewcommand{\tablename}{Tab.}}
\renewcommand{\cftfigpresnum}{Obr. }
\else \ifenglish
\usepackage[english]{babel}
\usepackage[UKenglish]{babel}
% Vlastni definice nazvu
\addto\captionsenglish{\renewcommand{\contentsname}{\MakeTextUppercase{Table of Contents}}}
\addto\captionsenglish{\renewcommand{\refname}{\MakeTextUppercase{References}}}