Initialized Git Foo thesis

master
agp8x 2017-06-20 10:43:12 +02:00
parent 1b3a392feb
commit e27ca47bd9
9 changed files with 329 additions and 0 deletions

25
ThesTeX/.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
*.aux
*.bbl
*.blg
*.idx
*.ilg
*.ind
*.loa
*.lof
*.log
*.lot
*.nlo
*.nls
*.out
*.pdf
*.synctex.gz
*.toc
*.fls
*.fdb_latexmk
# Stylesheets and classes only in meta directory
*.sty
*.cls
*.bst
*.gin
# Do not initialize twice
.prepared

7
ThesTeX/.latexmkrc Normal file
View File

@ -0,0 +1,7 @@
$pdf_mode = 1;
$pdflatex = 'pdflatex --shell-escape -interaction=nonstopmode %O %S -file-line-error -synctex=1';
# Custom dependency and function for nomencl package
add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
sub makenlo2nls {
system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
}

14
ThesTeX/.travis.yml Normal file
View File

@ -0,0 +1,14 @@
services:
- docker
script:
- make
- ls -la | grep pdf
deploy:
provider: releases
api_key:
secure: $GITHUB_TOKEN
file: thesis.pdf
skip_cleanup: true
on:
repo: uniba-ktr/ThesTeX
tags: true

29
ThesTeX/Makefile Normal file
View File

@ -0,0 +1,29 @@
# Copyright 2016, Marcel Großmann <marcel.grossmann@uni-bamberg.de>
# Adjust your base GIT directory relatively to Makefile
base := ..
# Internal Variables - Touch & Perish
# Folder to clone TeXMeta to, relatively to $base
meta := $(base)/meta
main := thesis
bibtexstyles := IEEEtran.bst
# TeXMeta location
metaurl := "https://github.com/uniba-ktr/TeXMeta.git"
MAKE_FILE := $(meta)/Makefile
ifeq ($(wildcard $(MAKE_FILE)),)
.DEFAULT_GOAL := gitmodules
else
include $(MAKE_FILE)
endif
# Internal Targets
gitmodules: initialize
@test -d $(meta) || git submodule add $(metaurl) $(meta)
@git submodule update --init $(meta)
@( git add $(meta) && git commit -m "Update meta" ) || true
@make prepare
initialize:
@test -f .prepared || rm -rf .git .gitmodules meta
@test -f .prepared || ( cd $(base) && ( test -d .git || git init ) )

47
ThesTeX/README.md Normal file
View File

@ -0,0 +1,47 @@
[![Build Status](https://travis-ci.org/uniba-ktr/ThesTeX.svg?branch=master)](https://travis-ci.org/uniba-ktr/ThesTeX)
# ThesTeX
LaTeX template for bachelor or master thesis
## Setup
### Easy Initialization with GNU make
In the `Makefile` you may adjust the `base` variable to setup your git base directory relatively to the cloned directory.
First of all, run `make` to initialize the repository and execute the initial build.
Thereafter, only run `make` in the cloned directory to recreate your `pdf` file.
### Without make
1. Remove the `.git` folder and the `.gitmodules` file to be able to create a new git repository
2. First checkout all necessary submodules with `git submodule init` followed by `git submodule update`
3. Create the directories `graphic`, `code`, `images` and `content`
4. Copy `meta/style/gitexinfo.sty`, `meta/style/gitinfo2.sty` and `meta/style/IEEEtran.bst` to the root of your cloned directory.
5. For versioning of your PDF files copy `meta/style/gitinfo2-hook.txt` to `.git/hooks/post-checkout`, `.git/hooks/post-commit` and `.git/hooks/post-merge` and make these copies executable.
### Necessary Configurations
1. Edit the `config/metainfo.tex` file to include
* your name in the `\author{}` command,
* the German title in `\title{}` and the English one in `\subtitle{}`,
* the submission date in `\date{}`,
* your desired degree in `\newcommand\degree{}`,
* your study course in `\newcommand\studycourse{}`,
* the name of your advisor in `\newcommand\advisor{}` and
* the submission location of your thesis in `\newcommand\location{}`
2. Modify `\gittrue` to `\gitfalse` in `config/metainfo.tex` to disable git versioning.
3. Edit the `\selectlanguage{}` command in `thesis.tex` to setup the language you write your submission in. Possible options are
* `ngerman`
* `english`
## Generating the PDF
Use `latexmk` to generate a readable document, or use `make all` of the `Makefile`.
If You use texmaker, set `latexmk` as your default build command
## Cleaning Up
Run `make clean` or `latexmk -C` to remove the generated PDF and all temporary LaTeX files.

37
ThesTeX/config/index.ist Normal file
View File

@ -0,0 +1,37 @@
%% idxstyle.ist
%% Copyright 2003-2005 Nicolas Markey
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
% The Current Maintainer of this work is Nicolas Markey
%
% This work consists of the files
% ttb_en.tex
% ttb_en.sec1.tex ttb_en.sec2.tex ttb_en.sec3.tex
% ttb_en.sec4.tex ttb_en.sec5.tex ttb_style.sty
% local.bib idxstyle.ist Makefile
% and the derived ttb_en.dvi, ttb_en.ps and ttb_en.pdf
%
%
% This file is derived from fridx1.ist:
% FICHIER fridx1.ist
% Personnalisation Numero 1 d'un index (faire makeindex -s fridx1.ist)
% --------------------------------------------------------------------
headings_flag 1
heading_prefix "{\\large \\bf \\hfil--\\ "
heading_suffix " --\\ \\hfil}\\nopagebreak\n"
symhead_negative "symbols"
symhead_positive "Symbols"
delim_0 " \\dotfill \ "
delim_1 " \\dotfill \ "
delim_2 " \\dotfill \ "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -0,0 +1,13 @@
% Meta-Informationen
\author{Autor}
\title{Titel (deutsch)}
\subtitle{Title (english)}
\newcommand\degree{Abschluss}
\newcommand\studycourse{Studiengang}
\newcommand\advisor{Betreuer}
\newcommand\location{Bamberg}
\subject{\degree arbeit im Studiengang \studycourse\ der Fakultät Wirtschaftsinformatik und Angewandte Informatik der Otto-Friedrich-Universität Bamberg}
\date{xx.xx.xxxx}
\gittrue
\thesistrue

39
ThesTeX/packages.txt Normal file
View File

@ -0,0 +1,39 @@
adjustbox
algorithmicx
algorithms
cancel
caption
catoptions
collectbox
doublestroke
eso-pic
etoolbox
float
fourier
koma-script
l3kernel
l3packages
listings
marvosym
menukeys
moreverb
multirow
nomencl
pgf
pgfplots
relsize
setspace
subfig
symbol
todonotes
ucs
ulem
units
utopia
wallpaper
wasy
wasysym
xcolor
xkeyval
xstring
zapfding

118
ThesTeX/thesis.tex Normal file
View File

@ -0,0 +1,118 @@
% Vorlage für Masterarbeiten
% Konfiguration in texmaker: Options -> Configure Texmaker -> Quick Build -> Select Latexmk + ViewPDF
% Entsprechende Informationen in den config/metainfo verändern
% Beispieldokument entsteht bei Kompilierung nach oben angegebener Reihenfolge
\documentclass[
fontsize=12pt, % Schriftgroesse 12pt
paper=a4, % Layout fuer Din A4
%oneside, % einseitig
twoside, % Layout fuer beidseitigen Druck
%openright, % Start auf rechter Seite
headinclude, % Kopfzeile wird Seiten-Layouts mit beruecksichtigt
headsepline, % horizontale Linie unter Kolumnentitel
%footinclude,
%footexclude, %fusszeile nicht bercksichtigen
%plainheadsepline, % horizontale Linie auch beim plain-Style
BCOR=12mm, % Korrektur fuer die Bindung
DIV=14, % DIV-Wert fuer die Erstellung des Satzspiegels, siehe scrguide
%DIVcalc, % automatische Berechnung des Satzspiegels
%openany, % Kapitel knnen auf geraden und ungeraden Seiten beginnen
%openright, % Kapitel auf rechten Seiten beginnen!
%pointlessnumbers, % Kapitelnummern immer ohne Punkt
fleqn, % fleqn: Glgen links (statt mittig)
%draft, % Keine Bilder in der Anzeige, overfull hboxes werden angezeigt
appendixprefix, %berschriften des Anhangs +"Anhang"
%chapterprefix, %berschriften der Kapitel +"KAPITEL"
%tablecaptionabove, %tabellen immer als berschriften
abstract=true,
pagesize=pdftex %berschrift Zusammenfassung einschalten
]{scrreprt}
%===============================================================================
% zentrale Layout-Angaben und Befehle
%===============================================================================
\newcommand\meta{../meta}
\input{\meta/config/commands}
%===============================================================================
% LATEX-Dokument
%===============================================================================
\input{\meta/config/hyphenation}
\begin{document}
%===============================================================================
% Zum Kompilieren pdflatex und bibtex ausführen.
% Konfiguration in texmaker: Options -> Configure Texmaker -> Quick Build -> Select Latexmk + ViewPDF
% Entsprechende Informationen in den config/metainfo verändern
% Zur Auswahl der Sprache im folgenden Befehl
% ngerman für deutsch eintragen, english für Englisch.
%===============================================================================
\selectlanguage{ngerman}
\setstretch{1.1}
%% Titelseite
\maketitle
%% Seitenlayout
\pagestyle{scrplain}
\cleardoubleemptypage
\pagenumbering{Roman}
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\newpage
\listofalgorithms
\newpage
%% Falls nur Abkuerzungs- oder Symbolverzeichnis benoetigt wird, folgende Befehle benutzen %%
%\printnomenclature
%% Abkuerzungs- und Symbolverzeichnis %%
%% Zum alphabetischen Sortieren in der Konsole "makeindex filename.nlo -s nomencl.ist -o filename.nls" ausfuehren; nach dem zweiten Kompilieren erscheint das Abkuerzungsverzeichnis dann im Dokument %%
%% Alternativ im TeXnicCenter unter Ausgabe - Ausgabeprofile definieren - Nachbearbeitung einen Postprocessor ("Neu"-Button oben rechts) erstellen. Nach Bennenung unten als Anwendung Makeindex (aus Verzeichnis "./miktex/bin/makeindex.exe") auswaehlen und als Argumente folgenden String setzen: "%bm".nlo -s nomencl.ist -o "%bm".nls" %%
\usetwonomenclatures
\printnomenclature
\cleardoubleemptypage
\pagestyle{scrheadings}
\pagenumbering{arabic}
\setcounter{page}{1}
% 1.5-facher Zeilenabstand für die Arbeit
\setstretch{1.5}
%===============================================================================
% LATEX-Dokument: Kapitel laden
%===============================================================================
%
% hier einzelne Kapitel mit \input{Kapitel-File} einfügen
%
\ifgit
\input{\meta/exampleContent/version}
\fi
\input{\meta/exampleContent/exampleContentThesis}
\cleardoubleemptypage
\pagestyle{scrplain}
% 1.1-facher Zeilenabstand für das Literaturverzeichnis und den Anhang
\setstretch{1.1}
\bibliographystyle{IEEEtran}%alphadin}%alpha}%abbrvdin}%natdin}%plaindin}%apa}
%plaindin = Literaturverzeichnis nach deutschem DIN-Standard siehe Webseite von Lorenzen www.haw-hamburg.de/pers/Lorenzen
\bibliography{\meta/exampleLiterature/bib}
\cleardoubleemptypage%
% Stichwortverzeichnis soll im Inhaltsverzeichnis auftauchen
% Sprungmarke mit Phantomsection korrigiert
\phantomsection%
\addcontentsline{toc}{chapter}{Index}%
% Stichwortverzeichnis endgueltig anzeigen
\printindex%
\appendix
\setstretch{1.5}
\chapter{Anhang}
\setstretch{1.1}
\cleardoubleemptypage
\erklaerung
\end{document}