From 6b97700d0960f93e83b38300a9921a1de47258df Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Mon, 28 Apr 2014 00:06:08 +0200 Subject: [PATCH] added report for assignment1. --- report1/.gitignore | 11 ++++ report1/build.sh | 4 ++ report1/gitinfohook.sh | 28 ++++++++++ report1/main.tex | 119 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 report1/.gitignore create mode 100755 report1/build.sh create mode 100755 report1/gitinfohook.sh create mode 100644 report1/main.tex diff --git a/report1/.gitignore b/report1/.gitignore new file mode 100644 index 0000000..ebb76a1 --- /dev/null +++ b/report1/.gitignore @@ -0,0 +1,11 @@ +##### .gitignore default file. ##### +*.dep +*.swp +*.pdf +*.aux +*.log +*.toc +*.out +*.dvi +*.gz +gitHeadInfo.gin diff --git a/report1/build.sh b/report1/build.sh new file mode 100755 index 0000000..28cf32f --- /dev/null +++ b/report1/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +./gitinfohook.sh +pdflatex main.tex + diff --git a/report1/gitinfohook.sh b/report1/gitinfohook.sh new file mode 100755 index 0000000..e085f4e --- /dev/null +++ b/report1/gitinfohook.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright 2011 Brent Longborough +# Please read gitinfo.pdf for licencing and other details +# ----------------------------------------------------- +# cp gitinfohook.sh .git/hooks/post-update +# chmod +x .git/hooks/post-update +# +#prefixes=". test docs" # Example for multiple gitHeadInfo.tex files +prefixes="." # Default --- in the working copy root +for pref in $prefixes + do + git log -1 --date=short \ + --pretty=format:"\usepackage[% + shash={%h}, + lhash={%H}, + authname={%an}, + authemail={%ae}, + authsdate={%ad}, + authidate={%ai}, + authudate={%at}, + commname={%an}, + commemail={%ae}, + commsdate={%ad}, + commidate={%ai}, + commudate={%at}, + refnames={%d} + ]{gitsetinfo}" HEAD > $pref/gitHeadInfo.gin + done diff --git a/report1/main.tex b/report1/main.tex new file mode 100644 index 0000000..b941912 --- /dev/null +++ b/report1/main.tex @@ -0,0 +1,119 @@ +\RequirePackage{snapshot} % stats of included files: $filename.dep + +\documentclass[10pt,a5paper,twoside,openright,onecolumn,ngerman]{article} +\usepackage[ngerman]{babel} + +%%%%% Formatting and encoding %%%%% +% encoding +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} + +% page +\usepackage[columnsep=.75cm,lmargin=.75cm,rmargin=.75cm,tmargin=1.5cm,bmargin=1.5cm]{geometry} +\setlength{\parindent}{0pt} + +\usepackage{fancyhdr} +\pagestyle{fancy} +\lhead{} +\chead{} +\rhead{} +\cfoot{} +\fancyhead[LE,RO]{\leftmark} +\fancyfoot[LE,RO]{\thepage} + +% Use sans serif font. +\renewcommand*{\familydefault}{\sfdefault} + +% change heading fontsizes. +\usepackage{sectsty} +\subsectionfont{\normalsize} +\subsubsectionfont{\small} + +% \chapter hacks +% Create \Hide command (used for chapters) +\usepackage[explicit]{titlesec} +\newcommand*\Hide{\titleformat{\chapter}[display]{}{}{0pt}{\Huge}\titleformat{\part}{}{}{0pt}{}} + +% inhibit creation of new double page on new chapter. +\usepackage{etoolbox} +\makeatletter +\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{} +\makeatother + +% change heading margins. +\titlespacing*{\chapter}{0pt}{0pt}{-40pt} +\titlespacing*{\section}{0pt}{9pt}{3pt} +\titlespacing*{\subsection}{0pt}{6pt}{0pt} +\titlespacing*{\subsubsection}{0pt}{0pt}{0pt} + +% make \paragraph do newlines +\makeatletter +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@} + {-.75ex \@plus -1ex \@minus -0.2ex} + {0.01pt} + {\normalfont\normalsize\bfseries} +} +\makeatother + +%%% TOC changes %%% +% inhibit "Contents" Head in TOC +\makeatletter +\renewcommand\tableofcontents{\@starttoc{toc}} +\makeatother + +%make toc consider Chapter and section only. +\setcounter{tocdepth}{1} + +% disable chapter, section, ... numbering +\setcounter{secnumdepth}{-1} + +% change margin above chapter. +\usepackage[titles]{tocloft} +%%% /TOC changes %%% + +% make footnote numbering reset on every page. +\usepackage[hang,flushmargin,perpage]{footmisc} +%%%%% / Formatting %%%%% + +% includable git commit info +\usepackage[missing=run\ build.sh\ or\ gitinfohook.sh]{gitinfo} + +% Fürs "last generated" Datum +\usepackage[iso]{isodate} + +% Image import stuff +\usepackage[absolute]{textpos} +\usepackage{graphicx} +\DeclareGraphicsExtensions{.pdf,.png,.jpg} + +% clickable references/links/... +\usepackage{hyperref} + +% euro-sign +\usepackage{eurosym} +\DeclareUnicodeCharacter{20AC}{\euro} + +% frames +\usepackage[framemethod=default]{mdframed} +\newmdenv[linecolor=red,backgroundcolor=yellow]{yellowframe} + +% quotes +\usepackage[babel,german=quotes]{csquotes} + + +% START DOCUMENT +\begin{document}\thispagestyle{empty} + +\section*{Inhalt}\begin{footnotesize}\tableofcontents\end{footnotesize} +\subsection{Version}\begin{footnotesize}\url{http://git.somenet.org/?p=fsinf/basics.git}\\ +\url{ssh://git@git.somenet.org:666/fsinf/basics}\\ +This is revision: \textbf{\gitAbbrevHash}. Document (.tex) compiled on: \textbf{\today} +\end{footnotesize}\vspace{\fill}\newpage + +\section{asd} +ads + +\section{asd} +asd + +\end{document} -- 2.43.0