diff --git a/.gitignore b/.gitignore index c3bf7bc9d7e9e56fb4091aba96bbf81b0ffdddbb..39586c49e31dccc3b315e3b0363a78db7e2be7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,11 @@ ### List of fixmes (from fixme package) *.lox +### Nomenclature +*.nlg +*.nlo +*.nls + ### Ignore compiled pdfs *.pdf !figures/*/*.pdf diff --git a/latexmkrc b/latexmkrc index 57d3cdf93cbea4595ec9957dbfd04de06b13fbd6..8d95c4a1fa7c846bb108734ff1f99a077755a12d 100644 --- a/latexmkrc +++ b/latexmkrc @@ -17,4 +17,10 @@ $pdf_mode = 4; # 1: use pdflatex, 4: use lualatex, 5 use xelatex $bibtex_use = 2; # Extra extensions to clean -$clean_ext = 'synctex.gz synctex.gz(busy) run.xml tex.bak bbl bcf fdb_latexmk run tdo %R-blx.bib lox' +$clean_ext = 'synctex.gz synctex.gz(busy) run.xml tex.bak bbl bcf fdb_latexmk run tdo %R-blx.bib lox nlg nlo nls'; + +# Make nomenclature +add_cus_dep("nlo", "nls", 0, "nlo2nls"); +sub nlo2nls { + system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg"); +} diff --git a/preamble.tex b/preamble.tex index fb688716e6fd27fb294ac7a40d56ac675ad2f2e9..ca6ae5b406c07e60853c355fe079796080a4f3a4 100644 --- a/preamble.tex +++ b/preamble.tex @@ -88,6 +88,7 @@ \renewmenumacro{\directory}{pathswithfolder} % default: paths \usepackage[scale=2]{ccicons} % Icons for CC licenses \usepackage[nolinks]{qrcode} % QR codes +\usepackage{siunitx} % SI units % For inkscape figures \usepackage{xifthen} diff --git a/rotare-doc.tex b/rotare-doc.tex index c091b22c73ee06783cdbbfe8f3fa34561e8ed096..fa2ec5040531e561c48416cec8b58aecec056ef4 100644 --- a/rotare-doc.tex +++ b/rotare-doc.tex @@ -63,6 +63,10 @@ draft, % toggle if draft version \tableofcontents % display table of contents \cleardoublepage +% Nomenclature +\printnomenclature + + % Body % *********************************************** \pagenumbering{arabic} % arabic page numbering diff --git a/style/symbols.sty b/style/symbols.sty index dfd3c4e730405e5b3f0df9abbccdfeadb1ffced3..2532c37c900e5c863e8716453ce93b95d8acb6a8 100644 --- a/style/symbols.sty +++ b/style/symbols.sty @@ -3,12 +3,21 @@ % This ensures coherence between all parts of the document and simplifies % maintenance or changes in the nomenclature. % +% This package also generates directly the nomenclature +% % Author: Thomas Lambert <t.lambert@uliege.be> % ULiege - Aeroelasticity and Experimental Aerodynamics % CC0 License % https://gitlab.uliege.be/thlamb/rotare-doc % ------------------------------------------------------------------------------ +% Generate nomenclature +\RequirePackage[stdsubgroups]{nomencl} +\makenomenclature +\newcommand{\nomunit}[1]{% + \renewcommand{\nomentryend}{\hspace*{\fill}\si{#1}}% +} +% TODO better spacing/title style % --- Velocities --------------------------------------------------------------- @@ -42,6 +51,9 @@ % --- Others ------------------------------------------------------------------- \newcommand{\area}{\ensuremath{A}} % (Rotor) Area +\nomenclature[A]{\area}{Area\nomunit{\m^2}} + + \newcommand{\radius}{\ensuremath{R}} % Rotor radius \newcommand{\rRad}{\ensuremath{r}} % Nondimensional radial position along the blade \newcommand{\aRad}{\ensuremath{y}} % Radial distance along the blade