diff --git a/.gitignore b/.gitignore index 2ee0272..2e81031 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,16 @@ # Rust /target + +# LaTeX +_minted-* +_markdown_* +*.aux +*.out +*.log +*.fdb* +*.fls +*.gz +*.pdf +*.bbl +*.blg +!papers/graphics/*.pdf diff --git a/papers/.latexmkrc b/papers/.latexmkrc new file mode 100644 index 0000000..a44bcb1 --- /dev/null +++ b/papers/.latexmkrc @@ -0,0 +1,4 @@ +ensure_path('TEXINPUTS','tex/', '.'); +ensure_path('LUAINPUTS','tex/', '.'); + +$pdf_mode=4; \ No newline at end of file diff --git a/papers/readme.md b/papers/readme.md new file mode 100644 index 0000000..8f585d8 --- /dev/null +++ b/papers/readme.md @@ -0,0 +1,25 @@ +# Rosenpass papers: + +This directory is containing publications by the Rosenpass project. You find this readme either within the source directory or the branch holding the built PDFs files. + +## Direct links to the PDF files + +[Whitepaper](https://github.com/rosenpass/rosenpass/blob/papers-pdf/whitepaper.pdf) + +## Local build instructions + +Requirements: To build the PDF files from Markdown you have to use at least TeX Live 2021 and python-pygments for the syntax highlighting. + +You can build the PDF files from Markdown using `latexmk`. Simply run + +``` +latexmk -r tex/CI.rc +``` + +inside `papers/`. The PDF files will be located directly in `papers/`. + +## Add version info within the template-rosenpass files + +The version info is using gitinfo2. To use the setup one has to run the `papers/tex/gitinfo2.sh` script. In local copies it's also possible to add this as a post-checkout or post-commit hook to keep it automatically up to date. + +The version information in the footer automatically includes a “draft”. This can be removed by tagging a release version using `\jobname-release`, e.h. `whitepaper-release` for the `whitepaper.md` file. \ No newline at end of file diff --git a/papers/tex/CI.rc b/papers/tex/CI.rc new file mode 100644 index 0000000..828724d --- /dev/null +++ b/papers/tex/CI.rc @@ -0,0 +1,11 @@ +ensure_path('TEXINPUTS','tex/', '.'); +ensure_path('LUAINPUTS','tex/', '.'); + +@default_files=("*.md"); +@default_excluded_files = ("*_content.md", "README.md", "readme.md"); +$do_cd=1; +$pdf_mode=4; + +$lualatex= 'lualatex --jobname=%R --shell-escape %O "\\def\\MarkDownInputFile{%S}\\input{markdown-wrapper.tex}"'; + +$clean_ext='_markdown_%R _markdown_%R _minted-%R _minted-%R'; diff --git a/papers/tex/cryptoverif-lexer.py b/papers/tex/cryptoverif-lexer.py new file mode 100644 index 0000000..1429a6a --- /dev/null +++ b/papers/tex/cryptoverif-lexer.py @@ -0,0 +1,44 @@ +import re +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import * + +class CryptoVerifLexer(RegexLexer): + """ + Lexer for the CryptoVerif + """ + flags = re.MULTILINE | re.DOTALL + + name = 'CrptoVerif' + aliases = ['cryptoverif'] + filenames = ['*.ocvl'] + + tokens = { + 'root': [ + (r'\(\*', Comment.Multiline, 'comment'), + (r'\s+', Text), + (r'(%|&)[^;]*;', Name.Entity), + ('