Skip to content
Snippets Groups Projects
Commit 9f67495e authored by Yoann Guilhem's avatar Yoann Guilhem Committed by Nicola Vigano
Browse files

Documentation:

- translate sources + Preamble.tex into DCTDoc.cls document class
- fix title pages
- fix Makefile

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@733 4c865b51-4357-4376-afb4-474e03ccb993
parent c469ff7f
No related branches found
No related tags found
No related merge requests found
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{DCTDoc}[2012/08/30 v1.0 DCT documentation class]
% Passes and class options to the underlying article class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrreprt}}
\ProcessOptions
\LoadClass[a4paper,12pt,twoside,openright,final,
titlepage,
pagesize,
headsepline,
nofootsepline,
onelinecaption,
tablecaptionabove,
liststotoc,
idxtotoc,
bibtotoc,
tocindent,
nochapterprefix,
appendixprefix]{scrreprt}[2009/07/24]
% \@ifclasslater{scrreprt}{2009/07/24}{
% % With koma-script >= 3.0
% \LoadClass[a4paper,12pt,twoside,openright,final]{scrreprt}[2009/07/24]
% %\LoadClass[a4paper,12pt,twoside,openright,final]{scrreprt}
%
% \KOMAoption{titlepage}{true}
% \KOMAoptions{pagesize}
% %\KOMAoption{pagesize}{true}
% \KOMAoption{headsepline}{true}
% \KOMAoption{footsepline}{false}
% \KOMAoption{captions}{oneline,tableabove}
% \KOMAoption{toc}{listof,bibliography,indent,index}
% %\KOMAoptions{DIV13}{true} % type area
% %\KOMAoptions{bigheadings}{true}
% %\KOMAoption{pointlessnumbers}{true}
% \KOMAoption{chapterprefix}{false}
% \KOMAoption{appendixprefix}{true}
% %\KOMAoption{BCOR}{15mm} % binding correction
% %\KOMAoption{cleardoublepage}{empty}
% %\KOMAoption{parskip}{}
% }{
% \LoadClass[a4paper,12pt,twoside,openright,final,
% titlepage,
% pagesize,
% headsepline,
% footsepline,
% onelinecaption,
% tablecaptionabove,
% liststotoc,
% idxtotoc,
% bibtotoc,
% tocindent,
% chapterprefix=false,
% appendixprefix]{scrreprt}
% }
%
% %\KOMAoptions{DIV13=true} % type area
% %\KOMAoptions{bigheadings=true}
% %\KOMAoptions{pointlessnumbers==true}
% %\KOMAoptions{BCOR=15mm} % binding correction
% %\KOMAoptions{cleardoublepage=empty}
% %\KOMAoptions{parskip=}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (1) PACKAGES %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[latin1]{inputenc} % use applemac if you are on an apple laptop, ansinew for Windows, but latin1 should be fine for most systems
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[pdftex]{graphicx}
\usepackage[pdftex]{color}
\usepackage{a4}
\usepackage{acronym} % texlive-latex-extra should be installed to compile with acronym style
\usepackage{makeidx}
\usepackage[numbers,sort&compress]{natbib} % for bibliography
\usepackage{appendix}
\usepackage{subfigure} % almost OBSOLETE -> switch to subfig or subcaption
\usepackage{amsmath,amssymb,amsbsy} % match package, eg align statt eqnarray
\usepackage{amsfonts} % set of miscellaneous TeX fonts that augment the standard Computer Modern set normally distributed with TeX
\usepackage{xspace} % extra spaces and lengths
\usepackage{enumerate} % enumerate geht einfach zu aendern zb zu latein 2 anfangen
\usepackage{multirow} % multi-row cells in the tables
\usepackage{multicol} % multi-column layout
\usepackage{longtable} % long tables over multiple pages
\usepackage[cm]{fullpage} % shorten margin, wider text layout
\usepackage{fancyhdr} % For headers and footers
\usepackage{listings} % To insert code
%\usepackage[2007/09/29]{kvsetkeys}
%\usepackage{svn-multi} % To interact with svn
\usepackage[pdftex, colorlinks=true, pdfstartview=FitV, linkcolor=red, citecolor=green, urlcolor=blue]{hyperref} % hyperlinks
\usepackage[all]{hypcap}
\usepackage[english]{babel}
\usepackage{caption} % Latest caption package
%\usepackage{subcaption} % subcaption package % TOO RECENT FOR REDHAT4
\RequirePackage[latin1]{inputenc} % use applemac if you are on an apple laptop, ansinew for Windows, but latin1 should be fine for most systems
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{textcomp}
\RequirePackage[pdftex]{graphicx}
\RequirePackage[pdftex]{color}
\RequirePackage{a4}
\RequirePackage{acronym} % texlive-latex-extra should be installed to compile with acronym style
\RequirePackage{makeidx}
\RequirePackage[numbers,sort&compress]{natbib} % for bibliography
\RequirePackage{appendix}
\RequirePackage{subfigure} % almost OBSOLETE (but not for tetex-3.0) -> switch to subfig or subcaption
\RequirePackage{amsmath,amssymb,amsbsy} % match package, eg align statt eqnarray
\RequirePackage{amsfonts} % Set of miscellaneous TeX fonts that augment the standard Computer Modern set normally distributed with TeX
\RequirePackage{xspace} % Extra spaces and lengths
\RequirePackage{enumerate} % Enhanced enumerations
\RequirePackage{multirow} % multi-row cells in the tables
\RequirePackage{multicol} % multi-column layout
\RequirePackage{longtable} % Long tables over multiple pages
\RequirePackage[cm]{fullpage} % Shorter margins, wider text layout
\RequirePackage{fancyhdr} % For headers and footers
\RequirePackage{listings} % To insert code
%\RequirePackage[2007/09/29]{kvsetkeys}
%\RequirePackage{svn-multi} % To interact with svn
\RequirePackage[pdftex, colorlinks=true, pdfstartview=FitV, linkcolor=red, citecolor=green, urlcolor=blue]{hyperref} % hyperlinks
\RequirePackage[all]{hypcap}
\RequirePackage[english]{babel}
\RequirePackage{caption} % Latest caption package
%\RequirePackage{subcaption} % Too recent for teTeX-3.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (2) SETTINGS %
......@@ -82,7 +148,7 @@
% Colors
\definecolor{codeBG}{gray}{0.9}
\definecolor{outBG}{gray}{0.6}
\definecolor{outBG}{gray}{0.75}
% Code listing settings
\lstset{
......@@ -99,15 +165,14 @@ prebreak=...,
postbreak=...
}
\lstdefinestyle{outoftext2}{
basicstyle=\footnotesize,
basicstyle=\ttfamily\small,
backgroundcolor=\color{outBG},
prebreak=...,
postbreak=...
}
\lstloadlanguages{sh,bash,Matlab,Python,Octave,C,C++}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (3) COMMANDS %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -160,3 +225,4 @@ postbreak=...
{\lstset{language=,style=outoftext2}}
{}
\endinput
......@@ -2,6 +2,9 @@
# Variables #
###############
# Document class
CLASS = DCTDoc.cls
# Main documentation
MAIN = main
MAIN_TEXFILES = $(wildcard $(MAIN)/*.tex)
......@@ -22,9 +25,10 @@ PLOT_FILES = $(wildcard plots/*.*)
GRAPHIC_FILES = $(PHOTO_FILES) $(FIGURE_FILES) $(PLOT_FILES)
# Dependencies
MAIN_DEP = $(MAIN_TEXFILES) $(COMMON) $(FUNCTIONS) $(BIB_FILES) $(GRAPHIC_FILES)
USER_DEP = $(USER_TEXFILES) $(COMMON) $(FUNCTIONS) $(BIB_FILES) $(GRAPHIC_FILES)
DOCUMENTS = $(MAIN) $(USER_MANUAL)
COMMON_DEP = $(CLASS) $(COMMON) $(FUNCTIONS) $(BIB_FILES) $(GRAPHIC_FILES)
MAIN_DEP = $(MAIN_TEXFILES) $(COMMON_DEP)
USER_DEP = $(USER_TEXFILES) $(COMMON_DEP)
DOCUMENTS = $(MAIN) $(USER_MANUAL)
# Shell and commands
SHELL = /bin/sh
......@@ -33,7 +37,7 @@ RM = /bin/rm
LS = /bin/ls
#LATEX = pdflatex --interaction nonstopmode -shell-escape
LATEX = pdflatex -halt-on-error -shell-escape
BIBTEX = bibtex
BIBTEX = bibtex --terse
VIEWER = evince
# Check if it is needed to rerun LaTeX
......@@ -41,8 +45,6 @@ RERUN = 'There were undefined references|Rerun to get (cross-references|cita
# Check if all references and citations are defined
UNDEFINED = '(Reference|Citation) `[[:alnum:]:_-]*[[:punct:]] on page [[:digit:]]+ undefined on input line [[:digit:]]+\.|Label `[[:alnum:]:_-]*[[:punct:]] multiply defined.|Acronym `[[:alnum:]:_-]*[[:punct:]] is not defined on input line [[:digit:]]+\.'
Package acronym Warning: Acronym `OAR' is not defined on input line 105.
# Colors
RED =\033[31m
NORMAL=\033[0m
......@@ -52,20 +54,14 @@ BOLD =\033[1m
# Targets #
#############
.PHONY: all main user_manual example clean reallyclean help
.PHONY: all main user_manual clean reallyclean help
all: $(MAIN).pdf $(USER_MANUAL).pdf
all: main user_manual
main: $(MAIN).pdf
user_manual: $(USER_MANUAL).pdf
example: f_example.tex $(FUNCTIONS)
@$(LATEX) $<
@grep -qE $(RERUN) $(f_example).log && $(LATEX) $<
@grep -qE $(RERUN) $(f_example).log && $(LATEX) $<
@$(call f_info,f_example)
$(MAIN).pdf: $(MAIN).tex $(MAIN_DEP)
@$(call f_compile,$(MAIN))
@$(call f_info,$(MAIN))
......@@ -105,17 +101,14 @@ help:
define f_compile
$(LATEX) $1
$(BIBTEX) $(1)
grep -qE $(RERUN) $(1).log && $(LATEX) $<
grep -qE $(RERUN) $(1).log && $(LATEX) $<
$(BIBTEX) $1
grep -qE $(RERUN) $1.log && $(LATEX) $1 || true
grep -qE $(RERUN) $1.log && $(LATEX) $1 || true
grep -qE $(RERUN) $1.log && $(LATEX) $1 || true
endef
define f_info
$(ECHO) "-----------------------------------------"
# This work but it is ugly when undefined references
#if [ -f $1.blg ] ; then $(ECHO) -n "BibTeX Warnings : $(RED)" && grep '^Warning' $1.blg || $(ECHO) "$(NORMAL)None ; fi
#grep -iE $(UNDEFINED) $1.log || $(ECHO) "$(NORMAL)None"
# This work better
if [ -f $1.blg ] ; then $(ECHO) -n "BibTeX Warnings : " && ($(ECHO) "$(RED)"; grep '^Warning' $1.blg) | sed '$$s/^\x1b\[31m$$/\x1b[0mNone/' ; fi
$(ECHO) -n "$(NORMAL)Citations or references undefined : "
($(ECHO) "$(RED)"; cat $1.log | tr -d '\n' | grep -Eio $(UNDEFINED)) | sed '$$s/^\x1b\[31m$$/\x1b[0mNone/'
......
\documentclass[a4paper,
pagesize,
DIV13,%12,% type area
twoside,% bookstyle, even and odd pages style different
openright,% chapter always starts on the right page
cleardoublepage=empty,%
titlepage,%
%parskip,%
headsepline,%
footsepline=false,%
chapterprefix=false,%
%appendixprefix,%
onelinecaption,% 1st line: centered, otherwise
12pt,%
bigheadings,%
liststotoc,%
tocindent,%
listsindent,%
%abstracton,%
pointlessnumbers,% srcreprt
BCOR=15mm, % binding correction
final
%tablecaptionabove
]
{scrreprt}
% All the packages, settings and commands should be put in the Preamble.tex file
\input{common/Preamble.tex}
\documentclass{DCTDoc}
% All the packages, settings and commands should be put in the DCTDoc.cls file
\begin{document}
......@@ -35,21 +10,26 @@
\tableofcontents
\include{main/missing}
\include{main/introduction}
\include{main/3DRXD}
\include{main/DCT_Setup}
\include{main/Geometry}
\include{main/FED_Strain}
\include{main/DCT_Operation}
\include{main/Software}
\include{main/Calibration_Measurements}
%\include{main/FED_Strain}
%\include{main/DCT_Operation}
%\include{main/Software}
%\include{main/Calibration_Measurements}
\appendix
% put acronyms and technical terms in this chapter, they are then also available in shortform and hyperlinked via \acs{DCT},\acf{DCT},\acl{DCT}
\include{main/missing}
%\include{main/Links}
\input{common/acronyms}
\include{main/Links}
\include{main/bibliography}
% Bibliography
\nocite{*}
\bibliographystyle{unsrtnat}
\bibliography{bib/example} % just an example for the moment
\end{document}
\title{DCT Manual\\[1em]Compiled on: \today}
\author{Y. Guilhem \and A. King \and W. Ludwig \and L. Nervo \and P. Reischig \and S. Schmiederer \and N. Vigano}
%\date{}
\maketitle
\documentclass[a4paper,
pagesize,
DIV13,%12,% type area
twoside,% bookstyle, even and odd pages style different
openright,% chapter always starts on the right page
cleardoublepage=empty,%
titlepage,%
%parskip,%
headsepline,%
footsepline=false,%
chapterprefix=false,%
%appendixprefix,%
onelinecaption,% 1st line: centered, otherwise
12pt,%
bigheadings,%
liststotoc,%
tocindent,%
listsindent,%
%abstracton,%
pointlessnumbers,% srcreprt
%BCOR=15mm, % binding correction
final
%tablecaptionabove
]
{scrreprt}
% All the packages, settings and commands should be put in the Preamble.tex file
\input{common/Preamble.tex}
\documentclass{DCTDoc}
% All the packages, settings and commands should be put in the DCTDoc.cls file
\begin{document}
......@@ -48,6 +23,7 @@
\include{user_manual/Visualization}
\appendix
% Put acronyms and technical terms in this chapter, they are then also available in shortform and hyperlinked via \acs{DCT},\acf{DCT},\acl{DCT}
\input{common/acronyms}
......
......@@ -24,11 +24,20 @@
%\end{titlepage}
%\titlehead{title head }
%\subject{subject }
%\title{title }
%\subtitle{subtitle }
%\author{author }
%\date{date }
%\publishers{publisher }
%\and
%\thanks{footnote }
\title{DCT User Manual\\[1em]Compiled on: \today}
\author{Y. Guilhem \and A. King \and W. Ludwig \and L. Nervo \and N. Vigano \and P. Reischig \and S. Schmiederer}
\author{Y. Guilhem \and A. King \and W. Ludwig \and L. Nervo \and P. Reischig \and S. Schmiederer \and N. Vigano}
%\date{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment