From 9235a680f3a624d93c822c354458e5ad42cdc600 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 4 Apr 2018 20:20:10 +0000 Subject: handin (4apr18) git-svn-id: svn://tug.org/texlive/trunk@47292 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/handin/README.txt | 2 +- Master/texmf-dist/doc/latex/handin/example.pdf | Bin 2137095 -> 2137263 bytes Master/texmf-dist/doc/latex/handin/example.tex | 2 +- Master/texmf-dist/doc/latex/handin/handin-doc.pdf | Bin 131207 -> 126861 bytes Master/texmf-dist/doc/latex/handin/handin-doc.tex | 163 ++++++++++++---------- Master/texmf-dist/doc/latex/handin/layout.pdf | Bin 63699 -> 63859 bytes Master/texmf-dist/tex/latex/handin/handin.sty | 24 +++- 7 files changed, 111 insertions(+), 80 deletions(-) diff --git a/Master/texmf-dist/doc/latex/handin/README.txt b/Master/texmf-dist/doc/latex/handin/README.txt index b126141e2c2..f3ec0ee45ec 100644 --- a/Master/texmf-dist/doc/latex/handin/README.txt +++ b/Master/texmf-dist/doc/latex/handin/README.txt @@ -17,7 +17,7 @@ https://github.com/Strauman/Handin-LaTeX-template/ Licence: -The LaTeX package handin - version v0.0.2 (2018/04/01) build 30 +The LaTeX package handin - version v0.0.3 (2018/04/04) build 41 handin.sty ------------------------------------------------------------------------------------------- Copyright (c) 2018 by Andreas Storvik Strauman diff --git a/Master/texmf-dist/doc/latex/handin/example.pdf b/Master/texmf-dist/doc/latex/handin/example.pdf index 8f2c66eb1d2..1e60b785da0 100644 Binary files a/Master/texmf-dist/doc/latex/handin/example.pdf and b/Master/texmf-dist/doc/latex/handin/example.pdf differ diff --git a/Master/texmf-dist/doc/latex/handin/example.tex b/Master/texmf-dist/doc/latex/handin/example.tex index 0e2a4c64c47..171c35fb125 100644 --- a/Master/texmf-dist/doc/latex/handin/example.tex +++ b/Master/texmf-dist/doc/latex/handin/example.tex @@ -1,6 +1,6 @@ \documentclass{article} \usepackage[english]{babel} -% ^ Supports [english] and [norsk] (norwegian) +% ^ Supports [english], [german] and [norsk] (norwegian) \usepackage{handin} \title{Assignment 1} diff --git a/Master/texmf-dist/doc/latex/handin/handin-doc.pdf b/Master/texmf-dist/doc/latex/handin/handin-doc.pdf index 3ebd7213c3e..6945e5a6824 100644 Binary files a/Master/texmf-dist/doc/latex/handin/handin-doc.pdf and b/Master/texmf-dist/doc/latex/handin/handin-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/handin/handin-doc.tex b/Master/texmf-dist/doc/latex/handin/handin-doc.tex index 0ec4c17d1cf..557a5d290d0 100644 --- a/Master/texmf-dist/doc/latex/handin/handin-doc.tex +++ b/Master/texmf-dist/doc/latex/handin/handin-doc.tex @@ -1,8 +1,22 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% This is a generated file % -%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% handin v0.0.3b41 - 2018/04/04 +%% The LaTeX package handin - version v0.0.3 (2018/04/04) build 41 +%% #PACKAGE.sty +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2018 by Andreas Storvik Strauman +%% ------------------------------------------------------------------------------------------- +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% 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.3c or later is part of all distributions of LaTeX +%% version 2008/05/04 or later. +%% This work has the LPPL maintenance status `author-maintained'. +%% This work consists of all files listed in README.txt \documentclass{article} \usepackage[all]{tcolorbox} +\usepackage{needspace} +\usepackage{tabularx} \makeatletter \lstdefinestyle{mydocumentation}{style=tcbdocumentation, classoffset=0, @@ -30,9 +44,18 @@ \makeatother \let\dac\docAuxCommand \tcbset{documentation listing style=mydocumentation} +% Magenta HREF style +\let\oldhref\href +\gdef\href#1#2{{\color{magenta}\oldhref{#1}{#2}}} +% Give section some space +\let\oldsection\section +\gdef\section{\needspace{0.3\paperheight}\oldsection} +\let\oldsubsection\subsection +\gdef\subsection{\needspace{0.2\paperheight}\oldsubsection} + \setlength{\parindent}{0pt} -\title{{Handin - manual\\ v0.0.2{\\[-0.5em]\footnotesize(build 30)}}} +\title{{Handin - manual\\ v0.0.3{\\[-0.5em]\footnotesize(build 41)}}} \author{Andreas Strauman} \begin{document} \maketitle @@ -47,104 +70,92 @@ If you found any bugs or want new functionality, to contribute, view the comment \tableofcontents \clearpage \section{Reference} -\subsection{Making exercises} - Here are commands related to creating exercises - - -\begin{docCommand}[]{problem}{\marg{text}} - This command will print out a problem header. For example \dac{problem}\{1\} - prints a nice big header \textbf{Problem 1} You can do a star (*) after \dac{problem} to - prevent it from showing in the table of contents - -\end{docCommand} - -\begin{docCommand}[]{problem*}{\marg{text}} - Does the same as \dac{problem}, but does not add the problem to the table of contents - -\end{docCommand} - -\begin{docCommand}[]{pproblem}{\marg{text}} - This command will print out a part problem header based on what problem you are on. - For example if you already have done \dac{problem}\{1\}, then \dac{pproblem}\{a\} - prints a nice big header \textbf{(1a)}. You can do a star (*) after \dac{pproblem} to - prevent it from showing in the table of contents - -\end{docCommand} - -\begin{docCommand}[]{pproblem*}{\marg{text}} - Does the same as \dac{pproblem}, but does not add the part problem to the table of contents - -\end{docCommand} - \subsection{Page formatting commands} -\begin{docCommand}[]{title}{\marg{title}} - +This package redefines \dac{maketitle}. +Here are some front-page commands. See layout.pdf for where they will appear. +These commands all have to be executed in the preamble (that is after \dac{documentclass} and before \dac{begin}\{document\})\\ +The \dac{title} and \dac{author} commands are as per usual: +\begin{docCommand}{title}{\marg{title}} \end{docCommand} - -\begin{docCommand}[]{author}{\marg{your name}} - +\begin{docCommand}{author}{\marg{your name}} \end{docCommand} - -\begin{docCommand}[]{logo}{\marg{path/to/image}} +\begin{docCommand}{logo}{\marg{path/to/image}} If you want an image below the title, you provide the path to the image here - \end{docCommand} - -\begin{docCommand}[]{coursename}{\marg{text}} - +\begin{docCommand}{coursename}{\marg{text}} \end{docCommand} - -\begin{docCommand}[]{coursetitle}{\marg{text}} - The front page will show coursename - coursetitle on a "subtitle" format - +\begin{docCommand}{coursetitle}{\marg{text}} +The front page will show coursename - coursetitle on a "subtitle" format \end{docCommand} - -\begin{docCommand}[]{institute}{\marg{text}} +\begin{docCommand}{institute}{\marg{text}} Shows as text on bottom - \end{docCommand} - -\begin{docCommand}[]{containspages}{\marg{text}} - Here you can set a string that shows on bottom. Default is\\ - \dac{containspages}\{Contains \dac{pageref}\brackets{LastPage\} pages, front page included} - +\begin{docCommand}{containspages}{\marg{text}} + Here you can set a string that shows on bottom. Default is\\ + \dac{containspages}\{Contains \dac{pageref}\brackets{LastPage\} pages, front page included} \end{docCommand} - -\begin{docCommand}[]{pagetext}{\marg{string}} +\begin{docCommand}{pagetext}{\marg{string}} This is the text that is on the bottom right corner reading "Page x of y". Default is \dac{pagetext}\{Page \dac{thepage}~of \dac{pageref}{LastPage\}} - \end{docCommand} - \subsection{Languages} -This package supports norwegian and english. Translations are welcome at \dac{url}\{https://github.com/Strauman/Handin-LaTeX-template/tree/master/src/languages\}. that are set by the \!\dac{texttt}\{iflang\} package. - +This package supports. +\begin{itemize} +\item English +\item Norwegian +\item German (by \href{https://github.com/africola}{africola}) +\end{itemize} +Translations are welcome at \url{https://github.com/Strauman/Handin-LaTeX-template/tree/master/src/languages}. +The current language is set by the \texttt{iflang} package, so you can use e.g. babel: +\begin{dispListing} +\usepackage[german]{babel} +\end{dispListing} \subsection{General reference} -\begin{docCommand}[]{settable}{\marg{text}} - The text you enter would be a macro. See example: - +\begin{docCommand}{problem}{\marg{text}} + This command will print out a problem header. For example \dac{problem}\{1\} + prints a nice big header \textbf{Problem 1} You can do a star (*) after \dac{problem} to + prevent it from showing in the table of contents \end{docCommand} - +\begin{docCommand}{problem}{} + Does the same as \dac{problem}, but does not add the problem to the table of contents +\end{docCommand} +\begin{docCommand}{pproblem}{\marg{text}} + This command will print out a part problem header based on what problem you are on. + For example if you already have done \dac{problem}\{1\}, then \dac{pproblem}\{a\} + prints a nice big header \textbf{(1a)}. You can do a star (*) after \dac{pproblem} to + prevent it from showing in the table of contents +\end{docCommand} +\begin{docCommand}{pproblem}{} + Does the same as \dac{pproblem}, but does not add the part problem to the table of contents +\end{docCommand} +\begin{docCommand}{settable}{\marg{text}} \begin{dispListing} \settable{hello} - %if now \@hello is called, - % a warning is displayed with - % the text "\hello not set" +\end{dispListing} + if now \dac{@hello} is called, + a warning is displayed with + the text "\dac{hello} not set" +\begin{dispListing} \hello{world} - % if now \@hello is called, it prints "world" - \@hello@noerror gives the returning +\end{dispListing} + if now \dac{@hello} is called, it prints "world" + \dac{@hello@noerror} gives the returning content and empty without error if no content set. +\begin{dispListing} \ifset@hello{true}{false} - \end{dispListing} - +\end{docCommand} \section{Changelog} % Use , 2018/04/01 -\begin{tabular}{lll} +\begin{tabularx}{\textwidth}{llX} Version&Date&Changes\\ - v0.0.2&2018/04/01&Problems are now added to the table of contents by default -\end{tabular} + v0.0.2&2018/04/01&Problems are now added to the table of contents by default\\ + v0.0.2b34&2018/04/02&Updated documentation syntax\\ + v0.0.3b41&2018/04/04&\begin{itemize} + \item German language added by africola \newline (\url{https://github.com/africola}) + \end{itemize}\\ +\end{tabularx} \end{document} diff --git a/Master/texmf-dist/doc/latex/handin/layout.pdf b/Master/texmf-dist/doc/latex/handin/layout.pdf index 0ca1f3699e0..2231225d5a8 100644 Binary files a/Master/texmf-dist/doc/latex/handin/layout.pdf and b/Master/texmf-dist/doc/latex/handin/layout.pdf differ diff --git a/Master/texmf-dist/tex/latex/handin/handin.sty b/Master/texmf-dist/tex/latex/handin/handin.sty index 8b0a82833f7..61edfdf8625 100644 --- a/Master/texmf-dist/tex/latex/handin/handin.sty +++ b/Master/texmf-dist/tex/latex/handin/handin.sty @@ -1,5 +1,19 @@ -% handin v0.0.2b30 - 2018/04/01 -\ProvidesPackage{handin}[2018/04/01 v0.0.2 Creates a setup that is ideal for handing in hard-science school papers that are divided in exercises.] +%% handin v0.0.3b41 - 2018/04/04 +%% The LaTeX package handin - version v0.0.3 (2018/04/04) build 41 +%% handin.sty +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2018 by Andreas Storvik Strauman +%% ------------------------------------------------------------------------------------------- +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% 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.3c or later is part of all distributions of LaTeX +%% version 2008/05/04 or later. +%% This work has the LPPL maintenance status `author-maintained'. +%% This work consists of all files listed in README.txt +\ProvidesPackage{handin}[2018/04/04 v0.0.3 Creates a setup that is ideal for handing in hard-science school papers that are divided in exercises.] \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{lastpage} @@ -45,6 +59,12 @@ \set@tr{problem}{oppgave} \set@tr{pagetext}{Side \thepage~av \pageref{LastPage}} \set@tr{containspages}{Inneholder \pageref{LastPage} sider, inkludert forside.} +}{} +\IfLanguageName{german}{% +\set@tr{Problem}{Aufgabe} +\set@tr{problem}{Aufgabe} +\set@tr{containspages}{Enthält \pageref{LastPage} Seiten, inklusive Titelseite} +\set@tr{pagetext}{Seite \thepage~von \pageref{LastPage}} }{} \newif\ifshowoff \showofffalse -- cgit v1.2.3