tex.snippets 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. ## common
  2. # Section
  3. snippet sec
  4. \section{${1}}
  5. \label{sec:${2}}
  6. endsnippet
  7. # Subsection
  8. snippet subsec
  9. \subsection{${1}}
  10. \label{subsec:${2}}
  11. endsnippet
  12. # Subsection
  13. snippet subsub
  14. \subsubsection{${1}}
  15. \label{subsubsec:${2}}
  16. endsnippet
  17. # Paragraph
  18. snippet par
  19. \paragraph{${1}}
  20. endsnippet
  21. # Table
  22. snippet tab
  23. \begin{table}
  24. \centering
  25. \caption{${1}}
  26. \label{tab:${2}}
  27. \begin{tabular}{${3}}
  28. ${0} \\\\
  29. \end{tabular}
  30. \end{table}
  31. endsnippet
  32. # Figure
  33. snippet fig
  34. \begin{figure}
  35. ${0}
  36. \end{figure}
  37. endsnippet
  38. # Image
  39. snippet img
  40. \begin{figure}
  41. \centering
  42. \includegraphics[width=${2:0.9}\linewidth]{${1}}
  43. \caption{${3}}
  44. \label{fig:${4}}
  45. \end{figure}
  46. endsnippet
  47. # PGF-Image
  48. snippet pgf
  49. \begin{figure}
  50. \centering
  51. \input{${1}}
  52. \caption{${3}}
  53. \label{fig:${4}}
  54. \end{figure}
  55. endsnippet
  56. # Subimages
  57. snippet subimg
  58. \begin{figure}
  59. \centering
  60. \begin{subfigure}{0.49\linewidth}
  61. \includegraphics[width=1\linewidth]{${1}}
  62. \caption{${3}}
  63. \label{fig:${5}_1}
  64. \end{subfigure}
  65. \begin{subfigure}{0.49\linewidth}
  66. \includegraphics[width=1\linewidth]{${2}}
  67. \caption{${4}}
  68. \label{fig:${5}_2}
  69. \end{subfigure}
  70. \caption{${3}}
  71. \label{fig:${5}}
  72. \end{figure}
  73. endsnippet
  74. # Subimages of PGF Images
  75. snippet subpgf
  76. \begin{figure}
  77. \centering
  78. \begin{subfigure}{0.49\linewidth}
  79. \input{${1}}
  80. \caption{${3}}
  81. \label{fig:${5}_1}
  82. \end{subfigure}
  83. \begin{subfigure}{0.49\linewidth}
  84. \input{${2}}
  85. \caption{${4}}
  86. \label{fig:${5}_2}
  87. \end{subfigure}
  88. \caption{${3}}
  89. \label{fig:${5}}
  90. \end{figure}
  91. endsnippet
  92. # Environment
  93. snippet be
  94. \begin{${1:env}}
  95. ${0}
  96. \end{$1}
  97. endsnippet
  98. # Equation
  99. snippet eq
  100. \begin{equation}
  101. \label{eq:${2}}
  102. ${0}
  103. \end{equation}
  104. endsnippet
  105. # Equation
  106. snippet eq*
  107. \begin{equation*}
  108. ${0}
  109. \end{equation*}
  110. endsnippet
  111. # align
  112. snippet align
  113. \begin{align}
  114. ${0} \label{eqn:${1}}
  115. \end{align}
  116. endsnippet
  117. # align
  118. snippet align*
  119. \begin{align*}
  120. ${0}
  121. \end{align*}
  122. endsnippet
  123. # Equation array
  124. snippet eqnarray
  125. \begin{eqnarray}
  126. ${0}
  127. \end{eqnarray}
  128. endsnippet
  129. # Fraction
  130. snippet frac
  131. \frac{${1}}{${2}}${0}
  132. endsnippet
  133. # ()
  134. snippet ()
  135. \left(${0}\right)
  136. endsnippet
  137. # []
  138. snippet []
  139. \left[${0}\right]
  140. endsnippet
  141. # Label
  142. snippet lab
  143. \label{${1}}
  144. endsnippet
  145. # Reference
  146. snippet ref
  147. \ref{${1}}
  148. endsnippet
  149. # Itemize
  150. snippet itemize
  151. \begin{itemize}
  152. \item ${0}
  153. \end{itemize}
  154. endsnippet
  155. # Endless new item
  156. snippet item
  157. \item ${1}
  158. item
  159. endsnippet
  160. # electronvolt per c squared
  161. snippet evc
  162. \electronvolt \per \clight \squared
  163. endsnippet
  164. # siunitx maaan
  165. snippet si
  166. \SI{${1}}{${2}}
  167. endsnippet
  168. snippet ss
  169. \si{${1}}
  170. endsnippet
  171. snippet n
  172. \num{${1}}
  173. endsnippet
  174. snippet st "subscript text for indices" i
  175. _\text{${1}}${0}
  176. endsnippet
  177. ## beamer
  178. # frame
  179. snippet frame
  180. \begin{frame}{${1:frametitle}}
  181. ${0}
  182. \end{frame}
  183. endsnippet