Fix compilation with Codium

This commit is contained in:
Matteo Settenvini 2020-11-14 19:20:06 +01:00
parent d989762d5f
commit 84eea8e2f9
7 changed files with 74 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
!/.gitignore !/.gitignore
!/.gitlab-ci.yml !/.gitlab-ci.yml
!/.latexmkrc !/.latexmkrc
!/.vscode/settings.json
!*/ !*/
!*.tex !*.tex

View File

@ -5,7 +5,8 @@ build:
stage: build stage: build
image: texlive/texlive:latest image: texlive/texlive:latest
script: script:
- latexmk -pdfxe -jobname="manuale-italiano" main.tex - latexmk -jobname="manuale-italiano"
- mv build/manuale-italiano.pdf .
artifacts: artifacts:
paths: paths:
- ./manuale-italiano.pdf - ./manuale-italiano.pdf

View File

@ -1 +1,8 @@
$pdflatex=q/xelatex -synctex=1 %O %S/ @default_files = ('main');
$jobname = 'manuale-italiano';
$pdf_mode = 5;
$xelatex = 'xelatex -synctex=1 %O %P';
$out_dir = 'build';
$pdf_previewer = 'xdg-open';
$pre_tex_code = '\newcommand*\GermanTranslation{}';

25
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,25 @@
{
"latex-workshop.latex.outDir": "%DIR%/build",
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.recipe.default": "latexmk",
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk_rconly"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk_rconly",
"command": "latexmk",
"args": [
"-interaction=nonstopmode",
"-pv",
"%DOC%"
],
"env": {}
},
]
}

17
definitions.tex Normal file
View File

@ -0,0 +1,17 @@
\newcommand\gm{\textit{(m.)} }
\newcommand\gf{\textit{(f.)} }
\newenvironment{translation}[1]{%
\def\switchtolang{#1}
% TODO: for now we accept only german, else proper case handling needed:
\ifdefined\GermanTranslation
\begin{adjustwidth}{.1\textwidth}{}
\begin{\switchtolang}
\itshape
}{%
\end{\switchtolang}
\end{adjustwidth}
\else % do not translate
% No output
\fi
}

View File

@ -1,6 +1,8 @@
\usepackage[xetex,nomarginpar,margin=2cm,%showframe% \usepackage[xetex,nomarginpar,margin=2cm,%showframe%
]{geometry} ]{geometry}
\usepackage{ifthen}
\usepackage{tipa} \usepackage{tipa}
\usepackage{tipx} \usepackage{tipx}
\usepackage{fontspec} \usepackage{fontspec}
@ -24,13 +26,25 @@
\let\endoldlongtable\endlongtable \let\endoldlongtable\endlongtable
\renewenvironment{longtable}{\rowcolors{2}{white}{lightgray}\oldlongtable} {\endoldlongtable} \renewenvironment{longtable}{\rowcolors{2}{white}{lightgray}\oldlongtable} {\endoldlongtable}
\usepackage[pdfusetitle]{hyperref}
\hypersetup{
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=1,
colorlinks=true,
pdfstartview=Fit,
pdfpagemode=UseOutlines,
pdfpagelayout=TwoPageRight,
linkcolor=blue,
urlcolor=blue
}
% Activate as last: % Activate as last:
\usepackage{polyglossia} \usepackage{polyglossia}
\setmainlanguage{italian} \setmainlanguage{italian}
\setotherlanguage{german} \setotherlanguage{german}
\setotherlanguage[variant=american]{english} \setotherlanguage[variant=american]{english}
\newcommand\gm{\textit{(m.)} }
\newcommand\gf{\textit{(f.)} }
\usepackage{lipsum} \usepackage{lipsum}
\input{definitions}

View File

@ -20,6 +20,10 @@ il suffisso ``-isc-'' prima della desinenza. Per esempio: dorm\textbf{o}
(dormire) contro pul\textbf{isco} (pulire). Purtroppo non vi è una regola (dormire) contro pul\textbf{isco} (pulire). Purtroppo non vi è una regola
fissa. fissa.
%\begin{translation}{german}
% Translation goes here.
%\end{translation}
\nopagebreak\medskip \nopagebreak\medskip
\begin{table}[H] \begin{table}[H]