Cheat-sheet: fix compilation

Use xelatex and don't require fonts-extra (which is 1GB) just for two 20-lines
files.
This also syncs the dependencies for the cheat-sheets which those of Catala
literate output, which is good.
This commit is contained in:
Louis Gesbert 2023-08-04 15:36:53 +02:00
parent 4cc3bd7e1d
commit 147ab62fe8
3 changed files with 11 additions and 95 deletions

View File

@ -2,7 +2,7 @@ syntax.pdf: syntax_en.pdf syntax_fr.pdf
cpdf $^ -o $@
%.pdf: %.tex logo.pdf
latexmk -pdf -halt-on-error -shell-escape $<
latexmk -xelatex -halt-on-error -shell-escape $<
clean:
latexmk -f -C *.tex

View File

@ -8,42 +8,28 @@
\usepackage{epsfig}
%\usepackage{bookman}
%\usepackage{booktabs}
\usepackage{fontspec}
\usepackage{upquote} % Uncurly the quotes
\usepackage{etoolbox} % for backquote fix
\usepackage[scaled=0.9]{DejaVuSans}
\usepackage[scaled=0.9]{DejaVuSansMono}
\usepackage{mdframed} % nice frames
\usepackage[nobottomtitles]{titlesec} % better titles
\usepackage{enumitem}
\usepackage{minted}
\usepackage[a4paper,landscape,margin=1cm,includehead,headsep=2ex,nofoot]{geometry}
\usepackage{fancyhdr}\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{array}
\usepackage[none]{hyphenat}
\usepackage[document]{ragged2e}
\usemintedstyle{tango}
\setsansfont{DejaVu Sans}[Scale=0.9]
\setmonofont{DejaVu Sans Mono}[Scale=0.9]
\setlist[itemize]{noitemsep, topsep=0pt}
\renewcommand{\MintedPygmentize}{../../_build/default/compiler/catala.exe pygmentize}
% backquote dejavu fix
\makeatletter
\chardef\straightquote@code=\catcode`'
\chardef\backquote@code=\catcode``
\catcode`'=\active \catcode``=\active
\patchcmd{\@noligs}
{\textasciigrave}
{\fixedtextasciigrave}
{}{}
\newcommand{\fixedtextasciigrave}{%
\makebox[.5em]{\fontencoding{TS1}\fontfamily{fvs}\selectfont\textasciigrave}% Vera Sans
}
\catcode\lq\'=\straightquote@code
\catcode\lq\`=\backquote@code
\makeatletter
% fancyvrb and mdframed stuff
\newmdenv[bottomline=false,rightline=false]{topleft}
\newmdenv[topline=false,leftline=false]{bottomright}
@ -59,26 +45,6 @@
}
\pagestyle{empty}
%% \makeatletter
%% \renewcommand{\section}{\@startsection{section}{1}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {0.5ex plus .2ex}%x
%% {\normalfont\large\bfseries}}
%% \renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {0.5ex plus .2ex}%
%% {\normalfont\normalsize\bfseries}}
%% \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {1ex plus .2ex}%
%% {\normalfont\small\bfseries}}
%% \makeatother
%% \makeatletter
%% \let\origsection\section
%% \renewcommand\section{\vspace{5em}\origsection}
%% \makeatother
% Don't print section numbers
\setcounter{secnumdepth}{0}
@ -125,14 +91,6 @@
\renewcommand{\familydefault}{\sfdefault} % everything sans-serif
%Url handling
\hypersetup{
colorlinks=true,
urlcolor=black,
linkcolor=black,
citecolor=black
}
% font size -> set to equivalent to footnotesize of 10 pt
% it affect only the \\normalsize command, all are still relative to default's
% article one (10pt)

View File

@ -8,42 +8,28 @@
\usepackage{epsfig}
%\usepackage{bookman}
%\usepackage{booktabs}
\usepackage{fontspec}
\usepackage{upquote} % Uncurly the quotes
\usepackage{etoolbox} % for backquote fix
\usepackage[scaled=0.9]{DejaVuSans}
\usepackage[scaled=0.9]{DejaVuSansMono}
\usepackage{mdframed} % nice frames
\usepackage[nobottomtitles]{titlesec} % better titles
\usepackage{enumitem}
\usepackage{minted}
\usepackage[a4paper,landscape,margin=1cm,includehead,headsep=2ex,nofoot]{geometry}
\usepackage{fancyhdr}\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{array}
\usepackage[none]{hyphenat}
\usepackage[document]{ragged2e}
\usemintedstyle{tango}
\setsansfont{DejaVu Sans}[Scale=0.9]
\setmonofont{DejaVu Sans Mono}[Scale=0.9]
\setlist[itemize]{noitemsep, topsep=0pt}
\renewcommand{\MintedPygmentize}{../../_build/default/compiler/catala.exe pygmentize}
% backquote dejavu fix
\makeatletter
\chardef\straightquote@code=\catcode`'
\chardef\backquote@code=\catcode``
\catcode`'=\active \catcode``=\active
\patchcmd{\@noligs}
{\textasciigrave}
{\fixedtextasciigrave}
{}{}
\newcommand{\fixedtextasciigrave}{%
\makebox[.5em]{\fontencoding{TS1}\fontfamily{fvs}\selectfont\textasciigrave}% Vera Sans
}
\catcode\lq\'=\straightquote@code
\catcode\lq\`=\backquote@code
\makeatletter
% fancyvrb and mdframed stuff
\newmdenv[bottomline=false,rightline=false]{topleft}
\newmdenv[topline=false,leftline=false]{bottomright}
@ -59,26 +45,6 @@
}
\pagestyle{empty}
%% \makeatletter
%% \renewcommand{\section}{\@startsection{section}{1}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {0.5ex plus .2ex}%x
%% {\normalfont\large\bfseries}}
%% \renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {0.5ex plus .2ex}%
%% {\normalfont\normalsize\bfseries}}
%% \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
%% {-1ex plus -.5ex minus -.2ex}%
%% {1ex plus .2ex}%
%% {\normalfont\small\bfseries}}
%% \makeatother
%% \makeatletter
%% \let\origsection\section
%% \renewcommand\section{\vspace{5em}\origsection}
%% \makeatother
% Don't print section numbers
\setcounter{secnumdepth}{0}
@ -125,14 +91,6 @@
\renewcommand{\familydefault}{\sfdefault} % everything sans-serif
%Url handling
\hypersetup{
colorlinks=true,
urlcolor=black,
linkcolor=black,
citecolor=black
}
% font size -> set to equivalent to footnotesize of 10 pt
% it affect only the \\normalsize command, all are still relative to default's
% article one (10pt)