- Put
makememo
on path somewhere - Make sure
pandoc-crossref
andpandoc-citeproc
are somewhere on your path - Set the location of your bibliography file in metadata of
memo-template.md
- Set the location of your CSL file in metadata of
memo-template.md
- IEEE CSL file can be found here: https://github.com/citation-style-language/styles/blob/master/ieee.csl
- Create a markdown file such as
memo-example.md
- The metadata fields (title, subtitle, author, date) are optional
- Other metadata fields set here will not be used
- Call the bash script:
make-memo memo-example.md
- Open
memo-example.pdf
after it has been created :crystal-ball:
Last active
September 29, 2021 14:57
-
-
Save avonmoll/1e01e6fac89d3037526998774f7904f3 to your computer and use it in GitHub Desktop.
Extremely Simple Pandoc Memo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ln -sf $PWD/makememo ~/bin | |
ln -sf $PWD/memo-template.md ~/.pandoc/templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "-h" ]; then | |
echo "Usage: `basename $0` [-h] [file.md] -- program to create PDF version of memo using simple template | |
where: | |
-h show this help text" | |
exit 0 | |
else | |
fname=$1 | |
name=$(echo $fname | cut -d'.' -f 1) | |
echo `pandoc $fname --template=memo-template.md -t markdown | pandoc --pdf-engine=xelatex --filter=pandoc-crossref --filter=pandoc-citeproc -o $name.pdf` | |
exit 0 | |
fi |
Error in user YAML: (<unknown>): could not find expected ':' while scanning a simple key at line 17 column 1
---
documentclass: article
fontsize: 11pt
bibliography: '/home/alex/library.bib'
csl: '/home/alex/.csl/ieee.csl'
biblatexoptions:
- sorting=none
- backend=biber
header-includes:
- \usepackage{fullpage}
- \usepackage{hyperref}
- \linespread{1.05}
- \setmainfont{TeX Gyre Pagella}
- \setsansfont{TeX Gyre Heros}
- \setmathfont{TeX Gyre Pagella Math}
- \setlength{\parindent}{0pt}
- \setlength{\parskip}{.7em}
$if(footer)$
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \renewcommand{\headrulewidth}{0pt}
- \fancyhead{}
- \fancyfoot[RO,RE]{$footer$}
- \fancyfoot[CO,CE]{\thepage}
$endif$
$for(header-includes)$
- $header-includes$
$endfor$
link-citations: true
colorlinks: true
---
\noindent
\large\textbf{$title$}\hfill\textbf{$if(author)$$author$$else$Alexander Von Moll$endif$}\newline
\noindent
\normalsize
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment