myStyle.sty 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. \usepackage{multicol}
  2. \usepackage{calc}
  3. \usepackage{ifthen}
  4. \usepackage[landscape]{geometry}
  5. % This sets page margins to .5 inch if using letter paper, and to 1cm
  6. % if using A4 paper. (This probably isn't strictly necessary.)
  7. % If using another size paper, use default 1cm margins.
  8. \ifthenelse{\lengthtest { \paperwidth = 11in}}
  9. { \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
  10. {\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
  11. {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
  12. {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
  13. }
  14. % Turn off header and footer
  15. \pagestyle{empty}
  16. % Redefine section commands to use less space
  17. \makeatletter
  18. \renewcommand{\section}{\@startsection{section}{1}{0mm}%
  19. {-1ex plus -.5ex minus -.2ex}%
  20. {0.5ex plus .2ex}%x
  21. {\normalfont\large\bfseries}}
  22. \renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
  23. {-1explus -.5ex minus -.2ex}%
  24. {0.5ex plus .2ex}%
  25. {\normalfont\normalsize\bfseries}}
  26. \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
  27. {-1ex plus -.5ex minus -.2ex}%
  28. {1ex plus .2ex}%
  29. {\normalfont\small\bfseries}}
  30. \makeatother
  31. % Define BibTeX command
  32. \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
  33. T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
  34. % Don't print section numbers
  35. \setcounter{secnumdepth}{0}
  36. \setlength{\parindent}{0pt}
  37. \setlength{\parskip}{0pt plus 0.5ex}
  38. \usepackage{menukeys}
  39. \pdfinfo{
  40. /Author (Martin Thoma)
  41. /Title (Vim Cheat Sheet)
  42. /CreationDate (D:20130415072400)
  43. /Subject (Vim)
  44. /Keywords (Vim;Cheat Sheet)
  45. }