Remove some things I don’t use, stop latex snippets relying on external files
This commit is contained in:
parent
0541598ed5
commit
2f3f5d6afb
3 changed files with 148 additions and 23 deletions
|
@ -3,10 +3,72 @@
|
|||
# --
|
||||
\documentclass{article}
|
||||
|
||||
\input{$HOME/Documents/drive/res/latex-headers-templates/headers/standard} %$
|
||||
% \input{$HOME/Documents/drive/res/latex-headers-templates/headers/bibsetup} %$
|
||||
% Dimensions
|
||||
\usepackage{geometry}
|
||||
\geometry{a4paper}
|
||||
|
||||
% \bibliography{bib} % change if necessary
|
||||
% Text spacing
|
||||
\usepackage{microtype}
|
||||
\setlength{\parindent}{0em}
|
||||
\setlength{\parskip}{1em}
|
||||
\emergencystretch 3em
|
||||
\usepackage{setspace}
|
||||
\doublespacing
|
||||
\usepackage[bottom]{footmisc}
|
||||
|
||||
% Tables
|
||||
\usepackage{float}
|
||||
\usepackage{tablefootnote}
|
||||
\usepackage{makecell}
|
||||
\renewcommand{\cellalign}{cl}
|
||||
\usepackage{etoolbox}
|
||||
\AtBeginEnvironment{tabular}{\doublespacing}
|
||||
\usepackage{array}
|
||||
\usepackage{booktabs}
|
||||
|
||||
% Links and URLs
|
||||
\usepackage[hyphens]{url}
|
||||
\usepackage[hidelinks]{hyperref}
|
||||
\urlstyle{tt}
|
||||
|
||||
% Fonts
|
||||
\usepackage{mathspec}
|
||||
\setmainfont{TeX Gyre Pagella}
|
||||
\setmathfont(Digits){TeX Gyre Pagella Math}
|
||||
\setmathfont(Latin,Greek){TeX Gyre Pagella}
|
||||
\newfontfamily\ipatext{Doulos SIL}
|
||||
\DeclareTextFontCommand{\phontrans}{\ipatext} % wrap // and [] in \phontrans
|
||||
|
||||
% Typographic tweaks
|
||||
\usepackage{csquotes}
|
||||
\makeatletter
|
||||
\DeclareMathSymbol{0}{\mathalpha}{\eu@DigitsArabic@symfont}{`0}
|
||||
\DeclareMathSymbol{1}{\mathalpha}{\eu@DigitsArabic@symfont}{`1}
|
||||
\DeclareMathSymbol{2}{\mathalpha}{\eu@DigitsArabic@symfont}{`2}
|
||||
\DeclareMathSymbol{3}{\mathalpha}{\eu@DigitsArabic@symfont}{`3}
|
||||
\DeclareMathSymbol{4}{\mathalpha}{\eu@DigitsArabic@symfont}{`4}
|
||||
\DeclareMathSymbol{5}{\mathalpha}{\eu@DigitsArabic@symfont}{`5}
|
||||
\DeclareMathSymbol{6}{\mathalpha}{\eu@DigitsArabic@symfont}{`6}
|
||||
\DeclareMathSymbol{7}{\mathalpha}{\eu@DigitsArabic@symfont}{`7}
|
||||
\DeclareMathSymbol{8}{\mathalpha}{\eu@DigitsArabic@symfont}{`8}
|
||||
\DeclareMathSymbol{9}{\mathalpha}{\eu@DigitsArabic@symfont}{`9}
|
||||
\makeatother
|
||||
|
||||
% Language
|
||||
\usepackage{polyglossia}
|
||||
\setdefaultlanguage[variant=british]{english}
|
||||
\setotherlanguages{french} % for some reason this displays footnotes correctly?
|
||||
|
||||
% Other
|
||||
\usepackage{paralist}
|
||||
\usepackage{verbatim}
|
||||
|
||||
% uncomment and expand this if there's a bibliography:
|
||||
% latexbib
|
||||
|
||||
\title{}
|
||||
\author{}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
|
|
82
snippets/latex-mode/latexbib
Normal file
82
snippets/latex-mode/latexbib
Normal file
|
@ -0,0 +1,82 @@
|
|||
# name: latex-bibsetup
|
||||
# key: latexbib
|
||||
# --
|
||||
\usepackage[style=authoryear-ibid,alldates=long,giveninits=true,dashed=false,labeldate=year,mergedate=maximum,maxbibnames=10,ibidpage=true,uniquename=false]{biblatex}
|
||||
|
||||
\renewbibmacro*{volume+number+eid}{ % puts issue number in brackets
|
||||
\printfield{volume}
|
||||
\printfield{number}
|
||||
\setunit{\addcomma\space}
|
||||
\printfield{eid}}
|
||||
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
|
||||
|
||||
\renewbibmacro{in:}{ % gets rid of In for journal articles
|
||||
\ifentrytype{article}
|
||||
{}
|
||||
{\printtext{\bibstring{in}\intitlepunct}}}
|
||||
|
||||
\DefineBibliographyStrings{english}{ % changes visited on to accessed
|
||||
urlseen={Accessed},
|
||||
}
|
||||
|
||||
\DeclareFieldFormat[article]{pages}{#1} % gets rid of pp. for journal articles
|
||||
\DeclareNameAlias{sortname}{family-given} % stops 2nd author being listed first last
|
||||
\renewcommand*{\intitlepunct}{\space} % deletes colon after In
|
||||
\AtEveryBibitem{\uspunctuation} % fixes full stop placement
|
||||
|
||||
\renewcommand*{\postnotedelim}{\addcolon} % replaces p. in text with colons
|
||||
\DeclareFieldFormat{postnote}{#1}
|
||||
\DeclareFieldFormat{multipostnote}{#1}
|
||||
|
||||
\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}} % year first published
|
||||
\renewbibmacro*{cite:labeldate+extradate}{%
|
||||
\iffieldundef{origyear}
|
||||
{}
|
||||
{\printorigdate
|
||||
\setunit{\addspace}}%
|
||||
\iffieldundef{labelyear}
|
||||
{}
|
||||
{\printtext[bibhyperref]{\printlabeldateextra}}}
|
||||
|
||||
\DeclareCiteCommand{\citeorigyear}
|
||||
{\boolfalse{citetracker}%
|
||||
\boolfalse{pagetracker}%
|
||||
\usebibmacro{prenote}}
|
||||
{\printfield{origyear}}
|
||||
{\multicitedelim}
|
||||
{\usebibmacro{postnote}}
|
||||
|
||||
\renewbibmacro*{date+extradate}{%
|
||||
\iffieldundef{origyear}
|
||||
{}
|
||||
{\printorigdate
|
||||
\setunit{\addspace}}%
|
||||
\iffieldundef{labelyear}
|
||||
{}
|
||||
{\printtext[parens]{%
|
||||
\iflabeldateisdate
|
||||
{\printdateextra}
|
||||
{\printlabeldateextra}}}}
|
||||
|
||||
\renewbibmacro*{begentry}{% % adds short author in square brackets where applicable
|
||||
\ifnameundef{shortauthor}
|
||||
{}
|
||||
{\bibopenbracket\printnames{shortauthor}%
|
||||
\bibclosebracket\space}}
|
||||
|
||||
\DefineBibliographyExtras{english}{% % D M Y format in bibliography
|
||||
\protected\def\mkbibdatelong#1#2#3{%
|
||||
\iffieldundef{#3}
|
||||
{}
|
||||
{\stripzeros{\thefield{#3}}%
|
||||
\iffieldundef{#2}{}{\nobreakspace}}%
|
||||
\iffieldundef{#2}
|
||||
{}
|
||||
{\mkbibmonth{\thefield{#2}}%
|
||||
\iffieldundef{#1}{}{\space}}%
|
||||
\stripzeros{\thefield{#1}}}%
|
||||
}
|
||||
|
||||
\bibliography{bib} % change if necessary
|
||||
|
||||
$0
|
Loading…
Add table
Add a link
Reference in a new issue