texlive[46235] Master/texmf-dist: sesstime (6jan18)
commits+karl at tug.org
commits+karl at tug.org
Sat Jan 6 22:55:14 CET 2018
Revision: 46235
http://tug.org/svn/texlive?view=revision&revision=46235
Author: karl
Date: 2018-01-06 22:55:14 +0100 (Sat, 06 Jan 2018)
Log Message:
-----------
sesstime (6jan18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/sesstime/README
trunk/Master/texmf-dist/doc/latex/sesstime/sesstime.pdf
trunk/Master/texmf-dist/doc/latex/sesstime/stimsamp.tex
trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp3.tex
trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp4.tex
trunk/Master/texmf-dist/source/latex/sesstime/sesstime.dtx
trunk/Master/texmf-dist/source/latex/sesstime/sesstime.ins
trunk/Master/texmf-dist/tex/latex/sesstime/sesstime.sty
Modified: trunk/Master/texmf-dist/doc/latex/sesstime/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sesstime/README 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/doc/latex/sesstime/README 2018-01-06 21:55:14 UTC (rev 46235)
@@ -1,5 +1,5 @@
-sesstime v1.0
-Copyright 2016-2017 Niklas Beisert
+sesstime v1.1
+Copyright 2016-2018 Niklas Beisert
sesstime is a LaTeX2e package to add timing marks to lecture notes
in order to help managing the time available for presenting a given
Modified: trunk/Master/texmf-dist/doc/latex/sesstime/sesstime.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/sesstime/stimsamp.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sesstime/stimsamp.tex 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/doc/latex/sesstime/stimsamp.tex 2018-01-06 21:55:14 UTC (rev 46235)
@@ -6,7 +6,7 @@
%%
%% sesstime.dtx (with options: `sample')
%%
-%% Copyright (C) 2016-2017 Niklas Beisert
+%% Copyright (C) 2016-2018 Niklas Beisert
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\ProvidesFile{stimsamp.tex}[2017/05/01 v1.0 sample for sesstime]
+\ProvidesFile{stimsamp.tex}[2018/01/06 v1.1 sample for sesstime]
\documentclass[12pt]{article}
\usepackage{geometry}
@@ -47,6 +47,8 @@
\\(\timingreturn\ min)%
\ifnum #2>0\\at #2 min\fi\fi\vphantom{g}}}
+\timingconfigure{depthsec=3,depthpar=4}
+
\renewcommand{\timingsessionline}[5]{\ \\%
\makebox[2em][r]{#1. }%
\makebox[5em][l]{\sessiondate{#1}:}%
@@ -138,9 +140,14 @@
\timingsplit*{15}
\subsection{five.two}
\paragraph{five.two.paragraph.}
+\timingsession
\lorem
\timingsplit*{15}
+\subparagraph{five.two.subparagraph.}
+\timingsession
\lorem
+\timingsplit*{15}
+\lorem
\timingstop*{15}
\timingchapterend
Modified: trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp3.tex 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp3.tex 2018-01-06 21:55:14 UTC (rev 46235)
@@ -6,7 +6,7 @@
%%
%% sesstime.dtx (with options: `sample3')
%%
-%% Copyright (C) 2016-2017 Niklas Beisert
+%% Copyright (C) 2016-2018 Niklas Beisert
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
Modified: trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp4.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp4.tex 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/doc/latex/sesstime/stimsmp4.tex 2018-01-06 21:55:14 UTC (rev 46235)
@@ -6,7 +6,7 @@
%%
%% sesstime.dtx (with options: `sample4')
%%
-%% Copyright (C) 2016-2017 Niklas Beisert
+%% Copyright (C) 2016-2018 Niklas Beisert
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
Modified: trunk/Master/texmf-dist/source/latex/sesstime/sesstime.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sesstime/sesstime.dtx 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/source/latex/sesstime/sesstime.dtx 2018-01-06 21:55:14 UTC (rev 46235)
@@ -1,6 +1,6 @@
% \iffalse
%
-% sesstime.dtx Copyright (C) 2016-2017 Niklas Beisert
+% sesstime.dtx Copyright (C) 2016-2018 Niklas Beisert
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -19,10 +19,10 @@
% with |stimsmp3.tex| and |stimsmp4.tex|.
%
%<package|sample>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-%<package>\ProvidesPackage{sesstime}[2017/05/01 v1.0 session timing marks]
-%<sample>\ProvidesFile{stimsamp.tex}[2017/05/01 v1.0 sample for sesstime]
+%<package>\ProvidesPackage{sesstime}[2018/01/06 v1.1 session timing marks]
+%<sample>\ProvidesFile{stimsamp.tex}[2018/01/06 v1.1 sample for sesstime]
%<*driver>
-%\ProvidesFile{sesstime.drv}[2017/05/01 v1.0 sesstime reference manual file]
+%\ProvidesFile{sesstime.drv}[2018/01/06 v1.1 sesstime reference manual file]
\PassOptionsToClass{10pt,a4paper}{article}
\documentclass{ltxdoc}
@@ -46,7 +46,7 @@
{\texttt{nbeisert at itp.phys.ethz.ch}}}
\hypersetup{pdfauthor={Niklas Beisert}}
\hypersetup{pdfsubject={Manual for the LaTeX2e Package sesstime}}
-\date{1 May 2017, \textsf{v1.0}}
+\date{6 January 2018, \textsf{v1.1}}
\maketitle
\begin{abstract}\noindent
@@ -809,6 +809,22 @@
Set duration of automatically determined sessions;
|0| disables automatic determination.
+\item |depthsec=|\textit{depth}
+(initially set to |3|) --
+Set maximum sectioning depth to be displayed
+along with their number in the list of sessions;
+deeper sections are considered as paragraphs
+and are displayed differently.
+Values |0| through |5| correspond to
+|\chapter|, |\section|, |\subsection|,
+|\subsubsection|, |\paragraph| and |\subparagraph|.
+
+\item |depthpar=|\textit{depth}
+(initially set to |5|) --
+Set maximum sectioning depth to be displayed
+in list of sessions
+(similar to the standard \LaTeX{} counter |secnumdepth|).
+
\item |flags=|\textit{flags}
--
Specify a comma-separated list of flags.
@@ -830,7 +846,7 @@
\parskip1ex
\parindent0pt
-Copyright \copyright{} 2016--2017 Niklas Beisert
+Copyright \copyright{} 2016--2018 Niklas Beisert
This work may be distributed and/or modified under the
conditions of the \LaTeX{} Project Public License, either version 1.3
@@ -927,6 +943,17 @@
\subsection{Revision History}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v1.1:} 2018/01/06
+
+\begin{itemize}
+\item
+grabbing of section titles improved
+\item
+options |depthsec| and |depthpar| to
+adjust depth in list of sessions
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paragraph{v1.0:} 2017/05/01
\begin{itemize}
@@ -1062,6 +1089,11 @@
\ifnum #2>0\\at #2 min\fi\fi\vphantom{g}}}
% \end{macrocode}
+% Overwrite depth of sections in session list:
+% \begin{macrocode}
+\timingconfigure{depthsec=3,depthpar=4}
+% \end{macrocode}
+
% Overwrite display of sessions list:
% \begin{macrocode}
\renewcommand{\timingsessionline}[5]{\ \\%
@@ -1196,9 +1228,14 @@
\timingsplit*{15}
\subsection{five.two}
\paragraph{five.two.paragraph.}
+\timingsession
\lorem
\timingsplit*{15}
+\subparagraph{five.two.subparagraph.}
+\timingsession
\lorem
+\timingsplit*{15}
+\lorem
\timingstop*{15}
\timingchapterend
% \end{macrocode}
@@ -1389,7 +1426,9 @@
% indicates whether timing marks (of particular kind) should be printed.
% The dimensions |\sti at widthl| and |\sti at widthr| store
% the width of timing marks on the left and right, respectively.
-% |sti at autosession| stores the duration of automatically generated sessions:
+% |sti at autosession| stores the duration of automatically generated sessions.
+% |\sti at depthsec| and |\sti at depthpar| store the depth of sections
+% to be included in the list of sessions:
% \begin{macrocode}
\newif\ifsti at print\sti at printtrue
\newif\ifsti at printblock\sti at printblocktrue
@@ -1400,6 +1439,8 @@
\newdimen\sti at widthl\setlength{\sti at widthl}{1cm}
\newdimen\sti at widthr\setlength{\sti at widthr}{1cm}
\newcounter{sti at autosession}
+\def\sti at depthsec{3}
+\def\sti at depthpar{5}
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1419,6 +1460,8 @@
\define at key{sti@}{widthr}{\setlength{\sti at widthr}{#1}}
\define at key{sti@}{autosession}{\setcounter{sti at autosession}{#1}}
\define at key{sti@}{flags}{\def\sti at flags{#1}}
+\define at key{sti@}{depthsec}{\def\sti at depthsec{#1}}
+\define at key{sti@}{depthpar}{\def\sti at depthpar{#1}}
% \end{macrocode}
% \begin{macro}{\timingconfigure}
@@ -1576,49 +1619,60 @@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\sti at recordtitle}
% \begin{macro}{\sti at secnum}
-% \begin{macro}{\sti at secmark}
-% \begin{macro}{\sti at parmark}
-% The following code remembers the present sectioning titles
-% as well as the section number
-% for usage in the list of sections.
-% It does so by hooking into the definitions of |\chaptermark|,
-% |\|[|sub|\textbar|subsub|]|sectionmark| and |\|[|sub|]|paragraphmark|:
+% \begin{macro}{\sti at sectitle}
+% \begin{macro}{\sti at partitle}
+% Record the present sectioning title and number
+% for usage in the list of sessions.
+% The depth in the first parameter in comparison to
+% |\sti at depthsec| and |\sti at depthpar| determines
+% whether the information is stored as section or paragraph:
% \begin{macrocode}
-\providecommand{\chaptermark}[1]{}
-\let\sti at oldchaptermark=\chaptermark
-\let\sti at oldsectionmark=\sectionmark
-\let\sti at oldsubsectionmark=\subsectionmark
-\let\sti at oldsubsubsectionmark=\subsubsectionmark
-\let\sti at oldparagraphmark=\paragraphmark
-\let\sti at oldsubparagraphmark=\subparagraphmark
-\renewcommand{\chaptermark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thechapter}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldchaptermark{#1}}
-\renewcommand{\sectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsectionmark{#1}}
-\renewcommand{\subsectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesubsection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsubsectionmark{#1}}
-\renewcommand{\subsubsectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesubsubsection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsubsectionmark{#1}}
-\renewcommand{\paragraphmark}[1]{%
- \expandafter\gdef\expandafter\sti at parmark\expandafter{#1}%
- \sti at oldparagraphmark{#1}}
-\renewcommand{\subparagraphmark}[1]{%
- \expandafter\gdef\expandafter\sti at parmark\expandafter{#1}%
- \sti at oldsubparagraphmark{#1}}
+\newcommand{\sti at recordtitle}[4]{\ifnum#2>\sti at depthpar\else%
+ \ifnum#2>\sti at depthsec%
+ \xdef\sti at partitle{#4}%
+ \else%
+ \xdef\sti at secnum{#3}%
+ \xdef\sti at sectitle{#4}%
+ \xdef\sti at partitle{}%
+ \fi\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \begin{macro}{\@startsection}
+% The following code hooks into the definition
+% of |\@startsection| to record titles and numbers:
+% \begin{macrocode}
+\let\sti at old@startsection\@startsection%
+\def\@startsection#1#2#3#4#5#6{\@ifstar%
+ {\sti at ssect{#1}{#2}{#3}{#4}{#5}{#6}}%
+ {\@dblarg{\sti at sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
+\def\sti at ssect#1#2#3#4#5#6#7{\sti at recordtitle{#1}{#2}{}{#7}%
+ \sti at old@startsection{#1}{#2}{#3}{#4}{#5}{#6}*{#7}}
+\def\sti at sect#1#2#3#4#5#6[#7]#8{{\advance\csname c@#1\endcsname1%
+ \sti at recordtitle{#1}{#2}{\csname the#1\endcsname}{#7}}%
+ \sti at old@startsection{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\chapter}
+% The following code similarly hooks into the definitions
+% of |\chapter| (if defined):
+% \begin{macrocode}
+\ifdefined\chapter
+\let\sti at old@chapter\chapter
+\def\chapter{\@ifstar\sti at schapter{\@dblarg{\sti at chapter}}}
+\def\sti at schapter#1{\sti at recordtitle{chapter}{0}{}{#1}\sti at old@chapter*{#1}}
+\def\sti at chapter[#1]#2{{\advance\c at chapter1%
+ \sti at recordtitle{chapter}{0}{\thechapter}{#1}}\sti at old@chapter[#1]{#2}}
+\fi
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\timingprintsession}
% Print the mark for the current session.
% Indicate the number and duration of the session as well as
@@ -1733,7 +1787,7 @@
\newcommand{\sti at addsessionline}{%
\addtocontents{los}{\protect\timingsessionline%
{\thesti at session}{\thesti at sessiontime}%
- {\sti at secnum}{\sti at secmark}{\sti at parmark}}}%
+ {\sti at secnum}{\sti at sectitle}{\sti at partitle}}}%
% \end{macrocode}
% \end{macro}
% \end{macro}
Modified: trunk/Master/texmf-dist/source/latex/sesstime/sesstime.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/sesstime/sesstime.ins 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/source/latex/sesstime/sesstime.ins 2018-01-06 21:55:14 UTC (rev 46235)
@@ -2,7 +2,7 @@
\input docstrip.tex
\keepsilent
-% sesstime.ins Copyright (C) 2016-2017 Niklas Beisert
+% sesstime.ins Copyright (C) 2016-2018 Niklas Beisert
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -14,7 +14,7 @@
\preamble
-Copyright (C) 2016-2017 Niklas Beisert
+Copyright (C) 2016-2018 Niklas Beisert
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
Modified: trunk/Master/texmf-dist/tex/latex/sesstime/sesstime.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sesstime/sesstime.sty 2018-01-06 21:54:57 UTC (rev 46234)
+++ trunk/Master/texmf-dist/tex/latex/sesstime/sesstime.sty 2018-01-06 21:55:14 UTC (rev 46235)
@@ -6,7 +6,7 @@
%%
%% sesstime.dtx (with options: `package')
%%
-%% Copyright (C) 2016-2017 Niklas Beisert
+%% Copyright (C) 2016-2018 Niklas Beisert
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-\ProvidesPackage{sesstime}[2017/05/01 v1.0 session timing marks]
+\ProvidesPackage{sesstime}[2018/01/06 v1.1 session timing marks]
\RequirePackage{keyval}
\def\sti at flags{}
@@ -45,6 +45,8 @@
\newdimen\sti at widthl\setlength{\sti at widthl}{1cm}
\newdimen\sti at widthr\setlength{\sti at widthr}{1cm}
\newcounter{sti at autosession}
+\def\sti at depthsec{3}
+\def\sti at depthpar{5}
\define at key{sti@}{print}[true]{\csname sti at print#1\endcsname}
\define at key{sti@}{block}[true]{\csname sti at printblock#1\endcsname}
@@ -58,6 +60,8 @@
\define at key{sti@}{widthr}{\setlength{\sti at widthr}{#1}}
\define at key{sti@}{autosession}{\setcounter{sti at autosession}{#1}}
\define at key{sti@}{flags}{\def\sti at flags{#1}}
+\define at key{sti@}{depthsec}{\def\sti at depthsec{#1}}
+\define at key{sti@}{depthpar}{\def\sti at depthpar{#1}}
\newcommand{\timingconfigure}[2][]{%
\sti at processflags{#1}%
@@ -128,36 +132,33 @@
\csname sti at sessiontotal@#2\endcsname%
\ifx\timingreturn\relax\def\timingreturn{#1}\fi}
-\providecommand{\chaptermark}[1]{}
-\let\sti at oldchaptermark=\chaptermark
-\let\sti at oldsectionmark=\sectionmark
-\let\sti at oldsubsectionmark=\subsectionmark
-\let\sti at oldsubsubsectionmark=\subsubsectionmark
-\let\sti at oldparagraphmark=\paragraphmark
-\let\sti at oldsubparagraphmark=\subparagraphmark
-\renewcommand{\chaptermark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thechapter}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldchaptermark{#1}}
-\renewcommand{\sectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsectionmark{#1}}
-\renewcommand{\subsectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesubsection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsubsectionmark{#1}}
-\renewcommand{\subsubsectionmark}[1]{%
- \expandafter\gdef\expandafter\sti at secnum\expandafter{\thesubsubsection}%
- \expandafter\gdef\expandafter\sti at secmark\expandafter{#1}%
- \xdef\sti at parmark{}\sti at oldsubsectionmark{#1}}
-\renewcommand{\paragraphmark}[1]{%
- \expandafter\gdef\expandafter\sti at parmark\expandafter{#1}%
- \sti at oldparagraphmark{#1}}
-\renewcommand{\subparagraphmark}[1]{%
- \expandafter\gdef\expandafter\sti at parmark\expandafter{#1}%
- \sti at oldsubparagraphmark{#1}}
+\newcommand{\sti at recordtitle}[4]{\ifnum#2>\sti at depthpar\else%
+ \ifnum#2>\sti at depthsec%
+ \xdef\sti at partitle{#4}%
+ \else%
+ \xdef\sti at secnum{#3}%
+ \xdef\sti at sectitle{#4}%
+ \xdef\sti at partitle{}%
+ \fi\fi}
+\let\sti at old@startsection\@startsection%
+\def\@startsection#1#2#3#4#5#6{\@ifstar%
+ {\sti at ssect{#1}{#2}{#3}{#4}{#5}{#6}}%
+ {\@dblarg{\sti at sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
+\def\sti at ssect#1#2#3#4#5#6#7{\sti at recordtitle{#1}{#2}{}{#7}%
+ \sti at old@startsection{#1}{#2}{#3}{#4}{#5}{#6}*{#7}}
+\def\sti at sect#1#2#3#4#5#6[#7]#8{{\advance\csname c@#1\endcsname1%
+ \sti at recordtitle{#1}{#2}{\csname the#1\endcsname}{#7}}%
+ \sti at old@startsection{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}}
+
+\ifdefined\chapter
+\let\sti at old@chapter\chapter
+\def\chapter{\@ifstar\sti at schapter{\@dblarg{\sti at chapter}}}
+\def\sti at schapter#1{\sti at recordtitle{chapter}{0}{}{#1}\sti at old@chapter*{#1}}
+\def\sti at chapter[#1]#2{{\advance\c at chapter1%
+ \sti at recordtitle{chapter}{0}{\thechapter}{#1}}\sti at old@chapter[#1]{#2}}
+\fi
+
\providecommand{\timingprintsession}[2]{\timingprintremark{%
session #1%
\timingsessiontotal[0]{#1}\ifnum\timingreturn>0%
@@ -215,7 +216,7 @@
\newcommand{\sti at addsessionline}{%
\addtocontents{los}{\protect\timingsessionline%
{\thesti at session}{\thesti at sessiontime}%
- {\sti at secnum}{\sti at secmark}{\sti at parmark}}}%
+ {\sti at secnum}{\sti at sectitle}{\sti at partitle}}}%
\newcommand{\sti at notechaptertotal}[2]{%
\expandafter\gdef\csname sti at chaptertotal@#1\endcsname{#2}}
More information about the tex-live-commits
mailing list