add Andrea new images + add Olaf formatting improvements
[goodguy/cin-manual-latex.git] / common / settings.tex
index 62f9dc0db1846870f479d69d22d91034de0f09cf..86cf48a76a99674fea670c73f313501f95cd2864 100644 (file)
@@ -13,9 +13,8 @@
 %   examples. Alternative: invalidate according to TeX rules, so that
 %   other editors do not consider this an error. Do not automate, this
 %   must be adjusted manually.)
-% - Done. Remove "images/" from the path of includegraphics, the
-%   "graphicspath" is already set.
-
+% - no * in the font
+% - No novels in the listings.
 
 % The Settings
 
@@ -27,6 +26,7 @@
 \definecolor{CinGreen}{RGB}{39,174,96}%    "positiv"
 \definecolor{CinSilver}{RGB}{127,140,141}%
 \definecolor{CinWhite}{RGB}{239,240,241}%
+\definecolor{CinDarkGray}{RGB}{35,38,41}%
 
 % Original
 % \definecolor{chaptercolour}{RGB}{23,85,142}
@@ -41,7 +41,7 @@
   \renewcommand*{\chapnumfont}{%
     \normalfont\Large\bfseries\sffamily\color{CinBlueText}}
   \renewcommand*{\printchapternum}{%
-    \chapnumfont \resizebox{!}{3ex}{\thechapter}}
+    \chapnumfont\resizebox{!}{3ex}{\thechapter}}
   \renewcommand*{\afterchapternum}{% FIXME vskip?
     \par\hspace{1.5cm}\hrule\vskip\midchapskip}
   \renewcommand*{\chaptitlefont}{% Overwrites toc
@@ -60,6 +60,7 @@
 \addtodef{\tocheadstart}{\color{CinBlueText}}{} % If you want the whole TOC to be blue also
 %\addtoiargdef{\printtoctitle}{\color{CinBlueText}}{} % If you just want the TOC title blue
 
+
 % PDF properties
 \hypersetup{colorlinks=true,
   linkcolor=[named]{CinBlueText},
     editing system, Video editing program}
 }
 
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 % Package listings
-\lstset{                            % begin settings
-  %language=R,                      % the language of the code
+% FIXME: PDF c&p d o e s  n o t  w o r k.
+\lstset{% Common settings
+  frame=single,
+  framerule=0pt,
+  framextopmargin=0.25ex,
+  framexbottommargin=0.25ex,
+  backgroundcolor=\color{CinWhite},
+  basicstyle=\small,
+  % No numbers by default. If required, activate explicitly in the
+  % respective lstlisting: numbers=left|right or define a new style
+  % below.
+  numbers=none,
+  numberstyle=\small\color{CinSilver},
+  numbersep=1em,   % how far the line-numbers are from the code
+  % Do not show:
+  showspaces=false,
+  showstringspaces=false,
+  showtabs=false,
+  %
+  tabsize=2,
+  breaklines=true, % sets automatic line breaking
+  % Still undecided:
+  title=\lstname,  % show the filename of files included with
+                   % \lstinputlisting; also try caption instead of
+                   % title
   inputencoding=utf8,
-  basicstyle=\ttfamily\footnotesize,% the size of the fonts that are used for the code
-  numbers=left,                     % where to put the line-numbers
-  numberstyle=\tiny\color{black},   % the style that is used for the line-numbers
-  stepnumber=1,                     % the step between two line-numbers. If it's 1, each line
-                                    % will be numbered
-  numbersep=5pt,                    % how far the line-numbers are from the code
-  %backgroundcolor=\color{white},   % choose the background color. You must add \usepackage{color}
-  showspaces=false,                 % show spaces adding particular underscores
-  showstringspaces=false,           % underline spaces within strings
-  showtabs=false,                   % show tabs within strings adding particular underscores
-  frame=lines,                      % adds a frame around the code
-  %frame=single,                    % adds a frame around the code
-  rulecolor=\color{CinSilver},      % if not set, the frame-color
-                                    % may be changed on line-breaks
-                                    % within not-black text
-                                    % (e.g. commens (green here)).
-  tabsize=2,                        % sets default tabsize to 2 spaces
-  captionpos=b,                     % sets the caption-position to bottom
-  breaklines=true,                  % sets automatic line breaking
-  breakatwhitespace=false,          % sets if automatic breaks should only happen at whitespace
-  title=\lstname,                   % show the filename of files included with \lstinputlisting;
-                                    % also try caption instead of title
-  keywordstyle=\color{CinGreen},    % keyword style
-  commentstyle=\color{gray},        % comment style
-  stringstyle=\color{black},        % string literal style
-  %backgroundcolor=\color{green!10},
-  escapeinside={\%*}{*)},% FIXME?           % if you want to add a comment within your code
   extendedchars=true,
-  %keepspaces = true                %!!!! spaces in comments
-  texcl=true,
   postbreak=\mbox{\textcolor{CinSilver}{$\hookrightarrow$}\space},
-  % morekeywords={*,...}% FIXME              % if you want to add more keywords to the set
+  keywordstyle=\color{CinDarkGray},
+  commentstyle=\footnotesize\color{gray},
+  stringstyle=\color{CinDarkGray},
+  % Retains the characters as entered:
+  literate={-}{-}1 {*}{*}1
 }
+% Our settings specifically for the shell.
+% Usage: \begin{lstlisting}[style=sh]
+\lstdefinestyle{sh}{%
+  language=bash,
+  morekeywords={cp,gdb,git,grep,make,mkdir,tee}
+}
+% A pseudo-style that does nothing.
+% Usage: \begin{lstlisting}[style=nil] instead of:
+%        \begin{lstlisting}[]
+\lstdefinestyle{nil}{}
+
 
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %====================== Page geometry
 % \geometry{left=2.0cm}
 \def\CGGI{\CGG\;\INF}
 
 % Hyphenation for unknown words and technical terms
-\hyphenation{
+\hyphenation{%
   plug-ins
   ex-pan-ders
 }