style.sty
changeset 123 556cd74cbba9
parent 62 2151c77e1e24
child 252 a9d84442fb65
equal deleted inserted replaced
122:90dd9c6162b3 123:556cd74cbba9
     1 \usepackage{xcolor}
     1 \usepackage{xcolor}
       
     2 %%\usepackage{fontspec}
     2 \usepackage[sc]{mathpazo}
     3 \usepackage[sc]{mathpazo}
     3 \usepackage{fontspec}
     4 \usepackage{fontspec}
     4 \setmainfont[Ligatures=TeX]{Palatino Linotype}
     5 \setmainfont[Ligatures=TeX]{Palatino Linotype}
     5 \usepackage{amssymb}
     6 \usepackage{amssymb}
     6 \usepackage{amsmath}
     7 \usepackage{amsmath}
     7 %%\usepackage{menukeys}
     8 \usepackage{menukeys}
     8 
       
     9 \definecolor{darkblue}{rgb}{0,0,0.6}
     9 \definecolor{darkblue}{rgb}{0,0,0.6}
    10 \usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
    10 \usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
    11 
    11 
       
    12 %%% for regular expressions and values
    12 \newcommand{\ZERO}{\mbox{\bf 0}}
    13 \newcommand{\ZERO}{\mbox{\bf 0}}
    13 \newcommand{\ONE}{\mbox{\bf 1}}
    14 \newcommand{\ONE}{\mbox{\bf 1}}
    14 \newcommand{\Left}{\textit{Left}}
    15 \newcommand{\Left}{\textit{Left}}
    15 \newcommand{\Der}{\textit{Der}}
    16 \newcommand{\Der}{\textit{Der}}
    16 \newcommand{\der}{\textit{der}}
    17 \newcommand{\der}{\textit{der}}
    18 \newcommand{\ders}{\textit{ders}}
    19 \newcommand{\ders}{\textit{ders}}
    19 
    20 
    20 %%% for trees
    21 %%% for trees
    21 %% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
    22 %% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
    22 
    23 
       
    24 \newcommand\grid[1]{%
       
    25 \begin{tikzpicture}[baseline=(char.base)]
       
    26   \path[use as bounding box]
       
    27     (0,0) rectangle (1em,1em);
       
    28   \draw[red!50, fill=red!20]
       
    29     (0,0) rectangle (1em,1em);
       
    30   \node[inner sep=1pt,anchor=base west]
       
    31     (char) at (0em,\gridraiseamount) {#1};
       
    32 \end{tikzpicture}}
       
    33 \newcommand\gridraiseamount{0.12em}
       
    34 
       
    35 \makeatletter
       
    36 \newcommand\Grid[1]{%
       
    37   \@tfor\z:=#1\do{\grid{\z}}}
       
    38 \makeatother	
       
    39 
       
    40 \newcommand\Vspace[1][.3em]{%
       
    41   \mbox{\kern.06em\vrule height.3ex}%
       
    42   \vbox{\hrule width#1}%
       
    43   \hbox{\vrule height.3ex}}
       
    44 
       
    45 \def\VS{\Vspace[0.6em]}
       
    46 
       
    47 
    23 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
    48 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
    24 \newcommand{\defn}[1]{\textit{\textbf{#1}}}
    49 \newcommand{\defn}[1]{\textit{\textbf{#1}}}
    25 \newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}
    50 \newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}
    26 
    51 
    27 \definecolor{codegray}{gray}{0.9}
    52 \definecolor{codegray}{gray}{0.9}
    28 
    53 
    29 \makeatletter
    54 \makeatletter
    30 \def\fnote{\gdef\@thefnmark{}\@footnotetext}
    55 \def\fnote{\gdef\@thefnmark{}\@footnotetext}
    31 \makeatother
    56 \makeatother
    32 
    57 
       
    58 \newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
       
    59 only ASCII text or PDFs. Every solution should be preceeded by the corresponding 
       
    60 question text, like:
       
    61 
       
    62 \begin{center}
       
    63 \begin{tabular}{ll}
       
    64 Q$n$: & \ldots a difficult question from me\ldots\\
       
    65 A:    & \ldots an answer from you \ldots\\
       
    66 Q$n+1$ & \ldots another difficult question\ldots\\
       
    67 A:     & \ldots another brilliant answer from you\ldots
       
    68 \end{tabular}
       
    69 \end{center}
       
    70 
       
    71 \noindent Solutions will only be accepted until 20th December! Please send only
       
    72 one homework per email.}\bigskip}
       
    73 
       
    74 \newcommand{\POSTSCRIPT}{
       
    75 {\bf (Optional)} This question is for you to provide 
       
    76 regular feedback to me: for example
       
    77 what were the most interesting, least interesting, or confusing 
       
    78 parts in this lecture? Any problems with my Scala code? Please 
       
    79 feel free to share any other questions or concerns.}