Skip to content

Commit

Permalink
Add algorithm package
Browse files Browse the repository at this point in the history
* Fix the issue that  monospace font is not installed
  • Loading branch information
appleparan committed Jan 7, 2024
1 parent f1270ad commit dce9742
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions appendix.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,26 @@ \chapter{Experimental Equipment}
\chapter{Data Processing}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Monospace font Test

\texttt{PPO Algorithm in Pseudocode.}

Bold and Monospace Test

\textbf{\texttt{PPO Algorithm in Pseudocode.}}

\begin{algorithm}
\caption{PPO}
\begin{algorithmic}[1]
\For {$iteration=1,2,\ldots$}
\For {$actor=1,2,\ldots,N$}
\State Run policy $\pi_{\theta_{old}}$ in environment for $T$ time steps
\State Compute advantage estimates $\hat{A}_{1},\ldots,\hat{A}_{T}$
\EndFor
\State Optimize surrogate $L$ wrt. $\theta$, with $K$ epochs and minibatch size $M\leq NT$
\State $\theta_{old}\leftarrow\theta$
\EndFor
\end{algorithmic}
\end{algorithm}

\end{appendices}
Binary file added fonts/NotoSansMono-Bold.ttf
Binary file not shown.
Binary file modified thesis.pdf
Binary file not shown.
8 changes: 5 additions & 3 deletions thesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
Ligatures=TeX]{NotoSerifkr-Regular.otf}
\setCJKmonofont[
Path=fonts/,
Extension=.otf,
BoldFont=NotoSansMono-Regular,
Extension=.ttf,
BoldFont=NotoSansMono-Bold,
AutoFakeSlant,
Ligatures=TeX]{NotoSansMono-Regular.otf}
Ligatures=TeX]{NotoSansMono-Regular.ttf}
\fi

\ifluatex
Expand Down Expand Up @@ -120,6 +120,8 @@
\usepackage{graphicx} %for images and plots
\usepackage[figuresright]{rotating} %for rotated, landscape images
\usepackage{adjustbox} % fit table to page width
\usepackage{algorithm} % algorithm
\usepackage{algpseudocode} % algorithm

\usepackage{booktabs} % proessional-quality tables
\usepackage{multicol} % use multicol in table
Expand Down

0 comments on commit dce9742

Please sign in to comment.