From 9dd0355f8053d08ea1e39a183c1c8ed28ba754ae Mon Sep 17 00:00:00 2001 From: Orestis Malaspinas <orestis.malaspinas@hesge.ch> Date: Mon, 2 Mar 2020 23:15:34 +0100 Subject: [PATCH] pdf generation with multiple files --- 01_rappel.md | 2 +- 02_integrales.md | 2 +- 03_optimisation.md | 2 +- 04_edo.md | 8 +++----- 05_fourier.md | 2 +- 06_probas_stats.md | 2 +- 07_remerciements.md | 2 +- 08_notes.md | 6 ------ Makefile | 18 ++++++------------ metadata.yaml | 14 +++++++++++++- 10 files changed, 28 insertions(+), 30 deletions(-) diff --git a/01_rappel.md b/01_rappel.md index b50c3a8..25c80b6 100644 --- a/01_rappel.md +++ b/01_rappel.md @@ -337,4 +337,4 @@ $$f(x)=\frac{x^3}{x^2-4}.$$ (déterminer où la fonction est croissante, décroissante, atteint un extremum, etc). -6. Faire un croquis de $f(x)$. \ No newline at end of file +6. Faire un croquis de $f(x)$. diff --git a/02_integrales.md b/02_integrales.md index c87a730..f24d067 100644 --- a/02_integrales.md +++ b/02_integrales.md @@ -740,4 +740,4 @@ Il vient donc que $$\begin{aligned} &\left.+4f(a+(i+1/2)\cdot\delta x)\right]+\mathcal{O}(\delta x^4).\end{aligned}$$ Cette méthode permet d’évaluer exactement les intégrales des polynômes d’ordre 3, -$f(x)=ax^3+bx^2+cx+d$. \ No newline at end of file +$f(x)=ax^3+bx^2+cx+d$. diff --git a/03_optimisation.md b/03_optimisation.md index 9fc28a3..6aafe7d 100644 --- a/03_optimisation.md +++ b/03_optimisation.md @@ -717,4 +717,4 @@ Avec ce qui précède, voyez-vous une façon de trouver le minimum de la fonctio --- -Une méthode pour trouver le minimum de $f(x,y)$ est la méthode de la *descente de gradient*. \ No newline at end of file +Une méthode pour trouver le minimum de $f(x,y)$ est la méthode de la *descente de gradient*. diff --git a/04_edo.md b/04_edo.md index e5743c4..1c4ce9b 100644 --- a/04_edo.md +++ b/04_edo.md @@ -1,8 +1,6 @@ -Équations différentielles ordinaires -==================================== +# Équations différentielles ordinaires -Introduction ------------- +## Introduction Pour illustrer le concept d’équations différentielles, nous allons considérer pour commencer des systèmes qui évoluent dans le temps @@ -911,4 +909,4 @@ avec l'@eq:verlet_novel. Un autre avantage considérable de ce modèle est qu’il est très simple d’y inclure une force de frottement proportionnelle à la vitesse. Sans entrer dans les détails de la dérivation du schéma on a -$$x(t_{n+1})=(2-\delta t\zeta)x(t_n)-(1-\delta t\zeta)x(t_{n-1})+\delta t^2 a(x(t_n)).$$ \ No newline at end of file +$$x(t_{n+1})=(2-\delta t\zeta)x(t_n)-(1-\delta t\zeta)x(t_{n-1})+\delta t^2 a(x(t_n)).$$ diff --git a/05_fourier.md b/05_fourier.md index 444a07e..0e7071f 100644 --- a/05_fourier.md +++ b/05_fourier.md @@ -964,4 +964,4 @@ prenant $F_e=F_N$ on a que $N=1/F_e=1/F_N$ et que l’échantillonage permet de représenter les fréquences plus petites que $F_N/2$. Si la fréquence d’échantillonage est plus petite que la fréquence de Nyquist de notre signal, on verra apparaître le phénomène de *repliement de -spectre* (aliasing en anglais). \ No newline at end of file +spectre* (aliasing en anglais). diff --git a/06_probas_stats.md b/06_probas_stats.md index f2243e1..f1ef4d9 100644 --- a/06_probas_stats.md +++ b/06_probas_stats.md @@ -1290,4 +1290,4 @@ nombres aléatoires. Des analyses théoriques sont dès lors primordiales, mais bien en dehors du champs de ce cours... Il existe beaucoup d’autres possiblités (il y a des recommandations -sur le site `http://www.random.org`) pour tester des nombres aléatoires. \ No newline at end of file +sur le site `http://www.random.org`) pour tester des nombres aléatoires. diff --git a/07_remerciements.md b/07_remerciements.md index 2968290..474e557 100644 --- a/07_remerciements.md +++ b/07_remerciements.md @@ -4,4 +4,4 @@ Remerciements Je voudrais remercier (par ordre alphabétique) les étudiants du cours qui ont contribué à améliorer ce polycopié. En espérant que cette liste continuera à s’allonger avec les années. Merci à Messieurs -Borel, Gay-Balmaz, Ibanez, Lovino et Sousa. Je voudrais également remercier A. Malaspinas pour sa relecture et ses corrections. \ No newline at end of file +Borel, Gay-Balmaz, Ibanez, Lovino et Sousa. Je voudrais également remercier A. Malaspinas pour sa relecture et ses corrections. diff --git a/08_notes.md b/08_notes.md index 8fe13de..94d6eaa 100644 --- a/08_notes.md +++ b/08_notes.md @@ -1,9 +1,3 @@ - -\newcommand{\ux}{\bm{x}} -\newcommand{\dd}{\mathrm{d}} -\newcommand{\real}{\mathbb{R}} -\newcommand{\grad}{\mathrm{grad}} - [^1]: Pour ceux que ça intéresse cette série s’obtient à l’aide d’une série de Taylor. diff --git a/Makefile b/Makefile index 55802f3..75c84d3 100644 --- a/Makefile +++ b/Makefile @@ -18,21 +18,15 @@ HTMLOPTIONS += -c css/tufte-css/tufte.css HTMLOPTIONS += --self-contained HTMLOPTIONS += --mathjax=MathJax.js -MD=$(wildcard *.md) -HTML=$(MD:%.md=%.html) -PDF=$(MD:%.md=%.pdf) -TEX=$(MD:%.md=%.tex) +all: cours.pdf cours.html +# %.tex: %.md +# pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $< -all: $(PDF) $(HTML) $(TEX) +cours.pdf: 01_rappel.md 02_integrales.md 03_optimisation.md 04_edo.md 05_fourier.md 06_probas_stats.md 07_remerciements.md 08_notes.md + pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $^ --metadata-file metadata.yaml -%.tex: %.md Makefile - pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $< - -%.pdf: %.md Makefile - pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $< - -%.html: %.md Makefile +%.html: %.md pandoc -s $(OPTIONS) $(HTMLOPTIONS) -o $@ $< deploy: all diff --git a/metadata.yaml b/metadata.yaml index b932f95..0de5221 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -16,4 +16,16 @@ documentclass: book papersize: A4 cref: false urlcolor: blue ---- \ No newline at end of file +header-includes: +- | + ```{=latex} + \newcommand{\ux}{\bm{x}} + \newcommand{\dd}{\mathrm{d}} + \newcommand{\real}{\mathbb{R}} + \newcommand{\grad}{\mathrm{grad}} + ``` +--- + + + + -- GitLab