Better LaTeX setup

This commit is contained in:
Thomas Dehaeze 2025-02-04 23:10:59 +01:00
parent a8e88ce746
commit 7074b2bf04
5 changed files with 331 additions and 267 deletions

View File

@ -17,6 +17,9 @@
\RequirePackage{setspace} \RequirePackage{setspace}
\onehalfspacing \onehalfspacing
\usepackage{tocloft}
\setlength{\cftfignumwidth}{2.5em} % Adjust this value as needed
\usepackage{booktabs} \usepackage{booktabs}
\usepackage{multirow} \usepackage{multirow}
\usepackage{tabularx} \usepackage{tabularx}
@ -28,50 +31,12 @@
\widowpenalty = 10000 \widowpenalty = 10000
\displaywidowpenalty = 10000 \displaywidowpenalty = 10000
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
\renewcommand{\raggedpart}{\flushleft}
\setkomafont{part}{\normalfont\huge\scshape}
\setkomafont{sectioning}{\normalfont\scshape}
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\setkomafont{caption}{\small}
\setkomafont{captionlabel}{\usekomafont{caption}}
\setcounter{secnumdepth}{\subsubsectionnumdepth}
\makeatletter
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
% Section with color
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
\makeatother
\renewcommand{\floatpagefraction}{.8}% \renewcommand{\floatpagefraction}{.8}%
\usepackage{etoolbox} \usepackage{etoolbox}
\pretocmd{\section}{\clearpage}{}{} \pretocmd{\section}{\clearpage}{}{}
\usepackage[ %
colorlinks=true, %
citecolor=BrickRed, %
linkcolor=BrickRed, %
urlcolor=BrickRed, %
unicode %
]{hyperref}
\usepackage{hypcap}
\usepackage{bookmark}
\bookmarksetup{depth=2}
\makeatletter \makeatletter
\preto\Gin@extensions{png,} \preto\Gin@extensions{png,}
\DeclareGraphicsRule{.png}{pdf}{.pdf}{\noexpand\Gin@base.pdf} \DeclareGraphicsRule{.png}{pdf}{.pdf}{\noexpand\Gin@base.pdf}
@ -198,6 +163,9 @@
\AtEndEnvironment{listing}{\vspace{-16pt}} \AtEndEnvironment{listing}{\vspace{-16pt}}
\let\OldTexttt\texttt
\renewcommand{\texttt}[1]{{\ttfamily\hl{\mbox{\,#1\,}}}}
\usepackage{scrhack} \usepackage{scrhack}
\usepackage{float} \usepackage{float}
@ -207,5 +175,67 @@
\usepackage{soul} \usepackage{soul}
\sethlcolor{my-pale-grey} \sethlcolor{my-pale-grey}
% \usepackage[headsepline]{scrlayer-scrpage}
% \pagestyle{scrheadings}
\usepackage[autooneside=false,headsepline]{scrlayer-scrpage}
% \pagestyle{scrheadings}
% \automark[section]{chapter}
% Clear default header styles
\clearpairofpagestyles
\automark[section]{chapter}
% Set the header content
\ihead{\headmark} % Chapter (or section on even pages) aligned to the left
\ohead{\pagemark} % Page number aligned to the right
% Enable the page style
\pagestyle{scrheadings}
\setkomafont{headsepline}{\color{black}} % Change color if desired
\ModifyLayer[addvoffset=\dp\strutbox]{headsepline} % Fine-tune position
% \automark{section}
% \renewhead*{headings}{
% \ifstr{\headmark}{}{}{%
% \headmark\hfill
% }
% }
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
\renewcommand{\raggedpart}{\flushleft}
\setkomafont{part}{\normalfont\huge\scshape}
\setkomafont{sectioning}{\normalfont\scshape}
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\setkomafont{caption}{\small}
\setkomafont{captionlabel}{\usekomafont{caption}}
\setcounter{secnumdepth}{\subsubsectionnumdepth}
\makeatletter
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
% Section with color
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
\makeatother
\usepackage[ %
colorlinks=true, %
citecolor=BrickRed, %
linkcolor=BrickRed, %
urlcolor=BrickRed, %
unicode %
]{hyperref}
\usepackage{hypcap}
\usepackage{bookmark}
\bookmarksetup{depth=2}
\makeindex \makeindex
\makeglossaries \makeglossaries

View File

@ -55,7 +55,6 @@
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
)) ))
;; Remove automatic org heading labels ;; Remove automatic org heading labels
(defun my-latex-filter-removeOrgAutoLabels (text backend info) (defun my-latex-filter-removeOrgAutoLabels (text backend info)
"Org-mode automatically generates labels for headings despite explicit use of `#+LABEL`. This filter forcibly removes all automatically generated org-labels in headings." "Org-mode automatically generates labels for headings despite explicit use of `#+LABEL`. This filter forcibly removes all automatically generated org-labels in headings."
@ -86,11 +85,6 @@
org-ref-acronyms-before-parsing)) org-ref-acronyms-before-parsing))
#+END_SRC #+END_SRC
* Useful snippets :noexport:
- acronyms acrshort:nass acrshort:mimo acrshort:lti [[acrfull:siso][Single-Input Single-Output (SISO)]]
- glossary terms gls:ka, gls:phi.
* Glossary and Acronyms - Tables :ignore: * Glossary and Acronyms - Tables :ignore:
#+name: glossary #+name: glossary
@ -173,7 +167,6 @@
:UNNUMBERED: notoc :UNNUMBERED: notoc
:END: :END:
\gls{phi}
* Résumé * Résumé
:PROPERTIES: :PROPERTIES:
@ -198,7 +191,6 @@
* Introduction * Introduction
# [[file:/home/thomas/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/A0-nass-introduction/nass-introduction.org][NASS - Introduction]] # [[file:/home/thomas/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/A0-nass-introduction/nass-introduction.org][NASS - Introduction]]
* Conceptual Design Development * Conceptual Design Development
\minitoc \minitoc
**** Abstract **** Abstract
@ -388,8 +380,6 @@ For further analysis, 9 "configurations" of the uniaxial NASS model of Figure re
#+end_subfigure #+end_subfigure
#+end_figure #+end_figure
**** Identification of all combination of stiffnesses / masses :noexport:
*** Disturbance Identification *** Disturbance Identification
:PROPERTIES: :PROPERTIES:
:HEADER-ARGS:matlab+: :tangle matlab/uniaxial_3_disturbances.m :HEADER-ARGS:matlab+: :tangle matlab/uniaxial_3_disturbances.m
@ -734,8 +724,6 @@ Therefore, it is expected that the micro-station dynamics might impact the achie
#+end_subfigure #+end_subfigure
#+end_figure #+end_figure
**** Active Damping Controller Optimization and Damped plants :noexport:
**** Achievable Damping and Damped Plants **** Achievable Damping and Damped Plants
<<ssec:uniaxial_active_damping_achievable_damping>> <<ssec:uniaxial_active_damping_achievable_damping>>
@ -1627,8 +1615,6 @@ Physically, the negative stiffness term $-m\Omega^2$ induced by centrifugal forc
#+end_subfigure #+end_subfigure
#+end_figure #+end_figure
**** Identify Generic Dynamics :noexport:
**** System Dynamics: Effect of rotation **** System Dynamics: Effect of rotation
The system dynamics from actuator forces $[F_u, F_v]$ to the relative motion $[d_u, d_v]$ is identified for several rotating velocities. The system dynamics from actuator forces $[F_u, F_v]$ to the relative motion $[d_u, d_v]$ is identified for several rotating velocities.
Looking at the transfer function matrix $\mathbf{G}_d$ in equation eqref:eq:rotating_Gd_w0_xi_k, one can see that the two diagonal (direct) terms are equal and that the two off-diagonal (coupling) terms are opposite. Looking at the transfer function matrix $\mathbf{G}_d$ in equation eqref:eq:rotating_Gd_w0_xi_k, one can see that the two diagonal (direct) terms are equal and that the two off-diagonal (coupling) terms are opposite.
@ -1953,8 +1939,6 @@ Thus, if the added /parallel stiffness/ $k_p$ is higher than the /negative stiff
\boxed{\alpha > \frac{\Omega^2}{{\omega_0}^2} \quad \Leftrightarrow \quad k_p > m \Omega^2} \boxed{\alpha > \frac{\Omega^2}{{\omega_0}^2} \quad \Leftrightarrow \quad k_p > m \Omega^2}
\end{equation} \end{equation}
**** Identify plant with parallel stiffnesses :noexport:
**** Effect of parallel stiffness on the IFF plant **** Effect of parallel stiffness on the IFF plant
The IFF plant (transfer function from $[F_u, F_v]$ to $[f_u, f_v]$) is identified without parallel stiffness $k_p = 0$, with a small parallel stiffness $k_p < m \Omega^2$ and with a large parallel stiffness $k_p > m \Omega^2$. The IFF plant (transfer function from $[F_u, F_v]$ to $[f_u, f_v]$) is identified without parallel stiffness $k_p = 0$, with a small parallel stiffness $k_p < m \Omega^2$ and with a large parallel stiffness $k_p > m \Omega^2$.
Bode plots of the obtained dynamics are shown in Figure ref:fig:rotating_iff_effect_kp. Bode plots of the obtained dynamics are shown in Figure ref:fig:rotating_iff_effect_kp.
@ -2129,8 +2113,6 @@ These two proposed IFF modifications and relative damping control are compared i
For the following comparisons, the cut-off frequency for the added HPF is set to $\omega_i = 0.1 \omega_0$ and the stiffness of the parallel springs is set to $k_p = 5 m \Omega^2$ (corresponding to $\alpha = 0.05$). For the following comparisons, the cut-off frequency for the added HPF is set to $\omega_i = 0.1 \omega_0$ and the stiffness of the parallel springs is set to $k_p = 5 m \Omega^2$ (corresponding to $\alpha = 0.05$).
These values are chosen one the basis of previous discussions about optimal parameters. These values are chosen one the basis of previous discussions about optimal parameters.
**** Identify plants :noexport:
**** Root Locus **** Root Locus
Figure ref:fig:rotating_comp_techniques_root_locus shows the Root Locus plots for the two proposed IFF modifications and the relative damping control. Figure ref:fig:rotating_comp_techniques_root_locus shows the Root Locus plots for the two proposed IFF modifications and the relative damping control.
While the two pairs of complex conjugate open-loop poles are identical for both IFF modifications, the transmission zeros are not. While the two pairs of complex conjugate open-loop poles are identical for both IFF modifications, the transmission zeros are not.
@ -2203,8 +2185,6 @@ The previous analysis is now applied to a model representing a rotating nano-hex
Three nano-hexapod stiffnesses are tested as for the uniaxial model: $k_n = \SI{0.01}{\N\per\mu\m}$, $k_n = \SI{1}{\N\per\mu\m}$ and $k_n = \SI{100}{\N\per\mu\m}$. Three nano-hexapod stiffnesses are tested as for the uniaxial model: $k_n = \SI{0.01}{\N\per\mu\m}$, $k_n = \SI{1}{\N\per\mu\m}$ and $k_n = \SI{100}{\N\per\mu\m}$.
Only the maximum rotating velocity is here considered ($\Omega = \SI{60}{rpm}$) with the light sample ($m_s = \SI{1}{kg}$) because this is the worst identified case scenario in terms of gyroscopic effects. Only the maximum rotating velocity is here considered ($\Omega = \SI{60}{rpm}$) with the light sample ($m_s = \SI{1}{kg}$) because this is the worst identified case scenario in terms of gyroscopic effects.
**** Identify NASS dynamics :noexport:
**** Nano-Active-Stabilization-System - Plant Dynamics **** Nano-Active-Stabilization-System - Plant Dynamics
For the NASS, the maximum rotating velocity is $\Omega = \SI[parse-numbers=false]{2\pi}{\radian\per\s}$ for a suspended mass on top of the nano-hexapod's actuators equal to $m_n + m_s = \SI{16}{\kilo\gram}$. For the NASS, the maximum rotating velocity is $\Omega = \SI[parse-numbers=false]{2\pi}{\radian\per\s}$ for a suspended mass on top of the nano-hexapod's actuators equal to $m_n + m_s = \SI{16}{\kilo\gram}$.
The parallel stiffness corresponding to the centrifugal forces is $m \Omega^2 \approx \SI{0.6}{\newton\per\mm}$. The parallel stiffness corresponding to the centrifugal forces is $m \Omega^2 \approx \SI{0.6}{\newton\per\mm}$.
@ -2524,6 +2504,7 @@ Conclusions are similar than those of the uniaxial (non-rotating) model:
:PROPERTIES: :PROPERTIES:
:UNNUMBERED: t :UNNUMBERED: t
:END: :END:
<<sec:rotating_conclusion>>
In this study, the gyroscopic effects induced by the spindle's rotation have been studied using a simplified model (Section ref:sec:rotating_system_description). In this study, the gyroscopic effects induced by the spindle's rotation have been studied using a simplified model (Section ref:sec:rotating_system_description).
Decentralized acrlong:iff with pure integrators was shown to be unstable when applied to rotating platforms (Section ref:sec:rotating_iff_pure_int). Decentralized acrlong:iff with pure integrators was shown to be unstable when applied to rotating platforms (Section ref:sec:rotating_iff_pure_int).
@ -3154,6 +3135,9 @@ This can be seen in Figure ref:fig:modal_comp_acc_frf_modal_3 that shows the fre
#+end_figure #+end_figure
*** Conclusion *** Conclusion
:PROPERTIES:
:UNNUMBERED: t
:END:
<<sec:modal_conclusion>> <<sec:modal_conclusion>>
In this study, a modal analysis of the micro-station was performed. In this study, a modal analysis of the micro-station was performed.
@ -4752,6 +4736,9 @@ Using this simple test bench, it can be concluded that the /super element/ model
#+end_figure #+end_figure
*** Conclusion *** Conclusion
:PROPERTIES:
:UNNUMBERED: t
:END:
<<sec:test_apa_conclusion>> <<sec:test_apa_conclusion>>
In this study, the amplified piezoelectric actuators "APA300ML" have been characterized to ensure that they fulfill all the requirements determined during the detailed design phase. In this study, the amplified piezoelectric actuators "APA300ML" have been characterized to ensure that they fulfill all the requirements determined during the detailed design phase.
@ -6360,6 +6347,11 @@ Therefore, the model effectively represents the system coupling for different pa
[[file:figs/test_nhexa_comp_simscape_de_all_high_mass.png]] [[file:figs/test_nhexa_comp_simscape_de_all_high_mass.png]]
*** Conclusion *** Conclusion
:PROPERTIES:
:UNNUMBERED: t
:END:
<<sec:test_nhexa_conclusion>>
The goal of this test bench was to obtain an accurate model of the nano-hexapod that could then be included on top of the micro-station model. The goal of this test bench was to obtain an accurate model of the nano-hexapod that could then be included on top of the micro-station model.
The adopted strategy was to identify the nano-hexapod dynamics under conditions in which all factors that could have affected the nano-hexapod dynamics were considered. The adopted strategy was to identify the nano-hexapod dynamics under conditions in which all factors that could have affected the nano-hexapod dynamics were considered.
This was achieved by developing a suspended table with low frequency suspension modes that can be accurately modeled (Section ref:sec:test_nhexa_table). This was achieved by developing a suspended table with low frequency suspension modes that can be accurately modeled (Section ref:sec:test_nhexa_table).
@ -7630,6 +7622,7 @@ Moreover, the systematic approach to system development and validation, along wi
#+begin_export latex #+begin_export latex
\begin{refsection}[ref.bib] \begin{refsection}[ref.bib]
\renewcommand{\clearpage}{} % Désactive \clearpage temporairement
% List all papers even if not cited % List all papers even if not cited
\nocite{*} \nocite{*}
% Sort by year % Sort by year
@ -7642,10 +7635,11 @@ Moreover, the systematic approach to system development and validation, along wi
#+end_export #+end_export
* Glossary :ignore: * Glossary :ignore:
[[printglossaries:]]
#+latex: \printglossary[type=\acronymtype] # #+latex: \printglossary[type=\acronymtype]
#+latex: \printglossary[type=\glossarytype] # #+latex: \printglossary[type=\glossarytype]
#+latex: \printglossary # #+latex: \printglossary
* Footnotes * Footnotes

Binary file not shown.

File diff suppressed because it is too large Load Diff

152
setup.org
View File

@ -95,6 +95,12 @@ Do not modify itemize/enumerate environments by default
\onehalfspacing \onehalfspacing
#+end_src #+end_src
** List of figures
#+begin_src latex
\usepackage{tocloft}
\setlength{\cftfignumwidth}{2.5em} % Adjust this value as needed
#+end_src
** Tables ** Tables
#+begin_src latex #+begin_src latex
\usepackage{booktabs} \usepackage{booktabs}
@ -119,40 +125,6 @@ I reduce the size of tables so that longer tables can still fit into an A4 (redu
\displaywidowpenalty = 10000 \displaywidowpenalty = 10000
#+end_src #+end_src
** Headers
#+begin_src latex
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
#+end_src
** Section/Figure format
#+begin_src latex
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
\renewcommand{\raggedpart}{\flushleft}
\setkomafont{part}{\normalfont\huge\scshape}
\setkomafont{sectioning}{\normalfont\scshape}
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\setkomafont{caption}{\small}
\setkomafont{captionlabel}{\usekomafont{caption}}
\setcounter{secnumdepth}{\subsubsectionnumdepth}
#+end_src
Improve chapter font colors and font size.
The following commands make chapter numbers BrickRed.
#+begin_src latex
\makeatletter
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
% Section with color
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
\makeatother
#+end_src
** Floating images configuration ** Floating images configuration
By default, if a figure consumes 60% of the page it will get its own float-page. By default, if a figure consumes 60% of the page it will get its own float-page.
To change that we have to adjust the value of the =floatpagefraction= derivative. To change that we have to adjust the value of the =floatpagefraction= derivative.
@ -169,28 +141,6 @@ See more information [[https://tex.stackexchange.com/questions/68516/avoid-that-
\pretocmd{\section}{\clearpage}{}{} \pretocmd{\section}{\clearpage}{}{}
#+end_src #+end_src
** Hyperref and Bookmarks
#+begin_src latex
\usepackage[ %
colorlinks=true, %
citecolor=BrickRed, %
linkcolor=BrickRed, %
urlcolor=BrickRed, %
unicode %
]{hyperref}
\usepackage{hypcap}
#+end_src
The bookmark package implements a new bookmark (outline) organisation for package hyperref.
This lets us change the "tree-navigation" associated with the generated pdf and constrain the menu only to H:2.
#+begin_src latex
\usepackage{bookmark}
\bookmarksetup{depth=2}
#+end_src
** Use pdf instead of png ** Use pdf instead of png
#+begin_src latex #+begin_src latex
\makeatletter \makeatletter
@ -388,7 +338,7 @@ And reduce the distance between a minted listing and its caption.
\AtEndEnvironment{listing}{\vspace{-16pt}} \AtEndEnvironment{listing}{\vspace{-16pt}}
#+end_src #+end_src
#+begin_src matlab #+begin_src latex
\let\OldTexttt\texttt \let\OldTexttt\texttt
\renewcommand{\texttt}[1]{{\ttfamily\hl{\mbox{\,#1\,}}}} \renewcommand{\texttt}[1]{{\ttfamily\hl{\mbox{\,#1\,}}}}
#+end_src #+end_src
@ -426,6 +376,94 @@ Add the cover image as background to the first page. Only do so when outputting
\sethlcolor{my-pale-grey} \sethlcolor{my-pale-grey}
#+end_src #+end_src
** Headers
#+begin_src latex
% \usepackage[headsepline]{scrlayer-scrpage}
% \pagestyle{scrheadings}
#+end_src
Config to have the chapter name until there is a section, and then displays the sections (from the doc)
#+begin_src latex
\usepackage[autooneside=false,headsepline]{scrlayer-scrpage}
% \pagestyle{scrheadings}
% \automark[section]{chapter}
#+end_src
#+begin_src latex
% Clear default header styles
\clearpairofpagestyles
\automark[section]{chapter}
% Set the header content
\ihead{\headmark} % Chapter (or section on even pages) aligned to the left
\ohead{\pagemark} % Page number aligned to the right
% Enable the page style
\pagestyle{scrheadings}
\setkomafont{headsepline}{\color{black}} % Change color if desired
\ModifyLayer[addvoffset=\dp\strutbox]{headsepline} % Fine-tune position
#+end_src
Kind of working solution:
#+begin_src latex
% \automark{section}
% \renewhead*{headings}{
% \ifstr{\headmark}{}{}{%
% \headmark\hfill
% }
% }
#+end_src
** Section/Figure format
#+begin_src latex
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
\renewcommand{\raggedpart}{\flushleft}
\setkomafont{part}{\normalfont\huge\scshape}
\setkomafont{sectioning}{\normalfont\scshape}
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\setkomafont{caption}{\small}
\setkomafont{captionlabel}{\usekomafont{caption}}
\setcounter{secnumdepth}{\subsubsectionnumdepth}
#+end_src
Improve chapter font colors and font size.
The following commands make chapter numbers BrickRed.
#+begin_src latex
\makeatletter
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
% Section with color
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
\makeatother
#+end_src
** Hyperref and Bookmarks
#+begin_src latex
\usepackage[ %
colorlinks=true, %
citecolor=BrickRed, %
linkcolor=BrickRed, %
urlcolor=BrickRed, %
unicode %
]{hyperref}
\usepackage{hypcap}
#+end_src
The bookmark package implements a new bookmark (outline) organisation for package hyperref.
This lets us change the "tree-navigation" associated with the generated pdf and constrain the menu only to H:2.
#+begin_src latex
\usepackage{bookmark}
\bookmarksetup{depth=2}
#+end_src
** Index and glossaries ** Index and glossaries
#+begin_src latex #+begin_src latex
\makeindex \makeindex