Advertisement
Guest User

Driving Document

a guest
Apr 27th, 2017
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.90 KB | None | 0 0
  1. % Written with TexdStudio compiled using pdftex 3.14159265-2.6-1.40.17 TeXLive 2016
  2. % or the other engine xetex 3.14159265-2.6-0.99996 TeXLive 2016
  3. %txs:///pdflatex | txs:///biber | txs:///nomenclindex | txs:///pdflatex | txs:///pdflatex
  4. %pdflatex.exe -synctex=1 -shell-escape -interaction=nonstopmode %.tex
  5. % Shell escape is necessary for minted
  6. % Note that the bib file is encoded in UTF-8
  7. %biber --bblencoding=UTF-8 --bibencoding=UTF-8 "OngunArisevMSc" ;)
  8. \documentclass[titlepage, footnotes, a4paper]{kuthesismod} % Kuthesis class with footnotes enabled
  9. % The class(cls) file can be put into texmf tree and hashed with the command texhash(for TeXLive)
  10. \input{macros} % the macros for kuthesis class
  11. \usepackage{ifxetex}% load different packages with/without XeLaTex
  12. \ifxetex
  13. \usepackage{fontspec}% provides \setmainfont
  14. \setmainfont[Numbers=OldStyle,Ligatures=Common,Mapping=tex-text]{Linux Libertine O}% public domain font % or use the libertine package instead
  15. \else % packages below are not needed with UTF8 based engines
  16. \usepackage[utf8]{inputenc} % I write in UTF8
  17. \usepackage[T1]{fontenc} % 256 glyphs are sufficient for our purposes
  18. \usepackage{lmodern}
  19. \fi
  20. \usepackage[english]{babel}
  21. \usepackage{csquotes}
  22. \usepackage{graphicx} % Commented out \RequirePackage{graphicx} since it disables the passing of options in the \usepackage statement
  23. \usepackage{caption}
  24. \usepackage[list=true]{subcaption} % Provides subfigures with captions and lists them in ToC
  25. \usepackage{amsfonts, amsmath, amssymb} %% AMS packages
  26. \usepackage{esint} % extended set of integrals double closed etc.
  27. \usepackage{textcomp} % We need the SI unit package to use fonts from here
  28. \usepackage{siunitx} %% SI units
  29. \usepackage{microtype} % textcomp is usually needed for this to work properly
  30. \usepackage[usenames, dvipsnames]{xcolor}
  31. \usepackage{hyperref} % Options configured later
  32. \usepackage{hypcap} % For anchorage
  33. \usepackage{float} % For additional position specifiers etc.
  34. \usepackage[english, intoc]{nomencl} % nomenclature package use glossaries for having references to pages the symbols are used
  35. \usepackage[backend=biber, backref=true, sorting=none, url=true, style = nature]{biblatex} % Need to implement change the style maybe
  36. % Make the editor recognize the command DONE NOT COMPLETE-xpatch.cwl under /texstudio/completion/user
  37. \usepackage{xpatch} % extending etoolbox commands for bibliography macros
  38. \usepackage[page]{appendix} % for extended functionalities with appendices
  39. \usepackage{minted} % for code highlightning READ THE MANUAL Python installion is required and pdflatex(or xetex etc.) should be run with -shell-escape option
  40. \usepackage{tikz} % for some graphics
  41. % Load the necessary libraries for Tikz
  42. \usetikzlibrary{shapes.geometric, shapes.arrows, decorations.markings}
  43. \usetikzlibrary{arrows.meta}
  44. \usetikzlibrary{intersections}% for "name path".
  45. \usetikzlibrary{fadings}%
  46. \usetikzlibrary{calc,math}
  47.  
  48.  
  49. %% The following packages are not necessary
  50. % Geometry package distorts this class
  51. %\usepackage{calc} % Calculation functionality without need for TeX primitives
  52. \usepackage{wrapfig}
  53. %\usepackage{braket} % Braket notation
  54. %\usepackage{rotating} % For sideways environment
  55.  
  56. % Add the bibliography in BibLaTeX format UTF-8 encoding
  57. \addbibresource{ThesisReferences.bib}
  58. % Customize backref text
  59. \DefineBibliographyStrings{english}{%
  60. backrefpage = {\hspace*{-1ex}}, % Do not have space right after the bracket
  61. backrefpages = {\hspace*{-1ex}},
  62. }
  63. % Remove URLs from non-misc(if false) type bib entries
  64. \AtEveryBibitem{%
  65. \ifentrytype{misc}{%
  66. }{%
  67. \clearfield{url}%
  68. \clearfield{urldate}%
  69. }%
  70. }
  71. %% Length modifications
  72. \setlength{\nomlabelwidth}{7cm} % Nomenclature item separation left-right
  73. %\setlength{\headheight}{15pt} % this was necessary and class file is modified accordingly
  74. %\pretolerance = 150
  75. %\emergencystretch=3em $ need a value of 4em without microtype package
  76. %\setlength{\parskip}{1em plus 0.1em} %spacing between paragraph
  77. %\setlength{\nomitemsep}{-\parsep} % Nomenclature item vertical separation
  78. %\setlength{\textheight}{\topskip + 30\baselineskip}
  79. %% Show the box contents to diagnose overfull/underfull boxes
  80. %\showboxbreadth=50
  81. %\showboxdepth=50
  82. %\typeout{The text height is \the\textheight}
  83. %\typeout{The base line skip is \the\baselineskip}
  84.  
  85. % Additional configuration commands
  86. \xpatchbibmacro{pageref}{parens}{brackets}{}{} % Backref uses brackets instead of paranthesis
  87. \makenomenclature % this should be in the preamble and makeindex needs to be run afterwards see nomencl doc
  88.  
  89. \hypersetup{linkcolor=wine-stain, citecolor=ForestGreen, urlcolor=blue, colorlinks=true, linktoc= page, pdfauthor={Ongun Arısev},
  90. pdftitle={Ongun Arısev Msc. Thesis},
  91. pdfsubject={Mode Coupling},
  92. pdfkeywords={Thesis, Nanophotonics, Plasmonics, SPP}} % Color the page number in TOC
  93. %Configure the options dvipsnames for one color is used
  94. \colorlet{wine-stain}{red!80!black} % New color
  95. \graphicspath{{Figures/}} % Graphics path
  96. \DeclareGraphicsExtensions{.png} % Possible graphics extensions(since compiler is pdflatex I do not use eps format)
  97. % Set the caption font size and type
  98. \captionsetup{font=normalsize,labelfont={bf,sf}}
  99. \captionsetup[sub]{font=scriptsize,labelfont={bf,sf}}
  100. \newcommand{\figref}[1]{Figure~\ref{#1}}
  101. \newcommand{\tabref}[1]{Table~\ref{#1}}
  102. \renewcommand{\eqref}[1]{Equation~\ref{#1}}
  103. \newcommand{\chapref}[1]{Chapter~\ref{#1}}
  104. %\renewcommand{\autoref}[1]{\hyperref[#1]{Example~\ref*{#1}}} % Trying to emulate autoref command
  105. \newcommand*\chem[1]{\ensuremath{\mathrm{#1}}} % Basic chemical formula
  106.  
  107.  
  108. \begin{document}
  109.  
  110. \begin{figure}
  111. \begin{tikzpicture}
  112. \tikzmath{\ang = 45;};
  113. \begin{scope}[thick,decoration={
  114. markings,
  115. mark=at position 0.5 with {\arrow{latex}}}
  116. ]
  117. \filldraw[red] (-1,0) circle (2pt)
  118. node[anchor=east, font = \footnotesize] at (-1,-0.2) {$\mathrm{E_0}$};
  119. \draw[dashed, red] (-1,0) --++({\ang+90}:1);
  120. \filldraw[green] (1,0) circle (2pt)
  121. node[anchor=west, font = \footnotesize] at (1,-0.2) {$\mathrm{E_0}$};
  122. \draw[postaction={decorate}, red] (-1,0) --++ (\ang:2);
  123. \draw[postaction={decorate}, green] (1,0) --++ (\ang:2);
  124. \draw[<->, thick] (-1, -0.2) -- (1, -0.2);
  125. \draw[dashed, green] (1,0) --++ ({\ang+90}:2.5);
  126. \draw[<->, thick] (-1,0)++({\ang+90}:1) --++ (\ang:{2*cos(\ang)});
  127. % \draw[<->, thick] (-1,0)++({\ang+90}:1) --++ (\ang:{2*cos(\ang) });
  128. \node[anchor=north, font = \footnotesize] at (0, -0.2) {d=$\lambda/2$};
  129. \end{scope}
  130. \draw[blue, thick, dash pattern= on 25 off 7 on 50 off 7 on 10] (-2,0) -- (2, 0);
  131. \node[anchor=west, font = \footnotesize, blue] at (1.5,-0.05) {z}; node[near start, auto] {true}
  132. \draw[thick,blue,->] ([shift=(0:1)]1,0) arc (0:\ang:1);
  133. % \draw[thick,blue,->] (2,0) arc (0:\ang:1);
  134. \draw (1,0)++({\ang/2}:1.2) node[rotate=\ang, anchor=base, blue, font=\normalsize]{$\theta$};
  135. \draw ({\ang+90}:1.3) node[rotate=\ang, anchor=base, black, font=\normalsize]{$d\cos\theta$};
  136. \end{tikzpicture}
  137. \end{figure}
  138. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement