Latex Common Files, includes
- A Makefile used for compile
- A main.tex file as a note taking template
- support per chapter quick cite to docs or webpages
- support prettified code block showing
Latex Common Files, includes
/build/* |
\documentclass{report} | |
% use geometry to set paper size in US letter | |
\usepackage[letterpaper]{geometry} | |
\reversemarginpar | |
\usepackage{todonotes} | |
\usepackage{fancyref} | |
\usepackage{xcolor} | |
\usepackage{soul} | |
\usepackage[outputdir=build/]{minted} | |
\usemintedstyle{sas} | |
\setminted{autogobble} | |
\usepackage{fontspec} | |
\setmonofont{JetBrainsMono}[ | |
Path=./fonts/JetBrainsMono/, | |
Scale=MatchLowercase, | |
Extension = .ttf, | |
UprightFont=*-Regular, | |
BoldFont=*-Bold, | |
ItalicFont=*-Italic, | |
BoldItalicFont=*-BoldItalic | |
] | |
\usepackage{parskip} % paragraph with have no indent but wider vertical gap | |
\usepackage{graphicx} % figures | |
\usepackage{csquotes} | |
\usepackage{enumitem} % enumerate itemsep | |
\usepackage[ | |
refsection=chapter, | |
citestyle=numeric, | |
sorting=none | |
]{biblatex} | |
\DeclarePrintbibliographyDefaults{ | |
heading=subbibintoc, | |
title=See also: | |
} | |
\usepackage{hyperref} | |
\hypersetup{ | |
colorlinks=true, | |
linkcolor=black, | |
urlcolor=cyan, | |
citecolor=blue, | |
} | |
%\includeonly{} | |
\title{Latex Setting up Template} | |
\author{Kaidong Hu} | |
\addbibresource{main.bib} | |
\begin{document} | |
\maketitle | |
\tableofcontents | |
\include{pages/chapter1} | |
\include{pages/chapter2} | |
\include{pages/chapter3} | |
\end{document} |
SHELL = /bin/bash | |
# This Makefile is used to compile the LaTeX document. | |
# It requires user updates bibligraphy manually in order to avoid double | |
# compilation every time. | |
default: all | |
lualatex --shell-escape --interaction=nonstopmode --output-directory=build/ main.tex | |
@read -n1 -p "Open it? ([n]/y)" ans ; if [ "$$ans" = "y" ]; then zathura build/main.pdf & fi | |
build/pages: | |
mkdir -p build/pages | |
full: | build/pages | |
lualatex --shell-escape --interaction=nonstopmode --output-directory=build/ main.tex | |
biber build/main | |
lualatex --shell-escape --interaction=batchmode --output-directory=build/ main.tex | |
lualatex --shell-escape --interaction=batchmode --output-directory=build/ main.tex | |
show: | |
zathura build/main.pdf & | |
biber: | |
biber build/main | |
clean: | |
rm -rf build | |
all: | build/pages | |
.PHONY: default all clean biber |
Content | |
\printbibliography |
@misc{example_com, | |
title = {Example Domain Homepage}, | |
url = {https://example.com/} | |
} |