Update template

This commit is contained in:
Thomas Dehaeze 2021-12-09 15:56:34 +01:00
parent 807c95ba38
commit e85c3a81e8
3 changed files with 353 additions and 32 deletions

View File

@ -10,7 +10,7 @@
#+DATE: {{{time(%Y-%m-%d)}}}
#+LATEX_CLASS: scrreprt
#+LATEX_CLASS_OPTIONS: [a4paper, twoside, 11pt, onecolumn, bibliography=totoc, openright]
#+LATEX_CLASS_OPTIONS: [a4paper, twoside, 11pt, onecolumn, bibliography=totoc, openright, appendixprefix=true]
#+OPTIONS: num:t toc:nil ':t *:t -:t ::t <:nil author:t date:t tags:nil todo:nil |:t H:2 title:nil
@ -21,6 +21,19 @@
#+LATEX_HEADER: \input{config.tex}
#+LATEX_HEADER_EXTRA: \input{config_extra.tex}
#+LATEX_HEADER_EXTRA: \addbibresource{ref.bib}
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
#+PROPERTY: header-args:latex+ :results file raw replace
#+PROPERTY: header-args:latex+ :buffer no
#+PROPERTY: header-args:latex+ :eval no-export
#+PROPERTY: header-args:latex+ :exports results
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
:END:
* Build :noexport:
@ -52,10 +65,17 @@
(setq org-latex-packages-alist nil)
(setq org-latex-default-packages-alist nil)
;; Do not include the subtitle inside the title
(setq org-latex-subtitle-separate t)
(setq org-latex-subtitle-format "\\subtitle{%s}")
#+END_SRC
#+begin_src emacs-lisp
(let ((org-export-before-parsing-hook '(org-ref-glossary-before-parsing
org-ref-acronyms-before-parsing)))
(org-latex-export-to-latex))
#+end_src
* Glossary and Acronyms - Tables :ignore:
#+name: glossary
@ -65,8 +85,8 @@
| phi | \ensuremath{\phi} | A woody bush |
#+name: acronyms
| Key | Short | Long |
|------+-------+----------------------------------|
| key | abbreviation | full form |
|------+--------------+----------------------------------|
| mimo | MIMO | Multiple-Inputs Multiple-Outputs |
| siso | SISO | Single-Input Single-Output |
| nass | NASS | Nano Active Stabilization System |
@ -75,7 +95,6 @@
* Title Page :ignore:
#+begin_export latex
\begin{titlepage}
\vspace*{5cm}
\makeatletter
@ -107,11 +126,40 @@
\newpage
#+end_export
* Abstract
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Résumé
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Acknowledgments
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Table of Contents :ignore:
#+begin_export latex
\dominitoc
\tableofcontents
\listoftables
\listoffigures
#+end_export
* Introduction
* Test
\minitoc
** Test
- acronyms ac:mimo, ac:siso, and again ac:mimo
- acronyms acrshort:nass acrshort:mimo acrshort:lti [[acrfull:siso][Single-Input Single-Output (SISO)]]
- glossary terms gls:ka, gls:phi.
- Bibliography citations: cite:dehaeze21_activ_dampin_rotat_platf_using,dehaeze18_sampl_stabil_for_tomog_exper
- Bibliography citations: [[cite:&dehaeze21_activ_dampin_rotat_platf_using;&dehaeze21_mechat_approac_devel_nano_activ_stabil_system]].
Some Footnote[fn:1]
** blabla
*** sdlfk
@ -121,11 +169,269 @@
**** lksdfjasd
**** lksdfjasd
** blabla
* Test
* Source Blocks
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Figures
#+begin_src matlab
t = 0:0.01:5; % Time [s]
x = sin(2*pi*t); % Output Voltage [V]
#+end_src
#+begin_src matlab
figure;
plot(t, x);
xlabel('Time [s]'); ylabel('Voltage [V]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/matlab_fig_example.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:matlab_fig_example
#+caption: Matlab Figure
#+RESULTS:
[[file:figs/matlab_fig_example.png]]
** Table Result
#+begin_src matlab
x = 1:10;
y = x.^2;
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([x', y'], {}, {'$x$', '$y = x^2$'}, ' %.0f ');
#+end_src
#+name: tab:table_name
#+caption: Table caption
#+RESULTS:
| $x$ | $y = x^2$ |
|-----+-----------|
| 1 | 1 |
| 2 | 4 |
| 3 | 9 |
| 4 | 16 |
| 5 | 25 |
| 6 | 36 |
| 7 | 49 |
| 8 | 64 |
| 9 | 81 |
| 10 | 100 |
** Inline Results
Results can be automatically outputed as shown below.
#+begin_src matlab :results value replace
sqrt(2)
#+end_src
#+RESULTS:
: 1.4142
#+begin_src matlab :results output replace
y
#+end_src
#+RESULTS:
: y =
: 1 4 9 16 25 36 49 64 81 100
** Caption and Reference
Captions can be added to code blocks.
Moreover, we can link to specific bode blocks (Listing [[lst:matlab_figure]] or [[lst:matlab_svd]]).
#+name: lst:matlab_figure
#+caption: Code to produce a nice contour plot
#+begin_src matlab
figure;
[X,Y,Z] = peaks;
contour(X,Y,Z,20)
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/matlab_logo.pdf', 'width', 'small', 'height', 'normal');
#+end_src
#+name: fig:matlab_logo
#+caption: Obtained Contour Plot
#+RESULTS:
[[file:figs/matlab_logo.png]]
#+name: lst:matlab_svd
#+caption: Code to compute the Singular Value Decomposition
#+begin_src matlab :results output replace
A = [1 2; 3 4; 5 6; 7 8]
[U,S,V] = svd(A)
#+end_src
#+RESULTS:
#+begin_example
A = [1 2; 3 4; 5 6; 7 8]
A =
1 2
3 4
5 6
7 8
[U,S,V] = svd(A)
U =
-0.152483233310201 -0.82264747222566 -0.394501022283829 -0.379959133877596
-0.349918371807964 -0.42137528768458 0.242796545704357 0.800655879510063
-0.547353510305727 -0.0201031031435029 0.697909975442776 -0.461434357387336
-0.74478864880349 0.381169081397575 -0.546205498863303 0.0407376117548695
S =
14.2690954992615 0
0 0.626828232417541
0 0
0 0
V =
-0.641423027995072 0.767187395072177
-0.767187395072177 -0.641423027995072
#+end_example
** Source Blocks with Line Numbers
Citation [[cite:&taghirad13_paral;&dehaeze21_activ_dampin_rotat_platf_using]]
The Listing [[lst:matlab_line_numbers]] has line numbers as the =-n= option was used.
Specific lines of codes can be referenced.
For instance, the code used to specify the wanted the vertical label is on line [[(test)]].
#+name: lst:matlab_line_numbers
#+caption: Specify Labels
#+begin_src matlab +n -r
figure;
plot(t, x)
xlabel('Time [s]');
ylabel('Output [V]'); (ref:test)
#+end_src
Numbering can be continued by using =+n= option as shown below.
#+begin_src matlab +n
figure;
plot(t, u)
xlabel('Time [s]');
ylabel('Input [V]');
#+end_src
* Images
** Normal Image
Figure [[fig:general_control_names]] shows the results of the Tikz code of listing [[lst:tikz_test]].
#+name: lst:tikz_test
#+caption: Tikz code that is used to generate Figure [[fig:general_control_names]]
#+begin_src latex :file general_control_names.pdf :exports both
\begin{tikzpicture}
% Blocs
\node[block={2.0cm}{2.0cm}] (P) {$P$};
\node[block={1.5cm}{1.5cm}, below=0.7 of P] (K) {$K$};
% Input and outputs coordinates
\coordinate[] (inputw) at ($(P.south west)!0.75!(P.north west)$);
\coordinate[] (inputu) at ($(P.south west)!0.25!(P.north west)$);
\coordinate[] (outputz) at ($(P.south east)!0.75!(P.north east)$);
\coordinate[] (outputv) at ($(P.south east)!0.25!(P.north east)$);
% Connections and labels
\draw[<-] (inputw) node[above left, align=right]{(weighted)\\exogenous inputs\\$w$} -- ++(-1.5, 0);
\draw[<-] (inputu) -- ++(-0.8, 0) |- node[left, near start, align=right]{control signals\\$u$} (K.west);
\draw[->] (outputz) node[above right, align=left]{(weighted)\\exogenous outputs\\$z$} -- ++(1.5, 0);
\draw[->] (outputv) -- ++(0.8, 0) |- node[right, near start, align=left]{sensed output\\$v$} (K.east);
\end{tikzpicture}
#+end_src
#+name: fig:general_control_names
#+caption: General Control Configuration
#+RESULTS: lst:tikz_test
[[file:figs/general_control_names.png]]
** Sub Images
Link to subfigure [[fig:general_control_names_1]].
#+name: fig:subfigure
#+caption: Subfigure Caption
#+attr_latex: :environment subfigure :width 0.49\linewidth :align c
| file:figs/general_control_names.png | file:figs/general_control_names.png |
| <<fig:general_control_names_1>> sub figure caption | <<fig:general_control_names_2>> sub figure caption |
* Tables
Table [[tab:table_with_equations]] shows a table with some mathematics inside.
#+name: tab:table_with_equations
#+caption: A Simple table with included math
| $N$ | $N^2$ | $N^3$ | $N^4$ | $\sqrt n$ | $\sqrt[4]N$ |
|-----+-------+-------+-------+-----------+-------------|
| 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 4 | 8 | 16 | 1.4142136 | 1.1892071 |
| 3 | 9 | 27 | 81 | 1.7320508 | 1.3160740 |
#+TBLFM: $2=$1^2::$3=$1^3::$4=$1^4::$5=sqrt($1)::$6=sqrt(sqrt(($1)))
#+name: tab:table_without_head
#+caption: Table without Head
| | *1* | *2* | *3* | *4* | *5* |
| *1* | 1 | 2 | 3 | 4 | 5 |
| *2* | 2 | 4 | 6 | 8 | 10 |
| *3* | 3 | 6 | 9 | 12 | 15 |
| *4* | 4 | 8 | 12 | 16 | 20 |
| *5* | 5 | 10 | 15 | 20 | 25 |
#+name: tab:table_multiple_heads
#+ATTR_LATEX: :font \footnotesize
#+caption: Table with multiples groups
| | *Classical Control* | *Modern Control* | *Robust Control* |
| <l> | <c> | <c> | <c> |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Date* | 1930- | 1960- | 1980- |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Tools* | Transfer Functions | State Space formulation | Disk margin |
| | Nyquist Plots | Riccati Equations | Systems and Signals Norms ($\mathcal{H}_\infty$, $\mathcal{H}_2$ Norms) |
| | Bode Plots | | Closed Loop Transfer Functions |
| | Phase and Gain margins | | Weighting Functions |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Control Architectures* | Proportional, Integral, Derivative | Full State Feedback | General Control Configuration |
| | Leads, Lags | LQR, LQG | |
| | | Kalman Filters | |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Advantages* | Study Stability | Automatic Synthesis | Automatic Synthesis |
| | Simple | MIMO | MIMO |
| | Natural | Optimization Problem | Optimization Problem |
| | | | Guaranteed Robustness |
| | | | Easy specification of performances |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Disadvantages* | Manual Method | No Guaranteed Robustness | Required knowledge of specific tools |
| | Only SISO | Difficult Rejection of Perturbations | Need a reasonably good model of the system |
* Bibliography :ignore:
#+latex: \printbibliography
#+latex: \printbibliography[heading=bibintoc,title={Bibliography}]
* Glossary :ignore:
#+latex: \printglossary[type=\acronymtype]
#+latex: \printglossary
* Appendix :ignore:
#+latex: \appendix
* Mathematical formulas
* Comments on something
* Footnotes
[fn:1]this is a footnote with citation [[cite:&dehaeze21_mechat_approac_devel_nano_activ_stabil_system]].

47
ref.bib
View File

@ -1,3 +1,25 @@
@inproceedings{dehaeze21_mechat_approac_devel_nano_activ_stabil_system,
author = {Dehaeze, T. and Bonnefoy, J. and Collette, C.},
title = {Mechatronics Approach for the Development of a Nano-Active-Stabilization-System},
booktitle = {MEDSI'20},
year = {2021},
language = {english},
publisher = {JACoW Publishing},
series = {Mechanical Engineering Design of Synchrotron Radiation Equipment and Instrumentation},
venue = {Chicago, USA},
}
@inproceedings{brumund21_multib_simul_reduc_order_flexib_bodies_fea,
author = {Philipp Brumund and Thomas Dehaeze},
title = {Multibody Simulations with Reduced Order Flexible Bodies obtained by FEA},
booktitle = {MEDSI'20},
year = {2021},
language = {english},
publisher = {JACoW Publishing},
series = {Mechanical Engineering Design of Synchrotron Radiation Equipment and Instrumentation},
venue = {Chicago, USA},
}
@article{dehaeze21_activ_dampin_rotat_platf_using,
author = {Thomas Dehaeze and Christophe Collette},
title = {Active Damping of Rotating Platforms Using Integral Force Feedback},
@ -8,21 +30,12 @@
month = {Feb},
}
@inproceedings{dehaeze18_sampl_stabil_for_tomog_exper,
author = {Thomas Dehaeze and M. Magnin Mattenet and Christophe Collette},
title = {Sample Stabilization For Tomography Experiments In Presence Of Large Plant Uncertainty},
booktitle = {MEDSI'18},
year = {2018},
number = {10},
pages = {153--157},
doi = {10.18429/JACoW-MEDSI2018-WEOAMA02},
url = {https://doi.org/10.18429/JACoW-MEDSI2018-WEOAMA02},
address = {Geneva, Switzerland},
isbn = {978-3-95450-207-3},
keywords = {nass},
language = {english},
month = {Dec},
publisher = {JACoW Publishing},
series = {Mechanical Engineering Design of Synchrotron Radiation Equipment and Instrumentation},
venue = {Paris, France},
@book{taghirad13_paral,
author = {Taghirad, Hamid},
title = {Parallel robots : mechanics and control},
year = {2013},
publisher = {CRC Press},
address = {Boca Raton, FL},
isbn = {9781466555778},
keywords = {favorite, parallel robot},
}

View File

@ -56,6 +56,7 @@ Do not modify itemize/enumerate environments by default
#+begin_src latex
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
#+end_src
I reduce the size of tables so that longer tables can still fit into an A4 (reduce font and make sans serif).
@ -228,7 +229,8 @@ Also reduce the font-size
\renewcommand*{\bibfont}{\footnotesize}
#+end_src
* Table of Contents
* Table of Contents for each chapter
Note that this is marked as deprecated for koma-script.
#+begin_src latex
\usepackage{minitoc}
\usepackage[nottoc]{tocbibind}
@ -238,12 +240,12 @@ Also reduce the font-size
https://tug.org/FontCatalogue/quattrocento/
#+begin_src latex
\usepackage[sf, scaled=0.9]{quattrocento}
\usepackage[lf]{ebgaramond}
#+end_src
https://tug.org/FontCatalogue/crimsonproregular/
#+begin_src latex
\usepackage{crimson}
% \usepackage{crimson}
#+end_src
https://tug.org/FontCatalogue/sourcecodepro/