dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | Submodules | README | LICENSE

tex.snippets (4267B)


      1 priority 1
      2 
      3 snippet eq "Insert equation environment"
      4 \begin{equation}
      5     $0
      6     \label{eq:$1}
      7 \end{equation}
      8 endsnippet
      9 
     10 snippet Eq "Insert reference to equation"
     11 (Eq.~\ref{eq:$0})
     12 endsnippet
     13 
     14 snippet columnframe "Insert Beamer slide with two columns"
     15 \begin{frame}{$1}
     16     \begin{columns}
     17         \begin{column}{${2:0.50}\textwidth}
     18 		    $4
     19         \end{column}
     20         \begin{column}{${3:0.50}\textwidth}
     21 		    $5
     22         \end{column}
     23     \end{columns}
     24 \end{frame}
     25 endsnippet
     26 
     27 snippet fig "Insert figure environment"
     28 \begin{figure}[${5:htbp}]
     29     \includegraphics[width=$1\textwidth]{$2}
     30     \caption{\label{fig:${3:unnamed}}%
     31         $4
     32     }
     33 \end{figure}
     34 endsnippet
     35 
     36 snippet includegraphics "Include graphics (no figure env)"
     37 \includegraphics[width=$1\textwidth]{$2}
     38 endsnippet
     39 
     40 snippet Fig "Insert reference to figure"
     41 (Fig.~\ref{fig:$0})
     42 endsnippet
     43 
     44 # snippet sec "Insert section"
     45 # \section{$1}%
     46 # \label{sec:$2}
     47 # $0
     48 # endsnippet
     49 
     50 snippet Sec "Insert reference to section"
     51 (Section~\ref{sec:$0})
     52 endsnippet
     53 
     54 # snippet subsec "Insert subsection"
     55 # \subsection{$1}%
     56 # \label{subsec:$2}
     57 # $0
     58 # endsnippet
     59 
     60 snippet Subsec "Insert reference to subsection"
     61 (Section~\ref{subsec:$0})
     62 endsnippet
     63 
     64 snippet tab "Insert table environment"
     65 \begin{table}[${1:htpb}]
     66     \centering
     67     \caption{$2}
     68     \label{tab:${3:unnamed}}
     69     \begin{tabular}{${4:c}}
     70     $0
     71     \end{tabular}
     72 \end{table}
     73 
     74 endsnippet
     75 
     76 snippet Tab "Insert reference to table"
     77 (Tab.~\ref{fig:$0})
     78 endsnippet
     79 
     80 snippet vec "Insert boldsymbol vector"
     81 \boldsymbol{$0}
     82 endsnippet
     83 
     84 snippet $vec "Insert boldsymbol vector"
     85 $\boldsymbol{$0}$
     86 endsnippet
     87 
     88 snippet vec_ "Insert boldsymbol vector"
     89 \boldsymbol{$1}_\text{$2}^{$3}
     90 endsnippet
     91 
     92 snippet $vec_ "Insert boldsymbol vector"
     93 $\boldsymbol{$1}_\text{$2}^{$3}$
     94 endsnippet
     95 
     96 snippet article "Blank article template"
     97 \documentclass[a4paper,twoside,onecolumn,10pt]{article}
     98 
     99 %% Language
    100 \usepackage[english]{babel}  % break words
    101 
    102 %\captionnamefont{\bfseries\footnotesize}
    103 %\captiontitlefont{\footnotesize}
    104 %\captionnamefont{\bfseries}
    105 %\captiontitlefont{}
    106 %\captionstyle{}
    107 %\captiondelim{. }
    108 %\changecaptionwidth{}
    109 %\captionwidth{0.8\linewidth}
    110 
    111 %\usepackage[rightcaption]{sidecap}
    112 
    113 %% Font settings (recommended in Butterick's practical typography)
    114 % http://practicaltypography.com/
    115 \usepackage[T1]{fontenc} % Font encoding
    116 \usepackage{charter} % Serif body font
    117 \usepackage[charter]{mathdesign} % Math font
    118 \usepackage[scale=0.9]{sourcecodepro} % Monospaced fontenc
    119 \usepackage[lf]{FiraSans} % Sans-serif font
    120 
    121 %% Graphics
    122 \usepackage{graphicx}
    123 \usepackage{tikz} % Drawing library
    124 
    125 %% Mathematics, scientific and chemical notation
    126 \usepackage{amsmath}
    127 %\usepackage{mathtools}
    128 \usepackage{booktabs} % \toprule, \midrule and \bottomrule in tabular
    129 \usepackage[detect-all]{siunitx}
    130 \DeclareSIUnit\year{a}
    131 %\usepackage[version=3]{mhchem}
    132 
    133 %% Code typesetting
    134 % http://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings
    135 \usepackage{listings}
    136 % \begin{lstlisting}[float,label=lst:test,caption=A source code test,basicstyle=\ttfamily,language=Python]
    137 \usepackage{color}
    138 \definecolor{mygreen}{rgb}{0,0.6,0}
    139 \definecolor{mygray}{rgb}{0.5,0.5,0.5}
    140 \definecolor{mymauve}{rgb}{0.58,0,0.82}
    141 \lstset{%
    142   numbers=left,
    143   numberstyle=\tiny,
    144   language=Python,
    145   basicstyle=\ttfamily\footnotesize,
    146   captionpos=b,
    147   frame=single,
    148   keepspaces=true,
    149   keywordstyle=\color{blue},
    150   showstringspaces=false,
    151   stepnumber=1,
    152   tabsize=4,
    153   title=\lstname,
    154   commentstyle=\color{mygreen},
    155   stringstyle=\color{myauve}
    156 }
    157 
    158 %% Links, colors, citations
    159 \usepackage{color}
    160 %\definecolor{AUblue}{rgb}{0.0, 0.3, 0.5}
    161 %\usepackage[colorlinks=true,linkcolor=red,citecolor=AUblue]{hyperref}
    162 \usepackage{hyperref}
    163 %\usepackage{chapterbib} % multiple bibliographies in a document
    164 %\usepackage[round]{natbib}
    165 %\bibliographystyle{abbrvnat}
    166 \usepackage[natbib=true, style=authoryear, bibstyle=authoryear-comp, maxbibnames=10,
    167 maxcitenames=2, backend=bibtex8]{biblatex}
    168 %\bibliography{/Users/ad/articles/own/BIBnew.bib}
    169 
    170 %%% TITLE
    171 \title{${1:Title}}
    172 \author{${2:Anders Damsgaard}}
    173 \date{${3:\today}}
    174 
    175 \begin{document}
    176 
    177 \maketitle
    178 
    179 $0
    180 
    181 %% Bibliography
    182 %\newpage
    183 %\addcontentsline{toc}{part}{Bibliography}
    184 %\bibliography{/Users/ad/articles/own/BIBnew.bib}
    185 \printbibliography{}
    186 
    187 \end{document}
    188 endsnippet