From b6bd52b903fc1c17ed29910fb07e026127273442 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 11 Dec 2018 18:51:05 +0000 Subject: [PATCH] Various config changes --- Templates/letter.md | 9 +++++---- bin/aquarius-go | 1 + bin/compiler | 15 +++++++++++++-- i3/config | 1 + pandoc/templates/template-letter.tex | 21 +++++++++++++++++++++ 5 files changed, 41 insertions(+), 6 deletions(-) create mode 120000 bin/aquarius-go diff --git a/Templates/letter.md b/Templates/letter.md index f0c28fd5..82529bb0 100644 --- a/Templates/letter.md +++ b/Templates/letter.md @@ -7,13 +7,14 @@ address: # return-address # From Address. You can use \email for auto configured email # cc # ps -encl: -- cv -- another letter -opening: Dear Bob, +#encl: +#- cv +#- another letter +#opening: Dear Bob, # closing subject: My Subject # colorlinks: true +#numbersections: true ... This is my letter diff --git a/bin/aquarius-go b/bin/aquarius-go new file mode 120000 index 00000000..0ed5beac --- /dev/null +++ b/bin/aquarius-go @@ -0,0 +1 @@ +/home/jonathan/GitRepos/aquariusGo/aquarius-go \ No newline at end of file diff --git a/bin/compiler b/bin/compiler index 4cfdf281..ec93a5bb 100755 --- a/bin/compiler +++ b/bin/compiler @@ -27,7 +27,17 @@ textype() { \ biber --input-directory "$dir" "$base" && $command --output-directory="$dir" "$base" && $command --output-directory="$dir" "$base" - } +} + +mdtype(){ \ + command=${2:-"default"} + echo "$command" + case "$command" in + "fplreport") pandoc "$file" --template fellowship.latex --pdf-engine=xelatex -o "${base}.pdf" ;; + "letter") pandoc "$file" --template template-letter.tex -o "${base}.pdf" ;; + *) pandoc "$file" -o "$base".pdf ;; + esac +} shebangtest() { case "$shebang" in @@ -42,7 +52,8 @@ case "$file" in *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;; *\.tex|*\.latex) textype "$file" ;; #*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; - *\.md) pandoc "$file" -o "$base".pdf ;; + #*\.md) pandoc "$file" -o "$base".pdf ;; + *\.md) mdtype "$file" "$2" ;; *config.h) make && sudo make install ;; *\.c) cc "$file" -o "$base" && "$base" ;; *\.py) python "$file" ;; diff --git a/i3/config b/i3/config index b397e89f..66da2a8b 100644 --- a/i3/config +++ b/i3/config @@ -269,6 +269,7 @@ bindsym $mod+c exec chromium-snapshot-bin, workspace $workspace1 bindsym $mod+Shift+c exec chromium-snapshot-bin --force-device-scale-factor=2, workspace $workspace1 bindsym control+mod1+f exec thunar bindsym $mod+z exec zeal +bindsym $mod+Shift+q exec qutebrowser # Pulse Audio controls diff --git a/pandoc/templates/template-letter.tex b/pandoc/templates/template-letter.tex index 95def64a..e3d48577 100644 --- a/pandoc/templates/template-letter.tex +++ b/pandoc/templates/template-letter.tex @@ -252,6 +252,27 @@ $if(letterhead)$ $endif$ \usepackage{blindtext} +$if(numbersections)$ + \newcounter{section} + \newcounter{subsection}[section] + \setcounter{secnumdepth}{3} +$endif$ +\makeatletter +\newcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries}} +\newcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\bfseries}} +$if(numbersections)$ +\renewcommand \thesection{\@arabic\c@section} +\renewcommand\thesubsection{\thesection.\@arabic\c@subsection} +$endif$ + +\makeatother + \begin{document} $for(include-before)$