Skip to content

Instantly share code, notes, and snippets.

@tapyu
Last active June 11, 2024 15:47
Show Gist options
  • Save tapyu/886dc95fc19c4250fb38581ccc58bed8 to your computer and use it in GitHub Desktop.
Save tapyu/886dc95fc19c4250fb38581ccc58bed8 to your computer and use it in GitHub Desktop.
General LaTeX snippets
  • General LaTeX snippets
  • Default preamble
  • Makefile
  • latexindent.yaml configuration
  • \newglossaryentry{} entries
  • TeX Live Manager (tlmgr) installation guide
%%% important comment keywords %%%
% CAVEAT: -> a warning concerning some compilation issues that may break your system in some situation
% ADJUST: -> manual tweaks that you may want to change
% TODO: -> to-do list
%%%%%%%%% bibliography %%%%%%%%%
\usepackage[style=numeric-comp,backend=biber]{biblatex} % tells LaTeX to use the biber tool instead of the traditional bibtex tool for sorting and formatting your bibliography. Biber is a more advanced and powerful tool than bibtex and it provides more features, such as advanced sorting, Unicode support and support for various data sources.
\addbibresource{/home/tapyu/.cache/zotero/refs.bib} % add reference file, in the document, add \printbibliography to print bibliography
%%%%%%%%% references (cite and glossary) %%%%%%%%%
\makeatletter
% some classes (e.g., beamer) loads hyperref by default. So it is sensible to check whether it wasn't already loaded to avoind clashes
\@ifpackageloaded{hyperref}{
% The package is already loaded
}{
% The package is not loaded, so load it now
\usepackage[colorlinks=true,hyperindex=false]{hyperref} % make references blue and clickable
}
\makeatother
\hypersetup{ % you can use allcolors=blue in hyperref options instead this setup
linkcolor=black, % For \gls{} entries
citecolor=blue, % For \cite{} entries
}
\usepackage{glossaries} % \newglossaryentry{} entries. ADJUST: If you want to make the glossary entries nonclickable, load this package before hyperref
\usepackage[nonumberlist]{glossaries-extra} % additional features for glossaries. ADJUST: you might want to use the `automake' option to automatically generate the glossary, but it causes errors if you don't want to make glossaries with the `\makeglossaries' command.
%%%%%%%%% list of authors %%%%%%%%%
\usepackage{authblk} % CAVEAT: this pkg will lead to compilation errors if you use it along with `\IEEEauthorblockN`, which is a command from the `IEEEtran` document class
%%%%%%%%% items, tables and figs %%%%%%%%%
\makeatletter
\@ifclassloaded{beamer}{}{\usepackage{enumitem}}
\makeatother
\usepackage{xltabular}
\usepackage{float} % use the [H] option
\usepackage{tikz}
\usepackage{graphicx} % extends the basic LaTeX graphic capabilities: placement, scaling, rotation, file formats
\usepackage{subcaption} % provides a means of using the subfigures environment, allowing a figure to be subdivided into smaller parts
\usepackage{standalone} % place tikz environments or other material in own source files
%%%%%%%%% new features %%%%%%%%%
\usepackage{xparse} % create commands with optional arguments or complex argument structures
\usepackage{xstring} % testing a string's contents, extracting substrings, substitution of substrings
%%%%%%%%% math %%%%%%%%%
\newcommand\bmmax{0} \newcommand\hmmax{0} % fix the "Too many math alphabets used in version normal" error (see https://tex.stackexchange.com/a/243541/211183)
\usepackage{amsmath}
\usepackage{mathtools} % is an extension package to amsmath to use \DeclarePairedDelimiter
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{esint} % for \oiint
\usepackage{newtxmath} % for Greek variants (bold, nonitalic, etc...)
\usepackage{stmaryrd} % provides new symbols, such as \llbracket \rrbracket
\usepackage{bm} % for writing tensor, e.g., $\bm{\mathcal{A}}$
\usepackage{IEEEtrantools} % provides the IEEEeqnarray environment. CAVEAT: This package may crash your build if the \documentclass is IEEE-like, e.g., IEEEtran. In this case, delete this line!
\usepackage{siunitx} % typesetting units and unitless numbers SI (Système International d’Unités) units
% use \qty for number and unit, e.g., \qty{10}{\meter\per\second}
% CAVEAT: you cannot use siunitx for nonnumerical values, e.g. \qty{\pi}{\meter\per\second}
% use \unit{} for unit only, e.g., \unit{\meter\per\second}
% use (TODO: find it out for \qty)[options]{value1}{value2}{unit commands} for a range of values, possible options:
% 1. "range-phrase=-" -> change the word "to" to "--"
% 2. range-units=single -> chage "1m to 10m" to "1 to 10m"
% 3. mode=text % writes the unit in full
% 4. quantity-product={-} to create a compound adjective with quantities, e.g. "the 50-Hz signal..."
% use the [per-mode=symbol] option in the \unit or \qty command to change the writing of \per, or change the line below to set it globally
\sisetup{per-mode=symbol} % print the symbol "/" in "25/100"
\sisetup{tight-spacing=true} % makes the spacing in "5 x 10²" closer
% \squared -> ^2
\usepackage{physics} % several math macros, such as
\AtBeginDocument{\RenewCommandCopy\qty\SI} % CAVEAT: avoid incompatibilities between physics and siunitx packages when using the \qty{}{} command. The conflict happens because it is defined in both packages. Although physics has \SI{}{} as an alternative, it is deprecated and therefore you should use \unit{} and \qty{}{} instead of \si{} and \SI{}{}, respectively. See here (https://tex.stackexchange.com/questions/628183/how-to-avoid-qty-conflict-with-physics-and-siunitx) for more info.
% \tr -> trace
% \rank -> rank
% \expval -> angle brackets to inner product,〈a,b〉, or ensemble average〈s(t)〉
% \abs -> |x|
% \norm -> ||x||
% \eval -> evaluated bar x|_y=a
% \order -> Big-O notation
% \Re -> real
% \Im -> imaginary
% \dd[]{} -> differential
% \dv -> derivative
% \pdv -> partial derivative
%%%%%%%%% operators %%%%%%%%%
\let\oldemptyset\emptyset % change empty set
\let\emptyset\varnothing
% circular convolution a lá Oppenheim (if possible, prefer \circledast)
\newcommand*\circconv[1]{%
\begin{tikzpicture}
\node[draw,circle,inner sep=1pt] {#1};
\end{tikzpicture}}
\newcommand{\intersection}{\bigcap\limits} % intersection operator
%%%%%%%%% delimiters %%%%%%%%%
\makeatletter % changes the catcode of @ to 11
\DeclarePairedDelimiter\ceil{\lceil}{\rceil} % ⌈x⌉
\let\oldceil\ceil
\def\ceil{\@ifstar{\oldceil}{\oldceil*}} % swap the asterisk and the nonasterisk behaviors
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor} % ⌊x⌋
\let\oldfloor\floor
\def\floor{\@ifstar{\oldfloor}{\oldfloor*}}
\makeatother % changes the catcode of @ back to 12
%%%%%%%%% basic functions %%%%%%%%%
\newcommand{\adj}[1]{\ensuremath{\operatorname{adj}\left(#1\right)}} % adjugate matrix
\newcommand{\cof}[1]{\ensuremath{\operatorname{cof}\left(#1\right)}} % cofactor matrix
\newcommand{\eig}[1]{\ensuremath{\operatorname{eig}\left(#1\right)}} % eigenvalues
\newcommand{\nullspace}[1]{\ensuremath{\operatorname{N}\left(#1\right)}} % nullspace or kernel of the matrix
\newcommand{\nullity}[1]{\ensuremath{\operatorname{nullity}\left(#1\right)}} % nullity=dim(N(A))
\newcommand{\spn}[1]{\ensuremath{\operatorname{span}\left\{#1\right\}}} % span of a set of vectors, \span is a reserved word
\newcommand{\range}[1]{\ensuremath{\operatorname{C}\left(#1\right)}} % range or columnspace of a matrix=span(a1,a2, ..., an), where ai is the ith column vector of the matrix A
\newcommand{\unvec}[1]{\ensuremath{\operatorname{unvec}\left(#1\right)}} % unvectorize operator
\newcommand{\diag}[1]{\ensuremath{\operatorname{diag}\left(#1\right)}} % diagonal operator
\newcommand{\dom}[1]{\ensuremath{\operatorname{dom}\left(#1\right)}} % domain of the function
\newcommand{\frob}[1]{\ensuremath{\norm{#1}_\textrm{F}}} % Frobenius norm
\renewcommand{\dim}[1]{\ensuremath{\operatorname{dim}\left(#1\right)}} % dimension of a set
%%%%%%%%% customizable functions %%%%%%%%%
% arg min
\NewDocumentCommand{\argmin}{ e{_} m }{% \argmin_{x ∈ A}{f(x)} or \argmin{f(x)}
\ensuremath{%
\IfValueTF{#1}{%
\underset{#1}{\operatorname{arg\,min}\;#2}
}{% else
\operatorname{arg\,min}\;#2
}
}
}
% arg max
\NewDocumentCommand{\argmax}{ e{_} m }{% \argmax_{x ∈ A}{f(x)} or \argmax{f(x)}
\ensuremath{%
\IfValueTF{#1}{%
\underset{#1}{\operatorname{arg\,max}\;#2}
}{% else
\operatorname{arg\,max}\;#2
}
}
}
% limit in the mean (see Van Tress, chapter 6)
\NewDocumentCommand{\limean}{ E{_}{{}} m }{ % \limean_{x ∈ A}{f(x)} or \limean{f(x)}
\ensuremath{
\IfValueTF{#1}{%
\underset{#1}{\operatorname{l.i.m.}\;#2}
}{% else
\operatorname{l.i.m.}\;#2
}
}
}
% mean
\NewDocumentCommand{\E}{ E{_}{{}} o m }{% \E{A}, \E_{u}{A}. If you want only the left or right part of \E (useful for breaking line) you can use \E_{u}[left-only]{A} or \E_{u}[right-only]{A}, respectively
\ensuremath{%
\IfValueTF{#2}{%
\IfStrEq{#2}{left-only}{%
\operatorname{E}_{#1}\left[#3\right.%
}{% right-only
\left.#3\right]%
}%
}{%
\operatorname{E}_{#1}\left[#3\right]%
}%
}
}
% covariance
\NewDocumentCommand{\cov}{O{} m}{\ensuremath{\operatorname{cov}_{#1}\left[#2\right]}} % \cov[u]{x} or \cov{x}
% variance
\let\var\undefined\NewDocumentCommand{\var}{O{} m}{\ensuremath{\operatorname{var}_{#1}\left[#2\right]}} % \var[u]{x} or \var{x}
% vectorize operator
\let\vec\undefined\NewDocumentCommand{\vec}{O{} m}{\ensuremath{\operatorname{vec}_{#1}\left[#2\right]}} % \vec[u]{\mathbf{A}}, [u] is optional
% normalize all trigonometry functions (new and predefined) to put a parenthesis around the input argument
\RenewDocumentCommand{\sin}{s m}{% \sin{x} -> sin(x) \sin*{x} -> sin x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{sin} #2}{\operatorname{sin}\left(#2\right)}%
}
}
\RenewDocumentCommand{\cos}{s m}{% \cos{x} -> cos(x) \cos*{x} -> cos x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{cos} #2}{\operatorname{cos}\left(#2\right)}%
}
}
\RenewDocumentCommand{\tan}{s m}{% \tan{x} -> tan(x) \tan*{x} -> tan x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{tan} #2}{\operatorname{tan}\left(#2\right)}%
}
}
\NewDocumentCommand{\sinc}{s m}{% \sinc{x} -> sinc(x) \sinc*{x} -> sinc x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{sinc} #2}{\operatorname{sinc}\left(#2\right)}%
}
}
\NewDocumentCommand{\sgn}{s m}{% \sgn{x} -> sgn(x) \sng*{x} -> sgn x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{sng} #2}{\operatorname{sgn}\left(#2\right)}%
}
}
\RenewDocumentCommand{\sec}{s m}{% \sec{x} -> sec(x) \sec*{x} -> sec x
\ensuremath{
\IfBooleanTF{#1}{\operatorname{sec} #2}{\operatorname{sec}\left(#2\right)}%
}
}
%%%%%%%%% minor adjusts in some mathematical symbols %%%%%%%%%
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n} % newtxmath changes the font style of \mathcal. It prevents \mathcal from being changed
\let\oldforall\forall % put some spaces between the \forall command
\renewcommand{\forall}{\;\oldforall\;}
%%%%%%%%% comments, corrections, or revisions %%%%%%%%%
\usepackage{ifluatex} % handle lualatex-specific packages
\ifluatex
\usepackage{luacolor} % colour support based on LuaTEX’s
\usepackage[soul]{lua-ul} % provide underlining, strikethrough, and highlighting using features in LuaLATEX which avoid the restrictions imposed by other methods
\fi
\newcommand{\obs}[1]{\textcolor{red}{(#1)}} % observation
\newcommand{\secret}[1]{\makebox[0cm]{}} % inline comment
\newcommand{\sizecorr}[1]{\makebox[0cm]{\phantom{$\displaystyle #1$}}} % Used to seize the height of equation
\newcommand{\ensureoperation}{\negmedspace {}} % To ensure that a new line symbol is an operation instead of a sign
\interfootnotelinepenalty=10000 % restrict the footnote to one page
// make vscode use the recipe contained in the Makefile instead using the internal recipes mechanism of latex-workshop
{
"latex-workshop.latex.external.build.command": "make"
}
// config VScode in order to make LaTeX run LuaLaTeX engine with bibLaTeX
//use XeLaTeX or LuaLaTeX (I prefer Lua, btw)
//ref: https://tex.stackexchange.com/questions/668851/which-font-should-i-use-to-get-julias-code-with-bold-letter-using-minted-in-xel
// it must be added inside .vscode/settings.json of the latex project directory
// these engines are required to compile several features that is incompatible with pdflatex, such as:
// \usepackage{minted} package for writing code
// \usepackage{luacolor} for provide underlining, strikethough, and highlighting using features in LuaLATEX which avoid the restrictions imposed by other methods
// \usepackage[soul]{lua-ul} for expand the functionality of coloring, e.g., highlighting, font coloring and strikeouting
{
"latex-workshop.latex.recipe.default": "lualatex -> biber -> lualatex*2",
"latex-workshop.latex.recipes": [
{
"name": "lualatex -> biber -> lualatex*2",
"tools": [
"lualatex",
// "biber", // uncomment these
// "lualatex", // lines if you
// "lualatex" // aren using biblatex with biber backend
]
}
],
"latex-workshop.latex.tools": [
{
"name": "lualatex",
"command": "lualatex",
"args": [
"--shell-escape", // makes it compatible with \usepackage{minted}
// "-synctex=1", // This enables the synctex feature, which allows for synchronization between the source LaTeX document and the resulting PDF file.
// "-interaction=nonstopmode", // errors and warnings will be displayed in the console output but compilation will not stop
// "-file-line-error", // provides the file name and line number where an error occurred.
"%DOC%"
]
},
{
"name": "biber",
"command": "biber",
"args": [
"%DOCFILE%"
]
}
],
}
% create abstract and keyword section
\documentclass{article}
\title{My title}
\author{My author}
\newcommand\keywords[1]{%
\begingroup
\let\and\\
\par
\noindent\textbf{Keywords:}\\#1\par
\endgroup
}
\begin{document}
\maketitle
\begin{abstract}
Lorem ipsum...
\end{abstract}
\keywords{one \and two \and three foo bar \and four $x^2$-foo}
\section{Introduction}
\end{document}
% click here for more info: https://github.com/gpoore/pythontex
% or here: https://github.com/Ossifragus/runcode
\documentclass{article}
\usepackage{pythontex}
\newcommand{\pymultiply}[2]{\py{#1*#2}}
\begin{document}
\begin{pycode}
print("Python says ``Hello!''")
\end{pycode}
$8 \times 256 = \pymultiply{8}{256}$
\end{document}
% add vertical or horizontal spaces (gaps) between the elements of a \bmatrix
% \setstackgap{L}{} for vertical spacing of baselines
% \setstacktabbedgap{} for horizontal spacing inside the matrices
% \lrgap for the spacing at the left and right extremities of the vectors/matrices.
\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\setstackgap{L}{24pt} % vertical gap
\setstacktabbedgap{4pt} % horizontal gap
\def\lrgap{\kern6pt}
\def\xbracketVectorstack#1{\left[\lrgap\Vectorstack{#1}\lrgap\right]} % use it for vectors
\def\xbracketMatrixstack#1{\left[\lrgap\tabbedCenterstack{#1}\lrgap\right]} % use it for matrices
\begin{document}
\[
\xbracketVectorstack{
s'^{\mathrm{T}} \\
I_{p\times p}
}=
\xbracketMatrixstack{
A & B \\
C & D
}
\xbracketVectorstack{
s'^{\mathrm{T}} \\
I_{p\times p}
}
\]
\end{document}
% another solution (simpler)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\renewcommand{\arraystretch}{2.6} \begin{bmatrix}
\dfrac{\partial y}{x_1} \\
\dfrac{\partial y}{x_2} \\
\vdots \\
\dfrac{\partial y}{x_N}
\end{bmatrix}
\end{align}
\end{document}
% create a list of cited and uncited refereces with biblatex
\documentclass[12pt]{article}
% biblatex
\usepackage[backend=bibtex, sorting=none, style=numeric-comp, defernumbers=true]{biblatex} % using biblatex
\addbibresource{refs.bib} % add reference file
% for each cited reference create a category named "cited"
\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}
\begin{document}
Text
\nocite{*}
\printbibheading
\printbibliography[category=cited,heading=subbibliography,title={Cited papers}]
\printbibliography[title={Supplementary papers},heading=subbibliography,notcategory=cited]
\end{document}
% make PDF with a customized PDF dimension, this second page has PDF page with another customized dimension
\documentclass{article}
\usepackage[margin=2mm,textwidth=155mm,paperheight=20cm,paperwidth=15cm]{geometry}
\begin{document}
This is a standard page.
\clearpage
\edef\hmm{\pdfpagewidth=\the\pdfpagewidth \pdfpageheight=\the\pdfpageheight\relax}
\pdfpagewidth=17in
\pdfpageheight=11in
\newgeometry{top=1in,left=1in,textwidth=15in,textheight=9in}
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
\vspace*{\fill}
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
This is a big landscape page. This is a big landscape page. This is a big landscape page. This is a big landscape page.
\restoregeometry
\hmm
Back to a standard page
\end{document}
\documentclass{article}
\input{default_preamble.tex}
\input{default_gossary_entries.tex}
\title{My incredible title}
\author[1]{Awesome Author 1}
\author[2]{Awesome Author 2}
\author[2]{Awesome Author 3}
\affil[1]{Amazing University 1}
\affil[2]{Amazing University 2}
\date{\today}
\makeglossaries
\begin{document}
\maketitle
Hello world \cite{strangIntroductionLinearAlgebra1993}!
\begin{itemize}
\item First time -> \gls{ar}. Second time -> \gls{ar};
\item First time (in plural with the ``firstplural'' entry) -> \glspl{ismr}. Second time -> \gls{ismr}.
\end{itemize}
\printbibliography
\printglossaries % to print the glossary, add the `automake` option in the `glossaries-extra` pkg import (see the `default_preamble.tex` file)
\end{document}
\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx} % omit 'demo' for real document
\begin{document}
\begin{figure}
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\linewidth]{fig_a.pdf}
\caption{First subfigure} \label{fig:1a}
\end{subfigure}%
\hspace*{\fill} % maximize separation between the subfigures
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\linewidth]{fig_b.pdf}
\caption{Second subfigure} \label{fig:1b}
\end{subfigure}%
\hspace*{\fill} % maximizeseparation between the subfigures
\begin{subfigure}{0.31\textwidth}
\includegraphics[width=\linewidth]{fig_c.pdf}
\caption{Third subfigure} \label{fig:1c}
\end{subfigure}
\caption{A figure that contains three subfigures} \label{fig:1}
\end{figure}
\end{document}
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{float} % to use [H]
\usepackage[skip=0.5ex]{subcaption}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{figure}[H]
\centering
\begin{subfigure}{0.6\textwidth}
\includegraphics[width=\linewidth]{example-image}
\subcaption{$Q^{*}$ values for arm 1}
\label{subfig:item1}
\end{subfigure}
\end{figure}
\begin{figure}[H]\ContinuedFloat
\centering
\begin{subfigure}{0.6\textwidth}
\includegraphics[width=\linewidth]{example-image}
\subcaption{$Q^{*}$ values for arm 2}
\label{subfig:item2}
\end{subfigure}
\caption{$Q^{*}$ values for different arms}
\end{figure}%
\begin{figure}[H]\ContinuedFloat
\centering
\begin{subfigure}{0.6\textwidth}
\includegraphics[width=\linewidth]{example-image}
\subcaption{$Q^{*}$ values for arm 3}
\label{subfig:item3}
\end{subfigure}
\end{figure}
\begin{figure}[H]\ContinuedFloat
\centering
\begin{subfigure}{0.6\textwidth}
\includegraphics[width=\linewidth]{example-image}
\subcaption{$Q^{*}$ values for arm 4}
\label{subfig:item4}
\end{subfigure}
\caption[]{$Q^{*}$ values for different arms (cont.)}
\label{fig:main-label}
\end{figure}
\lipsum[2-3]
\end{document}
\newcounter{prob}
\newcounter{subprob}
\renewcommand{\thesubprob}{\alph{subprob}}
\newcommand{\problem}{\setcounter{subprob}{0} \stepcounter{prob} \par \medskip \noindent \textbf{Problem~\theprob \ }}
\newcommand{\answer}{\par \medskip \noindent \textit{Answer \ }}
\newcommand{\finalanswer}[1]{
\begin{center}
{\renewcommand{\arraystretch}{1.5}
\renewcommand{\tabcolsep}{0.2cm}
\begin{tabular}{|c|}
\hline
$ \displaystyle #1 $ \\
\hline
\end{tabular}}
\end{center}}
\newcommand{\subproblem}{\stepcounter{subprob} \par \smallskip \noindent \quad \textit{(\thesubprob) \ }}
\newcommand{\subanswer}{\par \smallskip \noindent \quad \textit{Answer \ }}
\newcommand{\option}{\item[$\square$]}
\newcommand{\thisone}{\item[$\blacksquare$]}
\newenvironment{subitemize}{\begin{itemize}}{\end{itemize}}
\documentclass[12pt,a4paper]{article}
\input{default_preamble.tex}
\input{homework_commands.tex}
\begin{document}
\author{Student}
\title{Document name}
\date{\today}
\maketitle
%%--CABEÇALHO--%%
\begin{center}
{\huge Title \par}
{\LARGE Discipline \par}
{\Large Course \par}
{\Large Professors \par}
% {\Large Opitional}
\end{center}
\problem \label{probone}
Problem
\subproblem Item
\subproblem Item
\subproblem Item
\answer
%============================================
\end{document}
maxNumberOfBackUps: 0
lookForAlignDelims:
xltabular: 1
# you must run this Makefile using the zsh interpreter
SHELL := /usr/bin/zsh
# you should change the main LaTeX filename if it is not "main.tex". Don't include the ".tex" entension.
filename=main
.PHONY: clean format
# Make considers targets that correspond to filenames to be up-to-date if the file exists and its modification time is later than that of its prerequisites. However, sometimes you may want to define targets that do not correspond to actual files, but rather perform some action such as cleaning up a build directory or running tests. These are called "phony" targets.
# The reason why the command expansion $(command) is not working in your Makefile is because it is not being evaluated by the shell, but by Make itself. In Make, the $ character has a special meaning and is used to reference variables, so when you write $(command) in your Makefile, Make thinks you are trying to reference a variable called command and not running the command command. double dollar sign ($$) forces shell to run this command, $(shell command) also works
# By default, the shell interpreter used by a Makefile is /bin/sh. However, you can change the shell interpreter that must run the Makefile by setting the SHELL variable at the beginning of the Makefile. When you use := to define a variable with a shell command, like MY_VAR := $(shell date), the command is evaluated immediately and the result is stored as a simple string. The value of the variable is not re-evaluated every time it is used in a command. That is, it is evaluated only once.
# the "-" operator to ignore the exit status of the command and let the rule. When you have a conditional statement without an else and it return false (1 or more), it is not handled by the shell and is returned to the Makefile, which in turn stop the procedure. the "-" at the beginning of the command make Makefile ignore it
all: compile
# check whether it exists, but do not trigger it. If it doesn't exist, however, it is triggered.
compile: | default_preamble.tex
@echo "Compiling..."
@-[[ -f $(filename).tex ]] && [[ ! $$(cat $(filename).tex) =~ '\\input\{default_preamble(\.tex)?\}' ]] && sed -i '2i\\\input{default_preamble.tex}' $(filename).tex
lualatex --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error $(filename).tex
biber $(filename).bcf
# If you leave these two line commented, you need to build it twice every time you change a \cite entry. On the other hand, it gets faster
# lualatex --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error $(filename).tex
# lualatex --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error $(filename).tex
@echo "Process completed successfully!"
default_preamble.tex:
@wget -qO $@ https://gist.githubusercontent.com/tapyu/886dc95fc19c4250fb38581ccc58bed8/raw/_default_preamble.tex # The macro @ evaluates to the name of the current target
@echo "default_preamble.tex has been downloaded"
clean:
@echo -n "cleaning auxiliary files...\n"
@setopt +o nomatch; rm -f *.out *.aux *.alg *.acr *.dvi *.gls *.log *.bbl *.blg *.ntn *.not *.lof *.lot *.toc *.loa *.lsg *.nlo *.nls *.ilg *.ind *.ist *.glg *.glo *.xdy *.acn *.idx *.loq *.bcf *.fdb_latexmk *.fls *.xml *.gz *~
@rm -f $(filename).pdf
@echo "Process completed successfully!"
format:
@grep -oP "(?<=\\\\input{)[^}]+" main.tex | while read file; do \
latexindent --silent --overwrite --local=.latexindent.yaml $${file}; \
done
% to sort it, run `f=my_glossary_entries.tex; { head -n 3 "$f"; tail -n +4 "$f" | awk '{ gsub(/^}$/,"}\0"); print $0 }' | sort -z | tr -d '\0' | tail -n +2; } | sponge "$f"`
% inspired by https://stackoverflow.com/a/67012044/23333162 (but modified by me)
% `sponge` command requires the `moreutils` package
\newglossaryentry{3d}{
type=\acronymtype,
name={3D},
description={Three Dimensional.},
first={three-Dimensional (3D)},
sort={3D},
long={three-dimensional},
longplural={},
short={3D},
}
\newglossaryentry{acf}{
type=\acronymtype,
name={ACF},
description={AutoCorrelation Function.},
first={AutoCorrelation Function (ACF)},
sort={ACF},
long={autocorrelation function},
short={ACF},
}
\newglossaryentry{adc}{
type=\acronymtype,
name={ADC},
description={Analog-to-Digital Converter.},
first={ADC (Analog-to-Digital Converter)},
sort={ADC},
long={analog-to-digital converter},
short={ADC},
}
\newglossaryentry{afsk}{
type=\acronymtype,
name={AFSK},
description={Audio Frequency-Shift Keying.},
first={Audio Frequency-Shift Keying (AFSK)},
sort={AFSK},
long={audio frequency-shift keying},
short={AFSK},
}
\newglossaryentry{agc}{
type=\acronymtype,
name={AGC},
description={Automatic Gain Control.},
first={Automatic Gain Control (AGC)},
sort={AGC},
long={automatic gain control},
short={AGC},
}
\newglossaryentry{ai}{
type=\acronymtype,
name={AI},
description={Artificial Intelligence.},
first={Artificial Intelligence (AI)},
sort={AI},
long={artificial intelligence},
plural={},
short={AI},
}
\newglossaryentry{altboc}{
type=\acronymtype,
name={AltBOC},
description={Alternative BOC.},
first={AltBOC (Alternative BOC)},
sort={AltBOC},
long={alternative boc},
short={AltBOC},
}
\newglossaryentry{ann}{
type=\acronymtype,
name={ANN},
description={Artificial Neural Networks.},
first={Artificial Neural Networks (ANN)},
sort={ANN},
long={artificial neural networks},
plural={},
short={ANN},
}
\newglossaryentry{aoa}{
type=\acronymtype,
name={AoA},
description={Angle of Arrival.},
first={Angle of Arrival (AoA)},
sort={AoA},
long={angle of arrival},
short={AoA},
}
\newglossaryentry{ar}{
type=\acronymtype,
name={AR},
description={Autoregressive.},
first={AR (Autoregressive)},
sort={AR},
long={autoregressive},
plural={Autoregressive},
short={AR},
}
\newglossaryentry{asic}{
type=\acronymtype,
name={ASIC},
description={Application-Specific Integrated Circuit.},
first={Application-Specific Integrated Circuits (ASICs)},
sort={ASIC},
long={application-specific integrated circuit},
plural={Application-Specific Integrated Circuits},
short={ASICs},
}
\newglossaryentry{awgn}{
type=\acronymtype,
name={AWGN},
description={Additive White Gaussian Noise.},
first={Additive White Gaussian Noise (AWGN)},
sort={AWGN},
long={additive white Gaussian noise},
short={AWGN},
}
\newglossaryentry{bb}{
type=\acronymtype,
name={BB},
description={Baseband.},
first={Baseband (BB)},
sort={BB},
long={baseband},
short={BB},
}
\newglossaryentry{bcrb}{
type=\acronymtype,
name={BCRB},
description={Baysean Cramér-Rao Bound.},
first={Baysean Cramér-Rao Bound (BCRB)},
sort={BCRB},
long={Baysean Cramér-Rao bound},
plural={},
short={BCRB},
}
\newglossaryentry{ber}{
type=\acronymtype,
name={BER},
description={Bit Error Rate.},
first={Bit Error Rate (BER)},
sort={BER},
long={bit error rate},
short={BER},
}
\newglossaryentry{boc}{
type=\acronymtype,
name={BOC},
description={Binary Offset Carrier.},
first={BOC (Binary Offset Carrier)},
sort={BOC},
long={binary offset carrier},
short={BOC},
}
\newglossaryentry{bpnn}{
type=\acronymtype,
name={BPNN},
description={Backpropagation Neural Network.},
first={Backpropagation Neural Network (BPNN)},
sort={BPNN},
long={backpropagation neural network},
plural={},
short={BPNN},
}
\newglossaryentry{ca}{
type=\acronymtype,
name={C/A},
description={Coarse/Acquisition.},
first={C/A (Coarse/Acquisition)},
sort={C/A},
long={coarse/acquisition},
short={C/A},
}
\newglossaryentry{cdf}{
type=\acronymtype,
name={CDF},
description={Cumulative Distribution Function.},
first={Cumulative Distribution Function (CDF)},
sort={CDF},
long={cumulative distribution function},
short={CDF},
}
\newglossaryentry{cdma}{
type=\acronymtype,
name={CDMA},
description={Code Division Multiple Access.},
first={CDMA (Code Division Multiple Access)},
sort={CDMA},
long={code division multiple access},
short={CDMA},
}
\newglossaryentry{cn0}{
type=\acronymtype,
name={\(C/N_0\)},
description={Carrier-to-Noise ratio.},
first={Carrier-to-Noise ratio (\(C/N_0\))},
sort={C/N_0},
long={carrier-to-noise ratio},
short={\(C/N_0\)},
}
\newglossaryentry{cnn}{
type=\acronymtype,
name={CNN},
description={Convolutional Neural Network.},
first={Convolutional Neural Network (CNN)},
sort={CNN},
long={convolutional neural network},
longplural={convolutional neural networks},
short={CNN},
}
\newglossaryentry{cnpq}{
type=\acronymtype,
name={CNPq},
description={National Council for Scientific and Technological Development.},
first={National Council for Scientific and Technological Development (CNPq)},
sort={CNPq},
long={national council for scientific and technological development},
short={CNPq},
}
\newglossaryentry{cpfsk}{
type=\acronymtype,
name={CPFSK},
description={Continuous-Phase Frequency-Shift Keying.},
first={Continuous-Phase Frequency-Shift Keying (CPFSK)},
sort={CPFSK},
long={continuous-phase frequency-shift keying},
short={CPFSK},
}
\newglossaryentry{cpm}{
type=\acronymtype,
name={CPM},
description={Continuous-Phase Modulation.},
first={Continuous-Phase Modulation (CPM)},
sort={CPM},
long={continuous-phase modulation},
short={CPM},
}
\newglossaryentry{cpo}{
type=\acronymtype,
name={CPO},
description={Carrier Phase Offset.},
first={Carrier Phase Offset (CPO)},
sort={CPO},
long={carrier phase offset},
short={CPO},
}
\newglossaryentry{crb}{
type=\acronymtype,
name={CRB},
description={Cramér-Rao Bound.},
first={Cramér-Rao Bound (CRB)},
sort={CRB},
long={cramér-rao bound},
plural={},
short={CRB},
}
\newglossaryentry{csk}{
type=\acronymtype,
name={CSK},
description={Code Sift Key.},
first={CSK (Code Sift Key)},
sort={CSK},
long={code sift key},
short={CSK},
}
\newglossaryentry{csm}{
type=\acronymtype,
name={CSM},
description={Cornell Scintillation Model.},
first={CSM (Cornell Scintillation Model)},
sort={CSM},
long={Cornell scintillation model},
plural={Cornell Scintillation Model},
short={CSM},
}
\newglossaryentry{dae}{
type=\acronymtype,
name={DAE},
description={Differential-Algebraic system of Equations.},
first={Differential-Algebraic system of Equations (DAE)},
sort={DAE},
long={differential-algebraic system of equations},
short={DAE},
}
\newglossaryentry{dd}{
type=\acronymtype,
name={DD},
description={Decision-Directed.},
first={Decision-Directed (DD)},
sort={DD},
long={decision-directed},
short={DD},
}
\newglossaryentry{dfs}{
type=\acronymtype,
name={DFS},
description={Discrete Fourier Series.},
first={DFS (Discrete Fourier Series)},
sort={DFS},
long={discrete fourier series},
longplural={},
short={DFS},
}
\newglossaryentry{dft}{
type=\acronymtype,
name={DFT},
description={Discrete Fourier Transform.},
first={DFT (Discrete Fourier Transform)},
sort={DFT},
long={discrete fourier transform},
longplural={},
short={DFT},
}
\newglossaryentry{dgnss}{
type=\acronymtype,
name={DGNSS},
description={Differential GNSS.},
first={DGNSS (Differential GNSS)},
sort={DGNSS},
long={differential gnss},
short={DGNSS},
}
\newglossaryentry{dll}{
type=\acronymtype,
name={DLL},
description={Delay-Locked Loop.},
first={Delay-Locked Loops (DLLs)},
sort={DLL},
long={delay-locked loop},
plural={Delay-Locked Loops},
short={DLL},
}
\newglossaryentry{dl}{
type=\acronymtype,
name={DL},
description={Deep Learning.},
first={Deep Learning (DL)},
sort={DL},
long={deep learning},
short={DL},
}
\newglossaryentry{dnn}{
type=\acronymtype,
name={DNN},
description={Deep Neural Network.},
first={Deep Neural Network (DNN)},
sort={DNN},
long={deep neural network},
plural={},
short={DNN},
}
\newglossaryentry{dtw}{
type=\acronymtype,
name={DTW},
description={Dynamic Time Warping.},
first={Dynamic Time Warping (DTW)},
sort={DTW},
long={dynamic time warping},
plural={application-specific integrated circuits},
short={DTW},
}
\newglossaryentry{esa}{
type=\acronymtype,
name={ESA},
description={European Space Agency.},
first={European Space Agency (ESA)},
sort={ESA},
long={European space agency},
plural={},
short={ESA}
}
\newglossaryentry{euv}{
type=\acronymtype,
name={EUV},
description={Extreme UltraViolet.},
first={Extreme UltraViolet (EUV)},
sort={EUV},
long={extreme ultraviolet},
short={EUV},
}
\newglossaryentry{evd}{
type=\acronymtype,
name={EVD},
description={Eigenvalue Decomposition.},
first={EVD (Eigenvalue Decomposition)},
sort={EVD},
long={eigenvalue decomposition},
short={EVD},
}
\newglossaryentry{fft}{
type=\acronymtype,
name={FFT},
description={Fast Fourier Transform.},
first={FFT (Fast Fourier Transform)},
sort={FFT},
long={fast fourier transform},
longplural={},
short={FFT},
}
\newglossaryentry{fir}{
type=\acronymtype,
name={FIR},
description={Finite Impulse Response.},
first={Finite Impulse Response (FIR)},
sort={FIR},
long={finite impulse response},
short={FIR},
}
\newglossaryentry{fpga}{
type=\acronymtype,
name={FPGA},
description={Field Programmable Gate Array.},
first={Field Programmable Gate Array (FPGA)},
sort={FPGA},
long={field programmable gate array},
short={FPGA},
}
\newglossaryentry{fs}{
type=\acronymtype,
name={FS},
description={Fourier Series.},
first={FS (Fourier Series)},
sort={FS},
long={fourier series},
longplural={},
short={FS},
}
\newglossaryentry{ft}{
type=\acronymtype,
name={FT},
description={Fourier Transform.},
first={FT (Fourier Transform)},
sort={FT},
long={fourier transform},
longplural={},
short={FT},
}
\newglossaryentry{gism}{
type=\acronymtype,
name={GISM},
description={Global Ionospheric Scintillation Model.},
first={Global Ionospheric Scintillation Model (GISM)},
sort={GISM},
long={global ionospheric scintillation model},
short={GISM},
}
\newglossaryentry{gistm}{
type=\acronymtype,
name={GISTM},
description={GNSS Ionospheric Scintillation and TEC Monitors.},
first={GNSS Ionospheric Scintillation and TEC Monitors (GISTM)},
firstplural={GNSS Ionospheric Scintillation and TEC Monitors (GISTMs)},
sort={GISTM},
long={gnss ionospheric scintillation and tec monitors (gistm)},
short={GISTM},
}
\newglossaryentry{gnss}{
type=\acronymtype,
name={GNSS},
description={Global Navigation Satellite System.},
first={Global Navigation Satellite System (GNSS)},
sort={GNSS},
long={global navigation satellite system},
short={GNSS},
}
\newglossaryentry{gps}{
type=\acronymtype,
name={GPS},
description={Global Positioning System.},
first={GPS (Global Positioning System)},
sort={GPS},
long={global positioning system},
short={GPS},
}
\newglossaryentry{ha}{
type=\acronymtype,
name={HA},
description={High Accuracy.},
first={High-Accuracy (HA)},
sort={HA},
long={high accuracy},
short={HA},
}
\newglossaryentry{if}{
type=\acronymtype,
name={IF},
description={Intermediate Frequency.},
first={IF (Intermediate Frequency)},
sort={IF},
long={intermediate frequency},
short={IF},
}
\newglossaryentry{iot}{
type=\acronymtype,
name={IoT},
description={Internet of Things.},
first={Internet of Things (IoT)},
sort={IoT},
long={internet of things},
short={IoT},
}
\newglossaryentry{ipp}{
type=\acronymtype,
name={IPP},
description={Ionospheric Pierce Point.},
first={Ionospheric Pierce Point (IPP)},
sort={IPP},
long={ionospheric pierce point},
short={IPP}
}
\newglossaryentry{isi}{
type=\acronymtype,
name={ISI},
description={Intersymbol Interference.},
first={Intersymbol Interference (ISI)},
sort={ISI},
long={intersymbol interference},
short={ISI},
}
\newglossaryentry{ismr}{
type=\acronymtype,
name={ISMR},
description={Ionospheric Scintillation Monitoring Receiver.},
first={Ionospheric Scintillation Monitoring Receiver (ISMR)},
firstplural={Ionospheric Scintillation Monitoring Receivers (ISMRs)},
sort={ISMR},
long={ionospheric scintillation monitoring},
short={ISMR},
}
\newglossaryentry{itu}{
type=\acronymtype,
name={ITU},
description={International Telecommunications Union.},
first={International Telecommunications Union (ITU)},
sort={ITU},
long={international telecommunications union},
plural={},
short={ITU},
}
\newglossaryentry{lms}{
type=\acronymtype,
name={LMS},
description={Least Mean Squares.},
first={Least Mean Squares (LMS)},
sort={LMS},
long={least mean squares},
plural={},
short={LMS},
}
\newglossaryentry{lna}{
type=\acronymtype,
name={LNA},
description={Low Noise Amplifier.},
first={LNA (Low Noise Amplifier)},
sort={LNA},
long={low noise amplifier},
short={LNA},
}
\newglossaryentry{los}{
type=\acronymtype,
name={LOS},
description={Line Of Sight.},
first={LOS (Line-Of-Sight)},
sort={LOS},
long={line of sight},
short={LOS},
}
\newglossaryentry{lo}{
type=\acronymtype,
name={LO},
description={Local Oscillator.},
first={Local Oscillator (LO)},
sort={LO},
long={local oscillator},
short={LO},
}
\newglossaryentry{lpf}{
type=\acronymtype,
name={LPF},
description={LowPass Filter.},
first={LowPass Filter (LPF)},
sort={LPF},
long={lowpass filter},
short={LPF},
}
\newglossaryentry{lsb}{
type=\acronymtype,
name={LSB},
description={Least Significant Bit.},
first={Least Significant Bit (LSB)},
sort={LSB},
long={least significant bit},
short={LSB},
}
\newglossaryentry{lstm}{
type=\acronymtype,
name={LSTM},
description={Long short-term memory.},
first={Long Short-Term Memory (LSTM)},
sort={LSTM},
long={long short-term memory},
short={LSTM},
}
\newglossaryentry{lut}{
type=\acronymtype,
name={LUT},
description={Lookup Table.},
first={LUT (Lookup Table)},
sort={LUT},
long={lookup table},
longplural={Lookup Tables},
short={LUT},
}
\newglossaryentry{mcrb}{
type=\acronymtype,
name={MCRB},
description={Modified Cramér-Rao Bound.},
first={Modified Cramér-Rao Bound (MCRB)},
sort={MCRB},
long={Modified Cramér-Rao bound},
short={MCRB},
}
\newglossaryentry{mc}{
type=\acronymtype,
name={MC},
description={Multiconstellation.},
first={MultiConstellation (MC)},
sort={MC},
long={multiconstellation},
short={MC},
}
\newglossaryentry{mf}{
type=\acronymtype,
name={MF},
description={Multifrequency.},
first={MultiFrequency (MF)},
sort={MF},
long={multifrequency},
short={MF},
}
\newglossaryentry{mlp}{
type=\acronymtype,
name={MLP},
description={MultiLayer Perceptron.},
first={MultiLayer Perceptron (MLP)},
sort={MLP},
long={multilayer perceptron},
plural={},
short={MLP},
}
\newglossaryentry{mlsd}{
type=\acronymtype,
name={MLSD},
description={Maximum Likelihood Sequence Detection.},
first={Maximum Likelihood Sequence Detection (MLSD)},
sort={MLSD},
long={maximum likelihood sequence detection},
plural={},
short={MLSD},
}
\newglossaryentry{mlse}{
type=\acronymtype,
name={MLSE},
description={Maximum Likelihood Sequence Estimation.},
first={Maximum Likelihood Sequence Estimation (MLSE)},
sort={MLSE},
long={maximum likelihood sequence estimation},
plural={},
short={MLSE},
}
\newglossaryentry{ml}{
type=\acronymtype,
name={ML},
description={Maximum Likelihood.},
first={Maximum Likelihood (ML)},
sort={ML},
long={maximum likelihood},
plural={},
short={ML},
}
\newglossaryentry{mm}{
type=\acronymtype,
name={MM},
description={Mass Market.},
first={Mass-Market (MM)},
sort={MM},
long={mass market},
short={MM},
}
\newglossaryentry{mps}{
type=\acronymtype,
name={MPS},
description={Multiple Phase Screen.},
first={Multiple Phase Screen (MPS)},
sort={MPS},
long={multiple phase screen},
plural={},
short={MPS}
}
\newglossaryentry{msb}{
type=\acronymtype,
name={MSB},
description={Most Significant Bit.},
first={Most Significant Bit (MSB)},
sort={MSB},
long={most significant bit},
short={MSB},
}
\newglossaryentry{mse}{
type=\acronymtype,
name={MSE},
description={Mean Squared Error.},
first={Mean Squared Error (MSE)},
sort={MSE},
long={mean squared error},
plural={},
short={MSE},
}
\newglossaryentry{mvu}{
type=\acronymtype,
name={MVU},
description={Minimum Variance Unbiased.},
first={Minimum Variance Unbiased (MVU)},
sort={MVU},
long={minimum variance unbiased},
plural={},
short={MVU},
}
\newglossaryentry{nco}{
type=\acronymtype,
name={NCO},
description={Numerically-Controlled Oscillator.},
first={NCO (Numerically-Controlled Oscillator)},
sort={NCO},
long={numerically-controlled oscillator},
short={NCO},
}
\newglossaryentry{nn}{
type=\acronymtype,
name={NN},
description={Nearest Neighbour.},
first={NN (Nearest Neighbour)},
sort={NN},
long={nearest neighbour},
plural={application-specific integrated circuits},
short={NN},
}
\newglossaryentry{np}{
type=\acronymtype,
name={NP},
description={Neyman-Pearson.},
first={Neyman-Pearson (NP)},
sort={NP},
long={neyman-pearson},
short={NP},
}
\newglossaryentry{ocxo}{
type=\acronymtype,
name={OCXO},
description={Oven-Controlled Crystal Oscillator.},
first={OCXO (Oven-Controlled Crystal Oscillator)},
sort={OCXO},
long={oven-controlled crystal oscillator},
short={OCXO},
}
\newglossaryentry{ode}{
type=\acronymtype,
name={ODE},
description={Ordinary Differential Equation.},
first={Ordinary Differential Equation (ODE)},
sort={ODE},
long={ordinary differential equation},
longplural={Ordinary Differential Equations},
short={ODE},
}
\newglossaryentry{ols}{
type=\acronymtype,
name={OLS},
description={Ordinary Least Squares.},
first={Ordinary Least Squares (OLS)},
sort={OLS},
long={ordinary least squares},
plural={},
short={OLS},
}
\newglossaryentry{pca}{
type=\acronymtype,
name={PCA},
description={Principal Component Analysis (PCA).},
first={Principal Component Analysis (PCA)},
sort={PCA},
long={principal component analysis},
short={PCA},
}
\newglossaryentry{pdf}{
type=\acronymtype,
name={PDF},
description={Probability Density Function.},
first={Probability Density Function (PDF)},
sort={PDF},
long={probability density function},
short={PDF},
}
\newglossaryentry{pe}{
type=\acronymtype,
name={PE},
description={Parabolic Equation.},
first={Parabolic Equation (PE)},
sort={PE},
long={parabolic equation},
short={PE},
}
\newglossaryentry{pll}{
type=\acronymtype,
name={PLL},
description={Phase-Locked Loop.},
first={Phase-Locked Loop (PLL)},
firstplural={Phase-Locked Loops (PLLs)},
sort={PLL},
long={phase-locked loop},
longplural={phase-locked loops},
plural={PLLs},
short={PLL},
}
\newglossaryentry{ppp}{
type=\acronymtype,
name={PPP},
description={Precise Point Positioning.},
first={Precise Point Positioning (PPP)},
sort={PPP},
long={precise point positioning},
short={PPP},
}
\newglossaryentry{pr}{
type=\acronymtype,
name={PR},
description={PseudoRandom.},
first={PR (PseudoRandom)},
sort={PR},
long={pseudorandom},
short={PR},
}
\newglossaryentry{psd}{
type=\acronymtype,
name={PSD},
description={Power Spectral Density.},
first={Power Spectral Density (PSD)},
sort={PSD},
long={power spectral density},
short={PSD},
}
\newglossaryentry{pvt}{
type=\acronymtype,
name={PVT},
description={Position, Velocity and Time.},
first={PVT (Position, Velocity and Time)},
sort={PVT},
long={position, velocity and time},
short={PVT},
}
\newglossaryentry{qpsk}{
type=\acronymtype,
name={QPSK},
description={Quadrature Phase-Shift Keying.},
first={Quadrature Phase-Shift Keying (QPSK)},
sort={QPSK},
long={quadrature phase-shift keying},
short={QPSK},
}
\newglossaryentry{rbf}{
type=\acronymtype,
name={RBF},
description={Radial Basis Function.},
first={Radial Basis Function (RBF)},
sort={RBF},
long={radial basis function},
plural={},
short={RBF},
}
\newglossaryentry{relu}{
type=\acronymtype,
name={ReLU},
description={Rectified Linear Unit.},
first={Rectified Linear Unit (ReLU)},
sort={ReLU},
long={rectified linear unit},
short={ReLU},
}
\newglossaryentry{rf-fe}{
type=\acronymtype,
name={RF-FE},
description={Radio Frequency Front End.},
first={Radio Frequency Front End (RF-FE)},
sort={RF-FE},
long={radio frequency front end},
short={RF-FE},
}
\newglossaryentry{rf}{
type=\acronymtype,
name={RF},
description={Radio Frequency.},
first={RF (Radio Frequency)},
sort={RF},
long={radio frequency},
short={RF},
}
\newglossaryentry{rls}{
type=\acronymtype,
name={RLS},
description={Recursive Least Squares.},
first={Recursive Least Squares (RLS)},
sort={RLS},
long={recursive least squares},
plural={},
short={RLS},
}
\newglossaryentry{rms}{
type=\acronymtype,
name={RMS},
description={Root Mean Square.},
first={Root Mean Square (RMS)},
sort={RMS},
long={root mean square},
short={RMS},
}
\newglossaryentry{rtk}{
type=\acronymtype,
name={RTK},
description={Real-Time Kinematics.},
first={Real-Time Kinematics (RTK)},
sort={RTK},
long={real-time kinematics},
short={RTK},
}
\newglossaryentry{rt}{
type=\acronymtype,
name={RT},
description={Rayleigh-Taylor.},
first={Rayleigh-Taylor (RT)},
sort={RT},
long={rayleigh-taylor},
short={RT},
}
\newglossaryentry{scap}{
type=\acronymtype,
name={SCAp},
description={Safety- and liability-Critical Applications.},
first={SCAp (Safety- and liability-Critical Applications)},
sort={SCAp},
long={safety- and liability-critical applications},
short={SCAp},
}
\newglossaryentry{sde}{
type=\acronymtype,
name={SDE},
description={Stochastic Differential Equation.},
first={Stochastic Differential Equation (SDE)},
sort={SDE},
long={stochastic differential equation},
longplural={Stochastic Differential Equations},
short={SDE},
}
\newglossaryentry{sdr}{
type=\acronymtype,
name={SDR},
description={Software-Defined Radio.},
first={Software-Defined Radio (SDR)},
sort={SDR},
long={software-defined radio},
short={SDR},
}
\newglossaryentry{sgd}{
type=\acronymtype,
name={SGD},
description={Stochastic Gradient Descent.},
first={Stochastic Gradient Descent (SGD)},
sort={SGD},
long={stochastic gradient descent},
plural={},
short={SGD},
}
\newglossaryentry{snr}{
type=\acronymtype,
name={SNR},
description={Signal-to-Noise Ratio.},
first={SNR (Signal-to-Noise Ratio)},
sort={SNR},
long={signal-to-noise ratio},
short={SNR},
}
\newglossaryentry{std}{
type=\acronymtype,
name={STD},
description={Symbol Timing Delay.},
first={Symbol Timing Delay (STD)},
sort={STD},
long={symbol timing delay},
short={STD},
}
\newglossaryentry{stft}{
type=\acronymtype,
name={STFT},
description={Short-Time Fourier Transform.},
first={Short-Time Fourier Transform (STFT)},
sort={STFT},
long={short-time fourier transform},
short={STFT},
}
\newglossaryentry{svc}{
type=\acronymtype,
name={SVC},
description={Support Vector Classifier.},
first={Support Vector Classifier (SVC)},
sort={SVC},
long={support vector classifier},
short={SVC},
}
\newglossaryentry{svd}{
type=\acronymtype,
name={SVD},
description={Singular Value Decomposition.},
first={SVD (Singular Value Decomposition)},
sort={SVD},
long={singular value decomposition},
short={SVD},
}
\newglossaryentry{svm}{
type=\acronymtype,
name={SVM},
description={Support Vector Machine.},
first={Support Vector Machine (SVM)},
sort={SVM},
long={support vector machine},
short={SVM},
}
\newglossaryentry{tcxo}{
type=\acronymtype,
name={TCXO},
description={Temperature Compensated Crystal Oscillator.},
first={TCXO (Temperature Compensated Crystal Oscillator)},
sort={TCXO},
long={temperature compensated crystal oscillator},
short={TCXO},
}
\newglossaryentry{tec}{
type=\acronymtype,
name={TEC},
description={Total Electron Content.},
first={TEC (Total Electron Content)},
sort={TEC},
long={total electron content},
short={TEC},
}
\newglossaryentry{tsc}{
type=\acronymtype,
name={TSC},
description={Time Series Classification.},
first={Time Series Classification (TSC)},
sort={TSC},
long={time series classification},
short={TSC},
}
\newglossaryentry{tt&c}{
type=\acronymtype,
name={TT\&C},
description={Telemetry, Tracking and Command.},
first={Telemetry, Tracking and Command (TT\&C)},
sort={TT\&C},
long={telemetry, tracking and command},
short={TT\&C},
}
\newglossaryentry{uhf}{
type=\acronymtype,
name={UHF},
description={Ultra High Frequency.},
first={UHF (Ultra High Frequency)},
sort={UHF},
long={ultra high frequency},
short={UHF},
}
\newglossaryentry{up}{
type=\acronymtype,
name={\textmu P},
description={Microprocessor.},
first={microprocessors (\textmu Ps)},
sort={\textmu P},
long={microprocessor},
plural={microprocessors},
short={\textmu Ps},
}
\newglossaryentry{vhf}{
type=\acronymtype,
name={VHF},
description={Very High Frequency.},
first={VHF (Very High Frequency)},
sort={VHF},
long={very high frequency},
short={VHF},
}
\newglossaryentry{vtec}{
type=\acronymtype,
name={VTEC},
description={Vertical Total Electron Content.},
first={VTEC (Vertical Total Electron Content)},
sort={VTEC},
long={vertical total electron content},
longplural={Vertical Total Electron Contents},
short={VTEC},
}
\newglossaryentry{wmf}{
type=\acronymtype,
name={WMF},
description={Whitened Matched Filter.},
first={WMF (Whitened Matched Filter)},
sort={WMF},
long={whitened matched filter},
longplural={},
short={WMF},
}
\newglossaryentry{wscs}{
type=\acronymtype,
name={WSCS},
description={Wide-Sense Cyclostationary.},
first={Wide-Sense CycloStationary (WSCS)},
sort={WSCS},
long={wide-sense cyclostationary},
plural={},
short={WSCS},
}
\newglossaryentry{wss}{
type=\acronymtype,
name={WSS},
description={Wide-Sense Stationary.},
first={Wide-Sense Stationary (WSS)},
sort={WSS},
long={wide-sense stationary},
short={WSS},
}
\documentclass[a4paper]{article}
\usepackage[margin=1.5in]{geometry} % For margin alignment
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage{arevmath} % For math symbols
\usepackage[noend]{algpseudocode}
\title{Algorithm template}
\author{Roy}
\date{\today} % Today's date
\begin{document}
\maketitle
\section{Demo code}
\begin{algorithm}
\caption{Put your caption here}
\begin{algorithmic}[1]
\Procedure{Roy}{$a,b$} \Comment{This is a test}
\State System Initialization
\State Read the value
\If{$condition = True$}
\State Do this
\If{$Condition \geq 1$}
\State Do that
\ElsIf{$Condition \neq 5$}
\State Do another
\State Do that as well
\Else
\State Do otherwise
\EndIf
\EndIf
\While{$something \not= 0$} \Comment{put some comments here}
\State $var1 \leftarrow var2$ \Comment{another comment}
\State $var3 \leftarrow var4$
\EndWhile \label{roy's loop}
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}
\documentclass{article}
\usepackage{xcolor}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\title{Another algorithm template}
\author{Roy}
%%% Coloring the comment as blue
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
\SetCommentSty{mycommfont}
\SetKwInput{KwInput}{Input} % Set the Input
\SetKwInput{KwOutput}{Output} % set the Output
\begin{document}
\maketitle
\begin{algorithm}[H]
\DontPrintSemicolon
\KwInput{Your Input}
\KwOutput{Your output}
\KwData{Testing set $x$ \tcp{this is a comment}}
$\sum_{i=1}^{\infty} := 0$ \tcp*{this is another comment}
\tcc{Now this is an if...else conditional loop}
\If{Condition 1}
{
Do something \tcp*{this is another comment}
\If{sub-Condition}
{Do a lot}
\For(\tcp*[h]{A comment at left}){sequence}
{
loop instructions
}
}
\ElseIf{Condition 2}
{
Do Otherwise \;
\tcp{Now this is a for loop}
\For(\tcp*[f]{A comment at right}){sequence}
{
loop instructions
}
}
\Else
{
Do the rest
}
\tcc{Now this is a While loop}
\While{Condition}
{
Do something\;
}
\caption{Example code}
\label{alg:this-algorithm}
\end{algorithm}
\end{document}
\begin{algorithm}[H]
\SetKwInput{KwInput}{Input} % Set the Input
\SetKwInput{KwOutput}{Output} % set the Output
\DontPrintSemicolon
\KwInput{Your Input}
\KwOutput{Your output}
\KwData{Testing set $x$}
% Set Function Names
\SetKwFunction{FMain}{Main}
\SetKwFunction{FSum}{Sum}
\SetKwFunction{FSub}{Sub}
% Write Function with word ``Function''
\SetKwProg{Fn}{Function}{:}{}
\Fn{\FSum{$first$, $second$}}{
a = first\;
b = second\;
sum = first + second\;
\KwRet sum\;
}
\;
% Write Function with word ``Def''
\SetKwProg{Fn}{Def}{:}{}
\Fn{\FSub{$first$, $second$}}{
a = first\;
b = second\;
sum = first - second\;
\KwRet sum\;
}
\;
\SetKwProg{Fn}{Function}{:}{\KwRet}
\Fn{\FMain}{
a = 5\;
b = 10\;
Sum(5, 10)\;
Sub(5, 10)\;
print Sum, Sub\;
\KwRet 0\;
}
\end{algorithm}
% you should have ./test-png/test-{0..24}.png
\documentclass{article}
\usepackage{graphicx}
\usepackage{animate}
\begin{document}
Here is an animated GIF:
% fps
\animategraphics[loop,controls,width=\linewidth]{10}{test-png/test-}{0}{24}
\end{document}
\documentclass{article}
% create Bibliografy.bib
\usepackage{filecontents}
\begin{filecontents*}{Bibliografy.bib}
@book{strangIntroductionLinearAlgebra1993,
title = {Introduction to Linear Algebra},
author = {Strang, Gilbert and Strang, Gilbert and Strang, Gilbert and Strang, Gilbert},
date = {1993},
volume = {3},
publisher = {Wellesley-Cambridge Press Wellesley, MA}
}
@inproceedings{fohlmeisterDualKalmanFiltering2018,
title = {Dual {{Kalman}} Filtering Based {{GNSS}} Phase Tracking for Scintillation Mitigation},
booktitle = {2018 {{IEEE}}/{{ION Position}}, {{Location}} and {{Navigation Symposium}} ({{PLANS}})},
author = {Fohlmeister, Friederike and Antreich, Felix and Nossek, Josef A.},
date = {2018-04},
pages = {1151--1158},
issn = {2153-3598},
doi = {10.1109/PLANS.2018.8373499},
eventtitle = {2018 {{IEEE}}/{{ION Position}}, {{Location}} and {{Navigation Symposium}} ({{PLANS}})},
keywords = {GNSS,Synchronization}
}
@article{rinoAngleDependenceSingly1977,
title = {The Angle Dependence of Singly Scattered Wavefields},
author = {Rino, CL and Fremouw, EJ},
date = {1977},
journaltitle = {Journal of Atmospheric and Terrestrial Physics},
shortjournal = {Journal of Atmospheric and Terrestrial Physics},
volume = {39},
number = {8},
pages = {859--868},
publisher = {Elsevier},
issn = {0021-9169}
}
\end{filecontents*}
% Use the biblatex package
\usepackage[style=authoryear, backend=biber, hyperref=true]{biblatex}
\addbibresource{Bibliografy.bib}
\usepackage[hidelinks,allcolors=blue]{hyperref}
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = blue, %Colour for external hyperlinks
linkcolor = blue, %Colour of internal links
citecolor = red %Colour of citations
}
\title{My incredible title}
\date{\today}
\begin{document}
\maketitle
Hello world!
\begin{itemize}
\item A normal citation: \cite{strangIntroductionLinearAlgebra1993}.
\item A parenthesis citation: \parencite{fohlmeisterDualKalmanFiltering2018}.
\item A textual citation: \textcite{rinoAngleDependenceSingly1977}.
\item Citing only the author's name: \citeauthor{strangIntroductionLinearAlgebra1993}.
\item Citing only the year of publication: \citeyear{strangIntroductionLinearAlgebra1993}.
\item Citing only the title of the source: \citetitle{rinoAngleDependenceSingly1977}.
\end{itemize}
\printbibliography
\end{document}
\documentclass{article}
\usepackage{fontspec}
% \usepackage{unicode-math}
% \usepackage[utf8]{inputenc}
\usepackage{minted}
% \newfontfamily \JuliaMono {JuliaMono-Regular.ttf}[
% Path = /home/tapyu/.local/share/fonts/juliamono/,
% Extension = .ttf
% ]
% \newfontface \JuliaMonoRegular{JuliaMono-Regular}
% \setmonofont{JuliaMonoRegular}[
% Contextuals=Alternate
% ]
\begin{document}
This is some text with an \mintinline{python}{if} statement in it. You can also include variable names like \mintinline{cpp}{int x = 42;}. Now it is Matlab \mintinline{matlab}{fft(x)}.
\begin{minted}[breaklines,escapeinside=||,mathescape=true, linenos, numbersep=3pt, gobble=2, frame=lines, fontsize=\small, framesep=2mm]{julia}
using Convex, SCS, Plots, LaTeXStrings
N = 30 # N in the set {0, 1, ..., N}
n = 3 # order of the linear dynamical system
x_des = [7, 2, -6] # constraint -> ��(N) == x_des
# model parameters
�� = [-1 .4 .8; 1 0 0; 0 1 0]
�� = [1, 0, 0.3]
�� = Variable(n, N+1) # [��(0) ��(1) ... ��(N)]
�� = Variable(1, N) # [u(0) u(1) ... u(N-1)]
f0 = sum(max(abs(��), 2abs(��)-1)) # objective function
constraints = [
��[:,2:N+1] == ��*��[:,1:N]+��*��, # recursive equation
��[:,1] == zeros(n), # initial condition
��[:,N+1] == x_des, # final condition
]
problem = minimize(f0, constraints)
solve!(problem, SCS.Optimizer; silent_solver = true)
fig = plot(vec(��.value), xlabel=L"k", title=L"u(k)", line=:steppre)
savefig(fig, "figs/4.17.png")
\end{minted}
\end{document}
\usepackage{float}
\begin{figure}[H]
\centering
\includegraphics[scale=0.35]{../figs/elementwise_OLS/residues_PDF_I5i1.png}
\caption{Distribution of the residuals.}
\label{fig:distribution}
\end{figure}
% useful packages for writing a thesis document
% \glsxtrlong{gnss}[s] -> use `long` entry (with an "s" included to the word)
% \glspl{ismr} -> use the `plural` entry
% \glsxtrlongpl{cnn} -> use the `longplural` entry
% \gls{gnss}[s] -> short + an "s" to make it plural
\documentclass{article}
\usepackage{glossaries}
\usepackage[nonumberlist,automake]{glossaries-extra}
\newglossaryentry{ismr}{
type=\acronymtype,
name={ISMR},
description={Ionospheric scintillation monitoring receiver},
first={ionospheric scintillation monitoring receiver (ISMR)},
firstplural={ionospheric scintillation monitoring receivers (ISMRs)},
plural={ionospheric scintillation monitoring receivers (ISMRs)},
sort={ISMR},
long={ionospheric scintillation monitoring receiver},
short={ISMR}
}
\makeglossaries
\begin{document}
The first use is in \glspl{ismr} and subsequent uses are \gls{ismr}. But if I want, I can use long form \glsxtrlong{ismr}.
\printglossaries
\end{document}
\documentclass{article}
\usepackage{amsmath,amsfonts}
\begin{document}
\begin{align}
\mathbf{A} = \begin{bmatrix}
a_{11} & a_{12} & \dots & a_{1n} \\
a_{21} & a_{22} & \dots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m1} & a_{m2} & \dots & a_{mn} \\
\end{bmatrix} \in \mathbb{C}^{m \times n}
\end{align}
\end{document}
\documentclass{article}
\usepackage{luacolor}
\usepackage[soul]{lua-ul}
\newcommand{\remove}[1]{\hl{\color{red}\st{#1}}}
\newcommand{\add}[1]{\hl{\color{blue}#1}}
\newcommand{\change}[2]{\hl{\color{red}\st{#1}}\hl{\color{blue}#2}}
\begin{document}
\add{aaa} \remove{bbb} \change{ccc}{ddd}
\end{document}
% NOTE: https://tex.stackexchange.com/questions/32127/standalone-tikz-pictures
\documentclass{article}
\usepackage[mode=buildnew]{standalone}% requires -shell-escape
\usepackage{tikz}
\usepackage{float}
\begin{document}
Lorem ipsum ...
\begin{figure}[H]
\centering
\includestandalone[scale=0.35]{figuras/csm} % don't add the extension!
\caption{The block diagram of the Cornell Scintillation Model.}
\label{fig:csm}
\end{figure}
Lorem ipsum ...
\end{document}
\usepackage{svg}
\begin{figure}[H]
\centering
\includesvg[scale=0.35]{../figs/violin.svg}
\caption{Box plot of the rainfall estimation.}
\label{fig:distribution}
\end{figure}
\documentclass{article}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Example Table}
\begin{tabular}{|c|c|c|}
\hline
\textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\
\hline
Row 1, Col 1 & Row 1, Col 2 & Row 1, Col 3 \\
Row 2, Col 1 & Row 2, Col 2 & Row 2, Col 3 \\
Row 3, Col 1 & Row 3, Col 2 & Row 3, Col 3 \\
\hline
\end{tabular}
\label{tab:example}
\end{table}
\end{document}
\documentclass{article}
% redefine \maketitle
\makeatletter % changes the catcode of @ to 11
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author\\
\end{tabular}\par}%
\vskip 1em%
{\large {\tt Version:}\@date}%
\end{center}%
\par
\vskip 1.5em}
\makeatother % changes the catcode of @ back to 12
\usepackage{authblk}
\begin{document}
\title{\textbf{Notation} \vspace{-.3cm}}
\author{Rubem Vasconcelos Pacelli\\
{\tt rubem.engenharia@gmail.com}}
\affil{Department of Teleinformatics Engineering,\\Federal University of Ceará.\\Fortaleza, Ceará, Brazil. \vspace{-.5cm}}
\maketitle
\end{document}
\documentclass{article}
% CAVEAT: It doesn't work for two-column layout!
\usepackage{xltabular}
\newcolumntype{A}{>{\hsize=.5\hsize}X}
\newcolumntype{B}{>{\hsize=.25\hsize\centering\arraybackslash}X}
\newcolumntype{C}{>{\hsize=.25\hsize}X}
\begin{document}
\begin{xltabular}[l]{\linewidth}{|A|B|C|}
\caption{Caption.\label{tab:xltabular}}\\[\belowcaptionskip]\hline
Alpha & Beta & Gamma \\ \hline
0 & 2 & 4 \\ \hline
1 & 3 & 5 \\ \hline
\end{xltabular}
\end{document}
\documentclass{article}
\usepackage[showframe=true]{geometry}
\usepackage{enumitem}
\begin{document}
\begin{itemize}[leftmargin=*]
\item one
\item two
\item three
\end{itemize}
\end{document}
\documentclass{article}
\begin{filecontents*}[overwrite]{tasks.csv}
task,obj,resources,wp
task1.1,1,2k,1
task2.1,2,3k,2
task3.1,3,4k,3
\end{filecontents*}
\usepackage{datatool}
\begin{document}
% Load the database; later referenced as tasks
\DTLloaddb
[keys={task,obj,resources,wp}]% <options>
{tasks}% <db name>
{tasks.csv}% <filename>
Resources for the first task from Work Package
\DTLfetch{tasks}{task}{task2.1}{resources} %\input{project.csv[task1.1, wp]}
are
\DTLfetch{tasks}{task}{task1.1}{resources} %\input{project.csv[task1.1, resources]}
USD.
\end{document}
% text colors
\documentclass{article}
\usepackage{xcolor}
\newcommand{\obs}[1]{\textcolor{red}{#1}}
\begin{document}
This is an \obs{observation!}.
\end{document}
\pagenumbering{gobble}
% make underbraces with multiple lines
\usepackage{amsmath}
\[
\underbrace{...}_{\substack{\text{Some long text that} \\ \text{should be multiline}}}
\]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment