flake: bump nixpkgs, re-enable FiraCode+fontspec
* make sure lualatex is used consistently * add checks for tex engine used and enable options conditionally
This commit is contained in:
parent
866feed655
commit
58748a992a
@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668288759,
|
"lastModified": 1689174082,
|
||||||
"narHash": "sha256-olmFmG3er2sYTnwcZSjfxf/SiZo9mNgfGVA/O05DIIg=",
|
"narHash": "sha256-8Xs1HEoptV84Ob4zcfuFY+JUn7PbjnsYce/3YUmlMJ0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "eda76eb80e5a98f1cfdfe925032aae251f812eef",
|
"rev": "9a1074ae6b2e76f8c1ae69a5c467f4097de85516",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
pdflatex -synctex=1 -file-line-error \
|
lualatex -synctex=1 -file-line-error \
|
||||||
-interaction=nonstopmode -output-directory=$out thesis.tex
|
-interaction=nonstopmode -output-directory=$out thesis.tex
|
||||||
|
|
||||||
# handle bibliography.
|
# handle bibliography.
|
||||||
@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
latexmk \
|
latexmk \
|
||||||
-pdf \
|
-pdf \
|
||||||
-pdflatex="pdflatex -file-line-error -interaction=nonstopmode" \
|
-pdflatex="lualatex -file-line-error -interaction=nonstopmode" \
|
||||||
-use-make thesis.tex
|
-use-make thesis.tex
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
68
tex/UTB.tex
68
tex/UTB.tex
@ -9,8 +9,15 @@
|
|||||||
% =========================================================================== %
|
% =========================================================================== %
|
||||||
% BALÍČKY
|
% BALÍČKY
|
||||||
|
|
||||||
%\usepackage[czech,english]{babel} % volba při kompilaci latexem (vyžaduje texlive-lang), zakomentovano, nastavovanu prikazem \nastavjazyk
|
\usepackage[czech,english]{babel} % volba při kompilaci latexem (vyžaduje texlive-lang), zakomentovano, nastavovanu prikazem \nastavjazyk
|
||||||
|
% \usepackage{draftwatermark}
|
||||||
|
\usepackage{iftex}
|
||||||
|
\iflualatex \OR \ifxelatex
|
||||||
|
\usepackage[T1]{fontspec}
|
||||||
|
\fi
|
||||||
|
\ifpdftex \OR \pdflatex
|
||||||
\usepackage[T1]{fontenc}% definice vnitřního kódování
|
\usepackage[T1]{fontenc}% definice vnitřního kódování
|
||||||
|
\fi
|
||||||
\usepackage[utf8]{inputenc} % slouží pro definici kódování (při problémech zkusit zaměnit utf8x za utf8)
|
\usepackage[utf8]{inputenc} % slouží pro definici kódování (při problémech zkusit zaměnit utf8x za utf8)
|
||||||
\usepackage{color} % umožňuje použití barev
|
\usepackage{color} % umožňuje použití barev
|
||||||
\usepackage{graphicx} % rozšíření práce s grafikou
|
\usepackage{graphicx} % rozšíření práce s grafikou
|
||||||
@ -34,26 +41,25 @@
|
|||||||
%\usepackage{makeidx} % vytvoří rejstřík
|
%\usepackage{makeidx} % vytvoří rejstřík
|
||||||
\usepackage[pdftex,pdfa,hidelinks,breaklinks]{hyperref} % vytváří křížové odkazy
|
\usepackage[pdftex,pdfa,hidelinks,breaklinks]{hyperref} % vytváří křížové odkazy
|
||||||
%\usepackage{multicol} % vícesloupcová sazba
|
%\usepackage{multicol} % vícesloupcová sazba
|
||||||
%\usepackage{flafter} % zajistí, aby se plovoucí objekty objevovali až za jejich umístěním v textu
|
\usepackage{flafter} % zajistí, aby se plovoucí objekty objevovali až za jejich umístěním v textu
|
||||||
\usepackage{chngcntr} % Umožňuje změnu nastavení číslování obrázků, tabulek i rovnic
|
\usepackage{chngcntr} % Umožňuje změnu nastavení číslování obrázků, tabulek i rovnic
|
||||||
\usepackage{etoolbox} % Tool-box for LaTeX programmers
|
\usepackage{etoolbox} % Tool-box for LaTeX programmers
|
||||||
\usepackage[labelsep=space,tableposition=bottom,justification=centering]{caption} % Přenastavení popisků u figur a tabulek
|
\usepackage[labelsep=space,tableposition=bottom,justification=centering]{caption} % Přenastavení popisků u figur a tabulek
|
||||||
\usepackage{xmpincl} % Pro aplikaci standardu PDF/A
|
\usepackage{xmpincl} % Pro aplikaci standardu PDF/A
|
||||||
% 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}[2020/03/01] % Pro aplikaci standardu PDF/A
|
\usepackage{hyperxmp}[2020/03/01] % Pro aplikaci standardu PDF/A
|
||||||
\usepackage{pdfpages} % include raw PDF files directly
|
\usepackage{pdfpages} % include raw PDF files directly
|
||||||
\usepackage{makecell} % multiline table cells
|
\usepackage{makecell} % multiline table cells
|
||||||
\usepackage{colorprofiles}
|
\usepackage{colorprofiles}
|
||||||
% \usepackage[a-2b,mathxmp]{pdfx}[2018/12/22]
|
% \usepackage[a-2b,mathxmp]{pdfx}[2018/12/22] % ignore the misadvice that this needs to be placed before hyperref
|
||||||
|
|
||||||
% \usepackage{fontspec}
|
% needs fontspec, i.e. also needs lualatex (or xelatex), not pdflatex.
|
||||||
%\setmonofont{Fira Code}[
|
\iflualatex \OR \ifxelatex
|
||||||
% Scale=MatchLowercase,
|
\setmonofont{Fira Code}[
|
||||||
% Contextuals=Alternate % Activate the calt feature
|
Scale=MatchLowercase,
|
||||||
%]
|
Contextuals=Alternate % Activate the calt feature
|
||||||
% \usepackage{lstfiracode} % https://ctan.org/pkg/lstfiracode
|
]
|
||||||
|
\fi
|
||||||
|
\usepackage{lstfiracode} % https://ctan.org/pkg/lstfiracode
|
||||||
% listings settings.
|
% listings settings.
|
||||||
\lstset{
|
\lstset{
|
||||||
%style=FiraCodeStyle, % Use predefined FiraCodeStyle
|
%style=FiraCodeStyle, % Use predefined FiraCodeStyle
|
||||||
@ -202,7 +208,7 @@
|
|||||||
\providecommand{\xmpCreatorTool}{}%pdfTeX
|
\providecommand{\xmpCreatorTool}{}%pdfTeX
|
||||||
|
|
||||||
\newcommand{\aplikujpdfa}{
|
\newcommand{\aplikujpdfa}{
|
||||||
\ifczech
|
\ifczech
|
||||||
\providecommand{\xmpTitle}{\nazevcz}
|
\providecommand{\xmpTitle}{\nazevcz}
|
||||||
\providecommand{\xmpAuthor}{\autor}
|
\providecommand{\xmpAuthor}{\autor}
|
||||||
\providecommand{\xmpKeywords}{\klicovaslovacz}
|
\providecommand{\xmpKeywords}{\klicovaslovacz}
|
||||||
@ -220,7 +226,7 @@
|
|||||||
% otherwise they go over the margin (known issue)
|
% otherwise they go over the margin (known issue)
|
||||||
breaklinks=true
|
breaklinks=true
|
||||||
}
|
}
|
||||||
\else \ifenglish
|
\else \ifenglish
|
||||||
\providecommand{\xmpTitle}{\nazeven}
|
\providecommand{\xmpTitle}{\nazeven}
|
||||||
\providecommand{\xmpAuthor}{\autor}
|
\providecommand{\xmpAuthor}{\autor}
|
||||||
\providecommand{\xmpKeywords}{\klicovaslovaen}
|
\providecommand{\xmpKeywords}{\klicovaslovaen}
|
||||||
@ -240,16 +246,17 @@
|
|||||||
}
|
}
|
||||||
\fi \fi
|
\fi \fi
|
||||||
|
|
||||||
% https://tex.stackexchange.com/questions/42641/can-pdflatex-produce-pdf-a?noredirect=1&lq=1
|
%% https://tex.stackexchange.com/questions/42641/can-pdflatex-produce-pdf-a?noredirect=1&lq=1
|
||||||
% https://webpages.tuni.fi/latex/pdfa-guide.pdf
|
%% https://webpages.tuni.fi/latex/pdfa-guide.pdf
|
||||||
% \begin{filecontents*}[overwrite]{\jobname.xmpdata}
|
% % \begin{filecontents*}[overwrite]{\jobname.xmpdata}
|
||||||
% \Title{\nazeven}
|
% \begin{filecontents*}[overwrite]{tex/pdfa-1b.xmpi}
|
||||||
% \Author{\autor}
|
% \Title{\nazeven}
|
||||||
% \Language{en-GB}
|
% \Author{\autor}
|
||||||
% \Subject{\abstrakten}
|
% \Language{en-GB}
|
||||||
% \Keywords{\klicovaslovaen}
|
% \Subject{\abstrakten}
|
||||||
|
% \Keywords{\klicovaslovaen}
|
||||||
% \end{filecontents*}
|
% \end{filecontents*}
|
||||||
%
|
|
||||||
% \makeatletter
|
% \makeatletter
|
||||||
% \includexmp{tex/pdfa-1b}
|
% \includexmp{tex/pdfa-1b}
|
||||||
% \makeatother
|
% \makeatother
|
||||||
@ -686,7 +693,7 @@
|
|||||||
%{\renewcommand*\numberline[1]{Fig. \,#1\space}}
|
%{\renewcommand*\numberline[1]{Fig. \,#1\space}}
|
||||||
%\renewcommand*\l@figure{\@dottedtocline{1}{0em}{5.0em}}
|
%\renewcommand*\l@figure{\@dottedtocline{1}{0em}{5.0em}}
|
||||||
%\renewcommand*\l@table{\@dottedtocline{1}{0em}{5.0em}}
|
%\renewcommand*\l@table{\@dottedtocline{1}{0em}{5.0em}}
|
||||||
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{5.0em}{\lstlistingname\space#1}{#2}}
|
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{5.0em}{List.\space#1}{#2}}
|
||||||
|
|
||||||
% Vynulování čítačů
|
% Vynulování čítačů
|
||||||
\@addtoreset{table}{section}
|
\@addtoreset{table}{section}
|
||||||
@ -863,14 +870,14 @@
|
|||||||
\addto\captionsczech{\renewcommand{\refname}{\MakeTextUppercase{Seznam použité literatury}}}
|
\addto\captionsczech{\renewcommand{\refname}{\MakeTextUppercase{Seznam použité literatury}}}
|
||||||
\addto\captionsczech{\renewcommand{\listfigurename}{\MakeTextUppercase{Seznam obrázků}}}
|
\addto\captionsczech{\renewcommand{\listfigurename}{\MakeTextUppercase{Seznam obrázků}}}
|
||||||
\addto\captionsczech{\renewcommand{\listtablename}{\MakeTextUppercase{Seznam tabulek}}}
|
\addto\captionsczech{\renewcommand{\listtablename}{\MakeTextUppercase{Seznam tabulek}}}
|
||||||
\renewcommand{\lstlistlistingname}{\MakeTextUppercase{Seznam kódů}}
|
\addto\captionsczech{\renewcommand{\lstlistlistingname}{\MakeTextUppercase{Seznam kódů}}}
|
||||||
%\addto\captionsczech{\renewcommand{\figurename}{Obr.}}
|
%\addto\captionsczech{\renewcommand{\figurename}{Obr.}}
|
||||||
%\addto\captionsczech{\renewcommand{\tablename}{Tab.}}
|
%\addto\captionsczech{\renewcommand{\tablename}{Tab.}}
|
||||||
\renewcommand{\cftfigpresnum}{Obr. }
|
\renewcommand{\cftfigpresnum}{Obr. }
|
||||||
\else \ifenglish
|
\else \ifenglish
|
||||||
\usepackage[UKenglish]{babel}
|
\usepackage[UKenglish,slovak,czech]{babel}
|
||||||
\selectlanguage{english}
|
% \selectlanguage{english}
|
||||||
% \hyphenpenalty 7000
|
% \hyphenpenalty 5000
|
||||||
\hyphenpenalty 7000
|
\hyphenpenalty 7000
|
||||||
%\hyphenpenalty 9000
|
%\hyphenpenalty 9000
|
||||||
% \hyphenpenalty 10000
|
% \hyphenpenalty 10000
|
||||||
@ -880,9 +887,10 @@
|
|||||||
\addto\captionsenglish{\renewcommand{\refname}{\MakeTextUppercase{References}}}
|
\addto\captionsenglish{\renewcommand{\refname}{\MakeTextUppercase{References}}}
|
||||||
\addto\captionsenglish{\renewcommand{\listfigurename}{\MakeTextUppercase{List of Figures}}}
|
\addto\captionsenglish{\renewcommand{\listfigurename}{\MakeTextUppercase{List of Figures}}}
|
||||||
\addto\captionsenglish{\renewcommand{\listtablename}{\MakeTextUppercase{List of Tables}}}
|
\addto\captionsenglish{\renewcommand{\listtablename}{\MakeTextUppercase{List of Tables}}}
|
||||||
\renewcommand{\lstlistlistingname}{List of Listings}
|
\addto\captionsenglish{\renewcommand{\lstlistlistingname}{\MakeTextUppercase{List of Listings}}}
|
||||||
%\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
|
%\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
|
||||||
%\addto\captionsenglish{\renewcommand{\tablename}{Tab.}}
|
\addto\captionsenglish{\renewcommand{\tablename}{Tab.}}
|
||||||
|
\addto\captionsenglish{\renewcommand{\lstlistingname}{Listing }}
|
||||||
\renewcommand{\cftfigpresnum}{Fig. }
|
\renewcommand{\cftfigpresnum}{Fig. }
|
||||||
\fi \fi
|
\fi \fi
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
% Šablona bakalářské/diplomové práce
|
% Šablona bakalářské/diplomové práce
|
||||||
%
|
%
|
||||||
% Autor: Ing. Jozef Říha (2006-05-04), od té doby šablonu udržuje
|
% Autor: Ing. Jozef Říha (2006-05-04), od té doby šablonu udržuje
|
||||||
% Ing. Pavel Tomášek, Ph.D. (tomasek@utb.cz)
|
% Ing. Pavel Tomášek, Ph.D. (tomasek@utb.cz), ďalšie zmeny vykonal
|
||||||
|
% Adam Mirre (a_mirre AT utb DOT cz)
|
||||||
%
|
%
|
||||||
% Verze: 2021-05-04
|
% Verze: 2021-05-04
|
||||||
%
|
%
|
||||||
|
Reference in New Issue
Block a user