main.tex 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. \documentclass[a4paper, 12pt]{article}
  2. % english and utf8
  3. \usepackage[british]{babel}
  4. \usepackage[utf8]{inputenc}
  5. % url support
  6. \usepackage{url}
  7. % make links clickable
  8. \usepackage{hyperref}
  9. % code listings
  10. \usepackage{listings}
  11. \usepackage{color}
  12. \definecolor{codebg}{rgb}{0.9,0.9,0.9}
  13. \definecolor{mygreen}{rgb}{0,0.6,0}
  14. \definecolor{mygray}{rgb}{0.5,0.5,0.5}
  15. \definecolor{mymauve}{rgb}{0.58,0,0.82}
  16. \lstset{%
  17. backgroundcolor=\color{codebg}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
  18. basicstyle=\footnotesize, % the size of the fonts that are used for the code
  19. breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
  20. breaklines=true, % sets automatic line breaking
  21. captionpos=b, % sets the caption-position to bottom
  22. commentstyle=\color{mygreen}, % comment style
  23. % deletekeywords={...}, % if you want to delete keywords from the given language
  24. escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
  25. extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
  26. % frame=single, % adds a frame around the code
  27. keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
  28. keywordstyle=\color{blue}, % keyword style
  29. % language=Octave, % the language of the code
  30. % morekeywords={*,...}, % if you want to add more keywords to the set
  31. numbers=left, % where to put the line-numbers; possible values are (none, left, right)
  32. numbersep=5pt, % how far the line-numbers are from the code
  33. numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
  34. rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
  35. showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
  36. showstringspaces=false, % underline spaces within strings only
  37. showtabs=false, % show tabs within strings adding particular underscores
  38. stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
  39. stringstyle=\color{mymauve}, % string literal style
  40. tabsize=2, % sets default tabsize to 2 spaces
  41. title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title
  42. }
  43. \lstdefinelanguage{json}{
  44. morekeywords={},
  45. sensitive=false,
  46. morestring=[b]",
  47. }
  48. % include images
  49. \usepackage{graphicx}
  50. % better tables using tabularx
  51. \usepackage{tabularx}
  52. % support github markdown strikethrough
  53. % http://tex.stackexchange.com/questions/23711/strikethrough-text
  54. \usepackage{ulem}
  55. \begin{document}
  56. \include{README}
  57. \end{document}