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

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