File: csdoc.sty

package info (click to toggle)
code-saturne 5.3.2+repack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 76,868 kB
  • sloc: ansic: 338,582; f90: 118,487; python: 65,227; makefile: 4,429; cpp: 3,826; xml: 3,078; sh: 1,205; lex: 170; yacc: 100
file content (273 lines) | stat: -rw-r--r-- 8,569 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
%-------------------------------------------------------------------------------

% This file is part of Code_Saturne, a general-purpose CFD tool.
%
% Copyright (C) 1998-2018 EDF S.A.
%
% This program is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation; either version 2 of the License, or (at your option) any later
% version.
%
% This program 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 program; if not, write to the Free Software Foundation, Inc., 51 Franklin
% Street, Fifth Floor, Boston, MA 02110-1301, USA.

%-------------------------------------------------------------------------------

\NeedsTeXFormat{LaTeX2e}
\def \filename {csdoc.sty}
\def \filedate {2013/02/07}
\def \fileversion {0.6}
\ProvidesPackage {csdoc}[\filedate\space\fileversion\space
  Code_Saturne documentation format package]
\typeout {Package: `csdoc' \fileversion\space <\filedate>}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load required packages
\RequirePackage{ifpdf}

\ifpdf
  \pdfcompresslevel=9
  \RequirePackage[pdftex]{graphicx}
  \DeclareGraphicsExtensions{.png,.pdf,.jpg}
\else
  \RequirePackage{graphicx}
\fi

\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{setspace}
\RequirePackage{xspace}

\RequirePackage{tabularx}
\RequirePackage{wasysym}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{ifthen}
\RequirePackage{alltt}
\RequirePackage{nomencl}
\RequirePackage{enumitem}
\RequirePackage{subfigure}
\RequirePackage{listings}
\lstloadlanguages{C,C++,Fortran,Python}

\RequirePackage[latin1]{inputenc}
\RequirePackage[OT1]{fontenc} % \RequirePackage[T1]{fontenc} Caution: symbols list

% Keep the hyperref package at the end of the required packages list
\RequirePackage[pdftex,
                bookmarksopen=true,
                colorlinks=true,
                linkcolor=blue,
                filecolor=blue,
                urlcolor=blue,
                citecolor=blue]{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page layout: macro definitions
\newcommand{\titreCS}[1]{\def\titre{#1}}
\newcommand{\docassociesCS}[1]{\def\docassocies{#1}}
\newcommand{\resumeCS}[1]{\def\resume{#1}}

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Horizontal margins
%-------------------
\setlength{\voffset}{0pt}
\setlength{\topmargin}{0pt}
\addtolength{\topmargin}{-13mm}
\setlength{\headheight}{15mm}
\setlength{\headsep}{6mm}
\setlength{\textheight}{233mm}
\setlength{\footskip}{15mm}

% Vertical margins
%-----------------
\setlength{\hoffset}{0pt}
\setlength{\evensidemargin}{7mm}
\setlength{\oddsidemargin}{7mm}
\setlength{\textwidth}{156mm}
\setlength{\parindent}{0mm}
\setlength{\parskip}{6pt}
\setlength{\tabcolsep}{1mm}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Renew title styles for sections and others
\DeclareFixedFont{\polsec}{OT1}{phv}{b}{n}{16}
\DeclareFixedFont{\polssec}{OT1}{phv}{b}{n}{14}
\DeclareFixedFont{\polsssec}{OT1}{phv}{b}{n}{12}
\renewcommand{\section}{\@startsection {section}{1}{\z@}
                        {12pt plus2pt minus1pt}
                        {6pt}
                        {\bfseries\fontsize{16}{18}\selectfont\polsec}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
                           {12pt plus2pt minus1pt}
                           {6pt}
                           {\bfseries\fontsize{14}{16}\polssec}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
                           {12pt plus2pt minus1pt}
                           {6pt}
                           {\bfseries\fontsize{12}{14}\polsssec}}
\newcommand{\subsubsubsection}{\@startsection {paragraph}{3}{\z@}
                             {12pt plus2pt minus1pt}
                             {6pt}
                             {\bfseries\fontsize{10}{12}\polsssec}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Contents
%
\renewcommand*\l@section{\upshape\bfseries \@dottedtocline{1}{0.5em}{2.5em}}
\renewcommand*\l@subsection{\mdseries\scshape \@dottedtocline{2}{0.5em}{3.4em}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Input Code_Saturne name and version macros
\input{csvers}
%
% Choose Code_Saturne logo version

\newcommand{\logocs}{cs_logo_flux}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%-------------
% Remove the references title

\renewenvironment{thebibliography}[1]
     {\list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy\clubpenalty4000\widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Warning: \passepage does not work before a \chapter ('report' class)
\newcommand{\passepage}{%
\ifthenelse{\isodd{\arabic{page}}}
{\newpage\hspace*{6.cm}\newpage}{\newpage}}
\newcommand{\passepart}{%
\hspace*{6.cm}\ifthenelse{\isodd{\value{page}}}
{\newpage}{\hspace*{-6.cm}}}
%
\newcommand{\minititre}[1]{\bigskip\noindent \underline{\sc #1}\\}
%
% Headers and footpages
% =====================
\pagestyle{fancy}
\fancyhead{}
\fancyhead[LE,LO]{\cartouche}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% CARTOUCHE
% =========
\newcommand{\cartouche}{%
\hspace*{-5mm}
\begin{tabularx}{162mm}
{|>{\small\centering\arraybackslash}p{2.7cm}|>{\small\centering\arraybackslash}X|>
{\small\centering\arraybackslash}p{3.5cm}|}
\hline
\vspace{2mm}\textbf{EDF R\&D}
&
\vspace{2mm}\textbf{\large\titre}
&
\CS \par
documentation \par
Page \thepage/\pageref{LastPage} \\
\hline
\end{tabularx}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
\newcount\hour \newcount\minute
\hour=\time  \divide \hour by 60
\minute=\time
\loop \ifnum \minute > 59 \advance \minute by -60 \repeat
\newcommand\now{\number\hour\ h
         \ifnum \minute<10 0\fi
         \number\minute}

\input{../../debian/epoch}
\def\monthyear{%
  \ifcase\month\or
  JANUARY\or FEBRUARY\or MARCH\or APRIL\or MAY\or JUNE\or
  JULY\or AUGUST\or SEPTEMBER\or OCTOBER\or NOVEMBER\or
  DECEMBER\fi
  \space \number\year}

\newcommand{\makepdgCS}
{%

\begin{titlepage}

\thispagestyle{empty}

\enlargethispage{4.5cm} % Enlarge the \textheight for the current page
\unitlength=1cm

\begin{center}
\vspace*{-32mm}

\begin{picture}(16,8.5)
  \put(7,5.7){\includegraphics*[width=1.95cm]{logoedf}}
  \put(0,7.1){\textsf{\textbf{EDF R\&D}}}
  \put(0,4.6){\scriptsize\textsc{\textsf{Fluid Dynamics, Power Generation and Environment Department}}}
  \put(0,4.3){\scriptsize\textsc{\textsf{Single Phase Thermal-Hydraulics Group}}}
  \put(0,3.6){\scriptsize\textsc{\textsf{6, quai Watier}}}
  \put(0,3.3){\scriptsize\textsc{\textsf{F-78401 Chatou Cedex}}}
  \put(0,2.5){\scriptsize\textsc{\textsf{Tel: 33 1 30 87 75 40}}}
  \put(0,2.2){\scriptsize\textsc{\textsf{\parbox[t]{16cm}{Fax: 33 1 30 87 79 16 \hfill \monthyear}}}}
\end{picture}
\begin{picture}(16,4.4)
  \put(2.5,0){\framebox(11,4.4){\ }}
  \put(2.75,3.8){\CS\ documentation}
  \put(2.75,2.5){\parbox[t]{10.5cm}{\centering\textbf{{\titre}}}}
  \put(2.75,0.4){contact: saturne-support@edf.fr}
\end{picture}
\begin{picture}(16,13)
\put(3,3){\includegraphics*[width=10cm]{\logocs}}
\end{picture}
\end{center}

{ http://code-saturne.org/\hfill\copyright{} EDF \number\year}

\passepart

\end{titlepage}
\normalsize
}