From e213dad6b3f145857bd9f2de3d3aaf32afea5c41 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 20 Apr 2024 15:25:46 +0200 Subject: [PATCH] code harmonization --- latex/book/book.tex | 33 ++++++++++++++++++++++++++----- latex/book/sections/section1.tex | 4 ++++ latex/book/sections/section2.tex | 4 ++++ latex/book/sections/section3.tex | 4 ++++ latex/document/document.tex | 34 ++++++++++++++++++-------------- 5 files changed, 59 insertions(+), 20 deletions(-) diff --git a/latex/book/book.tex b/latex/book/book.tex index 73a3802..41b0c36 100644 --- a/latex/book/book.tex +++ b/latex/book/book.tex @@ -7,31 +7,54 @@ \usepackage[T1]{fontenc} % encoding \renewcommand{\familydefault}{\sfdefault} % sans-serif font -\usepackage[french]{babel} % langages +% Langages +\usepackage[french]{babel} \frenchsetup{SmallCapsFigTabCaptions=false} +% Add \extra info to title +\makeatletter +\providecommand{\extra}[1]{ + \apptocmd{\@author}{ + \end{tabular} + \par\vspace*{0.7em} + \begin{tabular}[t]{c} + #1}{}{} +} +\makeatother + +% Change page dimensions +% \usepackage[ +% a4paper, +% left=20mm, +% top=20mm, +% ]{geometry} + % Bibliography \bibliographystyle{unsrt} \nocite{*} -% Metadata -\def\docTitle{Title} -\def\docAuthor{Author} +% Metadatas +\def\docTitle{TITLE} +\def\docAuthor{YOU} +\def\authorMail{mailto:place@holder.com} +\def\docSubject{SUBJECT} +\def\docLocation{LOCATION} % Dependencies \usepackage[ pdfauthor={\docAuthor}, pdftitle={\docTitle}, + pdfsubject={\docSubject}, % subject metadata hidelinks, ]{hyperref} \title{\docTitle} \author{\docAuthor} +\extra{\docSubject~$\cdot$ \docLocation} \date{} \begin{document} - \maketitle \flushbottom \tableofcontents diff --git a/latex/book/sections/section1.tex b/latex/book/sections/section1.tex index c8f1bba..b478586 100644 --- a/latex/book/sections/section1.tex +++ b/latex/book/sections/section1.tex @@ -1,5 +1,9 @@ \documentclass[class=article]{standalone} +% Code integration +% \usepackage{minted} +% \usemintedstyle{emacs} + \begin{document} Here is the first section. diff --git a/latex/book/sections/section2.tex b/latex/book/sections/section2.tex index 98c05e2..3d0e73b 100644 --- a/latex/book/sections/section2.tex +++ b/latex/book/sections/section2.tex @@ -1,5 +1,9 @@ \documentclass[class=article]{standalone} +% Code integration +% \usepackage{minted} +% \usemintedstyle{emacs} + \begin{document} Here is the second section. diff --git a/latex/book/sections/section3.tex b/latex/book/sections/section3.tex index fa956db..8fd1b24 100644 --- a/latex/book/sections/section3.tex +++ b/latex/book/sections/section3.tex @@ -1,5 +1,9 @@ \documentclass[class=article]{standalone} +% Code integration +% \usepackage{minted} +% \usemintedstyle{emacs} + \begin{document} Here is the third section. diff --git a/latex/document/document.tex b/latex/document/document.tex index 0e6e5fb..d194afc 100644 --- a/latex/document/document.tex +++ b/latex/document/document.tex @@ -4,7 +4,8 @@ \usepackage[T1]{fontenc} % encoding \renewcommand{\familydefault}{\sfdefault} % sans-serif font -\usepackage[french]{babel} % langages +% Langages +\usepackage[french]{babel} \frenchsetup{SmallCapsFigTabCaptions=false} % Add \extra info to title @@ -18,31 +19,34 @@ } \makeatother -% \usepackage[ % change page dimensions +% Change page dimensions +% \usepackage[ % a4paper, % left=20mm, % top=20mm, % ]{geometry} -% \usepackage{minted} % code integration +% Code integration +% \usepackage{minted} % \usemintedstyle{emacs} -\newcommand{\mytitle}{TITLE} -\newcommand{\myauthor}{YOU} -\newcommand{\mysubject}{SUBJECT} -\newcommand{\mylocation}{LOCATION} -\newcommand{\mymail}{mailto:place@holder.com} +% Metadatas +\def\docTitle{TITLE} +\def\docAuthor{YOU} +\def\authorMail{mailto:place@holder.com} +\def\docSubject{SUBJECT} +\def\docLocation{LOCATION} \usepackage[ - pdfauthor={\myauthor}, % author metadata - pdftitle={\mytitle}, % title metadata - pdfsubject={\mysubject}, % subject metadata - hidelinks, % clickable links in table of contents + pdfauthor={\docAuthor}, % author metadata + pdftitle={\docTitle}, % title metadata + pdfsubject={\docSubject}, % subject metadata + hidelinks, % clickable links in table of contents ]{hyperref} -\title{\mytitle} -\author{\href{\mymail}{\myauthor}} -\extra{\mysubject~$\cdot$ \mylocation} +\title{\docTitle} +\author{\href{\authorMail}{\docAuthor}} +\extra{\docSubject~$\cdot$ \docLocation} \date{} \begin{document}