source: trunk/Documentation/PluginHowTo/HowToDeveloper.tex

Last change on this file was 8944, checked in by kopal, 12 months ago
  • updated urls in developer howto
File size: 7.6 KB
Line 
1\documentclass[11pt, a4paper, titlepage, appendixprefix]{scrreprt}
2
3\usepackage[latin1]{inputenc}
4\usepackage[english]{babel}
5\usepackage{graphicx}
6\usepackage{booktabs}
7\usepackage{geometry}
8\usepackage{setspace}
9\usepackage{fancyhdr}
10\usepackage{url}
11\usepackage{wrapfig}
12\usepackage[usenames,dvipsnames]{color}
13\usepackage{colortbl}
14\usepackage{eso-pic}
15\usepackage{listings}
16\usepackage{fix-cm}
17\usepackage{textcomp}
18\usepackage[T1]{fontenc}
19\usepackage{lmodern}
20\usepackage{color,soul}
21
22%\usepackage[automark]{scrpage2}
23%\usepackage[absolute]{textpos}
24
25
26\lstset{language=[Sharp]C, % base language is C and dialect is Sharp (C#)
27captionpos=b, % descriptions are underneath
28frame=lines, % above und underneath the code listing are horizontal lines
29basicstyle=\ttfamily, % font
30keywordstyle=\color{blue}, % Color for keywords like public, void, object, etc.
31commentstyle=\color{ForestGreen}, % Color for comments
32stringstyle=\color{BrickRed}, % Color for strings
33numbers=left, % line numbers to the left of the code
34numberstyle=\tiny, % small line numbers
35numbersep=5pt,
36tabsize=2,
37breaklines=true, % Wordwrap activated
38showstringspaces=false,
39morestring=[b]', % counts single quote pairs as strings (and thus also colors them red)
40upquote=true, % changes smart single quotes to straight ' marks
41% emph defines certain colors for specific words
42% emph={double,bool,int,unsigned,char,true,false,void},emphstyle=\color{blue},
43emph={Assert,Test}, emphstyle=\color{BrickRed},
44emph={[2]double,bool,int,unsigned,char,true,false,void,using,\# ,region,endregion},
45emphstyle={[2]\color{blue}}
46}
47
48\geometry{a4paper, portrait, left=2cm, right=2cm, top=2cm, bottom=2cm, includefoot}
49
50%\pagestyle{headings}
51%\pagestyle{scrheadings}
52\pagestyle{fancy} % self-made page style
53\fancyhf{} % clear all header and footer fields
54\fancyhead[L]{\leftmark} % left header
55\fancyhead[C]{\AddToShipoutPicture*{\BackgroundHeaderPic}} % center header
56%\fancyhead[R]{\rightmark} % right header --> Removed because it overflows on the leftmark if the text is too long
57
58\fancyfoot[C]{\thepage\AddToShipoutPicture*{\BackgroundFooterPic}} % center footer
59%\fancyfoot[EL,OR]{\thepage} % page number
60%\fancyfoot[ER,OL]{\includegraphics[height=0.3cm]{figures/ct_logo}}
61
62\renewcommand{\headrulewidth}{2pt} % upper separator
63\renewcommand{\footrulewidth}{2pt} % lower separator
64
65\newlength{\headbgwidth}
66\setlength{\headbgwidth}{\headwidth}
67%\addtolength{\headbgwidth}{0.3mm}
68%\addtolength{\headwidth}{\marginparwidth}
69
70
71\renewcommand{\headrule}{{\color{orange}\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
72\renewcommand{\footrule}{{\color{orange}\vskip-\footruleskip\vskip-\footrulewidth\hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
73
74
75\makeatletter
76\newcommand\BackgroundHeaderPic{
77%\AddToShipoutPicture{%
78    \setlength{\@tempdimb}{1.87cm}%
79    \setlength{\@tempdimc}{28.4cm}%
80    \setlength{\unitlength}{1pt}%
81    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
82        \includegraphics[width=\headbgwidth, height=\headheight]{figures/ct_page_header}%
83    }
84}
85
86\newcommand\BackgroundFooterPic{
87%\AddToShipoutPicture{%
88    \setlength{\@tempdimb}{1.87cm}%
89    \setlength{\@tempdimc}{1.8cm}%
90    \setlength{\unitlength}{1pt}%
91    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
92        \includegraphics[width=\headbgwidth, height=0.7cm]{figures/ct_page_footer_pure}%
93    }
94}
95
96\newcommand\WaterMarkPic{%
97    \setlength{\@tempdimb}{1.85cm}%
98    \setlength{\@tempdimc}{2.7cm}%
99    \setlength{\unitlength}{1pt}%
100    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
101            \includegraphics[width=0.6\textwidth]{figures/ct_logo_watermark}%
102    }
103}
104\makeatother
105
106% finetune the gaps between figure and text in the subfigure environment (basically close the gap as much as possible)
107%\renewcommand{\subfigtopskip}{0pt}
108%\renewcommand{\subfigbottomskip}{0pt}
109
110% some color definitions for the pdf statements below
111\definecolor{mygrey}{rgb}{0.45,0.45,0.45}
112\definecolor{mydarkgrey}{rgb}{0.2,0.2,0.2}
113\definecolor{red}{rgb}{1.0,0.33,0.33}
114\definecolor{orange}{rgb}{1.00,0.73,0.33}
115\definecolor{yellow}{rgb}{0.95,0.92,0.}
116\definecolor{lightgreen}{rgb}{0.3,0.95,0.46}
117\definecolor{titleblue}{rgb}{0.03,0.10,0.46}
118
119
120\input{frontpage}
121
122
123\title{Plugin Developer Manual}
124\subtitle{How to build your own plugins for CrypTool 2}
125\author{S.\ Przybylski, A.\ Wacker, M.\ Wander, F.\ Enkler, P.\ Vacek,  A.\ Krau\ss, and N.\ Kopal}
126\email{\{przybylski$|$wacker$|$wander$|$enkler$|$vacek$|$krauss|$kopal$\}@cryptool.org}
127\version{0.8g}
128\date{\today}
129
130% Metadata and configuration of the pdf output:
131% Do not forget to enter the correct title, author, subject, and keywords
132
133% For screen viewing it is nice to have references marked in a slightly different
134% color than the rest of the text, since they will be hyperlinks to the
135% referenced objects.
136\usepackage[pdftex,
137             pdftitle={\@title},
138             colorlinks,
139             linkcolor={mydarkgrey},
140             citecolor={mygrey},
141             urlcolor={blue},
142             plainpages={false},
143             bookmarksnumbered={true},
144             bookmarksopenlevel={3},
145             pdfauthor={\@author},
146             pdfsubject={\@subtitle},
147             pdfkeywords={CrypTool,Cryptography,eLearning,Cryptanalysis},
148             pdfstartview={Fit}]{hyperref}
149
150%\usepackage{pdfsync}
151
152% To avoid nasty mistakes like having comments directly in the textflow
153% the following \todo macro was defined. With that you can enter
154% \todo{What I still have to do here}
155% inside of your text and a marker will appear at the page's margin with the
156% text "What I still have to do here".
157% The first line activates this feature. If you comment it out and uncomment
158% the second line below there will be no error messages and no todos will be shown
159% anymore. So - even if you have forgotten to delete one of them - they will not appear
160% in the final printout.
161\newcommand{\todo}[1]{\marginpar{\textcolor{red}{ToDo:} #1}}
162
163% Only prints on title page:
164\AddToShipoutPicture*{\WaterMarkPic}
165
166%\AtBeginDocument{\markboth{\@author}{\@title}}
167\begin{document}
168        \maketitle
169
170        \begin{abstract}
171        \thispagestyle{plain}
172        CrypTool~2 (CT2) is the successor of the well-known e-learning platform for cryptography and cryptanalysis CrypTool 1 (CT1). Both are used for educational purposes at schools and universities as well as in companies and agencies.\footnote{\url{http://www.cryptool.org/}} As of March 2016, CrypTool~2 consists of about 25,000 lines of C\# code in the core application and over 250,000 lines of C\# code in about 200 plugins.
173
174CrypTool~2 is built using the following technologies and development tools:
175
176\begin{itemize}
177        \item .NET (a modern software framework from Microsoft with solutions to common programming problems)
178        \item C\# (a modern object-oriented programming language, comparable to Java)
179  \item WPF (a modern vector-based graphical subsystem for rendering user interfaces in Windows-based applications)
180  \item Visual Studio (a development environment)
181        \item Subversion (a source code and documentation version management system)
182        \item trac (a lightweight web-based software project management system)
183\end{itemize}
184
185This document is intended for plugin developers who want to contribute a new plugin to CrypTool~2 which implements a cryptographic algorithm or similar functionality. Please note that CrypTool~2 is an alive project in development. Certain information may be outdated or missing. If you want to stay up-to-date, we recommend checking out the CrypTool~2 development wiki\footnote{\url{trac.ct2.cryptool.org/}} and website\footnote{\url{http://www.cryptool.org/cryptool2/}}.
186    \end{abstract}
187
188        \tableofcontents
189    \listoffigures
190
191%    \AddToShipoutPicture{\WaterMarkPic}
192
193        \include{part1}
194        \include{part2}
195        \include{part345}
196
197\end{document}
Note: See TracBrowser for help on using the repository browser.