tex.snippets 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. # Wrapimage
  48. snippet wrap
  49. \begin{wrapfigure}{o}${3:[4cm]}{${2:0.3\linewidth}}
  50. \centering
  51. \includegraphics[width=$2]{${1:example-image-a}}
  52. \caption{${4}}
  53. \label{fig:${5}}
  54. \end{wrapfigure}
  55. endsnippet
  56. # PGF-Image
  57. snippet pgf
  58. \begin{figure}
  59. \centering
  60. \input{${1}}
  61. \caption{${3}}
  62. \label{fig:${4}}
  63. \end{figure}
  64. endsnippet
  65. # Subimages
  66. snippet subimg
  67. \begin{figure}
  68. \centering
  69. \begin{subfigure}{0.49\linewidth}
  70. \includegraphics[width=1\linewidth]{${1}}
  71. \caption{${3}}
  72. \label{fig:${5}_1}
  73. \end{subfigure}
  74. \begin{subfigure}{0.49\linewidth}
  75. \includegraphics[width=1\linewidth]{${2}}
  76. \caption{${4}}
  77. \label{fig:${5}_2}
  78. \end{subfigure}
  79. \caption{${3}}
  80. \label{fig:${5}}
  81. \end{figure}
  82. endsnippet
  83. # Subimages of PGF Images
  84. snippet subpgf
  85. \begin{figure}
  86. \centering
  87. \begin{subfigure}{0.49\linewidth}
  88. \input{${1}}
  89. \caption{${3}}
  90. \label{fig:${5}_1}
  91. \end{subfigure}
  92. \begin{subfigure}{0.49\linewidth}
  93. \input{${2}}
  94. \caption{${4}}
  95. \label{fig:${5}_2}
  96. \end{subfigure}
  97. \caption{${3}}
  98. \label{fig:${5}}
  99. \end{figure}
  100. endsnippet
  101. # Environment
  102. snippet be
  103. \begin{${1:env}}
  104. ${0}
  105. \end{$1}
  106. endsnippet
  107. # Equation
  108. snippet eq
  109. \begin{equation}
  110. \label{eq:${2}}
  111. ${0}
  112. \end{equation}
  113. endsnippet
  114. # Equation
  115. snippet eq*
  116. \begin{equation*}
  117. ${0}
  118. \end{equation*}
  119. endsnippet
  120. # align
  121. snippet align
  122. \begin{align}
  123. ${0} \label{eqn:${1}}
  124. \end{align}
  125. endsnippet
  126. # align
  127. snippet align*
  128. \begin{align*}
  129. ${0}
  130. \end{align*}
  131. endsnippet
  132. # Equation array
  133. snippet eqnarray
  134. \begin{eqnarray}
  135. ${0}
  136. \end{eqnarray}
  137. endsnippet
  138. # Fraction
  139. snippet frac
  140. \frac{${1}}{${2}}${0}
  141. endsnippet
  142. # ()
  143. snippet ()
  144. \left(${0}\right)
  145. endsnippet
  146. # []
  147. snippet []
  148. \left[${0}\right]
  149. endsnippet
  150. # Label
  151. snippet lab
  152. \label{${1}}
  153. endsnippet
  154. # Reference
  155. snippet ref
  156. \ref{${1}}
  157. endsnippet
  158. # Itemize
  159. snippet itemize
  160. \begin{itemize}
  161. \item ${0}
  162. \end{itemize}
  163. endsnippet
  164. # Endless new item
  165. snippet item
  166. \item ${1}
  167. item
  168. endsnippet
  169. # siunitx maaan
  170. snippet si
  171. \SI{${1}}{${2}}
  172. endsnippet
  173. snippet ss
  174. \si{${1}}
  175. endsnippet
  176. snippet n
  177. \num{${1}}
  178. endsnippet
  179. snippet st "subscript text for indices" i
  180. _\text{${1}}${0}
  181. endsnippet
  182. ## beamer
  183. # frame
  184. snippet frame
  185. \begin{frame}{${1:frametitle}}
  186. ${0}
  187. \end{frame}
  188. endsnippet