Commit f9d17ed5 authored by Cupif's avatar Cupif
Browse files

[+] english support

parent 7b7d42bf
\documentclass{tnreport}
%\documentclass[confidential]{tnreport} % If you are writing confidential report
\def\reportTitle{Winter is Coming} % Title
\def\reportLongTitle{Winter is Coming -- You know nothing Jon Snow} % Long Title
\def\reportAuthor{Jon Snow}
\def\reportAuthorEmail{\email{jon@castleblack.com}} % Student's email
\def\reportAuthorAddress{Student's address} % Student's address
\def\reportAuthorCity{Postal code, CITY} % Student's postal code and city
\def\reportAuthorPhone{Phone Number} % Student's phone number
\def\reportIndustrialSupervisor{Eddard Stark} % Industrial supervisor's name
\def\reportAcademicSupervisor{Tyrion Lannister} % Academic supervisor's name
\def\reportCompany{Home Box Office} % Company title
\def\reportCompanyAddress{Company address} % Company address
\def\reportCompanyCity{Postal code, CITY} % Company city and postal code
\def\reportCompanyPhone{Company phone number} % Company phone number
\def\reportCompanyLogoPath{figures/anonymous_company-logo} % Company logo
\def\place{Winterfell} % City of signature for the anti-plagiarism agreement
\def\date{\today} % Date of signature for the anti-plagiarism agreement
\begin{document}
\maketitle
\pagenumbering{roman}
\insertAntiPlagiarismAgreement{Snow, Jon}{2014041022}
\cleardoublepage
\makesecondtitle
\section*{Acknowledgements}
\addcontentsline{toc}{chapter}{Acknowledgements}
{\em
``Night gathers, and now my watch begins. \\
It shall not end until my death.
I shall take no wife, hold no lands, father no children. \\
I shall wear no crowns and win no glory. \\
I shall live and die at my post.
I am the sword in the darkness. \\
I am the watcher on the walls. \\
I am the shield that guards the realms of men.
I pledge my life and honor to the Night's Watch, \\
for this night and all the nights to come.''
}
\hspace{4cm} -- The Night's Watch oath
\cleardoublepage
\section*{Preface (optionnal)}
\addcontentsline{toc}{chapter}{Preface (optionnal)}
\cleardoublepage
\renewcommand{\baselinestretch}{0.5}\normalsize
\tableofcontents
\renewcommand{\baselinestretch}{1.0}\normalsize
\cleardoublepage
\pagenumbering{arabic}
\setcounter{page}{1}
\chapter{Introduction}
Never resting pride and purpose, in his cups, sed do ever vigilant incididunt
ut labore et dolore magna servant. Let it be written bastard, quis nostrud
exercitation ullamco mace nisi ut moon and stars green dreams. Though all men
do despise us the wall he asked too many questions work her will. Excepteur
sint occaecat let me soar, dagger court spiced wine officia deserunt mollit
seven hells chamber gallant.
Curabitur pretium tincidunt lacus. Tread lightly here mulled wine. Nullam
varius, gown rouse me not, est eros bibendum elit, a taste of glory
sollicitudin mauris. Death before disgrace gargoyles nibh euismod joust. None
so wise we light the way. Suckling pig risus a elit. Mare's milk. Dragons
sellsword, ligula eu tempor squire, eros est euismod turpis, arbor gold sapien
risus a quam. Ours is the fury. Night's watch. Pellentesque malesuada nulla
honeyed locusts. Honed and ready, the seven, greyscale eget, your grace, dirk.
Ever vigilant, elit ut dictum aliquet, winter is coming sorcery, righteous in
wrath lacus eget erat. Blood mollis maegi nunc. Summerwine arcu. Dagger
consequat. In his cups, feast ironborn, tunic crimson, spiced wine, whore.
Moon and stars, mollis quis, the wall, holdfast maester, orci. Old bear seven
hells dictumst.
\cleardoublepage
\chapter{Company introduction}
Moon-flower juice, craven pride and purpose, mulled wine suscipit mauris, gown
trencher take the black risus. In convallis tellus a mauris. Milk of the poppy
none so fierce. Work her will. Never resting arbor gold. Gallant hac lord of
light. Baseborn facilisis diam at odio. Mauris dictum, green dreams consequat
elementum, lacus ligula mare's milk, godswood tread lightly here ac sem. Donec
turpis. Lamprey tourney crypt. Your grace lance eu mauris. Quisque gravida
ipsum non fire. Beware our sting, scelerisque vitae, motley dagger, lobortis
ac, chamber. Aliquam spiced wine risus. The seven let me soar. Etiam death
before disgrace. Suspendisse odio. Gallant fleet. Our sun shines bright.
None so dutiful sit amet, consectetur adipisicing dwarf, sed drink, your king
commands it no song so sweet aliqua. The last of the dragons, quis nostrud
destrier none so wise ut aliquip ex ea commodo sellsword. Feed it to the goats
your grace the wall flagon cillum dolore eu fugiat nulla pariatur. Trueborn a
taste of glory proident, squire he asked too many questions mollit anim
righteous in wrath.
\cleardoublepage
\chapter{Examples Listings}
It is quite easy to add source code into a report. You just need to configure the language, the legend, and a label so that you can refer to it. The result is given in the listing \ref{lst:firstExample}. It is also possible to change the colors. To do so, edit the lstset in the tnreport.cls class.
\begin{lstlisting}[language=c++, caption={First Example}, label={lst:firstExample}]
void CEquation::IniParser()
{
if (!pP){ //if not already initialized...
pP = new mu::Parser;
pP->DefineOprt("%", CEquation::Mod, 6); //deprecated
pP->DefineFun("mod", &CEquation::Mod, false);
pP->DefineOprt("&", AND, 1); //DEPRECATED
pP->DefineOprt("and", AND, 1);
pP->DefineOprt("|", OR, 1); //DEPRECATED
pP->DefineOprt("or", OR, 1);
pP->DefineOprt("xor", XOR, 1);
pP->DefineInfixOprt("!", NOT);
pP->DefineFun("floor", &CEquation::Floor, false);
pP->DefineFun("ceil", &CEquation::Ceil, false);
pP->DefineFun("abs", &CEquation::Abs, false);
pP->DefineFun("rand", &CEquation::Rand, false);
pP->DefineFun("tex", &CEquation::Tex, false);
pP->DefineVar("x", &XVar);
pP->DefineVar("y", &YVar);
pP->DefineVar("z", &ZVar);
}
}
\end{lstlisting}
\clearpage
You can also display source code directly from a file. The result of this operation is visible within the listing \ref{lst:fromSrc}:
\lstinputlisting[language=c++,caption={Displaying source code from file},label={lst:fromSrc}]{figures/sourceCode.cpp}
Many languages are supported: \\
ABAP2,4, ACSL, Ada4, Algol4, Ant, Assembler2,4, Awk4, bash, Basic2,4, C\#5, C++4, C4, Caml4, Clean, Cobol4, Comal, csh, Delphi, Eiffel, Elan, erlang, Euphoria, Fortran4, GCL, Gnuplot, Haskell, HTML, IDL4, inform, Java4, JVMIS, ksh, Lisp4, Logo, Lua2, make4, Mathematica1,4, Matlab, Mercury, MetaPost, Miranda, Mizar, ML, Modelica3, Modula-2, MuPAD, NASTRAN, Oberon-2, Objective C5 , OCL4, Octave, Oz, Pascal4, Perl, PHP, PL/I, Plasm, POV, Prolog, Promela, Python, R, Reduce, Rexx, RSL, Ruby, S4, SAS, Scilab, sh, SHELXL, Simula4, SQL, tcl4, TeX4, VBScript, Verilog, VHDL4, VRML4, XML, XSLT.
\clearpage
Nonetheless, you can define yours by adding its definition to the tnreport.cls class. Here below is the kind of definition you should add in the listing \ref{lst:defLang}. This way, you define the language keywords, the string and comments delimiters.
\begin{lstlisting}[language=Tex, caption={Language definition syntax}, label={lst:defLang}]
\lstdefinelanguage{amf}
{keywords=
{
xml,
amf,
volume,
material,
coordinates,
vertices,
vertex,
triangle,
x,
y,
z,
v1,
v2,
v3,
mesh,
object,
constellation,
metadata,
color,
texmap,
texture,
utex1,
utex2,
utex3,
instance,
deltax,
deltay,
deltaz,
r,
g,
b,
rx,
ry,
rz,
composite
},
sensitive=false,
morestring=[b]",
comment=[s]{<!--}{-->}
}
\end{lstlisting}
\cleardoublepage
\chapter{Another chapter}
\section{Another section}
Green dreams none so dutiful, tread lightly here, sed do spearwife mulled wine
sandsilk labore et dolore magna aliqua. Greyscale our sun shines bright, milk
of the poppy laboris nisi ut he asked too many questions. Poison is a woman's
weapon let me soar others esse night's watch the seven nulla pariatur. Dagger
pavilion none so wise smallfolk, old bear though all men do despise us you
know nothing.
\subsection{First sub-section}
\subsubsection{First sub-sub-section}
Figure example:
\begin{figure}[h]
\centering
\includegraphics[width=10cm]{figures/school-logo}
\caption{TELECOM Nancy logo}
\label{fig:logo-tn}
\end{figure}
Figure~\ref{fig:logo-tn} represents \reportSchool{}'s logo.
This is a bibliography reference~\cite{GOT4}.
\cleardoublepage
\chapter{Conclusion}
\cleardoublepage
\bibliography{example} % See example.bib
\bibliographystyle{plain}
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\cleardoublepage
\lstlistoflistings
\cleardoublepage
\chapter*{Glossary}
\addcontentsline{toc}{chapter}{Glossary}
\cleardoublepage
\begin{appendices}
\chapter{First Appendix}
First Appendix content.
\chapter{Second Appendix}
Second Appendix content.
\end{appendices}
\cleardoublepage
\thispagestyle{empty}
\section*{Résumé}
\addcontentsline{toc}{chapter}{Résumé}
No foe may pass amet, sun green dreams, none so dutiful no song so sweet et
dolore magna aliqua. Ward milk of the poppy, quis tread lightly here bloody
mummers mulled wine let it be written. Nightsoil we light the way you know
nothing brother work her will eu fugiat moon-flower juice. Excepteur sint
occaecat cupidatat non proident, the wall culpa qui officia deserunt mollit
crimson winter is coming.
Moon and stars lacus. Nulla gravida orci a dagger. The seven, spiced wine
summerwine prince, ours is the fury, nec luctus magna felis sollicitudin
flagon. As high as honor full of terrors. He asked too many questions arbor
gold. Honeyed locusts in his cups. Mare's milk. Pavilion lance, pride and
purpose cloak, eros est euismod turpis, slay smallfolk suckling pig a quam.
Our sun shines bright. Green dreams. None so fierce your grace. Righteous in
wrath, others mace, commodo eget, old bear, brothel. Aliquam faucibus, let me
soar nuncle, a taste of glory, godswood coopers diam lacus eget erat. Night's
watch the wall. Trueborn ironborn. Never resting. Bloody mummers chamber,
dapibus quis, laoreet et, dwarf sellsword, fire. Honed and ready, mollis maid,
seven hells, manhood in, king. Throne none so wise dictumst.
{\bf Mots-clés :}
\section*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
Green dreams mulled wine. Feed it to the goats. The wall, seven hells ever
vigilant, est gown brother cell, nec luctus magna felis sollicitudin mauris.
Take the black we light the way. Honeyed locusts ours is the fury smallfolk.
Spare me your false courtesy. The seven. Crimson crypt, whore bloody mummers
snow, no song so sweet, drink, your king commands it fleet. Raiders fermentum
consequat mi. Night's watch. Pellentesque godswood nulla a mi. Greyscale
sapien sem, maidenhead murder, moon-flower juice, consequat quis, stag.
Aliquam realm, spiced wine dictum aliquet, as high as honor, spare me your
false courtesy blood. Darkness mollis arbor gold. Nullam arcu. Never resting.
Sandsilk green dreams, mulled wine, betrothed et, pretium ac, nuncle. Whore
your grace, mollis quis, suckling pig, clansmen king, half-man. In hac
baseborn old bear.
Never resting lord of light, none so wise, arbor gold eiusmod tempor none so
dutiful raiders dolore magna mace. You know nothing servant warrior, cold old
bear though all men do despise us rouse me not. No foe may pass honed and
ready voluptate velit esse he asked too many questions moon. Always pays his
debts non proident, in his cups pride and purpose mollit anim id your grace.
{\bf Keywords :}
\end{document}
\ No newline at end of file
File moved
File moved
File moved
File moved
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{tnreport}[2015/03/13 TELECOM Nancy Master Thesis, v0.2]
\LoadClass[a4paper,twoside,12pt]{report}
\RequirePackage{graphicx}
\RequirePackage[english]{babel}
\RequirePackage{amsfonts,amssymb,amsmath,mathtools}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
%\RequirePackage{times}
\RequirePackage{libertine}
%\RequirePackage{newtxtext}
\RequirePackage[libertine]{newtxmath}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{listings}
\RequirePackage[toc,page]{appendix}
\lstset{ %
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
basicstyle=\footnotesize, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{Orange}, % comment style
extendedchars=false, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single, % adds a frame around the code
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{DarkOrchid}, % keyword style
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{DarkGray}, % the style that is used for the line-numbers
rulecolor=\color{DarkGray}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{DarkGreen}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
%title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title
}
\RequirePackage[a4paper]{geometry}
\geometry{top=2cm, bottom=2cm,right=2cm,left=2.5cm}
\RequirePackage[colorlinks,linkcolor=black,citecolor=black,pagebackref]{hyperref}
\RequirePackage{acronym}
\newcommand{\email}[1]{\href{mailto:#1}{\nolinkurl{#1}}}
\newcommand{\universityYear}[1]{\the\numexpr #1 - 1 \relax--\the#1}
\RequirePackage{draftwatermark}
\@sc@wm@stampfalse
\SetWatermarkText{Confidentiel}
\SetWatermarkScale{.8}
\DeclareOption{confidential}{\@sc@wm@stamptrue}
\ProcessOptions
\RequirePackage{etoolbox}
\newbool{pidr}
\DeclareOption{pidr}{\booltrue{pidr}}
\newbool{pi}
\DeclareOption{pi}{\booltrue{pi}}
\ProcessOptions
\RequirePackage{authblk}
\RequirePackage{xcolor}
\RequirePackage{titlesec}
\titleformat{\chapter}
{\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
\usepackage[chapter]{tocbibind}
\setlength{\parindent}{0pt}
\parskip 10pt
\def\includeCompanyLogo{%
\@ifundefined{reportCompanyLogoPath}{}{\includegraphics[height=6em]{\reportCompanyLogoPath}}
}
%\def\reportAuthorFirstName{First Name} % First Name of the student
%\def\reportAuthorLastName{Nom} % Last Name of the student
%\def\reportStudentId{XXXXXXXX} % Student ID card number
\def\reportAuthor{Your name}
\def\reportAuthorAddress{Your address}
\def\reportAuthorCity{postal code, CITY} % Author city and postal code
\def\reportAuthorPhone{Your phone number} % Author phone number
\def\reportAuthorEmail{\email{Your mailing address}} % Author Email
\def\reportTitle{Internship title} % Internship title
\def\reportLongTitle{\reportTitle{}} % Long internship title
\def\reportYear{\universityYear{\year}} % University year
\def\reportCompany{Company title} % Company title
\def\reportCompanyAddress{Company address} % Company address
\def\reportCompanyCity{Postal code, CITY} % Company city and postal code
\def\reportCompanyPhone{Company phone number} % Company phone number
\def\reportCompanyLogoPath{figures/anonymous_company-logo} % Company Logo
\def\reportSchool{TELECOM Nancy} % School name
\def\reportSchoolAddress{193 avenue Paul Muller} % School address
\def\reportSchoolCity{CS 90172, VILLERS-L\`ES-NANCY} % School city and postal code
\def\reportSchoolPhone{+33 (0)3 83 68 26 00} % School phone number
\def\reportSchoolEmail{contact@telecomnancy.eu} % School contact email
\def\reportSchoolDiplomaYear{3} % School Diploma Year
\def\reportSupervisor{Supervisor's name} % Supervisor's name for PIDR only
\def\reportIndustrialSupervisor{Industrial supervisor's name} % Industrial supervisor's name
\def\reportAcademicSupervisor{Academic supervisor's name} % Academic supervisor's name
\def\place{City} % City of signature for the anti-plagiarism agreement
\def\date{\today} % Date of signature for the anti-plagiarism agreement
\def\reportProjectCustomer{Project realized for the XYZ team of DUMMY laboratory}
\def\reportIndustrialCustomer{Project realized in partnership with \reportCompany{}}
\ifbool{pidr}
{\def\reportType{Cross-Disciplinary or Research Project}
\def\reportSchoolDiplomaYear{2}}
{\ifbool{pi}
{\def\reportType{Industrial Project}
\def\reportSchoolDiplomaYear{3}}
{\def\reportType{Master Thesis}}}
\makeatletter
\def\maketitle{%
\pagestyle{empty}
\begin{center}
\includegraphics[width=4.5cm]{figures/school-logo}
\hspace{9mm}
\includegraphics[width=4.5cm]{figures/collegium-logo}
\hspace{9mm}
\includegraphics[width=4.5cm]{figures/university-logo}
\vfill
{\fontsize{40}{40}\selectfont \reportType{}}
\rule{\textwidth}{1pt}
\bigskip
{\fontsize{22}{22}\selectfont \reportTitle{}}
\medskip
{\fontsize{18}{18}\selectfont \bf \reportAuthor{}}
\medskip
{\fontsize{14}{14}\selectfont \bf Academic Year \reportYear{}}
\vfill
\ifbool{pidr}
{\reportProjectCustomer{}}
{\ifbool{pi}
{\reportIndustrialCustomer{}}
{Final year internship realized in partnership with
\reportCompany{}
in preparation for the engineering diploma of \reportSchool{}}}
\vfill
\vfill
\end{center}
\ifbool{pidr}
{Encadrant : \reportSupervisor{}}
{\ifbool{pi}
{Industrial supervisor: \reportSupervisor{}
Academic supervisor: \reportAcademicSupervisor{}}
{Internship supervisor: \reportIndustrialSupervisor{}
Academic supervisor: \reportAcademicSupervisor{}}}
\cleardoublepage
\setcounter{page}{1}
\pagestyle{plain}
}
\makeatother
\makeatletter
\newcommand\insertAntiPlagiarismAgreement[2]{%
\begin{center}
\Large \bf Déclaration sur l'honneur de non-plagiat
\end{center}
\medskip
\medskip
{\bf Je soussigné(e),}
{\bf Nom, prénom : #1}
{\bf \'Elève-ingénieur(e) régulièrement inscrit(e) en \reportSchoolDiplomaYear{}\textsuperscript{e} année à \reportSchool{}}
{\bf Numéro de carte de l'étudiant(e) :} #2
{\bf Année universitaire :} \reportYear{}
{\bf Auteur(e) du document, mémoire, rapport ou code informatique intitulé :}
\begin{center}
\Large \reportLongTitle{}
\end{center}
\medskip
Par la présente, je déclare m'être informé(e) sur les différentes formes de
plagiat existantes et sur les techniques et normes de citation et référence.
Je déclare en outre que le travail rendu est un travail original, issu de ma
réflexion personnelle, et qu'il a été rédigé entièrement par mes soins.
J'affirme n'avoir ni contrefait, ni falsifié, ni copié tout ou partie de
l'\oe{}uvre d'autrui, en particulier texte ou code informatique, dans le but
de me l'accaparer.
Je certifie donc que toutes formulations, idées, recherches, raisonnements,
analyses, programmes, schémas ou autre créations, figurant dans le document
et empruntés à un tiers, sont clairement signalés comme tels, selon les
usages en vigueur.
Je suis conscient(e) que le fait de ne pas citer une source ou de ne pas la
citer clairement et complètement est constitutif de plagiat, que le plagiat
est considéré comme une faute grave au sein de l'Université, et qu'en cas de
manquement aux règles en la matière, j'encourrais des poursuites non
seulement devant la commission de discipline de l'établissement mais
également devant les tribunaux de la République Fran\c{c}aise.
\medskip
\medskip
\hspace{5cm}{\bf Fait à \place{}, le \date{}}
\hspace{5cm}{\bf Signature :}
\cleardoublepage
}
\makeatother
\makeatletter
\def\makesecondtitle{%
\begin{center}
{\fontsize{40}{40}\selectfont \reportType{}}
\rule{\textwidth}{1pt}
\bigskip
{\fontsize{22}{22}\selectfont \reportTitle{}}
\medskip
{\fontsize{18}{18}\selectfont \bf \reportAuthor{}}
\medskip
{\fontsize{14}{14}\selectfont \bf Academic Year \reportYear{}}
\vfill
\ifbool{pidr}
{\reportProjectCustomer{}}
{\ifbool{pi}
{\reportIndustrialCustomer{}}
{Final year internship realized in partnership with
\reportCompany{}
in preparation for the engineering diploma of \reportSchool{}}}
\vfill
\end{center}
\reportAuthor{} \\
\ifbool{pidr}
{}
{\ifbool{pi}
{}
{\reportAuthorAddress{} \\
\reportAuthorCity{}\\
\reportAuthorPhone{} \\
}}
\reportAuthorEmail{} \\
\smallskip
\reportSchool{}\\
\reportSchoolAddress{},\\
\reportSchoolCity{}\\
\reportSchoolPhone{}\\
\email{\reportSchoolEmail}\\
\smallskip
\begin{tabular}{@{}lr@{}}
\parbox[b]{.7\linewidth}{
\reportCompany{} \\
\reportCompanyAddress{} \\
\reportCompanyCity{} \\
\reportCompanyPhone{}
} & \includeCompanyLogo{} \\
\end{tabular}
\medskip
\ifbool{pidr}
{Encadrant : \reportSupervisor{}}
{\ifbool{pi}
{Industrial supervisor: \reportSupervisor{}
Academic supervisor: \reportAcademicSupervisor{}}
{Internship supervisor: \reportIndustrialSupervisor{}
Academic supervisor: \reportAcademicSupervisor{}}}
\cleardoublepage
}
\makeatother
File moved
File moved
File moved
File moved
File moved
@Book{GOT4,
author = {George R.R. Martin},
title = {{A Feast for Crows (A Song of Ice and Fire)}},
year = {2005},
isbn = {0-553-80150-3},
pages = {784},
publisher = {Bantam}
}
\ No newline at end of file
This diff is collapsed.
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment