From b13d611ff619f9cd238c73d1d5a284b49fedb33b Mon Sep 17 00:00:00 2001 From: haskal Date: Tue, 26 May 2020 05:55:24 -0400 Subject: [PATCH] latex rendering (EXTREMELY CURSED) --- .gitignore | 282 +---------------------------- Makefile | 16 +- fonts.tex | 18 ++ satellite-bus/bytes-away/README.md | 1 + top.md | 9 + 5 files changed, 43 insertions(+), 283 deletions(-) create mode 100644 fonts.tex create mode 100644 top.md diff --git a/.gitignore b/.gitignore index 8a42ebb..4aa5afe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,284 +1,6 @@ -## Core latex/pdflatex auxiliary files: +*.pdf *.aux -*.lof *.log -*.lot *.fls -*.out -*.toc -*.fmt -*.fot -*.cb -*.cb2 -.*.lb - -## Intermediate documents: -*.dvi -*.xdv -*-converted-to.* -# these rules might exclude image files for figures etc. -# *.ps -# *.eps -# *.pdf - -## Generated if empty string is given at "Please type another file name for output:" -.pdf - -## Bibliography auxiliary files (bibtex/biblatex/biber): -*.bbl -*.bcf -*.blg -*-blx.aux -*-blx.bib -*.run.xml - -## Build tool auxiliary files: *.fdb_latexmk -*.synctex -*.synctex(busy) -*.synctex.gz -*.synctex.gz(busy) -*.pdfsync - -## Build tool directories for auxiliary files -# latexrun -latex.out/ - -## Auxiliary and intermediate files from other packages: -# algorithms -*.alg -*.loa - -# achemso -acs-*.bib - -# amsthm -*.thm - -# beamer -*.nav -*.pre -*.snm -*.vrb - -# changes -*.soc - -# comment -*.cut - -# cprotect -*.cpt - -# elsarticle (documentclass of Elsevier journals) -*.spl - -# endnotes -*.ent - -# fixme -*.lox - -# feynmf/feynmp -*.mf -*.mp -*.t[1-9] -*.t[1-9][0-9] -*.tfm - -#(r)(e)ledmac/(r)(e)ledpar -*.end -*.?end -*.[1-9] -*.[1-9][0-9] -*.[1-9][0-9][0-9] -*.[1-9]R -*.[1-9][0-9]R -*.[1-9][0-9][0-9]R -*.eledsec[1-9] -*.eledsec[1-9]R -*.eledsec[1-9][0-9] -*.eledsec[1-9][0-9]R -*.eledsec[1-9][0-9][0-9] -*.eledsec[1-9][0-9][0-9]R - -# glossaries -*.acn -*.acr -*.glg -*.glo -*.gls -*.glsdefs -*.lzo -*.lzs - -# uncomment this for glossaries-extra (will ignore makeindex's style files!) -# *.ist - -# gnuplottex -*-gnuplottex-* - -# gregoriotex -*.gaux -*.gtex - -# htlatex -*.4ct -*.4tc -*.idv -*.lg -*.trc -*.xref - -# hyperref -*.brf - -# knitr -*-concordance.tex -# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files -# *.tikz -*-tikzDictionary - -# listings -*.lol - -# luatexja-ruby -*.ltjruby - -# makeidx -*.idx -*.ilg -*.ind - -# minitoc -*.maf -*.mlf -*.mlt -*.mtc[0-9]* -*.slf[0-9]* -*.slt[0-9]* -*.stc[0-9]* - -# minted -_minted* -*.pyg - -# morewrites -*.mw - -# nomencl -*.nlg -*.nlo -*.nls - -# pax -*.pax - -# pdfpcnotes -*.pdfpc - -# sagetex -*.sagetex.sage -*.sagetex.py -*.sagetex.scmd - -# scrwfile -*.wrt - -# sympy -*.sout -*.sympy -sympy-plots-for-*.tex/ - -# pdfcomment -*.upa -*.upb - -# pythontex -*.pytxcode -pythontex-files-*/ - -# tcolorbox -*.listing - -# thmtools -*.loe - -# TikZ & PGF -*.dpth -*.md5 -*.auxlock - -# todonotes -*.tdo - -# vhistory -*.hst -*.ver - -# easy-todo -*.lod - -# xcolor -*.xcp - -# xmpincl -*.xmpi - -# xindy -*.xdy - -# xypic precompiled matrices and outlines -*.xyc -*.xyd - -# endfloat -*.ttt -*.fff - -# Latexian -TSWLatexianTemp* - -## Editors: -# WinEdt -*.bak -*.sav - -# Texpad -.texpadtmp - -# LyX -*.lyx~ - -# Kile -*.backup - -# gummi -.*.swp - -# KBibTeX -*~[0-9]* - -# TeXnicCenter -*.tps - -# auto folder when using emacs and auctex -./auto/* -*.el - -# expex forward references with \gathertags -*-tags.tex - -# standalone packages -*.sta - -# Makeindex log files -*.lpz - -# xwatermark package -*.xwm - -# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib -# option is specified. Footnotes are the stored in a file with suffix Notes.bib. -# Uncomment the next line to have this generated file ignored. -#*Notes.bib +/build/ diff --git a/Makefile b/Makefile index 0a756d2..ca7fa0f 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ .PHONY: all clean genreadme DOCS_ALL=$(wildcard **/**/README.md) +WRITEUP_PDF=writeup.pdf -all: README.md - @echo TODO +all: README.md $(WRITEUP_PDF) clean: - @echo TODO + $(RM) -r $(WRITEUP_PDF) build/ README.md: $(DOCS_ALL) @echo "GEN README.md" @(printf "# BLAHAJ Hack-a-Sat 2020 Writeups\n\n"; for file in $(DOCS_ALL); do \ printf -- "- [%s](%s)\n" "$$(dirname $$file)" "$$(dirname $$file)"; done) > README.md + +$(WRITEUP_PDF): $(DOCS_ALL) fonts.tex top.md + @echo "GEN writeup.md" + @mkdir build/ 2>/dev/null || true + @find . -mindepth 3 -iname '*.png' -exec cp {} build/ \; + @cp fonts.tex build/fonts.tex + @for md in top.md $(DOCS_ALL); do cat $$md; done > build/writeup.md + @echo "PDF writeup.pdf" + @cd build && pandoc -i writeup.md --pdf-engine=lualatex -o writeup.pdf + @cp build/writeup.pdf $@ diff --git a/fonts.tex b/fonts.tex new file mode 100644 index 0000000..2c8ddd4 --- /dev/null +++ b/fonts.tex @@ -0,0 +1,18 @@ +% why are we in a separate file here? +% pandoc really likes to mess with these commands when they're in the yaml config so, it's a +% separate file out of pandoc's evil clutches now + +% i literally had to force upgrade to absolute bleeding edge lualatex to get this working ok + +\usepackage{fontspec} +\usepackage{newunicodechar} +\newfontfamily{\emojifont}{Noto Color Emoji}[Renderer=Harfbuzz] +\DeclareTextFontCommand{\textemoji}{\emojifont} +\newunicodechar{🧃}{\textemoji{🧃}} + +\newfontfamily{\symbolfont}{DejaVu Sans}[Renderer=Harfbuzz] +\DeclareTextFontCommand{\textsymbol}{\symbolfont} +\newunicodechar{⬡}{\textsymbol{⬡}} +\newunicodechar{⊕}{\textsymbol{⊕}} + +\setmonofont{Noto Mono} diff --git a/satellite-bus/bytes-away/README.md b/satellite-bus/bytes-away/README.md index 55a061f..de3f761 100644 --- a/satellite-bus/bytes-away/README.md +++ b/satellite-bus/bytes-away/README.md @@ -26,6 +26,7 @@ instance automatically by writing the configuration file at `cosmos/config/tools/cmd_tlm_server/cmd_tlm_server.txt`. When COSMOS is successfully connected to the CTF instance it looks like this (no themes were installed in the Docker container so it looks like Windows 95, I'm so sorry,) + ![COSMOS main window](COSMOS.png) COSMOS can be used to send commands with the Command Sender, and we can send for example a command diff --git a/top.md b/top.md new file mode 100644 index 0000000..7cd7856 --- /dev/null +++ b/top.md @@ -0,0 +1,9 @@ +--- +title: BLAHAJ +mainfont: Noto Serif +geometry: margin=0.3in + +header-includes: | + \input{fonts.tex} +--- +