Advertisement
Guest User

My LaTeX style

a guest
Sep 29th, 2012
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.37 KB | None | 0 0
  1. \ProvidesPackage{style}
  2.  
  3. \usepackage{graphicx}
  4.  
  5. \usepackage{tikz}
  6. % Inserts a scale bar into an image
  7. % Optional argument: the colour of the bar and text
  8. % Argument 1: an \includegraphics command
  9. % Argument 2: the real world width of the image
  10. % Argument 3: the length of the scale bar
  11. % Argument 4: the units in which the scale bar is measured
  12. \newcommand{\scalebar}[5][white]{
  13.  \begin{tikzpicture}
  14.    \draw (0,0) node[anchor=south west,inner sep=0] (image) { #2 };
  15.    \begin{scope}[x={(image.south east)},y={(image.north west)}]
  16.      \fill [#1] (0.05,0.2cm) rectangle (#4/#3+0.05,0.4cm);
  17.      \draw [#1] (0.05,0.4cm) node[anchor=south west] { \SI{#4}{#5} };
  18.    \end{scope}
  19.  \end{tikzpicture}
  20. }
  21.  
  22. % SI units
  23. \usepackage{siunitx}
  24. \DeclareSIUnit \molar {M}
  25. \sisetup{separate-uncertainty=true}
  26.  
  27. \usepackage{booktabs}
  28.  
  29. \usepackage[version=3]{mhchem}
  30.  
  31. \usepackage{graphicx}
  32.  
  33. \usepackage{subcaption}
  34.  
  35. \usepackage{mathtools}
  36.  
  37. \usepackage[width=.75\textwidth]{caption}
  38.  
  39. \usepackage[superscript]{cite}
  40.  
  41. % Define acronyms
  42. \usepackage{acronym}
  43.  
  44. \usepackage{chemfig}
  45. \setdoublesep{0.35700 em}  % 'Bond Spacing'
  46.  \setatomsep{1.78500 em}    % 'Fixed Length'
  47. %\setatomsep{1.0 em}    % 'Fixed Length'
  48. \setbondoffset{0.18265 em} % 'Margin Width'
  49. \newcommand{\bondwidth}{0.06642 em} % 'Line Width'
  50. \setbondstyle{line width = \bondwidth}
  51.  
  52. \usepackage{cleveref}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement