Remove some things I don’t use, stop latex snippets relying on external files

master
trémeur 3 years ago
parent 0541598ed5
commit 2f3f5d6afb

@ -14,6 +14,7 @@
(set-selection-coding-system 'utf-8) (set-selection-coding-system 'utf-8)
;; sonic arts ;; sonic arts
(setq ring-bell-function 'ignore) (setq ring-bell-function 'ignore)
(setq visible-bell t) (setq visible-bell t)
@ -161,14 +162,6 @@
(concat user-emacs-directory (concat user-emacs-directory
(convert-standard-filename "elpa/")))) (convert-standard-filename "elpa/"))))
(use-package reftex
;; easier latex references
:init
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
:config
(setq reftex-default-bibliography '("~/Documents/drive/res/readings/fullbib.bib"))) ; won't work currently on windows, not syncing this file
(use-package typo (use-package typo
;; smart quotes ;; smart quotes
:custom :custom
@ -184,9 +177,6 @@
;; Major modes ;; Major modes
(use-package 2048-game)
;; play the top game of 2014
(use-package interleave) (use-package interleave)
;; for annotating pdfs in an org file ;; for annotating pdfs in an org file
@ -276,15 +266,6 @@
(org-ellipsis "") (org-ellipsis "")
:hook (org-mode . org-bullets-mode)) :hook (org-mode . org-bullets-mode))
(global-set-key [f2] 'org-capture)
(load-file "~/Documents/drive/org/capture.el") ; capture templates stored here
(setq org-capture-bookmark nil)
(use-package org-drill
:config
(setq org-id-locations-file "~/Documents/drive/org/.org-id-locations")
(setq persist--directory-location "~/Documents/drive/org/persist"))
(setq org-todo-keywords (setq org-todo-keywords
'((sequence "TODO" "|" "DONE" "CANCELLED"))) '((sequence "TODO" "|" "DONE" "CANCELLED")))

@ -3,10 +3,72 @@
# -- # --
\documentclass{article} \documentclass{article}
\input{$HOME/Documents/drive/res/latex-headers-templates/headers/standard} %$ % Dimensions
% \input{$HOME/Documents/drive/res/latex-headers-templates/headers/bibsetup} %$ \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} \begin{document}

@ -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…
Cancel
Save