Skip to content
Snippets Groups Projects
Verified Commit c1e3d321 authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Adapt PathORAM presentation.

parents
No related branches found
No related tags found
No related merge requests found
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
[*.yml]
indent_style = space
indent_size = 2
document/dist/
*-eps-converted-to.pdf
chktex*
stages:
- lint
- build
- build-review
- review
- release
# CHANGE ME!
variables:
AUTHPASSWORD: "example" # change to "" (empty string) to disable authentication
# username is always "review" (without quotes)
include:
# BEFORE SCRIPT
- project: 'templates/ci-snippets'
file: 'variables.yml'
# LINT
- project: 'templates/ci-snippets'
file: 'latex-report/chktex.yml'
- project: 'templates/ci-snippets'
file: 'latex-report/cspell.yml'
# BUILD
- project: 'templates/ci-snippets'
file: 'latex-report/build.yml'
# BUILD REVIEW
- project: 'templates/ci-snippets'
file: 'latex-review-apps/build-review.yml'
# REVIEW
- project: 'templates/ci-snippets'
file: 'latex-review-apps/review.yml'
- project: 'templates/ci-snippets'
file: 'latex-review-apps/stop-review.yml'
# RELEASE
- project: 'templates/ci-snippets'
file: 'latex-report/artifacts.yml'
# ADJUSTMENTS
build-review:
except: []
review:
except: []
stop_review:
except: []
build:
script:
- ./document/build.sh
- ./document/build.sh -n
{
"version": "0.1",
"language": "en",
"words": [
"Dmytro",
"Bogatov",
"chktex"
],
"flagWords": [
"yu",
"yum"
],
"dictionaries": [
"companies",
"filetypes",
"misc",
"softwareTerms",
"en_us",
"latex"
],
"ignoreRegExpList": [
"^\\\\\\w+{?",
"\\\\textcite{.*}",
"\\\\cite{.*}",
"\\\\begin{\\w+}",
"\\\\end{\\w+}",
"\\\\usepackage{\\w+}",
"\\\\bibliographystyle{\\w+}"
]
}
{
"latex-workshop.latex.outDir": "./dist",
"latex-workshop.view.pdf.external.synctex": {
"command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
"args": [
"-r",
"%LINE%",
"./dist/report.pdf",
"%TEX%"
]
},
"latex-workshop.view.pdf.viewer": "external"
}
FROM dbogatov/docker-images:nginx-latest
LABEL maintainer="Dmytro Bogatov <dmytro@dbogatov.org>"
ARG PROJECTNAME
ARG PROJECTURL
ARG COMMIT
WORKDIR /srv
# Copy the source
COPY document/dist/ .
RUN /pdf/build-index.sh "$PROJECTNAME" "$PROJECTURL" "$COMMIT"
CMD ["nginx", "-g", "daemon off;"]
# Presentation title
The up-to-date version of the document is built in CI and resides as artifact.
> FIXME
- [Download the file](https://git.dbogatov.org/templates/latex-prsentation/-/jobs/artifacts/master/raw/presentation.pdf?job=artifacts)
- [View the file](https://git.dbogatov.org/templates/latex-prsentation/-/jobs/artifacts/master/file/presentation.pdf?job=artifacts)
## How to compile
```bash
./document/build.sh # to compile without notes
./document/build.sh -n # to compile wit notes
open ./document/dist/*.pdf # to open
```
https://eprint.iacr.org/2013/280.pdf
@inproceedings{path-oram,
author = {Stefanov, Emil and van Dijk, Marten and Shi, Elaine and Fletcher, Christopher and Ren, Ling and Yu, Xiangyao and Devadas, Srinivas},
title = {Path ORAM: An Extremely Simple Oblivious RAM Protocol},
booktitle = {Proceedings of the 2013 ACM SIGSAC Conference on Computer Communications Security},
year = {2013},
pages = {299--310},
publisher = {ACM}
}
#!/usr/bin/env bash
set -e
shopt -s extglob
# Ensure that the CWD is set to script's location
cd "${0%/*}"
CWD=$(pwd)
INTERACTION=nonstopmode
OUTDIR=dist
JOBNAME=presentation
NOTES=""
SUFFIX=""
SYNCTEX=1
usage() { echo "Usage: $0 [-o]" 1>&2; exit 1; }
while getopts "n" o; do
case "${o}" in
n)
NOTES="\def\generatenotes{true}"
SUFFIX="-with-notes"
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
rm -rf ${OUTDIR}
mkdir -p ${OUTDIR}
if [ -n "$CI_BUILD_REF" ];
then
printf "\providecommand{\\\version}{%s}" $(echo $CI_BUILD_REF | cut -c1-8) > version.tex
fi
latexmk -cd -f- -pdf -time \
-jobname=$JOBNAME$SUFFIX \
-outdir=$OUTDIR \
--synctex=${SYNCTEX} \
--interaction=${INTERACTION} \
-halt-on-error \
-pdflatex='xelatex %O "\def\dummy{} '${NOTES}' \input %S "' \
main
rm -f ${OUTDIR}/*.{aux,log,out,xwm,toc,lof,lot,bib,bbl,bcf,blg,xml,fls,fdb_latexmk,nav,snm}
echo "Done."
This diff is collapsed.
\documentclass{beamer}
\usetheme[
progressbar=frametitle,
titleformat section=smallcaps
]{metropolis}
\input{version.tex}
\input{meta.tex}
\input{preamble.tex}
\begin{document}
\maketitle
\input{sections/introduction}
\begin{frame}[allowframebreaks]{References}
\printbibliography%
\end{frame}
\end{document}
\title{Presentation Title}
\subtitle{
Subtitle \\
{\small Pissible multiline} \\
with references~\cite{path-oram}
}
\date{Built from \href{https://git.dbogatov.org/templates/latex-presentation/commit/\version}{\emph{\version}} on \today}
\author{Your name \\ your@email.com}
\institute{Your School}
\def\wm{\begin{tabular}{c} Optional \\ Watermark \end{tabular}}
% cSpell:disable
% CLI arguments
\ifdefined\generatenotes%
\newcommand{\notesOption}{show notes on second screen}%
\else
\newcommand{\notesOption}{hide notes}%
\fi
% packages
\usepackage{pgfpages}
\usepackage{booktabs}
\usepackage{bm}
\usepackage{mathtools}
\usepackage{listings}
\usepackage{fancybox}
\usepackage{bm}
\usepackage{multicol}
\usepackage{xpatch}
\usepackage{hyperref}
\usepackage{hyperxmp}
\usepackage{multirow}
\usepackage{xparse}
\usepackage{caption}
\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}
\usepackage[printwatermark]{xwatermark}
\usepackage{ifthen}
% settings
\graphicspath{{./graphics/}}
\setbeameroption{\notesOption}
\makeatletter
\let\@@magyar@captionfix\relax % chktex 21
\makeatother
\logo{
\includegraphics[
width=1cm,
keepaspectratio
]{logo.eps}\hspace{\dimexpr\paperwidth-36pt}\vspace{-30pt}
}
\addbibresource{bibfile.bib}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\hypersetup{
colorlinks=true,
linkcolor=magenta,
urlcolor=cyan,
citecolor=blue,
pdfpagemode=FullScreen,
pdfdisplaydoctitle=true,
pdfmenubar=false,
pdfpagelayout=SinglePage
}
\captionsetup[figure]{labelformat=empty}
\definecolor{CardinalRed}{RGB}{172,29,55}
\definecolor{Tangerine}{RGB}{247,148,30}
\setbeamercolor{alerted text}{fg=CardinalRed}
\setbeamercolor{example text}{fg=Tangerine}
{
\usebeamercolor[fg]{alerted text}
\usebeamercolor[fg]{example text}
}
% definitions
\newcommand{\BigO}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\BigOmega}[1]{\Omega\left(#1\right)}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\newsavebox{\mybox}
\newsavebox{\tablebox}
\xpatchbibmacro{name:andothers}{%
\bibstring{andothers}%
}{%
\bibstring[\emph]{andothers}%
}{}{}
\newsavebox\watermark%
\savebox\watermark{\tikz[color=gray,opacity=0.02]\node{\wm};}
\newwatermark*[
allpages,
angle=0,
scale=3,
xpos=0,
ypos=-25
]{\usebox\watermark}
\makeatletter
\newcommand{\manuallabel}[2]{\def\@currentlabel{#2}\label{#1}} % chktex 21
\makeatother
\newenvironment<>{fixblock}[1]{%
\begin{block}{#1}
\vspace{0pt}
#2
}{
\end{block}
}
\section{Section title}
\begin{frame}{Frame title}
\begin{fixblock}{Block title}
Block content with formula
\[
P(x) = \frac{1}{{\sigma \sqrt{ 2 \pi } }} e^{ - \frac{(x - \mu)^2}{2 \sigma^2} }
\]
\end{fixblock}
\begin{itemize}
\item Some list
\item Some list
\end{itemize}
\note{
The note.
}
\end{frame}
\providecommand{\version}{local-dev}
test.sh 0 → 100755
#!/usr/bin/env bash
shopt -s globstar
# Ensure that the CWD is set to script's location
cd "${0%/*}"
CWD=$(pwd)
#######
echo ">>> Testing CHKTEX..."
chktex -eall -n22 -n46 -n30 -n3 -e16 -I0 -v2 -o chktex.out document/**/*.tex document/*.tex &> /dev/null
cat chktex.out
if [ -s chktex.out ];
then
rm -f chktex.*
echo ">>> FAIL"
exit 1
else
rm -f chktex.*
fi
echo ">>> Testing special characters..."
! grep " ̈" document/**/*.tex document/*.tex
if [[ $? != 0 ]];
then
echo ">>> FAIL"
exit 1
fi
echo ">>> Testing CSPELL..."
docker run -it -v $(PWD):/code --entrypoint /bin/bash dbogatov/docker-images:cspell-latest -c "cd /code && cspell -c .vscode/cSpell.json document/**/*.tex document/*.tex"
if [[ $? != 0 ]];
then
echo ">>> FAIL"
exit 1
fi
echo ">>> pass"
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment