From 8b785998b1628c3aec3ea6132b98cbaa1d40133f Mon Sep 17 00:00:00 2001 From: chhan11 Date: Wed, 31 May 2017 16:11:03 +0200 Subject: [PATCH] Added new user shorthands tsq, bsq, myquote --- commands.tex | 10 ++++++++++ structure.tex | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/commands.tex b/commands.tex index b97f2fb..f7685d0 100644 --- a/commands.tex +++ b/commands.tex @@ -50,6 +50,16 @@ {\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 % changes code styling to: in frame, white bg. \lstnewenvironment{txt}{\lstset{style=plaintxt}}{} diff --git a/structure.tex b/structure.tex index 8239d6c..2934d70 100644 --- a/structure.tex +++ b/structure.tex @@ -37,6 +37,8 @@ \usepackage{inconsolata} \usepackage{blindtext} \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 @@ -206,4 +208,8 @@ \renewcommand\theadalign{cb} \renewcommand\theadfont{\bfseries} \renewcommand\theadgape{\Gape[4pt]} -\renewcommand\cellgape{\Gape[4pt]} \ No newline at end of file +\renewcommand\cellgape{\Gape[4pt]} + +\def\tsq#1{\textquotesingle{#1}} +\def\bsq#1{%both single quotes + \lq{#1}\rq}