chore: reformat and translate
This commit is contained in:
parent
0ab94472a5
commit
82aa8b2aab
2 changed files with 63 additions and 70 deletions
28
Makefile
28
Makefile
|
@ -3,7 +3,6 @@ TEX = $(NAME).tex
|
||||||
FULLNAME = Lettre
|
FULLNAME = Lettre
|
||||||
|
|
||||||
DIRECTORIES = $(filter-out "." ".git",$(shell find . -maxdepth 1 -type d -printf "\"%f\" "))
|
DIRECTORIES = $(filter-out "." ".git",$(shell find . -maxdepth 1 -type d -printf "\"%f\" "))
|
||||||
TEMP_FILES = aux log tns fdb_latexmk fls synctex.gz pdf out
|
|
||||||
TEMPLATE = Template
|
TEMPLATE = Template
|
||||||
|
|
||||||
TEXMK = latexmk -lualatex
|
TEXMK = latexmk -lualatex
|
||||||
|
@ -12,16 +11,9 @@ CP = cp -r
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
clean:
|
new:
|
||||||
@for dir in $(DIRECTORIES); do \
|
@echo Nom du dossier ?
|
||||||
cd "$$dir"; \
|
@read line; echo $$line | xargs -i $(CP) '$(TEMPLATE)' {}/
|
||||||
$(RM) $(foreach i,$(TEMP_FILES),$(NAME).$(i)); \
|
|
||||||
cd ..; \
|
|
||||||
done;
|
|
||||||
|
|
||||||
clean-full:
|
|
||||||
$(MAKE) clean
|
|
||||||
$(RM) *.pdf
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@for dir in $(filter-out "$(TEMPLATE)",$(DIRECTORIES)); do \
|
@for dir in $(filter-out "$(TEMPLATE)",$(DIRECTORIES)); do \
|
||||||
|
@ -31,6 +23,14 @@ build:
|
||||||
cd ..; \
|
cd ..; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
new:
|
EXTS = aux log tns fdb_latexmk fls synctex.gz pdf out
|
||||||
@echo Nom du dossier ?
|
clean:
|
||||||
@read line; echo $$line | xargs -i $(CP) '$(TEMPLATE)' {}/
|
@for dir in $(DIRECTORIES); do \
|
||||||
|
cd "$$dir"; \
|
||||||
|
$(RM) $(foreach e,$(EXTS),$(NAME).$(e)); \
|
||||||
|
cd ..; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
clean-full:
|
||||||
|
$(MAKE) clean
|
||||||
|
$(RM) *.pdf
|
||||||
|
|
|
@ -3,28 +3,35 @@
|
||||||
|
|
||||||
\LoadClass[a4paper,12pt]{lettre}
|
\LoadClass[a4paper,12pt]{lettre}
|
||||||
|
|
||||||
\AtEndPreamble{
|
% Langue
|
||||||
% Encoding
|
|
||||||
\RequirePackage[utf8]{inputenc}
|
|
||||||
\RequirePackage[T1]{fontenc}
|
|
||||||
\RequirePackage{lmodern}
|
|
||||||
|
|
||||||
% Language
|
|
||||||
\RequirePackage[french]{babel}
|
\RequirePackage[french]{babel}
|
||||||
|
|
||||||
% Font
|
% Police
|
||||||
\RequirePackage{fontspec}
|
\RequirePackage{fontspec}
|
||||||
\setmainfont[Numbers={Monospaced}]{Fira Sans}
|
\setmainfont[Numbers={Monospaced}]{Fira Sans}
|
||||||
\setmonofont{Fira Code}
|
\setmonofont{Fira Code}
|
||||||
|
|
||||||
% Remove the extra line
|
% Retire la ligne ajoutée pour la séparation entête/corps de la lettre
|
||||||
\makeatletter
|
\renewcommand*{\rule@length}{0}
|
||||||
\newcommand*{\NoRule}{\renewcommand*{\rule@length}{0}}
|
|
||||||
\makeatother
|
% Titre
|
||||||
\NoRule
|
\newcommand*{\titre}[1]{\def\@title{#1}}
|
||||||
|
|
||||||
|
% Auteur
|
||||||
|
\newcommand*{\auteur}[1]{\def\@author{#1}}
|
||||||
|
|
||||||
|
% Sujet
|
||||||
|
\def\@subject{\,}
|
||||||
|
\newcommand*{\sujet}[1]{\def\@subject{#1}}
|
||||||
|
|
||||||
|
% Mot-clés
|
||||||
|
\def\@keywords{\,}
|
||||||
|
\newcommand*{\motscles}[1]{\def\@keywords{\if#1\empty\else, #1\fi}}
|
||||||
|
|
||||||
% Clickable links + metadata
|
% Clickable links + metadata
|
||||||
\RequirePackage[pdfauthor={\@author},
|
\AtEndPreamble{
|
||||||
|
\RequirePackage[
|
||||||
|
pdfauthor={\@author},
|
||||||
pdftitle={\@title},
|
pdftitle={\@title},
|
||||||
pdfsubject={\@subject},
|
pdfsubject={\@subject},
|
||||||
pdfkeywords={\@author, lettre\@keywords},
|
pdfkeywords={\@author, lettre\@keywords},
|
||||||
|
@ -34,30 +41,16 @@
|
||||||
]{hyperref}
|
]{hyperref}
|
||||||
}
|
}
|
||||||
|
|
||||||
% Title
|
% Introduction
|
||||||
\newcommand*{\titre}[1]{\def\@title{#1}}
|
|
||||||
|
|
||||||
% Author
|
|
||||||
\newcommand*{\auteur}[1]{\def\@author{#1}}
|
|
||||||
|
|
||||||
% Opening
|
|
||||||
\newcommand{\ouverture}[1]{\def\@opening{#1}}
|
\newcommand{\ouverture}[1]{\def\@opening{#1}}
|
||||||
|
|
||||||
% Closing
|
% Conclusion
|
||||||
\newcommand{\cloture}[1]{\def\@closing{#1}}
|
\newcommand{\cloture}[1]{\def\@closing{#1}}
|
||||||
|
|
||||||
% Subject
|
% Destinataire
|
||||||
\def\@subject{\,}
|
|
||||||
\newcommand*{\sujet}[1]{\def\@subject{#1}}
|
|
||||||
|
|
||||||
% Keywords
|
|
||||||
\def\@keywords{\,}
|
|
||||||
\newcommand*{\motscles}[1]{\def\@keywords{\if#1\empty\else, #1\fi}}
|
|
||||||
|
|
||||||
% Receiver
|
|
||||||
\newcommand{\destinataire}[3]{\def\@receivername{#1}\def\@receiverAddress{#2}\def\@receiverCity{#3}}
|
\newcommand{\destinataire}[3]{\def\@receivername{#1}\def\@receiverAddress{#2}\def\@receiverCity{#3}}
|
||||||
|
|
||||||
% Letter content
|
% Contenu de la lettre
|
||||||
\newenvironment{easyLetter}{
|
\newenvironment{easyLetter}{
|
||||||
\begin{letter}{
|
\begin{letter}{
|
||||||
% Destinataire
|
% Destinataire
|
||||||
|
|
Loading…
Reference in a new issue