Skip to content
Snippets Groups Projects
Select Git revision
  • 9e089bf026ec17030f58f10e78a7187093fba479
  • master default protected
  • 2018ws
  • 2017ws
  • 2016ws
5 results

dynmem-7.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    pgscript.sty 4.03 KiB
    % pgscript.sty - LaTeX Settings for Lecture Notes
    % Copyright (C) 2012, 2015  Peter Gerwinski
    %
    % This document is free software: you can redistribute it and/or
    % modify it either under the terms of the Creative Commons
    % Attribution-ShareAlike 3.0 License, or under the terms of the
    % GNU General Public License as published by the Free Software
    % Foundation, either version 3 of the License, or (at your option)
    % any later version.
    %
    % This document is distributed in the hope that it will be useful,
    % but WITHOUT ANY WARRANTY; without even the implied warranty of
    % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    % GNU General Public License for more details.
    %
    % You should have received a copy of the GNU General Public License
    % along with this document.  If not, see <http://www.gnu.org/licenses/>.
    %
    % You should have received a copy of the Creative Commons
    % Attribution-ShareAlike 3.0 Unported License along with this
    % document.  If not, see <http://creativecommons.org/licenses/>.
    
    \usepackage{amsfonts}
    \usepackage[colorlinks,allcolors=blue]{hyperref}
    \usepackage[british,german]{babel}  % Yes, really "german" and not "ngerman".
    \usepackage[utf8]{luainputenc}  % Without this, umlauts are broken. Weird.
    \usepackage{microtype}
    \usepackage[T1]{fontenc}
    \usepackage{times}
    \usepackage{helvet}
    \renewcommand*\familydefault{\sfdefault}
    \usepackage{graphicx}
    \usepackage{pstricks}
    
    % Repair kerning: Automatically insert "\kern{-0.15em}" between "//" % (in URLs).
    \directlua{
      local glyph = node.id ("glyph")
      local function my_kerning (head)
        for t in node.traverse (head) do
          if t.id == glyph and t.char == 47 then
            if t.next
               and t.next.next
               and t.next.next.id == glyph
               and t.next.next.char == 47 then
              local k = node.new ("kern")
              k.kern = tex.sp ("-0.15em")
              k.next = t.next
              k.prev = t
              t.next.prev = k
              t.next = k
            end
          end
        end
        node.kerning (head)
      end
      luatexbase.add_to_callback ("kerning", my_kerning, "URL kerning")
    }
    
    \definecolor{blendedblue}{rgb}{0.2,0.2,0.7}
    \definecolor{darkgreen}{rgb}{0.0,0.3,0.0}
    \definecolor{darkred}{rgb}{0.7,0.0,0.0}
    \definecolor{darkgrey}{rgb}{0.4,0.4,0.4}
    
    \newcommand{\breath}{\bigskip\goodbreak}
    \newcommand{\subsubsubsection}[1]{\breath\par\textbf{#1}\nopagebreak\par}
    \newenvironment{experts}{\color{darkgrey}}{}
    \newenvironment{whiteout}{\definecolor{darkgreen}{rgb}{1.0,1.0,1.0}%
                              \definecolor{darkred}{rgb}{1.0,1.0,1.0}%
                              \color{white}}{}
    \urlstyle{sf}
    \newcommand{\file}[1]{{\color{blendedblue}#1}}
    \newcommand{\textarrow}{{\boldmath $\longrightarrow$}}
    \newcommand{\arrowitem}{\item[\textarrow]}
    \newcommand{\newterm}[1]{\emph{\color{darkgreen}#1}}
    
    \usepackage{listings}
    \lstset{basicstyle=\color{blendedblue},
            language=C,
            captionpos=b,
            gobble=4,
            xleftmargin=1em,
            columns=fullflexible,
            moredelim=**[is][\color{red}]{¡}{¿}}
    \lstdefinestyle{numbered}{xleftmargin=2em,
                              numbers=left,
                              numberstyle=\footnotesize\color{gray}}
    \lstdefinestyle{terminal}{basicstyle=\ttfamily\color{darkgreen},
                              language={},
                              columns=fixed,
                              moredelim=**[is][\color{darkred}]{¡}{¿},
                              moredelim=**[is][\color{blendedblue}]{°}{¿},
                              moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}}
    \lstdefinestyle{cmd}{basicstyle=\ttfamily\color{darkred},
                         language={},
                         columns=fixed,
                         moredelim=**[is][\color{darkgreen}]{¡}{¿},
                         moredelim=**[is][\color{blendedblue}]{°}{¿},
                         moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}}
    
    \setlength{\textwidth}{16.5cm}
    \setlength{\textheight}{26.0cm}
    \setlength{\hoffset}{-1.5cm}
    \setlength{\voffset}{-3.0cm}
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{\medskipamount}
    \setlength{\unitlength}{1cm}