Commit 9f3d9ab8 authored by Adrian C. Hinrichs's avatar Adrian C. Hinrichs
Browse files

Fix \maketitle-line-bug

parent a9ac3996
......@@ -38,7 +38,7 @@
%% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{HomeworkAssignment}[2017/05/02 v1.6.2]
\ProvidesClass{HomeworkAssignment}[2017/05/02 v1.6.3]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{ family=hwa,
prefix=hwa@ }
......@@ -135,7 +135,7 @@
\renewcommand{\maketitle} {
\begin{centering}
\huge{\textbf{\hwa@kurs}} {\hrule height 2pt} \vspace{.25cm}
\huge{\textbf{\hwa@kurs}} \vspace{.25cm} {\hrule height 2pt} \vspace{.25cm}
\large
\GetTranslation{abgabe}: \hwa@abgabe\\
\vspace{.5cm} \hrule \vspace{.25cm}
......
......@@ -38,7 +38,7 @@
\ProvidesFile{HomeworkAssignment.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<class>\ProvidesClass{HomeworkAssignment}[2017/05/02 v1.6.2]
%<class>\ProvidesClass{HomeworkAssignment}[2017/05/02 v1.6.3]
%<*driver>
\documentclass{ltxdoc}
\EnableCrossrefs
......@@ -70,7 +70,7 @@
% \DoNotIndex{\newcommand,\newenvironment}
% \GetFileInfo{HomeworkAssignment.cls}
%
% \renewcommand{\fileversion}{v1.6.1}
% \renewcommand{\fileversion}{v1.6.3}
% \renewcommand{\filedate}{$2017\backslash 04\backslash 30$}
%
% \title{The \textsf{HomeworkAssignment} class\thanks{This document
......@@ -183,7 +183,7 @@
% \item[v1.5.2 - 2017/04/29] Add version-number
% \item[v1.6 - 2017/05/02] Add Translations (German and English)\\ Add
% |\given| and |\toShow|\\Add |\QED|, |\EOP|, and |\eop|
% \item[v1.6.2 - 2017/05/05] Bugfixes
% \item[v1.6.3 - 2017/05/05] Bugfixes
%
% \end{description}
% \pagebreak
......@@ -364,7 +364,7 @@
\renewcommand{\maketitle} {
\begin{centering}
\huge{\textbf{\hwa@kurs}} {\hrule height 2pt} \vspace{.25cm}
\huge{\textbf{\hwa@kurs}} \vspace{.25cm} {\hrule height 2pt} \vspace{.25cm}
\large
\GetTranslation{abgabe}: \hwa@abgabe\\
\vspace{.5cm} \hrule \vspace{.25cm}
......
No preview for this file type
%%
%% This is file `HomeworkAssignment.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% HomeworkAssignment.dtx (with options: `class')
%% Copyright (c) 2017 by Adrian C. Hinrichs
%%
%% This File may be distributed and/or modified under the condition of the below
%% license.
%%
%%
%% MIT License
%%
%%
%%
%% Copyright (c) 2017
%%
%%
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
%% in the Software without restriction, including without limitation the rights
%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
%% copies of the Software, and to permit persons to whom the Software is
%% furnished to do so, subject to the following conditions:
%%
%% The above copyright notice and this permission notice shall be included in all
%% copies or substantial portions of the Software.
%%
%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{HomeworkAssignment}[2017/05/02 v1.6.2]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{ family=hwa,
prefix=hwa@ }
\DeclareStringOption[arabic]{problemsty}
\DeclareStringOption[alph]{subproblemsty}
\DeclareStringOption[roman]{subsubproblemsty}
\DeclareBoolOption[false]{listings}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOptionKey}{article}}
\ProcessKeyvalOptions*
\LoadClass{article}
\RequirePackage{suffix}
\RequirePackage{fancyhdr}
\RequirePackage{ifthen}
\RequirePackage{translations}
\RequirePackage{amssymb}
\ifhwa@listings
\RequirePackage{listings}
\lstset{
frame = single,
breaklines = true,
postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}},
basicstyle=\scriptsize
}
\else
\empty
\fi
\DeclareTranslationFallback{aufgabe}{Aufgabe}
\DeclareTranslationFallback{loesung}{L\"osung}
\DeclareTranslationFallback{beweis}{Beweis}
\DeclareTranslationFallback{uebungsgruppe}{\"Ubungsgruppe}
\DeclareTranslationFallback{abgabe}{Abgabe}
\DeclareTranslationFallback{zuZeigen}{Zu zeigen}
\DeclareTranslationFallback{gegeben}{Gegeben}
\DeclareTranslation{German}{aufgabe}{Aufgabe}
\DeclareTranslation{German}{loesung}{L\"osung}
\DeclareTranslation{German}{beweis}{Beweis}
\DeclareTranslation{German}{uebungsgruppe}{\"Ubungsgruppe}
\DeclareTranslation{German}{abgabe}{Abgabe}
\DeclareTranslation{German}{zuZeigen}{Zu zeigen}
\DeclareTranslation{German}{gegeben}{Gegeben}
\DeclareTranslation{English}{aufgabe}{Problem}
\DeclareTranslation{English}{loesung}{Solution}
\DeclareTranslation{English}{beweis}{Proof}
\DeclareTranslation{English}{uebungsgruppe}{Tutorial}
\DeclareTranslation{English}{abgabe}{Deadline}
\DeclareTranslation{English}{zuZeigen}{To show}
\DeclareTranslation{English}{gegeben}{Given}
\fancypagestyle{firstpage}{
%
\fancyhf{}
% clear all six fields
\renewcommand{\headrulewidth}{.7pt}
\renewcommand{\footrulewidth}{0pt} \fancyfoot[RE,LO]{\thepage}
\fancyhead[L]{\hwa@tutorium} \fancyhead[R]{\@date } }
\fancypagestyle{followingpage}{
%
\fancyhf{}
% clear all six fields
\fancyhead[RE,LO]{\@author} \fancyhead[LE,RO]{\hwa@kurs\\ \GetTranslation{abgabe}:
\hwa@abgabe} \fancyfoot[RE,LO]{\thepage}
\renewcommand{\headrulewidth}{0.7pt}
\renewcommand{\footrulewidth}{0pt} } \pagestyle{followingpage}
\AtBeginDocument{ \thispagestyle{firstpage}
\setlength{\headheight}{25pt} }
\newcommand{\hwa@problemno}{\arabic{problem}}
\newcommand{\hwa@subproblemno}{\alph{subproblem}}
\newcommand{\hwa@subsubproblemno}{\roman{subsubproblem}}
\newcommand{\hwa@parseCounterStyle}[3]{
\ifthenelse{\equal{#1}{arabic}}{ \renewcommand{#2}{\arabic{#3}} }{
\ifthenelse{\equal{#1}{roman}}{ \renewcommand{#2}{\roman{#3}} }{
\ifthenelse{\equal{#1}{alph}}{ \renewcommand{#2}{\alph{#3}} }{
\ifthenelse{\equal{#1}{Alph}}{ \renewcommand{#2}{\Alph{#3}} }{
\ifthenelse{\equal{#1}{Roman}}{
\renewcommand{#2}{\Roman{#3}} }{
\ClassError{HomeworkAssignment}{Invalid Value #1 for
option Counter-Styling}{Possible Values are alph,
arabic, Arabic, roman or Roman.} } } } } } }
\hwa@parseCounterStyle{\hwa@problemsty}{\hwa@problemno}{problem}
\hwa@parseCounterStyle{\hwa@subproblemsty}{\hwa@subproblemno}{subproblem}
\hwa@parseCounterStyle{\hwa@subsubproblemsty}{\hwa@subsubproblemno}{subsubproblem}
\newcommand{\hwa@kurs}{?\GetTranslation{subject}?}
\newcommand{\subject}[1]{\renewcommand{\hwa@kurs}{#1}}
\newcommand{\kurs}[1]{\subject{#1}}
\newcommand{\hwa@tutorium}{?\GetTranslation{uebungsgruppe}?}
\newcommand{\tutorial}[1]{\renewcommand{\hwa@tutorium}{#1}}
\newcommand{\tutorium}[1]{\tutorial{#1}}
\newcommand{\hwa@abgabe}{\today}
\newcommand{\deadline}[1]{\def\hwa@abgabe{#1}}
\newcommand{\abgabe}[1]{\deadline{#1}}
\renewcommand{\maketitle} {
\begin{centering}
\huge{\textbf{\hwa@kurs}} {\hrule height 2pt} \vspace{.25cm}
\large
\GetTranslation{abgabe}: \hwa@abgabe\\
\vspace{.5cm} \hrule \vspace{.25cm}
\normalsize{\@author}\\
\vspace{.25cm} \hrule \vspace{.25cm} \normalsize
\end{centering}
}
\newcounter{problem} \setcounter{problem}{0}
\newcounter{subproblem}[problem] \setcounter{subproblem}{0}
\newcounter{subsubproblem}[subproblem] \setcounter{subsubproblem}{0}
\newcommand{\problem}[1]{\@startsection{problem}%Name
{1}%Level
{\z@}%indent
{-2em \@plus -1em \@minus -1em}%beforeskip
{1ex \@plus .5ex}%afterskip
{\normalfont\Large\bfseries}%style
*{#1} \addcontentsline{toc}{section}{#1} }
\newcommand{\subproblem}[1]{\@startsection{subproblem}%Name
{2}%Level
{\z@}%indent
{-1em \@plus -.5em \@minus -.5em}%beforeskip
{.5ex \@plus .5ex}%afterskip
{\normalfont\large\bfseries}%style
*{#1} \addcontentsline{toc}{subsection}{#1} }
\newcommand{\subsubproblem}[1]{\@startsection{subsubproblem}%Name
{3}%Level
{\z@}%indent
{-.5em}%beforeskip
{.5em}%afterskip
{\normalfont\bfseries}%style
*{#1} }
\newcommand{\solution}[1][]{\@startsection{solution}%Name
{4}%Level
{\parindent}%indent
{-.1em}%beforeskip
{\z@}%afterskip
{\normalfont\bfseries}%style
*{\GetTranslation{loesung}\ifthenelse{\equal{#1}{}} {} { #1}:~~ } }
\newcommand{\proof}[1][]{\@startsection{proof}%Name
{4}%Level
{\parindent}%indent
{-.1em}%beforeskip
{\z@}%afterskip
{\normalfont\bfseries}%style
*{\GetTranslation{beweis}\ifthenelse{\equal{#1} {} } {} { #1}:~~ } }
\newcommand{\toShow}[1][]{\@startsection{to show}%Name
{4}%Level
{\parindent}%indent
{-.1em}%beforeskip
{\z@}%afterskip
{\normalfont\bfseries}%style
*{\GetTranslation{zuZeigen}\ifthenelse{\equal{#1} {} } {} { #1}:~~ } }
\newcommand{\given}[1][]{\@startsection{given}%Name
{4}%Level
{\parindent}%indent
{-.1em}%beforeskip
{\z@}%afterskip
{\normalfont\bfseries}%style
*{\GetTranslation{gegeben}\ifthenelse{\equal{#1} {} } {} { #1}:~~ } }
\newcommand{\newproblem}[1][]{\stepcounter{problem}
\ifthenelse{\equal{#1}{}} { } {\setcounter{problem}{#1}}
\problem{\GetTranslation{aufgabe} \hwa@problemno} }
\newcommand{\newsubproblem}[1][]{\stepcounter{subproblem}
\ifthenelse{\equal{#1}{}} { } {\setcounter{subproblem}{#1}}
\subproblem{\GetTranslation{aufgabe} \hwa@problemno{}.\hwa@subproblemno} }
\newcommand{\newsubsubproblem}[1][]{\stepcounter{subsubproblem}
\ifthenelse{\equal{#1}{}} { } {\setcounter{subsubproblem}{#1}}
\subsubproblem{\hwa@subsubproblemno)} }
\newcommand{\QED}{\begin{flushright}
\textit{QED}
\end{flushright}
}
\newcommand{\EOP}{\begin{flushright}
$\square$
\end{flushright}
}
\newcommand{\eop}{\begin{flushright}
$\blacksquare$
\end{flushright}
}
\endinput
%%
%% End of file `HomeworkAssignment.cls'.
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