Guest User

Untitled

a guest
Nov 18th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. %!TEX program = xelatex
  2. documentclass[
  3. draft=false, % final mode
  4. paper=portrait,
  5. twoside=false,
  6. open=right,
  7. parskip=full,
  8. headings=big,
  9. version=last, %
  10. italian, % language (passed to babel and other packages)
  11. % (ngerman, english, french, ...)
  12. ]{scrbook} % Classes: scrartcl, scrreprt, scrbook
  13.  
  14. % ----------------------
  15. % DIMENSIONI PAGINA
  16. % ----------------------
  17. setlength{oddsidemargin}{0.3cm}
  18. setlength{textwidth}{0.7textwidth}
  19. setlength{marginparwidth}{2marginparwidth}
  20.  
  21.  
  22. usepackage{lmodern}
  23. usepackage{amsmath} % advanced math symbols pkg
  24. usepackage{amsthm, amsthm}
  25. usepackage[utf8]{inputenc} % utf8 encoding
  26. usepackage{graphicx} % pictures support
  27. usepackage{longtable} % table on multiple pages support
  28. usepackage[italian]{babel} % language support
  29. usepackage{enumitem} % custom enumeration support
  30. usepackage{rotating} % Rotating pictures support
  31. usepackage{floatrow} % Support for floated images
  32. usepackage{hyperref} % Support for href in toc
  33. usepackage{marvosym} % Currency symbols
  34. usepackage{fancyhdr} % Fancy headers
  35. usepackage{array}
  36. usepackage{footnote}
  37. usepackage{setspace}
  38. usepackage{afterpage} % Permette di mettere i numeri di pagina nel footer se si usa il package Fancyhdr
  39. usepackage{textcomp} % Package for copyright glyph
  40. usepackage[newfloat]{minted} % Package for highlight code
  41. usepackage{appendix} %Package for appendices
  42. usepackage{chngcntr} %Package for list of figures numeration
  43. usepackage{csquotes}
  44. usepackage{fontspec}
  45. usepackage[protrusion=true]{microtype}
  46. usepackage{mwe}
  47.  
  48.  
  49. % ----------------------
  50. % CUSTOMIZATION CAPITOLI
  51. % ----------------------
  52. usepackage{xcolor}
  53. usepackage{graphicx}
  54. usepackage{etoolbox}
  55. usepackage{blindtext}
  56.  
  57. input{preamble/style-chapter}
  58.  
  59. renewcommand*{sectionformat}{%
  60. llap{thesectionenskip}%
  61. }
  62.  
  63. renewcommand*{subsectionformat}{%
  64. llap{thesubsectionenskip}%
  65. }
  66.  
  67. % ----------------------
  68. % FOOTNOTE AL MARGINE
  69. % ----------------------
  70. usepackage{marginfix} % --> gestisce correttamente il posizionamento ai margini
  71. usepackage[%
  72. bottom, % Footnotes appear always on bottom. This is necessary
  73. stable, % Make footnotes stable in section titles
  74. perpage, % Reset on each page
  75. side, % Place footnotes in the margin
  76. ragged, % Use RaggedRight
  77. marginal,
  78. norule, % suppress rule above footnotes
  79. multiple, % rearrange multiple footnotes intelligent in the text.
  80. ]{footmisc}
  81. setlength{footnotemargin}{0.1mm} % --> distanza numero di nota a pie di pagine e testo
  82. definecolor{footnotecolor}{RGB}{78, 78, 78}
  83. deffootnotelayout{raggedrightcolor{footnotecolor}} % --> raggedright coincide con text-align:left
  84.  
  85.  
  86. % ----------------------
  87. % CAPTION CUSTOMIZATION
  88. % ----------------------
  89. usepackage[
  90. format=plain,
  91. justification=raggedright,
  92. singlelinecheck=false
  93. ]{caption}
  94. captionsetup{figurename=FIGURE, labelsep=colon}
  95. captionsetup[figure]{font={color=footnotecolor,it,footnotesize},labelfont={color=black,bf,it,scriptsize}}
  96. captionsetup[listing]{font={color=footnotecolor,it,footnotesize},labelfont={color=black,bf,it,scriptsize}}
  97. renewcommand*{figureformat}{ % --> elimina un punto di troppo sulla numerazione delle figure
  98. figurename~thefigure
  99. % autodot% DELETED
  100. }
  101.  
  102. % ----------------------
  103. % FLOATING
  104. % ----------------------
  105. floatsetup{
  106. margins=hangright,
  107. capposition=beside,
  108. capbesideposition={bottom,right},
  109. floatwidth=textwidth
  110. }
  111.  
  112. begin{document}
  113. setminted{linenos,autogobble, frame=lines, framesep=3mm, tabsize=2, fontsize=footnotesize,baselinestretch=1} %IMPOSTAZIONI
  114. chapter{Chapter}
  115. blindtextfootnote{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras accumsan rutrum dictum. Nunc volutpat egestas ante non efficitur. Sed pellentesque vulputate scelerisque.}
  116. begin{figure}
  117. includegraphics[width=textwidth]{example-image-a}
  118. caption{MWE to demonstrate how to place to images side-by-side}
  119. end{figure}
  120. blindtext
  121. blindtext
  122. begin{listing}
  123. begin{minted}{objective-c}
  124. @interface XYZShoutingPerson : XYZPerson
  125. @end
  126.  
  127. @implementation XYZShoutingPerson
  128. - (void)saySomething:(NSString *)greeting {
  129. NSString *uppercaseGreeting = [greeting uppercaseString];
  130. NSLog(@"%@", uppercaseGreeting);
  131. }
  132. @end
  133. end{minted}
  134. caption{Objective-c interface}
  135. end{listing}
  136. end{document}
  137.  
  138. begin{listing}[H]
  139. inputminted{javascript}{code/reactive/simple_sum.js}
  140. caption{Pseudocodice per la somma di due variabili}
  141. label{code:somma_variabili_pseudocodice}
  142. end{listing}
Add Comment
Please, Sign In to add comment