Commit 0c41b3cb authored by Matthias David's avatar Matthias David

add tufte style and marginnotes

parent 23278820
......@@ -6,134 +6,139 @@ En ajoutant un classe de latex dans le fichier de configuration d'emacs, cela pe
## Classe de latex
```
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("assign"
"\\documentclass{article}
\\usepackage{amsmath,amsfonts,stmaryrd,amssymb}
\\usepackage{enumerate}
\\usepackage[ruled]{algorithm2e}
\\usepackage[framemethod=tikz]{mdframed}
\\usepackage{listings}
\\usepackage[francais]{babel}
\\lstset{
basicstyle=\\ttfamily,
}
\\usepackage{geometry}
\\geometry{
paper=a4paper,
top=2.5cm,
bottom=3cm,
left=2.5cm,
right=2.5cm,
headheight=14pt,
footskip=1.5cm,
headsep=1.2cm,
}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{XCharter}
\\mdfdefinestyle{commandline}{
leftmargin=10pt,
rightmargin=10pt,
innerleftmargin=15pt,
middlelinecolor=black!50!white,
middlelinewidth=2pt,
frametitlerule=false,
backgroundcolor=black!5!white,
frametitle={Ligne de commande},
frametitlefont={\\normalfont\\sffamily\\color{white}\\hspace{-1em}},
frametitlebackgroundcolor=black!50!white,
nobreak,
}
\\newenvironment{commandline}{
\\medskip
\\begin{mdframed}[style=commandline]
}{
\\end{mdframed}
\\medskip
}
\\mdfdefinestyle{question}{
innertopmargin=1.2\\baselineskip,
innerbottommargin=0.8\\baselineskip,
roundcorner=5pt,
nobreak,
singleextra={
\\draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{
Question \\theQuestion\\questionTitle};
},
}
\\newcounter{Question}
\\newenvironment{question}[1][\\unskip]{
\\bigskip
\\stepcounter{Question}
\\newcommand{\\questionTitle}{~#1}
\\begin{mdframed}[style=question]
}{
\\end{mdframed}
\\medskip
}
\\mdfdefinestyle{warning}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\\draw(P-|O)++(-0.5em,0)node(tmp1){};
\\draw(P-|O)++(0.5em,0)node(tmp2){};
\\fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2);
\\node at(P-|O){\\color{white}\\scriptsize\\bf !};
\\draw[very thick](P-|O)++(0,-1em)--(O);
}
}
\\newenvironment{warning}[1][Attention:]{
\\medskip
\\begin{mdframed}[style=warning]
\\noindent{\\textbf{#1}}
}{
\\end{mdframed}
}
\\mdfdefinestyle{info}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\\fill[black](P-|O)circle[radius=0.4em];
\\node at(P-|O){\\color{white}\\scriptsize\\bf i};
\\draw[very thick](P-|O)++(0,-0.8em)--(O);
}
}
\\newenvironment{info}[1][Info:]{
\\medskip
\\begin{mdframed}[style=info]
\\noindent{\\textbf{#1}}
}{
\\end{mdframed}
}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-latex-classes
'("assign"
"\\documentclass{article}
\\usepackage{amsmath,amsfonts,stmaryrd,amssymb}
\\usepackage{enumerate}
\\usepackage[ruled]{algorithm2e}
\\usepackage[framemethod=tikz]{mdframed}
\\usepackage{listings}
\\usepackage[footnote]{snotez}
\\usepackage[french]{babel}
\\lstset{
basicstyle=\\ttfamily,
}
\\usepackage{geometry}
\\geometry{
paper=a4paper,
top=40pt,
bottom=3cm,
left=30pt,
textwidth=417pt,
headheight=14pt,
marginparsep=20pt,
marginparwidth=100pt,
footskip=30pt,
headsep=0cm,
}
\\usepackage[utf8]{inputenc}
\\usepackage{sansmathfonts}
\\usepackage[T1]{fontenc}
\\renewcommand*\\familydefault{\\sfdefault}
\\mdfdefinestyle{commandline}{
leftmargin=10pt,
rightmargin=10pt,
innerleftmargin=15pt,
middlelinecolor=black!50!white,
middlelinewidth=2pt,
frametitlerule=false,
backgroundcolor=black!5!white,
frametitle={Ligne de commande},
frametitlefont={\\normalfont\\sffamily\\color{white}\\hspace{-1em}},
frametitlebackgroundcolor=black!50!white,
nobreak,
}
\\newenvironment{commandline}{
\\medskip
\\begin{mdframed}[style=commandline]
}{
\\end{mdframed}
\\medskip
}
\\mdfdefinestyle{question}{
innertopmargin=1.2\\baselineskip,
innerbottommargin=0.8\\baselineskip,
roundcorner=5pt,
nobreak,
singleextra={
\\draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{
Question \\theQuestion\\questionTitle};
},
}
\\newcounter{Question}
\\newenvironment{question}[1][\\unskip]{
\\bigskip
\\stepcounter{Question}
\\newcommand{\\questionTitle}{~#1}
\\begin{mdframed}[style=question]
}{
\\end{mdframed}
\\medskip
}
\\mdfdefinestyle{warning}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\\draw(P-|O)++(-0.5em,0)node(tmp1){};
\\draw(P-|O)++(0.5em,0)node(tmp2){};
\\fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2);
\\node at(P-|O){\\color{white}\\scriptsize\\bf !};
\\draw[very thick](P-|O)++(0,-1em)--(O);
}
}
\\newenvironment{warning}[1][Attention:]{
\\medskip
\\begin{mdframed}[style=warning]
\\noindent{\\textbf{#1}}
}{
\\end{mdframed}
}
\\mdfdefinestyle{info}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\\fill[black](P-|O)circle[radius=0.4em];
\\node at(P-|O){\\color{white}\\scriptsize\\bf i};
\\draw[very thick](P-|O)++(0,-0.8em)--(O);
}
}
\\newenvironment{info}[1][Info:]{
\\medskip
\\begin{mdframed}[style=info]
\\noindent{\\textbf{#1}}
}{
\\end{mdframed}
}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
)
```
## Dans le fichier .org en en-tete
......
......@@ -2,9 +2,12 @@
#+DESCRIPTION: Decouvrir org-mode par l'exemple
#+AUTHOR:Matthias David
#+MAIL: matthias@gnu.re
#+OPTIONS: H:2
#+LANGUAGE:fr
#+LATEX_CLASS:assign
* Notes
Ceci est du texte, mais voila dans celui-ci il[fn:1] y a une note. Mais celle-ci peut également se voir ajouter[fn:2] une image.
* Tableau
| Nom | Présent | Excusé |
|----------+---------+--------|
......@@ -87,3 +90,9 @@ Ceci est un text avec de /l'italique/ , du *gras*, du =code=, du _souligné_, d
** Liste de description
- Premier élément :: sa description est intéressante car quand est elle énorme celle ci s'aligne sur le bloc qui correspond a la desctiption et ne fait donc pas de retour a la ligne intenpestif. Ce qui produit une mise en forme agréable pour le lecteur.
* Footnotes
[fn:2] *et voila !* [[file:images/Rplots.png]]
[fn:1] *NB* Voici la note a benet.
No preview for this file type
images/pdf.png

42.1 KB | W: | H:

images/pdf.png

62.7 KB | W: | H:

images/pdf.png
images/pdf.png
images/pdf.png
images/pdf.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment