diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-23 21:06:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-23 21:06:31 +0000 |
commit | 1c993f4dd3c9ac5e5bc2b66f4b1da95f96f29f22 (patch) | |
tree | ad47ded2d2e4091de814a78f70d77d8d03ca3b9d /Master/texmf-dist/doc/latex/handin/handin-doc.tex | |
parent | 7824e5a36604fe2e00136ea16ebc42c4d320a27d (diff) |
handin (23jul18)
git-svn-id: svn://tug.org/texlive/trunk@48255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/handin/handin-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/handin/handin-doc.tex | 181 |
1 files changed, 133 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/latex/handin/handin-doc.tex b/Master/texmf-dist/doc/latex/handin/handin-doc.tex index 0e6348c5152..d369189ecc4 100644 --- a/Master/texmf-dist/doc/latex/handin/handin-doc.tex +++ b/Master/texmf-dist/doc/latex/handin/handin-doc.tex @@ -1,6 +1,6 @@ -%% handin v0.1.0b47 - 2018/04/10 -%% The LaTeX package handin - version v0.1.0 (2018/04/10) build 47 -%% #PACKAGE.sty +%% handin v0.1.1b52 - 2018/07/22 +%% The LaTeX package handin - version v0.1.1 (2018/07/22) build 52 +%% Manual/Documentation for handin.sty %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2018 by Andreas Storvik Strauman %% ------------------------------------------------------------------------------------------- @@ -13,18 +13,20 @@ %% 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} +\documentclass[a4paper]{article} \usepackage[all]{tcolorbox} \usepackage{needspace} \usepackage{tabularx} +\usepackage{geometry} \makeatletter +\def\input@path{{../../docs/}} \lstdefinestyle{mydocumentation}{style=tcbdocumentation, classoffset=0, texcsstyle=*\color{blue}, moretexcs={arrayrulecolor,draw,includegraphics,ifthenelse,isodd,lipsum,path,pgfkeysalso}, classoffset=1, moretexcs={% core - problem,pproblem,title,author,logo,coursename,coursetitle,institute,containspages,pagetext,settable,handinsetup,currentProblem,currentPartProblem,currentProblemIfNewPage + problem,pproblem,handinsetup,title,author,logo,coursename,coursetitle,institute,containspages,pagetext,currentProblem,currentPartProblem,currentProblemIfNewPage,settable }, texcsstyle=*\color{Definition}\bfseries, classoffset=0,% restore default @@ -41,13 +43,54 @@ \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west); }, drop fuzzy shadow,#1} - \makeatother + \def\l@macro#1#2{#1\hfill\newline} +\newcommand\macrotable{\hypersetup{linkcolor=black}\@starttoc{mac}\hypersetup{linkcolor=Definition}} +\newcommand\gh[1]{\href{#1}{https://github.com/#1}} +% --- CHANGELOG TABLE --- % +\newcommand*\l@version[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{}\par + \endgroup + \fi} + \newcommand*\l@change[2]{% + \addvspace{0.5em \@plus\p@}% + \leftskip1em--\hspace{0.5em}\begin{minipage}{0.5\textwidth}#1\end{minipage}\hfill% + \begin{minipage}{0.3\textwidth}#2\end{minipage}\par% + } + +\newcommand\chlogtable{\begin{NoHyper}\@starttoc{chlog}\hypersetup{final}\end{NoHyper}} +\def\newversion#1{\addcontentsline{chlog}{version}{#1}} +\newcommand\change[2][]{\addtocontents{chlog}{\protect\contentsline{change}{#2}{#1}{section.\thepage}}} +% --- /CHANGELOG TABLE --- % + +\let\oldTOC\tableofcontents +\renewcommand\tableofcontents{\hypersetup{linkcolor=black}\oldTOC\hypersetup{linkcolor=Definition}} +\reversemarginpar +\def\updated#1{\tcbdocmarginnote{\bfseries{\color{blue}U}#1}} +\def\defnew#1{\tcbdocmarginnote{\bfseries{\color{green}N}#1}} + \let\dac\docAuxCommand +\def\mdac#1{\docAuxCommand{\expandafter\@gobble\string#1}} + +\makeatother + \long\def\keyDef#1#2#3#4{\begin{docKey}{#1}{=\meta{#2}}{\meta{default}=#3}#4\end{docKey}} +\long\def\optDef#1#2{\begin{docKey*}{#1}{}{}#2\end{docKey*}} \tcbset{documentation listing style=mydocumentation} % Magenta HREF style \let\oldhref\href \gdef\href#1#2{{\color{magenta}\oldhref{#1}{#2}}} +\tcbset{documentation listing style=mydocumentation,/tcb/color hyperlink=Definition} +\hypersetup{colorlinks=true} % Give section some space \let\oldsection\section \gdef\section{\needspace{0.3\paperheight}\oldsection} @@ -56,7 +99,7 @@ \setlength{\parindent}{0pt} -\title{{handin - manual\\ v0.1.0{\\[-0.5em]\footnotesize(build 47)}}} +\title{{handin - manual\\ v0.1.1{\\[-0.5em]\footnotesize(build 52)}}} \author{Andreas Strauman} \begin{document} \maketitle @@ -67,14 +110,15 @@ This is a package that makes it easy for student to hand in a formatted document If you are a teacher, this package works just as well for creating exercises!\\ -If you found any bugs or want new functionality, to contribute, view the commented source, get latest version of this package or get in touch with me, you can do all of that at \url{https://github.com/Strauman/Handin-LaTeX-template/}. If you have questions of functionality, kindly direct them to the community\\ \url{http://tex.stackexchange.com}. The author is active on this site regularly. +If you found any bugs or want new functionality, to contribute, view the commented source, get latest version of this package or get in touch with me, you can do all of that at\\\url{https://github.com/Strauman/handin-LaTeX}. If you have questions of functionality, kindly direct them to the community\\ \url{http://tex.stackexchange.com}. The author is active on this site regularly. \tableofcontents \clearpage \section{Reference} -\subsection{Making exercises} +\filbreak\subsection{Making exercises} Here are commands related to creating exercises -\begin{docCommand}{problem}{\marg{text}} +\begin{docCommand}{problem}{\marg{text}}\addcontentsline{toc}{subsubsection}{\refCom{problem}} + 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 @@ -82,7 +126,8 @@ Here are commands related to creating exercises \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}} +\begin{docCommand}{pproblem}{\marg{text}}\addcontentsline{toc}{subsubsection}{\refCom{pproblem}} +\updated{v0.1.1\\2018/07/22 } 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)}. Note that the default behaviour is such that if you are on a @@ -92,10 +137,16 @@ Here are commands related to creating exercises \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{Package options (\dac{handinsetup})} +\filbreak\subsection{Package options} +\keyDef{light}{true/false}{false}{ +Pass this option if you don't want to define a different \dac{maketitle} and include +basic math packages. +} +\filbreak\subsection{Package options (\dac{handinsetup})} You can do configurations on this package, and probably even more to come in later versions! -\begin{docCommand}{handinsetup}{\marg{[key/values]}} +\begin{docCommand}{handinsetup}{\marg{[key/values]}}\addcontentsline{toc}{subsubsection}{\refCom{handinsetup}} + Here is a list of the different keys and their meaning \end{docCommand} \keyDef{problem header}{macro}{\dac{@tr}\{Problem\}~\dac{currentProblem}}{ @@ -124,7 +175,7 @@ If "wholepage", \dac{maketitle} will produce a full front-page. If "small", \dac \begin{dispListing} \handinsetup{part problem header=\currentPartProblem} \end{dispListing} -\subsection{Page formatting commands} +\filbreak\subsection{Page formatting commands} 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\})\\ @@ -134,26 +185,32 @@ but are made lasting (not cleared by \dac{maketitle}) with \dac{thetitle} and \d \end{docCommand} \begin{docCommand}{author}{\marg{your name}} \end{docCommand} -\begin{docCommand}{logo}{\marg{path/to/image}} +\begin{docCommand}{logo}{\marg{path/to/image}}\addcontentsline{toc}{subsubsection}{\refCom{logo}} + 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}}\addcontentsline{toc}{subsubsection}{\refCom{coursename}} + \end{docCommand} -\begin{docCommand}{coursetitle}{\marg{text}} +\begin{docCommand}{coursetitle}{\marg{text}}\addcontentsline{toc}{subsubsection}{\refCom{coursetitle}} + The front page will show coursename - coursetitle on a "subtitle" format \end{docCommand} -\begin{docCommand}{institute}{\marg{text}} +\begin{docCommand}{institute}{\marg{text}}\addcontentsline{toc}{subsubsection}{\refCom{institute}} + Shows as text on bottom \end{docCommand} -\begin{docCommand}{containspages}{\marg{text}} +\begin{docCommand}{containspages}{\marg{text}}\addcontentsline{toc}{subsubsection}{\refCom{containspages}} + 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}}\addcontentsline{toc}{subsubsection}{\refCom{pagetext}} + 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} +\filbreak\subsection{Languages} This package supports. \begin{itemize} \item English @@ -167,8 +224,9 @@ The current language is set by the \texttt{iflang} package, so you can use e.g. \begin{dispListing} \usepackage[german]{babel} \end{dispListing} -\subsection{General reference} -\begin{docCommand}{currentProblem}{} +\filbreak\subsection{General reference} +\begin{docCommand}{currentProblem}{}\addcontentsline{toc}{subsubsection}{\refCom{currentProblem}} + Contains the argument of the last call to \dac{problem} \begin{dispListing} \pproblem{hello} @@ -176,10 +234,12 @@ Contains the argument of the last call to \dac{problem} \currentPartProblem %<- contains world \end{dispListing} \end{docCommand} -\begin{docCommand}{currentPartProblem}{} +\begin{docCommand}{currentPartProblem}{}\addcontentsline{toc}{subsubsection}{\refCom{currentPartProblem}} + Just as \refCom{currentProblem}, but contains the argument of the last call to \dac{pproblem} \end{docCommand} -\begin{docCommand}{currentProblemIfNewPage}{} +\begin{docCommand}{currentProblemIfNewPage}{}\addcontentsline{toc}{subsubsection}{\refCom{currentProblemIfNewPage}} + If the problem is not defined on the current page, then The first time \dac{currentProblemIfNewPage} is called on a page, it expands to the current problem number. If not, it expands to empty. @@ -216,30 +276,55 @@ If the problem is defined on the current page, it also expands to empty. \ifset@hello{true}{false} \end{dispListing} \end{docCommand} +\filbreak\subsection{Macro index reference} + \addcontentsline{mac}{macro}{\refCom{author}}{} +\addcontentsline{mac}{macro}{\refCom{containspages}}{} +\addcontentsline{mac}{macro}{\refCom{coursename}}{} +\addcontentsline{mac}{macro}{\refCom{coursetitle}}{} +\addcontentsline{mac}{macro}{\refCom{currentPartProblem}}{} +\addcontentsline{mac}{macro}{\refCom{currentProblem}}{} +\addcontentsline{mac}{macro}{\refCom{currentProblemIfNewPage}}{} +\addcontentsline{mac}{macro}{\refCom{handinsetup}}{} +\addcontentsline{mac}{macro}{\refCom{institute}}{} +\addcontentsline{mac}{macro}{\refCom{logo}}{} +\addcontentsline{mac}{macro}{\refCom{pagetext}}{} +\addcontentsline{mac}{macro}{\refCom{pproblem}}{} +\addcontentsline{mac}{macro}{\refCom{pproblem*}}{} +\addcontentsline{mac}{macro}{\refCom{problem}}{} +\addcontentsline{mac}{macro}{\refCom{problem*}}{} +\addcontentsline{mac}{macro}{\refCom{settable}}{} +\addcontentsline{mac}{macro}{\refCom{title}}{} + + \macrotable + + +% \newgeometry{lmargin=0.7cm} \section{Changelog} % Use , 2018/04/01 -\begin{tabularx}{\textwidth}{llX} - Version&Date&Changes\\ - 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}\\ - v0.0.4&2018/04/06&\begin{itemize} - \item Made proper margins for problem headers and part problem headers - \item Added \texttt{microtype} and Latin Modern font (\texttt{cfr-lm})\newline - Contributed by:\newline - \href{https://github.com/koppor}{koppor} (\url{https://github.com/koppor}) - \end{itemize}\\ - v0.1.0&2018/04/10&\begin{itemize} - \item Introduced package options - \item New slick, minimalistic, front page by \href{https://github.com/DanielTrosten/}{DanielTrosten} - \item Added support for \dac{thetitle} and \dac{theauthor} by \href{https://github.com/MadsAdrian/}{MadsAdrian} - \item Footer bar by default by \href{https://github.com/MadsAdrian/}{MadsAdrian} - \item New part problem counting features - \item Misc fixes of margin bugs - \item Better file structuring on page style by \href{https://github.com/MadsAdrian/}{MadsAdrian} - \end{itemize}\\ -\end{tabularx} +\newversion{v0.0.2 2018/04/01} + \change{Problems are now added to the table of contents by default} +\newversion{v0.0.2b34 2018/04/02} + \change{Updated documentation syntax} +\newversion{v0.0.3b41 2018/04/04} + \change[\gh{africola}]{German language translation} + +\newversion{v0.0.4 2018/04/06} + \change{Made proper margins for problem headers and part problem headers} + \change[\gh{koppor}]{Added \texttt{microtype} and Latin Modern font (\texttt{cfr-lm})} + + +\newversion{v0.1.0 2018/04/10} + \change{Introduced package options} + \change[\gh{DanielTrosten}]{New slick, minimalistic, front page} + \change[\gh{MadsAdrian}]{Added support for \dac{thetitle} and \dac{theauthor}} + \change[\gh{MadsAdrian}]{Footer bar by default} + \change{New part problem counting features} + \change{Misc fixes of margin bugs} + \change[\gh{MadsAdrian}]{Better file structuring on page style} +\newversion{v0.1.1 2018/07/22} + \change{Fixed bug where first page after title did not have header and footer.} + \change{Makes sure \refCom{pproblem} is in horizontal mode, so that the \dac{pproblem} header is placed correctly.} + \change{Added package option \refKey{light}} +\chlogtable \end{document} |