Use \import for chapters

This commit is contained in:
2024-06-26 12:01:15 +02:00
parent eb0872bb98
commit c376cbddfc
2 changed files with 24 additions and 23 deletions

View File

@@ -5,5 +5,5 @@ Compile `main.tex` using either `pdflatex` with `biblatex` or `lualatex` (recomm
You may need to install the following packages: You may need to install the following packages:
```bash ```bash
tlmgr install abstract acro babel-french comment epigraph eso-pic etoc inconsolata libertinus newtx nextpage sauerj sectsty shorttoc titlesec wallpaper tlmgr install abstract acro babel-french comment epigraph eso-pic etoc import inconsolata libertinus newtx nextpage sauerj sectsty shorttoc titlesec wallpaper
``` ```

View File

@@ -36,6 +36,8 @@
pdfversion=1.7 % Fix /includefigure warnings pdfversion=1.7 % Fix /includefigure warnings
} }
\usepackage{import}
\usepackage{siunitx} % For numbers with units \usepackage{siunitx} % For numbers with units
\sisetup{ \sisetup{
retain-explicit-plus=true, % Keep + in numbers retain-explicit-plus=true, % Keep + in numbers
@@ -74,11 +76,10 @@
\definechangesauthor[color=RawSienna]{CP} \definechangesauthor[color=RawSienna]{CP}
\newcommand{\CP}[1]{\comment[id=CP]{#1}} \newcommand{\CP}[1]{\comment[id=CP]{#1}}
\newcommand{\inputchapter}[1]{\clearemptydoublepage\input{#1}} % Load a chapter after a clear double page \newcommand{\inputchapter}[2]{% Load a chapter (#2) in a path (#1)
\clearemptydoublepage% after a clear double page
\newcommand{\inputchapterfigures}[2]{% Load a chapter (#2) with figures from a specific directory (#1) \graphicspath{{#1/figures/}}% with figures
\graphicspath{{#1/#2/figures/}}% \import{#1}{#2}% and relative paths \input in the chapter
\inputchapter{#1/#2/#2}%
} }
\newcommand{\mainchapter}[1]{% \newcommand{\mainchapter}[1]{%
@@ -104,33 +105,33 @@
\input{0-front/cover/cover} \input{0-front/cover/cover}
\selectlanguage{english} \selectlanguage{english}
\inputchapter{0-front/content/acknowledgement} \inputchapter{0-front/content}{acknowledgement}
\inputchapter{0-front/content/abstract} \inputchapter{0-front/content}{abstract}
\inputchapter{0-front/content/résumé} \inputchapter{0-front/content}{résumé}
\inputchapter{0-front/content/contents} \inputchapter{0-front/content}{contents}
\inputchapter{0-front/content/publications} \inputchapter{0-front/content}{publications}
\inputchapter{0-front/content/acronyms} \inputchapter{0-front/content}{acronyms}
\inputchapter{0-front/content/figures} \inputchapter{0-front/content}{figures}
\inputchapter{0-front/content/tables} \inputchapter{0-front/content}{tables}
\mainmatter \mainmatter
\input{1-introduction/part} \input{1-introduction/part}
\inputchapterfigures{1-introduction}{introduction} \inputchapter{1-introduction/introduction}{introduction}
\inputchapterfigures{1-introduction}{related-work} \inputchapter{1-introduction/related-work}{related-work}
\input{2-perception/perception} \input{2-perception/perception}
\inputchapterfigures{2-perception}{xr-perception} \inputchapter{2-perception/xr-perception}{xr-perception}
\inputchapterfigures{2-perception}{ar-textures} \inputchapter{2-perception/ar-textures}{ar-textures}
\input{3-manipulation/manipulation} \input{3-manipulation/manipulation}
\inputchapterfigures{3-manipulation}{visual-hand} \inputchapter{3-manipulation/visual-hand}{visual-hand}
\inputchapterfigures{3-manipulation}{visuo-haptic-hand} \inputchapter{3-manipulation/visuo-haptic-hand}{visuo-haptic-hand}
\input{4-conclusion/part} \input{4-conclusion/part}
\inputchapter{4-conclusion/conclusion} \inputchapter{4-conclusion}{conclusion}
\backmatter \backmatter
\inputchapter{4-conclusion/bibliography} \inputchapter{4-conclusion}{bibliography}
\inputchapter{4-conclusion/backcover/backcover} \inputchapter{4-conclusion/backcover/}{backcover}
\end{document} \end{document}