1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-11-29 19:37:53 +00:00

Added new user shorthands tsq, bsq, myquote

This commit is contained in:
chhan11 2017-05-31 16:11:03 +02:00
parent e26642ebc5
commit 8b785998b1
2 changed files with 17 additions and 1 deletions

View file

@ -50,6 +50,16 @@
{\footnotesize #2}} {\footnotesize #2}}
\newcommand{\myquote}[2]{%
\sbox0{#1}%
\ifdim\wd0=0pt
{\epigraph{#2}{\textit{{\tiny \theauthor}}}} %if #1 is empty
\else
{\epigraph{#2}{\textit{#1}}} %if quote is cited
\fi
}
% Enviroment @var txt % Enviroment @var txt
% changes code styling to: in frame, white bg. % changes code styling to: in frame, white bg.
\lstnewenvironment{txt}{\lstset{style=plaintxt}}{} \lstnewenvironment{txt}{\lstset{style=plaintxt}}{}

View file

@ -37,6 +37,8 @@
\usepackage{inconsolata} \usepackage{inconsolata}
\usepackage{blindtext} \usepackage{blindtext}
\usepackage{expdlist} \usepackage{expdlist}
\usepackage{epigraph} % used to style quotes
\usepackage{titling} % makes available \thetitle \theauthor \thedate
\bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles \bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles
@ -207,3 +209,7 @@
\renewcommand\theadfont{\bfseries} \renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]} \renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]} \renewcommand\cellgape{\Gape[4pt]}
\def\tsq#1{\textquotesingle{#1}}
\def\bsq#1{%both single quotes
\lq{#1}\rq}