diff --git a/.travis.yml b/.travis.yml
index a16f1bc..900fcd1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,13 @@
language: python
python:
- - 2.6
- 2.7
+
+branches:
+ only:
+ - UpdatePython27
+
before_install:
- sudo apt-get remove chromium firefox mongodb-10gen
- sudo apt-get install texlive
@@ -12,7 +16,10 @@ before_install:
# - sudo apt-get install texlive
install:
- - "pip install -r requirements.txt --use-mirrors"
+ - pip install docutils==0.12
+ - pip install pybtex
+ - pip install sphinx==1.3.1
+ - pip install sphinxcontrib-exceltable
script:
- make html && make html
diff --git a/Abverz.rst b/Abverz.rst
new file mode 100644
index 0000000..e382c0e
--- /dev/null
+++ b/Abverz.rst
@@ -0,0 +1,16 @@
+:orphan:
+
+.. only:: html or text
+
+ Stichwortverzeichniss
+ =====================
+
+Kurze Übersicht über die im Bericht verwendeten Abkürzungen.
+
+.. topic:: Your Topic Title
+
+ Subsequent indented lines comprise
+ the body of the topic, and are
+ interpreted as body elements.
+
+
diff --git a/ch-intro/index.rst b/ch-intro/index.rst
index d701ea4..ea4b430 100644
--- a/ch-intro/index.rst
+++ b/ch-intro/index.rst
@@ -17,10 +17,7 @@ support all of the needs of a thesis writer. Many of the patches are not
appropriate for contributing directly to the upstream Sphinx repository, so
this is instead a separate project.
-This sphinxtr output is available in several formats at:
-http://jterrace.github.com/sphinxtr.
-
-The source code for sphinxtr can be found at:
+The orginal source code for sphinxtr can be found at:
https://github.com/jterrace/sphinxtr.
Installation
@@ -75,6 +72,9 @@ Changes
The following changes and additions have been made from vanilla Sphinx:
+* 2017 Start on the python3.5/sphinx 1.4.3 version
+* 2016 working Version(this version)
+
* A cross-format bibtex bibliography based on sphinx-natbib
* Tables that can go inside figures
* Changed table formatting to look pretty, like booktabs
@@ -86,8 +86,5 @@ The following changes and additions have been made from vanilla Sphinx:
* Numbered section references
* A singletext output that builds into a single text file, similar to singlehtml
* A subfigure environment
+* Nov. 2015 adapting for Python 2.7
-Documents Using sphinxtr
-========================
-
-* `Jeff Terrace's PhD Thesis `_
diff --git a/conf.py b/conf.py
index 1a0856c..2aa689a 100644
--- a/conf.py
+++ b/conf.py
@@ -1,4 +1,5 @@
-import sys, os
+import os
+import sys
# directory relative to this conf file
CURDIR = os.path.abspath(os.path.dirname(__file__))
@@ -6,28 +7,26 @@
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'extensions'))
# import the custom html and latex builders/translators/writers
-import html_mods
-import latex_mods
# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+# needs_sphinx = '1.0'
# import order is important here
extensions = [
- 'fix_equation_ref',
- 'sphinx.ext.mathjax',
- 'sphinx.ext.ifconfig',
- 'subfig',
- 'numfig',
- 'numsec',
- 'natbib',
- 'figtable',
- 'singlehtml_toc',
- 'singletext',
- ]
+ 'fix_equation_ref',
+ 'sphinx.ext.mathjax',
+ 'sphinx.ext.ifconfig',
+ 'subfig',
+ 'numfig',
+ 'numsec',
+ 'natbib',
+ 'figtable',
+ 'singlehtml_toc',
+ 'singletext', 'sphinxcontrib.exceltable'
+]
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['templates']
+templates_path = [ 'templates' ]
# The suffix of source filenames.
source_suffix = '.rst'
@@ -36,11 +35,11 @@
source_encoding = 'utf-8-sig'
# General information about the project.
-project = u'The Sphinx Thesis Resource (sphinxtr)'
-author = u'Jeff Terrace'
-copyright = u'by %s, 2012.' % author
-version = '0.1'
-release = '0.1'
+project = u'Bericht'
+author = u'Me'
+copyright = u'by %s, 2015.' % author
+version = '0.2'
+release = '0.2'
# Turns on numbered figures for HTML output
number_figures = True
@@ -58,11 +57,11 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = [
- '_build',
- 'tex',
- 'epilog.rst',
- 'README.rst',
- ]
+ '_build',
+ 'tex',
+ 'epilog.rst',
+ 'README.rst',
+]
# The master toctree document.
# Ideally, we wouldn't have to do this, but sphinx seems to have trouble with
@@ -76,12 +75,11 @@
# A string of reStructuredText that will be included at the end of
# every source file that is read.
-rst_epilog = open(os.path.join(CURDIR, 'epilog.rst'),'r').read().decode('utf8')
+rst_epilog = open(os.path.join(CURDIR, 'epilog.rst'), 'r').read().decode('utf8')
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
-
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -91,52 +89,52 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-#html_theme_options = {}
+# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
html_title = "%s" % project
# A shorter title for the navigation bar. Default is the same as html_title.
-html_short_title = "Someone's PhD Thesis"
+html_short_title = "Report"
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-#html_favicon = None
+# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['static']
+html_static_path = [ 'static' ]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-template_files = ['localtoc.html', 'relations.html', 'sourcelink.html']
+template_files = [ 'localtoc.html', 'relations.html', 'sourcelink.html' ]
if not tags.has('singlehtml'):
# only include search box for regular html, not single page html
template_files.append('searchbox.html')
html_sidebars = {
- '**': template_files,
+ '**': template_files,
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
# If false, no module index is generated.
html_domain_indices = False
@@ -145,24 +143,24 @@
html_use_index = False
# If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
# supresses the last dot in section numbers
# changes "1. Introduction" -> "1 Introduction"
@@ -191,8 +189,8 @@
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
- 'papersize': 'letterpaper',
-
+ 'papersize': 'a4paper',
+
# * gets passed to \documentclass
# * default options are single sided, double spaced
# you can change them with these options:
@@ -200,31 +198,31 @@
# * singlespace
# * you might want to omit the list of tables (lot)
# if you use figtable without the :nofig: option
- 'classoptions': ',english,lof,lot',
-
+ 'classoptions': ',ngerman,lof,lot',
+
# The font size ('10pt', '11pt' or '12pt').
- 'pointsize': '12pt',
-
+ 'pointsize': '10pt',
+
# Additional stuff for the LaTeX preamble.
'preamble': ADDITIONAL_PREAMBLE,
-
+
# Additional footer
'footer': ADDITIONAL_FOOTER,
-
+
# disable font inclusion
'fontpkg': '',
'fontenc': '',
-
+
# disable fancychp
'fncychap': '',
-
+
# get rid of the sphinx wrapper class file
'wrapperclass': 'puthesis',
-
+
# override maketitle
'maketitle': '\makefrontmatter',
'tableofcontents': '',
-
+
# disable index printing
'printindex': '',
}
@@ -241,7 +239,7 @@
]
latex_docclass = {
- 'manual': 'puthesis',
+ 'manual': '',
}
latex_additional_files = [
@@ -253,24 +251,25 @@
'tex/refstyle.bst',
'refs.bib',
'tex/ccicons.sty',
+ 'img/Kopfzeile_neu.png'
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
-#latex_logo = None
+# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
latex_use_parts = False
# If true, show page references after internal links.
-#latex_show_pagerefs = False
+# latex_show_pagerefs = False
# If true, show URL addresses after external links.
-#latex_show_urls = False
+# latex_show_urls = False
# Documents to append as an appendix to all manuals.
-#latex_appendices = []
+# latex_appendices = []
# If false, no module index is generated.
latex_domain_indices = False
diff --git a/extensions/__init__.py b/extensions/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/extensions/backports.zip b/extensions/backports.zip
new file mode 100644
index 0000000..9bd6685
Binary files /dev/null and b/extensions/backports.zip differ
diff --git a/extensions/latex_mods.py b/extensions/latex_mods.py
index 391dd99..9dc4e0c 100644
--- a/extensions/latex_mods.py
+++ b/extensions/latex_mods.py
@@ -1,17 +1,16 @@
# -*- coding: utf-8 -*-
import os
-from docutils.io import FileOutput
-from docutils.frontend import OptionParser
-from docutils import nodes
-
import sphinx.builders.latex
-from sphinx.util.smartypants import educate_quotes_latex
-from sphinx.writers.latex import LaTeXWriter
+import sphinx.writers.latex
+from docutils import nodes
+from docutils.frontend import OptionParser
+from docutils.io import FileOutput
from sphinx.util.console import bold
from sphinx.util.osutil import copyfile
+from sphinx.util.smartypants import educate_quotes_latex
from sphinx.util.texescape import tex_escape_map
-import sphinx.writers.latex
+from sphinx.writers.latex import LaTeXWriter
# remove usepackage for sphinx here, we add it later in the preamble in conf.py
sphinx.writers.latex.HEADER = sphinx.writers.latex.HEADER.replace('\usepackage{sphinx}', '')
@@ -23,6 +22,9 @@ class DocTranslator(BaseTranslator):
def __init__(self, *args, **kwargs):
BaseTranslator.__init__(self, *args, **kwargs)
self.verbatim = None
+ self.previous_spanning_row = 0
+ self.previous_spanning_column = 0
+
def visit_caption(self, node):
caption_idx = node.parent.index(node)
if caption_idx > 0:
@@ -204,7 +206,7 @@ def write(self, *ignored):
sphinx.writers.latex.BEGIN_DOC = ''
# output these as include files
- for docname in ['abstract', 'dedication', 'acknowledgements']:
+ for docname in ['abstract', 'dedication', 'Abverz']:
destination = FileOutput(
destination_path=os.path.join(self.outdir, '%s.inc' % docname),
encoding='utf-8')
diff --git a/extensions/natbib/__init__.py b/extensions/natbib/__init__.py
index 11601ce..78b7fa1 100644
--- a/extensions/natbib/__init__.py
+++ b/extensions/natbib/__init__.py
@@ -1,23 +1,23 @@
+import collections
+import os
+import re
+
+import pybtex.backends.plaintext
+import pybtex.style.names.lastfirst
+import pybtex.style.names.plain
from docutils import nodes, transforms
from docutils.parsers.rst import directives
-
+from oldPy import OrderedSet
+from pybtex.database.input import bibtex
from sphinx import addnodes
from sphinx.domains import Domain, ObjType
from sphinx.locale import l_, _
from sphinx.roles import XRefRole
from sphinx.util.compat import Directive
-from pybtex.database.input import bibtex
-import pybtex.style.names.plain
-import pybtex.style.names.lastfirst
-import pybtex.backends.plaintext
-
-import collections
import latex_codec
-import os
-import re
-from backports import OrderedSet
+#from backports import OrderedSet
# fix pybtex bug in some versions
try:
diff --git a/extensions/natbib/latex_codec.py b/extensions/natbib/latex_codec.py
index 571b47c..5537905 100644
--- a/extensions/natbib/latex_codec.py
+++ b/extensions/natbib/latex_codec.py
@@ -18,9 +18,18 @@
"""
from __future__ import generators
+
import codecs
import re
-from backports import Set
+
+import oldPy
+
+try:
+ from sets import Set
+except ImportError:
+ Set = set
+
+#from backports import Set
def register():
"""Enable encodings of the form 'latex+x' where x describes another encoding.
diff --git a/extensions/numfig.py b/extensions/numfig.py
index 5a6d990..02d15d6 100644
--- a/extensions/numfig.py
+++ b/extensions/numfig.py
@@ -1,174 +1,160 @@
+##
+## @file numfig.py
+##
+## @brief For numbering figures in Sphinx
+##
+## @version $Id$
+##
+## Started from https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home
+##
+## Copyright © 2005-2012, Tech-X Corporation, Boulder, CO
+## Free for any use whatsoever.
+##
+
from docutils import nodes
+from docutils.nodes \
+ import figure, caption, Text, reference, raw, SkipNode
from sphinx.roles import XRefRole
+
import figtable
import subfig
-from backports import OrderedDict, OrderedSet
-
-# Element classes
-class page_ref(nodes.reference):
- pass
-class num_ref(nodes.reference):
- pass
+#
+# Element classes
+#
+class page_ref(reference):
+ pass
+class num_ref(reference):
+ pass
+#
# Visit/depart functions
-
+#
+# Why is SkipNode raised?
+#
def skip_page_ref(self, node):
- raise nodes.SkipNode
+ raise SkipNode
-def latex_visit_page_ref(self, node):
- self.body.append("\\pageref{%s:%s}" % (node['refdoc'], node['reftarget']))
- raise nodes.SkipNode
+def skip_num_ref(self, node):
+ raise SkipNode
-def latex_visit_num_ref(self, node):
+def latex_visit_page_ref(self, node):
fields = node['reftarget'].split('#')
-
+
if len(fields) > 1:
label, target = fields
else:
label = None
target = fields[0]
-
+
if target not in self.builder.env.docnames_by_figname:
raise nodes.SkipNode
targetdoc = self.builder.env.docnames_by_figname[target]
-
+
ref_link = '%s:%s' % (targetdoc, target)
-
- if label is None:
- latex = '\\ref{%s}' % ref_link
- else:
- latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link)
-
- self.body.append(latex)
+ self.body.append("\\pageref{%s}" % ref_link)
raise nodes.SkipNode
-
-def doctree_read(app, doctree):
- # first generate figure numbers for each figure
- env = app.builder.env
-
- docname_figs = getattr(env, 'docname_figs', {})
- docnames_by_figname = getattr(env, 'docnames_by_figname', {})
-
- for figure_info in doctree.traverse(lambda n: isinstance(n, nodes.figure) or \
- isinstance(n, subfig.subfigend) or \
- isinstance(n, figtable.figtable)):
-
- for id in figure_info['ids']:
- docnames_by_figname[id] = env.docname
-
- fig_docname = docnames_by_figname[id]
- if fig_docname not in docname_figs:
- docname_figs[fig_docname] = OrderedDict()
-
- if isinstance(figure_info.parent, subfig.subfig):
- mainid = figure_info.parent['mainfigid']
- else:
- mainid = id
-
- if mainid not in docname_figs[fig_docname]:
- docname_figs[fig_docname][mainid] = OrderedSet()
-
- if isinstance(figure_info.parent, subfig.subfig):
- docname_figs[fig_docname][mainid].add(id)
-
- env.docnames_by_figname = docnames_by_figname
- env.docname_figs = docname_figs
-
-def doctree_resolved(app, doctree, docname):
- # replace numfig nodes with links
- if app.builder.name in ('html', 'singlehtml', 'epub'):
- env = app.builder.env
-
- docname_figs = getattr(env, 'docname_figs', {})
- docnames_by_figname = env.docnames_by_figname
-
- figids = getattr(env, 'figids', {})
-
- secnums = []
- fignames_by_secnum = {}
- for figdocname, figurelist in env.docname_figs.iteritems():
- if figdocname not in env.toc_secnumbers:
- continue
- secnum = env.toc_secnumbers[figdocname]['']
- secnums.append(secnum)
- fignames_by_secnum[secnum] = figurelist
-
- last_secnum = 0
- secnums = sorted(secnums)
- figid = 1
- for secnum in secnums:
- if secnum[0] != last_secnum:
- figid = 1
- for figname, subfigs in fignames_by_secnum[secnum].iteritems():
- figids[figname] = str(secnum[0]) + '.' + str(figid)
- for i, subfigname in enumerate(subfigs):
- subfigid = figids[figname] + chr(ord('a') + i)
- figids[subfigname] = subfigid
- figid += 1
- last_secnum = secnum[0]
-
- env.figids = figids
-
- for figure_info in doctree.traverse(lambda n: isinstance(n, nodes.figure) or \
+def latex_visit_num_ref(self, node):
+ fields = node['reftarget'].split('#')
+ if len(fields) > 1:
+ label, target = fields
+ ref_link = '%s:%s' % (node['refdoc'], target)
+ latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link)
+ self.body.append(latex)
+ else:
+ self.body.append('\\ref{%s:%s}' % (node['refdoc'], fields[0]))
+ raise SkipNode
+
+def latex_depart_num_ref(self, node):
+ pass
+
+def html_visit_num_ref(self, node):
+ fields = node['reftarget'].split('#')
+ if len(fields) > 1:
+ label, target = fields
+ target_file = ''
+ if node['refdoc']==target_file:
+# Target file and curent file are the same
+ link = "%s.html#%s" %(node['refdoc'], target.lower())
+ else:
+ link = "%s.html#%s" %(target_file, target.lower())
+ html = '%s' %(link, label)
+ self.body.append(html)
+ else:
+ self.body.append('%s' % (node['refdoc'], fields[0]))
+
+def html_depart_num_ref(self, node):
+ pass
+
+def compute_numfig_fignums(app, doctree):
+# Generate figure numbers for each figure
+ env = app.builder.env
+ i = getattr(env, 'i', 1)
+ figids = getattr(env, 'figids', {})
+ figid_docname_map = getattr(env, 'figid_docname_map', {})
+ for figure_info in doctree.traverse(lambda n: isinstance(n, figure) or \
isinstance(n, subfig.subfigend) or \
isinstance(n, figtable.figtable)):
- id = figure_info['ids'][0]
- fignum = figids[id]
- for cap in figure_info.traverse(nodes.caption):
- cap.insert(1, nodes.Text(" %s" % cap[0]))
- if fignum[-1] in map(str, range(10)):
- boldcaption = "%s %s:" % (app.config.figure_caption_prefix, fignum)
- else:
- boldcaption = "(%s)" % fignum[-1]
- cap[0] = nodes.strong('', boldcaption)
-
- for ref_info in doctree.traverse(num_ref):
- if '#' in ref_info['reftarget']:
- label, target = ref_info['reftarget'].split('#')
- labelfmt = label + " %s"
- else:
- labelfmt = '%s'
- target = ref_info['reftarget']
-
- if target not in docnames_by_figname:
- app.warn('Target figure not found: %s' % target)
- link = "#%s" % target
- linktext = target
- else:
- target_doc = docnames_by_figname[target]
-
- if app.builder.name == 'singlehtml':
- link = "#%s" % target
- else:
- link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc),
- target)
-
- linktext = labelfmt % figids[target]
-
- html = '%s' % (link, linktext)
- ref_info.replace_self(nodes.raw(html, html, format='html'))
+ if app.builder.name != 'latex' and app.config.numfig_number_figures:
+ for cap in figure_info.traverse(caption):
+ cap[0] = nodes.strong('',Text("%s %d: %s" % \
+ (app.config.numfig_figure_caption_prefix, i, cap[0])))
+ for id in figure_info['ids']:
+ figids[id] = i
+ figid_docname_map[id] = env.docname
+ i += 1
+ env.figid_docname_map = figid_docname_map
+ env.i = i
+ env.figids = figids
+
+def insert_numfig_links(app, doctree, docname):
+# Replace numfig nodes with links
+ figids = app.builder.env.figids
+ if app.builder.name != 'latex':
+ for ref_info in doctree.traverse(num_ref):
+
+ if '#' in ref_info['reftarget']:
+ label, target = ref_info['reftarget'].split('#')
+ labelfmt = label + " %d"
+ else:
+ labelfmt = '%d'
+ target = ref_info['reftarget']
+
+ if target not in figids:
+ continue
+
+ if app.builder.name == 'html':
+ target_doc = app.builder.env.figid_docname_map[target]
+ link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc),
+ target)
+ html = '%s' % (link, labelfmt %(figids[target]))
+ ref_info.replace_self(raw(html, html, format='html'))
+ else:
+ ref_info.replace_self(Text(labelfmt % (figids[target])))
def setup(app):
- app.add_config_value('number_figures', True, True)
- app.add_config_value('figure_caption_prefix', "Figure", True)
- app.add_node(page_ref,
- text=(skip_page_ref, None),
- html=(skip_page_ref, None),
- singlehtml=(skip_page_ref, None),
- latex=(latex_visit_page_ref, None))
+# Are these used?
+ app.add_config_value('numfig_number_figures', True, True)
+ app.add_config_value('numfig_figure_caption_prefix', "Figure", True)
+
+ app.add_node(page_ref,
+ text=(skip_page_ref, None),
+ html=(skip_page_ref, None),
+ latex=(latex_visit_page_ref, None))
+
+ app.add_role('page', XRefRole(nodeclass=page_ref))
- app.add_role('page', XRefRole(nodeclass=page_ref))
+ app.add_node(num_ref,
+ text=(skip_num_ref, None),
+ html=(html_visit_num_ref, html_depart_num_ref),
+ latex=(latex_visit_num_ref, latex_depart_num_ref))
- app.add_node(num_ref,
- latex=(latex_visit_num_ref, None),
- text=(skip_page_ref, None))
+ app.add_role('num', XRefRole(nodeclass=num_ref))
- app.add_role('num', XRefRole(nodeclass=num_ref))
+ app.connect('doctree-read', compute_numfig_fignums)
+ app.connect('doctree-resolved', insert_numfig_links)
- app.connect('doctree-read', doctree_read)
- app.connect('doctree-resolved', doctree_resolved)
diff --git a/extensions/numfig_old.py b/extensions/numfig_old.py
new file mode 100644
index 0000000..4d16d46
--- /dev/null
+++ b/extensions/numfig_old.py
@@ -0,0 +1,186 @@
+from docutils import nodes
+from sphinx.roles import XRefRole
+
+import figtable
+import subfig
+from port_dicts import OrderedDict, OrderedSet
+
+
+# Element classes
+
+class page_ref(nodes.reference):
+ pass
+
+class num_ref(nodes.reference):
+ pass
+
+
+# Visit/depart functions
+
+def skip_page_ref(self, node):
+ raise nodes.SkipNode
+
+def latex_visit_page_ref(self, node):
+ self.body.append("\\pageref{%s:%s}" % (node['refdoc'], node['reftarget']))
+ raise nodes.SkipNode
+
+def latex_visit_num_ref(self, node):
+ fields = node['reftarget'].split('#')
+
+ if len(fields) > 1:
+ label, target = fields
+ else:
+ label = None
+ target = fields[0]
+
+ if target not in self.builder.env.docnames_by_figname:
+ raise nodes.SkipNode
+ targetdoc = self.builder.env.docnames_by_figname[target]
+
+ ref_link = '%s:%s' % (targetdoc, target)
+
+ if label is None:
+ latex = '\\ref{%s}' % ref_link
+ else:
+ latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link)
+
+ self.body.append(latex)
+ raise nodes.SkipNode
+
+
+def doctree_read(app, doctree):
+ # first generate figure numbers for each figure
+ env = app.builder.env
+
+ docname_figs = getattr(env, 'docname_figs', {})
+ docnames_by_figname = getattr(env, 'docnames_by_figname', {})
+
+ for figure_info in doctree.traverse(lambda n: isinstance(n, nodes.figure) or \
+ isinstance(n, subfig.subfigend) or \
+ isinstance(n, figtable.figtable)):
+
+ for id in figure_info['ids']:
+ docnames_by_figname[id] = env.docname
+ fig_docname = docnames_by_figname[id]
+ if fig_docname not in docname_figs:
+ docname_figs[fig_docname] = OrderedDict()
+
+ if isinstance(figure_info.parent, subfig.subfig):
+ mainid = figure_info.parent['mainfigid']
+ else:
+ mainid = id
+
+ if mainid not in docname_figs[fig_docname]:
+ docname_figs[fig_docname][mainid] = OrderedSet()
+
+ if isinstance(figure_info.parent, subfig.subfig):
+ docname_figs[fig_docname][mainid].add(id)
+
+ env.docnames_by_figname = docnames_by_figname
+ env.docname_figs = docname_figs
+
+def doctree_resolved(app, doctree, docname):
+ # replace numfig nodes with links
+ if app.builder.name in ('html', 'singlehtml', 'epub'):
+ env = app.builder.env
+
+ docname_figs = getattr(env, 'docname_figs', {})
+ docnames_by_figname = env.docnames_by_figname
+
+ figids = getattr(env, 'figids', {})
+
+ secnums = []
+ fignames_by_secnum = {}
+ for figdocname, figurelist in env.docname_figs.iteritems():
+ if figdocname not in env.toc_secnumbers:
+ continue
+ secnum = env.toc_secnumbers[figdocname]['']
+ secnums.append(secnum)
+ #d['test2'] = d.pop('test')
+ newkeys= ['id1','id2','id3','id4','id5']
+ for nkey in newkeys:
+ dummy = 'C'+str(secnum[0])+nkey
+ if nkey in figurelist.keys():
+ print dummy
+ figurelist[dummy] = figurelist.pop(nkey)
+ #print figurelist.keys(),secnum
+ fignames_by_secnum[secnum] = figurelist
+ #print figurelist,secnum
+
+ last_secnum = 0
+ secnums = sorted(secnums)
+ figid = 1
+ for secnum in secnums:
+ if secnum[0] != last_secnum:
+ figid = 1
+ for figname, subfigs in fignames_by_secnum[secnum].iteritems():
+ figids[figname] = str(secnum[0]) + '.' + str(figid)
+ #print figids[figname],figname
+ for i, subfigname in enumerate(subfigs):
+ subfigid = figids[figname] + chr(ord('a') + i)
+ figids[subfigname] = subfigid
+ figid += 1
+ last_secnum = secnum[0]
+
+ env.figids = figids
+
+ for figure_info in doctree.traverse(lambda n: isinstance(n, nodes.figure) or \
+ isinstance(n, subfig.subfigend) or \
+ isinstance(n, figtable.figtable)):
+ #figure_info['ids']
+ id = figure_info['ids'][0]
+ fignum = figids[id]
+ for cap in figure_info.traverse(nodes.caption):
+ cap.insert(1, nodes.Text(" %s" % cap[0]))
+ if fignum[-1] in map(str, range(10)):
+ boldcaption = "%s %s:" % (app.config.figure_caption_prefix, fignum)
+ else:
+ boldcaption = "(%s)" % fignum[-1]
+ cap[0] = nodes.strong('', boldcaption)
+
+ for ref_info in doctree.traverse(num_ref):
+ if '#' in ref_info['reftarget']:
+ label, target = ref_info['reftarget'].split('#')
+ labelfmt = label + " %s"
+ else:
+ labelfmt = '%s'
+ target = ref_info['reftarget']
+
+ if target not in docnames_by_figname:
+ app.warn('Target figure not found: %s' % target)
+ link = "#%s" % target
+ linktext = target
+ else:
+ target_doc = docnames_by_figname[target]
+
+ if app.builder.name == 'singlehtml':
+ link = "#%s" % target
+ else:
+ link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc),
+ target)
+
+ linktext = labelfmt % figids[target]
+
+ html = '%s' % (link, linktext)
+ ref_info.replace_self(nodes.raw(html, html, format='html'))
+
+def setup(app):
+ app.add_config_value('number_figures', True, True)
+ app.add_config_value('figure_caption_prefix', "Figure", True)
+
+ app.add_node(page_ref,
+ text=(skip_page_ref, None),
+ html=(skip_page_ref, None),
+ singlehtml=(skip_page_ref, None),
+ latex=(latex_visit_page_ref, None))
+
+ app.add_role('page', XRefRole(nodeclass=page_ref))
+
+ app.add_node(num_ref,
+ latex=(latex_visit_num_ref, None),
+ text=(skip_page_ref, None))
+
+ app.add_role('num', XRefRole(nodeclass=num_ref))
+
+ app.connect('doctree-read', doctree_read)
+ app.connect('doctree-resolved', doctree_resolved)
diff --git a/extensions/numimg.py b/extensions/numimg.py
new file mode 100644
index 0000000..f7292fb
--- /dev/null
+++ b/extensions/numimg.py
@@ -0,0 +1,140 @@
+##
+## @file numimg.py
+##
+## @brief For numbering images in Sphinx
+##
+## @version $Id$
+##
+## Started from https://bitbucket.org/arjones6/sphinx-numimg/wiki/Home
+##
+## Copyright © 2005-2012, Tech-X Corporation, Boulder, CO
+## Free for any use whatsoever.
+##
+
+from docutils.nodes \
+ import image, caption, Text, reference, raw, SkipNode
+from sphinx.roles import XRefRole
+
+#
+# Element classes
+#
+class page_ref(reference):
+ pass
+
+class num_ref(reference):
+ pass
+
+#
+# Visit/depart functions
+#
+# Why is SkipNode raised?
+#
+def skip_page_ref(self, node):
+ raise SkipNode
+
+def skip_num_ref(self, node):
+ raise SkipNode
+
+def latex_visit_page_ref(self, node):
+ self.body.append("\\pageref{%s:%s}" % (node['refdoc'], node['reftarget']))
+ raise SkipNode
+
+def latex_visit_num_ref(self, node):
+ fields = node['reftarget'].split('#')
+ if len(fields) > 1:
+ label, target = fields
+ ref_link = '%s:%s' % (node['refdoc'], target)
+ latex = "\\hyperref[%s]{%s \\ref*{%s}}" % (ref_link, label, ref_link)
+ self.body.append(latex)
+ else:
+ self.body.append('\\ref{%s:%s}' % (node['refdoc'], fields[0]))
+ raise SkipNode
+
+def latex_depart_num_ref(self, node):
+ pass
+
+def html_visit_num_ref(self, node):
+ fields = node['reftarget'].split('#')
+ if len(fields) > 1:
+ label, target = fields
+ target_file = ''
+ if node['refdoc']==target_file:
+# Target file and curent file are the same
+ link = "%s.html#%s" %(node['refdoc'], target.lower())
+ else:
+ link = "%s.html#%s" %(target_file, target.lower())
+ html = '%s' %(link, label)
+ self.body.append(html)
+ else:
+ self.body.append('%s' % (node['refdoc'], fields[0]))
+
+def html_depart_num_ref(self, node):
+ pass
+
+def compute_numimg_imgnums(app, doctree):
+# Generate image numbers for each image
+ env = app.builder.env
+ i = getattr(env, 'i', 1)
+ numids = getattr(env, 'numids', {})
+ numid_docname_map = getattr(env, 'numid_docname_map', {})
+ for image_info in doctree.traverse(image):
+ if app.builder.name != 'latex' and app.config.numimg_number_images:
+ for cap in image_info.traverse(caption):
+ cap[0] = Text("%s %d: %s" % \
+ (app.config.numimg_image_caption_prefix, i, cap[0]))
+ for id in image_info['ids']:
+ numids[id] = i
+ numid_docname_map[id] = env.docname
+ i += 1
+ env.numid_docname_map = numid_docname_map
+ env.i = i
+ env.numids = numids
+
+def insert_numimg_links(app, doctree, docname):
+# Replace numimg nodes with links
+ numids = app.builder.env.numids
+ if app.builder.name != 'latex':
+ for ref_info in doctree.traverse(num_ref):
+
+ if '#' in ref_info['reftarget']:
+ label, target = ref_info['reftarget'].split('#')
+ labelfmt = label + " %d"
+ else:
+ labelfmt = '%d'
+ target = ref_info['reftarget']
+
+ if target not in numids:
+ continue
+
+ if app.builder.name == 'html':
+ target_doc = app.builder.env.numid_docname_map[target]
+ link = "%s#%s" % (app.builder.get_relative_uri(docname, target_doc),
+ target)
+ html = '%s' % (link, labelfmt %(numids[target]))
+ ref_info.replace_self(raw(html, html, format='html'))
+ else:
+ ref_info.replace_self(Text(labelfmt % (numids[target])))
+
+def setup(app):
+
+# Are these used?
+ app.add_config_value('numimg_number_images', True, True)
+ app.add_config_value('numimg_image_caption_prefix', "Image", True)
+
+ app.add_node(page_ref,
+ text=(skip_page_ref, None),
+ html=(skip_page_ref, None),
+ latex=(latex_visit_page_ref, None))
+
+ app.add_role('page', XRefRole(nodeclass=page_ref))
+
+ app.add_node(num_ref,
+ text=(skip_num_ref, None),
+ html=(html_visit_num_ref, html_depart_num_ref),
+ latex=(latex_visit_num_ref, latex_depart_num_ref))
+
+ app.add_role('num', XRefRole(nodeclass=num_ref))
+
+ app.connect('doctree-read', compute_numimg_imgnums)
+ app.connect('doctree-resolved', insert_numimg_links)
+
diff --git a/extensions/oldPy.py b/extensions/oldPy.py
new file mode 100644
index 0000000..5fa6d2f
--- /dev/null
+++ b/extensions/oldPy.py
@@ -0,0 +1,69 @@
+__author__ = 'rened'
+
+import collections
+
+class OrderedSet(collections.MutableSet):
+
+ def __init__(self, iterable=None):
+ self.end = end = []
+ end += [None, end, end] # sentinel node for doubly linked list
+ self.map = {} # key --> [key, prev, next]
+ if iterable is not None:
+ self |= iterable
+
+ def __len__(self):
+ return len(self.map)
+
+ def __contains__(self, key):
+ return key in self.map
+
+ def add(self, key):
+ if key not in self.map:
+ end = self.end
+ curr = end[1]
+ curr[2] = end[1] = self.map[key] = [key, curr, end]
+
+ def discard(self, key):
+ if key in self.map:
+ key, prev, next = self.map.pop(key)
+ prev[2] = next
+ next[1] = prev
+
+ def __iter__(self):
+ end = self.end
+ curr = end[2]
+ while curr is not end:
+ yield curr[0]
+ curr = curr[2]
+
+ def __reversed__(self):
+ end = self.end
+ curr = end[1]
+ while curr is not end:
+ yield curr[0]
+ curr = curr[1]
+
+ def pop(self, last=True):
+ if not self:
+ raise KeyError('set is empty')
+ key = self.end[1][0] if last else self.end[2][0]
+ self.discard(key)
+ return key
+
+ def __repr__(self):
+ if not self:
+ return '%s()' % (self.__class__.__name__,)
+ return '%s(%r)' % (self.__class__.__name__, list(self))
+
+ def __eq__(self, other):
+ if isinstance(other, OrderedSet):
+ return len(self) == len(other) and list(self) == list(other)
+ return set(self) == set(other)
+
+
+if __name__ == '__main__':
+ s = OrderedSet('abracadaba')
+ t = OrderedSet('simsalabim')
+ print(s | t)
+ print(s & t)
+ print(s - t)
diff --git a/extensions/port_dicts.py b/extensions/port_dicts.py
new file mode 100644
index 0000000..48ff53e
--- /dev/null
+++ b/extensions/port_dicts.py
@@ -0,0 +1,316 @@
+import collections
+
+Set = set
+
+try:
+ from collections import OrderedDict
+except ImportError:
+ class OrderedDict(dict):
+ 'Dictionary that remembers insertion order'
+ # An inherited dict maps keys to values.
+ # The inherited dict provides __getitem__, __len__, __contains__, and get.
+ # The remaining methods are order-aware.
+ # Big-O running times for all methods are the same as for regular dictionaries.
+
+ # The internal self.__map dictionary maps keys to links in a doubly linked list.
+ # The circular doubly linked list starts and ends with a sentinel element.
+ # The sentinel element never gets deleted (this simplifies the algorithm).
+ # Each link is stored as a list of length three: [PREV, NEXT, KEY].
+
+ def __init__(self, *args, **kwds):
+ '''Initialize an ordered dictionary. Signature is the same as for
+ regular dictionaries, but keyword arguments are not recommended
+ because their insertion order is arbitrary.
+
+ '''
+ if len(args) > 1:
+ raise TypeError('expected at most 1 arguments, got %d' % len(args))
+ try:
+ self.__root
+ except AttributeError:
+ self.__root = root = [] # sentinel node
+ root[:] = [root, root, None]
+ self.__map = {}
+ self.__update(*args, **kwds)
+
+ def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
+ 'od.__setitem__(i, y) <==> od[i]=y'
+ # Setting a new item creates a new link which goes at the end of the linked
+ # list, and the inherited dictionary is updated with the new key/value pair.
+ if key not in self:
+ root = self.__root
+ last = root[0]
+ last[1] = root[0] = self.__map[key] = [last, root, key]
+ dict_setitem(self, key, value)
+
+ def __delitem__(self, key, dict_delitem=dict.__delitem__):
+ 'od.__delitem__(y) <==> del od[y]'
+ # Deleting an existing item uses self.__map to find the link which is
+ # then removed by updating the links in the predecessor and successor nodes.
+ dict_delitem(self, key)
+ link_prev, link_next, key = self.__map.pop(key)
+ link_prev[1] = link_next
+ link_next[0] = link_prev
+
+ def __iter__(self):
+ 'od.__iter__() <==> iter(od)'
+ root = self.__root
+ curr = root[1]
+ while curr is not root:
+ yield curr[2]
+ curr = curr[1]
+
+ def __reversed__(self):
+ 'od.__reversed__() <==> reversed(od)'
+ root = self.__root
+ curr = root[0]
+ while curr is not root:
+ yield curr[2]
+ curr = curr[0]
+
+ def clear(self):
+ 'od.clear() -> None. Remove all items from od.'
+ try:
+ for node in self.__map.itervalues():
+ del node[:]
+ root = self.__root
+ root[:] = [root, root, None]
+ self.__map.clear()
+ except AttributeError:
+ pass
+ dict.clear(self)
+
+ def popitem(self, last=True):
+ '''od.popitem() -> (k, v), return and remove a (key, value) pair.
+ Pairs are returned in LIFO order if last is true or FIFO order if false.
+
+ '''
+ if not self:
+ raise KeyError('dictionary is empty')
+ root = self.__root
+ if last:
+ link = root[0]
+ link_prev = link[0]
+ link_prev[1] = root
+ root[0] = link_prev
+ else:
+ link = root[1]
+ link_next = link[1]
+ root[1] = link_next
+ link_next[0] = root
+ key = link[2]
+ del self.__map[key]
+ value = dict.pop(self, key)
+ return key, value
+
+ # -- the following methods do not depend on the internal structure --
+
+ def keys(self):
+ 'od.keys() -> list of keys in od'
+ return list(self)
+
+ def values(self):
+ 'od.values() -> list of values in od'
+ return [self[key] for key in self]
+
+ def items(self):
+ 'od.items() -> list of (key, value) pairs in od'
+ return [(key, self[key]) for key in self]
+
+ def iterkeys(self):
+ 'od.iterkeys() -> an iterator over the keys in od'
+ return iter(self)
+
+ def itervalues(self):
+ 'od.itervalues -> an iterator over the values in od'
+ for k in self:
+ yield self[k]
+
+ def iteritems(self):
+ 'od.iteritems -> an iterator over the (key, value) items in od'
+ for k in self:
+ yield (k, self[k])
+
+ def update(*args, **kwds):
+ '''od.update(E, **F) -> None. Update od from dict/iterable E and F.
+
+ If E is a dict instance, does: for k in E: od[k] = E[k]
+ If E has a .keys() method, does: for k in E.keys(): od[k] = E[k]
+ Or if E is an iterable of items, does: for k, v in E: od[k] = v
+ In either case, this is followed by: for k, v in F.items(): od[k] = v
+
+ '''
+ if len(args) > 2:
+ raise TypeError('update() takes at most 2 positional '
+ 'arguments (%d given)' % (len(args),))
+ elif not args:
+ raise TypeError('update() takes at least 1 argument (0 given)')
+ self = args[0]
+ # Make progressively weaker assumptions about "other"
+ other = ()
+ if len(args) == 2:
+ other = args[1]
+ if isinstance(other, dict):
+ for key in other:
+ self[key] = other[key]
+ elif hasattr(other, 'keys'):
+ for key in other.keys():
+ self[key] = other[key]
+ else:
+ for key, value in other:
+ self[key] = value
+ for key, value in kwds.items():
+ self[key] = value
+
+ __update = update # let subclasses override update without breaking __init__
+
+ __marker = object()
+
+ def pop(self, key, default=__marker):
+ '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+ If key is not found, d is returned if given, otherwise KeyError is raised.
+
+ '''
+ if key in self:
+ result = self[key]
+ del self[key]
+ return result
+ if default is self.__marker:
+ raise KeyError(key)
+ return default
+
+ def setdefault(self, key, default=None):
+ 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
+ if key in self:
+ return self[key]
+ self[key] = default
+ return default
+
+ def __repr__(self, _repr_running={}):
+ 'od.__repr__() <==> repr(od)'
+ call_key = id(self), _get_ident()
+ if call_key in _repr_running:
+ return '...'
+ _repr_running[call_key] = 1
+ try:
+ if not self:
+ return '%s()' % (self.__class__.__name__,)
+ return '%s(%r)' % (self.__class__.__name__, self.items())
+ finally:
+ del _repr_running[call_key]
+
+ def __reduce__(self):
+ 'Return state information for pickling'
+ items = [[k, self[k]] for k in self]
+ inst_dict = vars(self).copy()
+ for k in vars(OrderedDict()):
+ inst_dict.pop(k, None)
+ if inst_dict:
+ return (self.__class__, (items,), inst_dict)
+ return self.__class__, (items,)
+
+ def copy(self):
+ 'od.copy() -> a shallow copy of od'
+ return self.__class__(self)
+
+ @classmethod
+ def fromkeys(cls, iterable, value=None):
+ '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
+ and values equal to v (which defaults to None).
+
+ '''
+ d = cls()
+ for key in iterable:
+ d[key] = value
+ return d
+
+ def __eq__(self, other):
+ '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
+ while comparison to a regular mapping is order-insensitive.
+
+ '''
+ if isinstance(other, OrderedDict):
+ return len(self)==len(other) and self.items() == other.items()
+ return dict.__eq__(self, other)
+
+ def __ne__(self, other):
+ return not self == other
+
+ # -- the following methods are only used in Python 2.7 --
+
+ def viewkeys(self):
+ "od.viewkeys() -> a set-like object providing a view on od's keys"
+ return KeysView(self)
+
+ def viewvalues(self):
+ "od.viewvalues() -> an object providing a view on od's values"
+ return ValuesView(self)
+
+ def viewitems(self):
+ "od.viewitems() -> a set-like object providing a view on od's items"
+ return ItemsView(self)
+
+KEY, PREV, NEXT = range(3)
+
+class OrderedSet(collections.MutableSet):
+ """
+ From: http://code.activestate.com/recipes/576694/
+ """
+ def __init__(self, iterable=None):
+ self.end = end = []
+ end += [None, end, end] # sentinel node for doubly linked list
+ self.map = {} # key --> [key, prev, next]
+ if iterable is not None:
+ self |= iterable
+
+ def __len__(self):
+ return len(self.map)
+
+ def __contains__(self, key):
+ return key in self.map
+
+ def add(self, key):
+ if key not in self.map:
+ end = self.end
+ curr = end[PREV]
+ curr[NEXT] = end[PREV] = self.map[key] = [key, curr, end]
+
+ def discard(self, key):
+ if key in self.map:
+ key, prev, next = self.map.pop(key)
+ prev[NEXT] = next
+ next[PREV] = prev
+
+ def __iter__(self):
+ end = self.end
+ curr = end[NEXT]
+ while curr is not end:
+ yield curr[KEY]
+ curr = curr[NEXT]
+
+ def __reversed__(self):
+ end = self.end
+ curr = end[PREV]
+ while curr is not end:
+ yield curr[KEY]
+ curr = curr[PREV]
+
+ def pop(self, last=True):
+ if not self:
+ raise KeyError('set is empty')
+ key = next(reversed(self)) if last else next(iter(self))
+ self.discard(key)
+ return key
+
+ def __repr__(self):
+ if not self:
+ return '%s()' % (self.__class__.__name__,)
+ return '%s(%r)' % (self.__class__.__name__, list(self))
+
+ def __eq__(self, other):
+ if isinstance(other, OrderedSet):
+ return len(self) == len(other) and list(self) == list(other)
+ return set(self) == set(other)
+
+ def __del__(self):
+ self.clear() # remove circular references
diff --git a/img/Kopfzeile_neu.png b/img/Kopfzeile_neu.png
new file mode 100644
index 0000000..822491e
Binary files /dev/null and b/img/Kopfzeile_neu.png differ
diff --git a/tex/preamble._tex b/tex/preamble._tex
index 85a43e7..97507a7 100644
--- a/tex/preamble._tex
+++ b/tex/preamble._tex
@@ -1,7 +1,8 @@
-\submitted{November 2012}
-\copyrightyear{2012}
-\adviser{Professor John P. Smith}
-\department{Computer Science}
+\submitted{Dezember 2016}
+\copyrightyear{2016}
+\adviser{M. Gosewinkel}
+
+\department{Technisches Labor der Inburex GmbH}
\newcommand{\proquestmode}{}
@@ -10,7 +11,7 @@
}
\acknowledgements{
-\input{acknowledgements.inc}
+\input{Abverz.inc}
}
\dedication{
diff --git a/tex/puthesis.cls b/tex/puthesis.cls
old mode 100755
new mode 100644
index c5e0f50..8c6d340
--- a/tex/puthesis.cls
+++ b/tex/puthesis.cls
@@ -1,9 +1,17 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{puthesis}
- [2008/05/02 v1.4 Princeton University Thesis class]
+ [2015/11/02 v1.4 Inburex Phitec Report class]
\RequirePackage{setspace}
\RequirePackage{ccicons}
\RequirePackage{ifthen}
+\RequirePackage{float}
+\RequirePackage{fancyhdr}
+\usepackage{lastpage}
+\usepackage{etoolbox}
+\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}
+%%%
+\usepackage[scaled]{helvet}
+\renewcommand*{\familydefault}{\sfdefault}
\newcounter{subyear}
\setcounter{subyear}{\number\year}
\def\submitted#1{\gdef\@submitted{#1}}
@@ -16,7 +24,7 @@
\def\adviser#1{\gdef\@adviser{#1}}
\long\def\@abstract{\@latex@error{No \noexpand\abstract given}\@ehc}
\newcommand*{\frontmatter}{
- \pagenumbering{roman}
+ %%%\pagenumbering{roman}
}
\newcommand*{\mainmatter}{\pagenumbering{arabic}}
\newcommand*{\makelot}{}
@@ -52,80 +60,66 @@
%% However, that is not compatible with package 'hyperref'. \tableofcontents needs
%% to be declared from within the document itself.
\newcommand*{\makefrontmatter}{
+\pagestyle{fancy}
+%%% Kopf und Fusszeilen
+\fancyhead[R]{ }
+\fancyhead[L]{ }
+\fancyhead[C]{\includegraphics[width=0.98\textwidth]{Kopfzeile_neu.png}}
+\fancyfoot[C]{Laborbericht TL/10716/16}
+\fancyfoot[R]{\thepage\ von \pageref{LastPage}}
+\fancypagestyle{meinstyle}{\renewcommand{\headrulewidth}{0pt}\fancyfoot[C]{}\fancyfoot[R]{}}
\bodyspacing
-\frontmatter\maketitlepage\makecopyrightpage\makeabstract
-\makeacknowledgements\makededication\maketoc
-\makelot\clearpage\makelof\clearpage\makelos
-\clearpage\mainmatter
+\let\ps@plain\ps@fancy
+\fancyfoot[C]{}\fancyfoot[R]{}
+\frontmatter\maketitlepage\makeabstract
+\maketoc\clearpage\makelof\clearpage\makelos
+\fancyfoot[C]{Laborbericht TL/10716/16}
+\fancyfoot[R]{\thepage\ von \pageref{LastPage}}
+\clearpage
+\mainmatter
}
\def\@submitted{\@submittedmonth~\@submittedyear}
-\def\@dept{Mathematics}
-\def\@deptpref{Department of}
+\def\@dept{Labor}
+\def\@deptpref{Abteilung}
\def\departmentprefix#1{\gdef\@deptpref{#1}}
\def\department#1{\gdef\@dept{#1}}
\long\def\acknowledgements#1{\gdef\@acknowledgements{#1}}
\def\dedication#1{\gdef\@dedication{#1}}
+
\newcommand{\maketitlepage}{{
- \thispagestyle{empty}
+ \thispagestyle{meinstyle}
\sc
- \vspace*{0in}
- \begin{center}
- \LARGE \@title
- \end{center}
- \vspace{.6in}
- \extravspace{.6in}
- \begin{center}
- \@author
- \end{center}
- \vspace{.6in}
- \extravspace{.6in}
- \begin{center}
- A Dissertation \\
- Presented to the Faculty \\
- of Princeton University \\
- in Candidacy for the Degree \\
- of Doctor of Philosophy
- \end{center}
- \vspace{.3in}
- \extravspace{.3in}
- \begin{center}
- Recommended for Acceptance \\
- by the \@deptpref \\
- \@dept \\
- Adviser: \@adviser
- \end{center}
- \vspace{.3in}
- \extravspace{.3in}
- \begin{center}
- \@submitted
- \end{center}
- \clearpage
+ \vspace*{1.5in}
+ Leere Seite
+
}}
\newcommand*{\makecopyrightpage}{
- \thispagestyle{empty}
+ \thispagestyle{meinstyle}
\vspace*{0in}
\begin{center}
- \copyright\ Copyright by \@author, \@copyrightyear. All rights reserved. \\
- \vspace{1in}
- \begin{minipage}[c]{0.2\linewidth}
- \hfill {\Huge \ccLogo~\ccAttribution}
- \end{minipage}
+ \copyright\ Verfasst von \@author, \@copyrightyear. \\
\hspace{0.1cm}
\begin{minipage}[c]{0.7\linewidth}
- This work is licensed under a Creative Commons Attribution-3.0 United States License. \\
- \url{http://creativecommons.org/licenses/by/3.0/us/}
+ Inburexlogo \\
\end{minipage}
\end{center}
\clearpage}
\newcommand*{\makeabstract}{
+ \thispagestyle{meinstyle}
\newpage
- \addcontentsline{toc}{section}{Abstract}
+ \thispagestyle{meinstyle}
+ \addcontentsline{toc}{section}{Titelseite}
\begin{center}
- \Large \textbf{Abstract}
+ \Large \textbf{Hinweis}
\end{center}
\@abstract
+ \\
+ \\
+ \\
+ \\
\clearpage
}
+
\def\makeacknowledgements{
\ifx\@acknowledgements\undefined
\else
@@ -137,7 +131,7 @@
\addcontentsline{toc}{section}{Acknowledgements}
\begin{center}
- \Large \textbf{Acknowledgements}
+ \Large \textbf{Abk\"urzungsverzeichnis}
\end{center}
\@acknowledgements
\clearpage
@@ -159,18 +153,18 @@
\phantomsection
\else
\fi
- \addcontentsline{toc}{section}{List of Tables}\listoftables}}
-\DeclareOption{lof}{\renewcommand*{\makelof}{
+ \addcontentsline{toc}{section}{Tabellenverzeichnis}\listoftables}}
+\DeclareOption{lof}{\renewcommand*{\makelof}{\thispagestyle{meinstyle}
\ifdefined\phantomsection
% makes hyperref recognize this section properly for pdf links
\phantomsection
\else
\fi
- \addcontentsline{toc}{section}{List of Figures}\listoffigures}}
+ \addcontentsline{toc}{section}{Grafikverzeichnis}\listoffigures}}
\DeclareOption{los}{
\renewcommand*{\makelos}{
\RequirePackage{losymbol}
- \section*{List of Symbols\@mkboth {LIST OF SYMBOLS}{LIST OF SYMBOLS}}
+ \section*{List of Symbols\@mkboth {Symbolverzeichnis}{LIST OF SYMBOLS}}
\@starttoc{los}
\ifdefined\phantomsection
% makes hyperref recognize this section properly for pdf links
@@ -205,14 +199,14 @@
{\PassOptionsToClass{twoside}{report}}
%% Not necessary to specify the point size - we inherit it from above
-%% \LoadClass[12pt]{report}
+%% \LoadClass[11pt]{report}
\LoadClass{report}
\ifthenelse{\boolean{@myopt@oneside}}
{
-\setlength{\oddsidemargin}{.5in} %{.4375in}
-\setlength{\evensidemargin}{.5in} %{.4375in}
+\setlength{\oddsidemargin}{.3in} %{.4375in}
+\setlength{\evensidemargin}{.3in} %{.4375in}
}{
-\setlength{\oddsidemargin}{.5in} %{.4375in}
+\setlength{\oddsidemargin}{.3in} %{.4375in}
\setlength{\evensidemargin}{0in} %{.4375in}
}
\setlength{\topmargin}{-.5in} %{-.5625in}
@@ -226,7 +220,7 @@
%%% try to avoid overfull lines by limiting how far it is okay to exceed the margins
%%% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=overfull
-\setlength{\emergencystretch}{2em}
+\setlength{\emergencystretch}{3em}
\long\def\abstract#1{\gdef\@abstract{#1}}
%% 'begincmd' no longer used -- insert \makefrontmatter in the document instead. See above.
diff --git a/tex/sphinx.sty b/tex/sphinx.sty
index 9ba74cb..1f65390 100644
--- a/tex/sphinx.sty
+++ b/tex/sphinx.sty
@@ -13,7 +13,7 @@
\ProvidesPackage{sphinx}[2010/01/15 LaTeX package (Sphinx markup)]
\RequirePackage{textcomp}
-%\RequirePackage{fancyhdr}
+\RequirePackage{fancyhdr}
\RequirePackage{fancybox}
%\RequirePackage{titlesec}
\RequirePackage{tabulary}