From 14528ee6754969064d34cdd1cc03e98e9d302694 Mon Sep 17 00:00:00 2001 From: Bart Snapp Date: Thu, 19 Jun 2025 15:06:03 -0400 Subject: [PATCH 1/9] started toc. HOWEVER, for the basic activity, I think no sections should be shown, it should just list the activity. When we do \part (as a chapter heading... should we use \chapter for this??) And follow with \sectionstyle, things look good -- Be sure to check out PDF table of contents (given by PDF viewer) On the other hand, there is something wrong with chapterstyle... to see this, just try to do \setcounter{tocdepth}{1} and note that the style there changes... This should not do that! --- toc/basicActivity.tex | 47 +++++++++++++++ toc/chapterLevelActivity.tex | 42 +++++++++++++ toc/sectionLevelActivity.tex | 43 +++++++++++++ toc/toc.tex | 50 +++++++++++++++ toc/xmPreamble.tex | 114 +++++++++++++++++++++++++++++++++++ 5 files changed, 296 insertions(+) create mode 100644 toc/basicActivity.tex create mode 100644 toc/chapterLevelActivity.tex create mode 100644 toc/sectionLevelActivity.tex create mode 100644 toc/toc.tex create mode 100644 toc/xmPreamble.tex diff --git a/toc/basicActivity.tex b/toc/basicActivity.tex new file mode 100644 index 0000000..11e60f6 --- /dev/null +++ b/toc/basicActivity.tex @@ -0,0 +1,47 @@ +\documentclass{ximera} + +\author{Bart Snapp} + +\title{A basic activity} + +\begin{document} +\begin{abstract} + This is filler content for a table of contents. +\end{abstract} +\maketitle + +This document is an example of a basic activity, with sections, subsections, and paragraphs. + + +Note, the option \verb!numbers! must be set in the \verb!xourse! file for these +files to be numbered in the table of contents. + +\begin{warning} +We \textbf{never} use \verb!\section*! to omit numbers, instead we use document class option \verb!numbers! to get numbers in the table of contents. +It is implemented like this \verb!\documentclass[numbers]{xourse}!. +\end{warning} + + + +\section{A true section in a basic Ximera activity} +\lipsum[1] + + +\subsection{A true subsection in a basic Ximera activity} +\lipsum[1] + +\paragraph{A true paragraph in a basic Ximera activity} +\lipsum[1] + + +\section{A second true section in a basic Ximera activity} +\lipsum[1] + + +\subsection{Another true subsection in a basic Ximera activity} +\lipsum[1] + +\paragraph{Another true paragraph in a basic Ximera activity} +\lipsum[1] + +\end{document} \ No newline at end of file diff --git a/toc/chapterLevelActivity.tex b/toc/chapterLevelActivity.tex new file mode 100644 index 0000000..bf3dd44 --- /dev/null +++ b/toc/chapterLevelActivity.tex @@ -0,0 +1,42 @@ +\documentclass{ximera} + +\author{Bart Snapp} + +\title{A chapter level activity} + +\begin{document} +\begin{abstract} +This is a chapter level Ximera activity. +\end{abstract} +\maketitle + +This document is an example of an activity, that is considered a +\textbf{chapter} within a document, where \verb!\chapterstyle! delineates +chapters. + +Note, the option \verb!numbers! must be set in the \verb!xourse! file for these +files to be numbered in the table of contents. + +This should be primarly used as a ``chapter overview'' and while it can contain +sections, we advise not mixing \verb!!\sectionstyle! and \verb!\section! with a +chapter level document (though we do it here for illustration purposes). + +\section{A true section in a chapter level Ximera activity} +\lipsum[1] + +\subsection{A true subsection in a chapter level Ximera activity} +\lipsum[1] + +\paragraph{A true paragraph in a chapter level Ximera activity} +\lipsum[1] + +\section{A second true section in a chapter level Ximera activity} +\lipsum[1] + +\subsection{Another true subsection in a chapter level Ximera activity} +\lipsum[1] + +\paragraph{Another true paragraph in a chapter level Ximera activity} +\lipsum[1] + +\end{document} \ No newline at end of file diff --git a/toc/sectionLevelActivity.tex b/toc/sectionLevelActivity.tex new file mode 100644 index 0000000..535a625 --- /dev/null +++ b/toc/sectionLevelActivity.tex @@ -0,0 +1,43 @@ +\documentclass{ximera} + +\author{Bart Snapp} + +\title{A section level Ximera activity} + +\begin{document} +\begin{abstract} +This is a Ximera activity interpreted as a section. +\end{abstract} +\maketitle + +This document is an example of an section level activity, that is considered a +\textbf{section} within a document, where \verb!\part! delineates chapters or a +previous activity with \verb!\chapterstyle! delineates the chapter and sections. + +Note, the option \verb!numbers! must be set in the \verb!xourse! file for these +files to be numbered in the table of contents. + +\begin{warning} + Since the level of the activity is a section, within this activity, + \verb!\section! will create subsections. +\end{warning} + +\section{A true section in a section level Ximera activity} +\lipsum[1] + +\subsection{A true subsection in a section level Ximera activity} +\lipsum[1] + +\paragraph{A true paragraph in a section level Ximera activity} +\lipsum[1] + +\section{A second true section in a section level Ximera activity} +\lipsum[1] + +\subsection{Another true subsection in a section level Ximera activity} +\lipsum[1] + +\paragraph{Another true paragraph in a section level Ximera activity} +\lipsum[1] + +\end{document} \ No newline at end of file diff --git a/toc/toc.tex b/toc/toc.tex new file mode 100644 index 0000000..003107b --- /dev/null +++ b/toc/toc.tex @@ -0,0 +1,50 @@ +\documentclass[numbers]{xourse} + +\author{Bart Snapp} + +\title{Basic Table of Contents} + +\begin{document} +\begin{abstract} + This document is an example of a basic table of contents. +\end{abstract} +\maketitle + +\activity{basicActivity} +\activity{basicActivity} +\activity{basicActivity} + + +%% Mabe a new command for this \xmPartAsChapter +\renewcommand{\part}[1]{\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle} + + +\part{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + +\part{The next chapter defined as a part} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + + + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + +\end{document} \ No newline at end of file diff --git a/toc/xmPreamble.tex b/toc/xmPreamble.tex new file mode 100644 index 0000000..6d1fa56 --- /dev/null +++ b/toc/xmPreamble.tex @@ -0,0 +1,114 @@ +\usepackage{lipsum} % for filler text + + +\renewcommand{\theHsection}{chapter.section.\thesection} %% MAKES LINKS WORK should be added to CLS + + + + +\makeatletter +\renewcommand\chapterstyle{% + \def\activitystyle{activity-chapter} + \def\maketitle{% + \addtocounter{titlenumber}{1}% + \phantomsection\addcontentsline{toc}{section}{\textbf{\thetitlenumber\hspace{1em}\@title}} + {\flushleft\small\sffamily\bfseries\@pretitle\par\vspace{-1.5em}}% + {\flushleft\LARGE\sffamily\bfseries\thetitlenumber\hspace{1em}\@title \par }% + {\vskip .6em\noindent\textit\theabstract\setcounter{problem}{0}\setcounter{section}{0}}% + \par\vspace{2em} +}} + + + + + +\renewcommand\sectionstyle{% MOVE TO CLS + \def\activitystyle{activity-section} + \def\maketitle{% + \gdef\headerNameContent{\thechaptertitle:~\@title}%% Needs a gdef to make the definition global. + \addtocounter{section}{1}% + \setcounter{sectiontitlenumber}{\value{section}}% + \phantomsection\addcontentsline{toc}{section}{\thetitlenumber.\thesectiontitlenumber\hspace{1em}\@title}% + {\flushleft\small\sffamily\bfseries\@pretitle\par\vspace{-1.5em}}% + {\flushleft\Large\sffamily\bfseries\thetitlenumber.\thesectiontitlenumber\hspace{1em}\@title \par}% + {\vskip .6em\noindent\textit\theabstract\setcounter{subsection}{0}}% + \par\vspace{2em} + + \renewcommand\section{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\sffamily\bfseries}} + + \renewcommand\subsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\sffamily\bfseries}} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\sffamily\bfseries}} +}} +\makeatother + + + + + +%%% LET'S see what this does: +% \makeatletter +% %% Redefine section and subsection %% MOVE TO CLS +% \renewcommand\section{\@startsection{subsection}{1}{\z@}% +% {-3.5ex \@plus -1ex \@minus -.2ex}% +% {2.3ex \@plus.2ex}% +% {\boldmath\normalfont\Large\sffamily\bfseries}} +% \renewcommand\subsection{\@startsection{subsubsection}{2}{\z@}% +% {-3.25ex \@plus -1ex \@minus -.2ex}% +% {1.5ex \@plus .2ex}% +% {\boldmath\normalfont\large\sffamily\bfseries}} +% \renewcommand\subsubsection{\@startsection{paragraph}{3}{\z@}% +% {-3.25ex \@plus -1ex \@minus -.2ex}% +% {1.5ex \@plus .2ex}% +% {\normalfont\normalsize\sffamily\bfseries}} +% \makeatother +% \renewcommand\thesubsection{\thesection} +% \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}} + + +\makeatletter +%% Redefine section and subsection %% MOVE TO CLS +\renewcommand\section{\@startsection{section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\boldmath\normalfont\Large\sffamily\bfseries}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex \@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\boldmath\normalfont\large\sffamily\bfseries}} +\renewcommand\subsubsection{\@startsection{subsection}{3}{\z@}% + {-3.25ex \@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\sffamily\bfseries}} +\makeatother + +\makeatletter %% move to CLS +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\sffamily\bfseries}} +\makeatother + +\makeatletter +\def\activitystyle{activity-chapter} +\def\maketitle{% + \addtocounter{titlenumber}{1}% + \phantomsection\addcontentsline{toc}{section}{\textbf{\thetitlenumber\hspace{1em}\@title}} + {\flushleft\small\sffamily\bfseries\@pretitle\par\vspace{-1.5em}}% + {\flushleft\LARGE\sffamily\bfseries\thetitlenumber\hspace{1em}\@title \par }% + {\vskip .6em\noindent\textit\theabstract\setcounter{problem}{0}\setcounter{section}{0}}% + \par\vspace{2em} +} +\makeatother + + +%% The bug is that the + From 13b5468f59b8a54035c2184509fa5c035c646daa Mon Sep 17 00:00:00 2001 From: Bart Snapp Date: Thu, 19 Jun 2025 15:19:28 -0400 Subject: [PATCH 2/9] added this --- toc/toc.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toc/toc.tex b/toc/toc.tex index 003107b..d08e9db 100644 --- a/toc/toc.tex +++ b/toc/toc.tex @@ -16,7 +16,7 @@ %% Mabe a new command for this \xmPartAsChapter -\renewcommand{\part}[1]{\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle} +\pdfOnly{\renewcommand{\part}[1]{\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle}} \part{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble From fe1ddb7d65e1d8ecc596b71aed4b3b18fd3e7222 Mon Sep 17 00:00:00 2001 From: Bart Snapp Date: Thu, 19 Jun 2025 18:30:03 -0400 Subject: [PATCH 3/9] removed opiniated warning... for the manual... --- toc/basicActivity.tex | 4 ---- toc/toc.tex | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/toc/basicActivity.tex b/toc/basicActivity.tex index 11e60f6..f4233dc 100644 --- a/toc/basicActivity.tex +++ b/toc/basicActivity.tex @@ -16,10 +16,6 @@ Note, the option \verb!numbers! must be set in the \verb!xourse! file for these files to be numbered in the table of contents. -\begin{warning} -We \textbf{never} use \verb!\section*! to omit numbers, instead we use document class option \verb!numbers! to get numbers in the table of contents. -It is implemented like this \verb!\documentclass[numbers]{xourse}!. -\end{warning} diff --git a/toc/toc.tex b/toc/toc.tex index d08e9db..103a028 100644 --- a/toc/toc.tex +++ b/toc/toc.tex @@ -9,7 +9,7 @@ This document is an example of a basic table of contents. \end{abstract} \maketitle - +\chapterstyle \activity{basicActivity} \activity{basicActivity} \activity{basicActivity} From 94dac51d1ae368962a2e5d82a4b4c72f869a2d02 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Sun, 22 Jun 2025 12:42:11 +0200 Subject: [PATCH 4/9] Fir activities on one page (shorter lipsums...) --- toc/basicActivity.tex | 30 +++++++++++++++--------------- toc/chapterLevelActivity.tex | 30 +++++++++++++++--------------- toc/sectionLevelActivity.tex | 29 ++++++++++++++--------------- 3 files changed, 44 insertions(+), 45 deletions(-) diff --git a/toc/basicActivity.tex b/toc/basicActivity.tex index f4233dc..b819829 100644 --- a/toc/basicActivity.tex +++ b/toc/basicActivity.tex @@ -10,34 +10,34 @@ \end{abstract} \maketitle -This document is an example of a basic activity, with sections, subsections, and paragraphs. +This is a basic activity, with sections, subsections, and paragraphs. -Note, the option \verb!numbers! must be set in the \verb!xourse! file for these -files to be numbered in the table of contents. +Note: option \verb!numbers! needed in the \verb!xourse! file for numbered entries in TOC. -\section{A true section in a basic Ximera activity} -\lipsum[1] +\section{A true section in a basic activity} +\lipsum[1][1-2] -\subsection{A true subsection in a basic Ximera activity} -\lipsum[1] -\paragraph{A true paragraph in a basic Ximera activity} -\lipsum[1] +\subsection{A true subsection in a basic activity} +\lipsum[2][1-2] +\paragraph{A true paragraph in a basic activity} +\lipsum[3][1] -\section{A second true section in a basic Ximera activity} -\lipsum[1] +\section{A second true section in a basic activity} +\lipsum[4][1-2] -\subsection{Another true subsection in a basic Ximera activity} -\lipsum[1] -\paragraph{Another true paragraph in a basic Ximera activity} -\lipsum[1] +\subsection{Another true subsection in a basic activity} +\lipsum[1][1-2] + +\paragraph{Another true paragraph in a basic activity} +\lipsum[2][1] \end{document} \ No newline at end of file diff --git a/toc/chapterLevelActivity.tex b/toc/chapterLevelActivity.tex index bf3dd44..9db9a70 100644 --- a/toc/chapterLevelActivity.tex +++ b/toc/chapterLevelActivity.tex @@ -10,33 +10,33 @@ \end{abstract} \maketitle -This document is an example of an activity, that is considered a +This an activity, that is considered a \textbf{chapter} within a document, where \verb!\chapterstyle! delineates chapters. -Note, the option \verb!numbers! must be set in the \verb!xourse! file for these -files to be numbered in the table of contents. +Note: option \verb!numbers! needed in the \verb!xourse! file for numbered entries in TOC. + This should be primarly used as a ``chapter overview'' and while it can contain sections, we advise not mixing \verb!!\sectionstyle! and \verb!\section! with a chapter level document (though we do it here for illustration purposes). -\section{A true section in a chapter level Ximera activity} -\lipsum[1] +\section{A true section in a chapter level activity} +\lipsum[1][1-2] -\subsection{A true subsection in a chapter level Ximera activity} -\lipsum[1] +\subsection{A true subsection in a chapter level activity} +\lipsum[2][1-2] -\paragraph{A true paragraph in a chapter level Ximera activity} -\lipsum[1] +\paragraph{A true paragraph in a chapter level activity} +\lipsum[3][1] -\section{A second true section in a chapter level Ximera activity} -\lipsum[1] +\section{A second true section in a chapter level activity} +\lipsum[1][1-2] -\subsection{Another true subsection in a chapter level Ximera activity} -\lipsum[1] +\subsection{Another true subsection in a chapter level activity} +\lipsum[2][1-2] -\paragraph{Another true paragraph in a chapter level Ximera activity} -\lipsum[1] +\paragraph{Another true paragraph in a chapter level activity} +\lipsum[3][1] \end{document} \ No newline at end of file diff --git a/toc/sectionLevelActivity.tex b/toc/sectionLevelActivity.tex index 535a625..f8da8ed 100644 --- a/toc/sectionLevelActivity.tex +++ b/toc/sectionLevelActivity.tex @@ -10,34 +10,33 @@ \end{abstract} \maketitle -This document is an example of an section level activity, that is considered a +This a section level activity, that is considered a \textbf{section} within a document, where \verb!\part! delineates chapters or a previous activity with \verb!\chapterstyle! delineates the chapter and sections. -Note, the option \verb!numbers! must be set in the \verb!xourse! file for these -files to be numbered in the table of contents. +Note: option \verb!numbers! needed in the \verb!xourse! file for numbered entries in TOC. \begin{warning} Since the level of the activity is a section, within this activity, \verb!\section! will create subsections. \end{warning} -\section{A true section in a section level Ximera activity} -\lipsum[1] +\section{A true section in a section level activity} +\lipsum[1][1-2] -\subsection{A true subsection in a section level Ximera activity} -\lipsum[1] +\subsection{A true subsection in a section level activity} +\lipsum[1][1-2] -\paragraph{A true paragraph in a section level Ximera activity} -\lipsum[1] +\paragraph{A true paragraph in a section level activity} +\lipsum[1][1] -\section{A second true section in a section level Ximera activity} -\lipsum[1] +\section{A second true section in a section level activity} +\lipsum[1][1-2] -\subsection{Another true subsection in a section level Ximera activity} -\lipsum[1] +\subsection{Another true subsection in a section level activity} +\lipsum[1][1-2] -\paragraph{Another true paragraph in a section level Ximera activity} -\lipsum[1] +\paragraph{Another true paragraph in a section level activity} +\lipsum[1][1] \end{document} \ No newline at end of file From fb547e59a9766ad33ea10ab47547f178f539eb7f Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Sun, 22 Jun 2025 14:45:34 +0200 Subject: [PATCH 5/9] add toc_wim (less activities; basicActivity-as-section) --- toc/toc_wim.tex | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 toc/toc_wim.tex diff --git a/toc/toc_wim.tex b/toc/toc_wim.tex new file mode 100644 index 0000000..3a6f6eb --- /dev/null +++ b/toc/toc_wim.tex @@ -0,0 +1,81 @@ +\documentclass[numbers]{xourse} + +\usepackage{titlesec} + +\author{Bart Snapp} + +\usepackage{lipsum} + +\title{Basic Table of Contents (wim)} + + +\setcounter{secnumdepth}{6} +\setcounter{tocdepth}{1} + +\begin{document} +\begin{abstract} +\end{abstract} +\maketitle + +% % Second TOC; DOES NOT WORK +% \clearpage +% \begingroup +% \setcounter{tocdepth}{6} +% \renewcommand{\contentsname}{Appendix Contents} +% \makeatletter +% \patchcmd{\@mkboth}{\ttl@savemark}{\relax}{}{} +% \makeatother +% \tableofcontents +% \endgroup + +% TOCDEPTH = \arabic{tocdepth} xxx yzz + + +%% Mabe a new command for this \xmPartAsChapter +\pdfOnly{\renewcommand{\part}[1]{\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle}} + +% \part{The first part} +\chapterstyle +\activity{basicActivity} +\activity{basicActivity} +% \sectionstyle +% \activity{basicActivity} +% \activity{basicActivity} + +% \activity{basicActivity} + + +\part{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +% \activity{sectionLevelActivity} + +\part{The next chapter defined as a part} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +% \activity{sectionLevelActivity} + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + +\part{And now for basicActivity as a section} +\chapterstyle +\activity{basicActivity} +\sectionstyle +\activity{basicActivity} + + +\end{document} \ No newline at end of file From 0116535ad9f1fda076a9d9b2afeced3f06933117 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Sun, 22 Jun 2025 14:57:10 +0200 Subject: [PATCH 6/9] recompile --- toc/toc_wim.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/toc/toc_wim.tex b/toc/toc_wim.tex index 3a6f6eb..9d0459e 100644 --- a/toc/toc_wim.tex +++ b/toc/toc_wim.tex @@ -8,7 +8,6 @@ \title{Basic Table of Contents (wim)} - \setcounter{secnumdepth}{6} \setcounter{tocdepth}{1} From 9ef6e146ceca15ae34cf1e7b2f26a20a9f430d9c Mon Sep 17 00:00:00 2001 From: Bart Snapp Date: Fri, 11 Jul 2025 11:08:35 -0400 Subject: [PATCH 7/9] testing --- toc/toc.tex | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/toc/toc.tex b/toc/toc.tex index 103a028..dab3ff3 100644 --- a/toc/toc.tex +++ b/toc/toc.tex @@ -4,28 +4,44 @@ \title{Basic Table of Contents} +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{1} + \begin{document} \begin{abstract} This document is an example of a basic table of contents. \end{abstract} \maketitle -\chapterstyle + + + \activity{basicActivity} \activity{basicActivity} \activity{basicActivity} + + + + + + + %% Mabe a new command for this \xmPartAsChapter -\pdfOnly{\renewcommand{\part}[1]{\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle}} +\pdfOnly{ + \newcommand{\xourseChapter}[1]{ + \ifonlineTF{\chapter{#1}} + { + \chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle}}} -\part{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble +\xourseChapter{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble \sectionstyle \activity{sectionLevelActivity} \activity{sectionLevelActivity} \activity{sectionLevelActivity} -\part{The next chapter defined as a part} +\xourseChapter{The next chapter defined as a part} \sectionstyle \activity{sectionLevelActivity} \activity{sectionLevelActivity} From 609a8a00ed1404d0d921eb418f22a0e48b5ad7a8 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Fri, 11 Jul 2025 22:54:22 +0200 Subject: [PATCH 8/9] move to 13-toc (issue-number!); temp (?) fix compilation error --- {toc => 13-toc}/basicActivity.tex | 0 {toc => 13-toc}/chapterLevelActivity.tex | 0 {toc => 13-toc}/sectionLevelActivity.tex | 0 13-toc/toc.tex | 66 ++++++++++++++++++++++++ {toc => 13-toc}/toc_wim.tex | 0 {toc => 13-toc}/xmPreamble.tex | 0 6 files changed, 66 insertions(+) rename {toc => 13-toc}/basicActivity.tex (100%) rename {toc => 13-toc}/chapterLevelActivity.tex (100%) rename {toc => 13-toc}/sectionLevelActivity.tex (100%) create mode 100644 13-toc/toc.tex rename {toc => 13-toc}/toc_wim.tex (100%) rename {toc => 13-toc}/xmPreamble.tex (100%) diff --git a/toc/basicActivity.tex b/13-toc/basicActivity.tex similarity index 100% rename from toc/basicActivity.tex rename to 13-toc/basicActivity.tex diff --git a/toc/chapterLevelActivity.tex b/13-toc/chapterLevelActivity.tex similarity index 100% rename from toc/chapterLevelActivity.tex rename to 13-toc/chapterLevelActivity.tex diff --git a/toc/sectionLevelActivity.tex b/13-toc/sectionLevelActivity.tex similarity index 100% rename from toc/sectionLevelActivity.tex rename to 13-toc/sectionLevelActivity.tex diff --git a/13-toc/toc.tex b/13-toc/toc.tex new file mode 100644 index 0000000..07eb321 --- /dev/null +++ b/13-toc/toc.tex @@ -0,0 +1,66 @@ +\documentclass[numbers]{xourse} + +\author{Bart Snapp} + +\title{Basic Table of Contents} + +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{1} + +\begin{document} +\begin{abstract} + This document is an example of a basic table of contents. +\end{abstract} +\maketitle + + + +\activity{basicActivity} +\activity{basicActivity} +\activity{basicActivity} + + + + + + + + + +%% Make a new command for this \xmPartAsChapter +\newcommand{\xourseChapter}[1]{ + \ifonlineTF + {\part{#1}} % Online an 'empty' \chapter does not exist ...? + {\chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle} +} + + +\xourseChapter{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + +\xourseChapter{The next chapter defined as a part} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + + + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + + +\chapterstyle +\activity{chapterLevelActivity} +\sectionstyle +\activity{sectionLevelActivity} +\activity{sectionLevelActivity} + +\end{document} \ No newline at end of file diff --git a/toc/toc_wim.tex b/13-toc/toc_wim.tex similarity index 100% rename from toc/toc_wim.tex rename to 13-toc/toc_wim.tex diff --git a/toc/xmPreamble.tex b/13-toc/xmPreamble.tex similarity index 100% rename from toc/xmPreamble.tex rename to 13-toc/xmPreamble.tex From cfc9f549e7bf995b79b907f11120b5b64f47900f Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Fri, 11 Jul 2025 23:07:50 +0200 Subject: [PATCH 9/9] Delete toc/toc.tex (see 13-toc!) --- toc/toc.tex | 66 ----------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 toc/toc.tex diff --git a/toc/toc.tex b/toc/toc.tex deleted file mode 100644 index dab3ff3..0000000 --- a/toc/toc.tex +++ /dev/null @@ -1,66 +0,0 @@ -\documentclass[numbers]{xourse} - -\author{Bart Snapp} - -\title{Basic Table of Contents} - -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{1} - -\begin{document} -\begin{abstract} - This document is an example of a basic table of contents. -\end{abstract} -\maketitle - - - -\activity{basicActivity} -\activity{basicActivity} -\activity{basicActivity} - - - - - - - - - -%% Mabe a new command for this \xmPartAsChapter -\pdfOnly{ - \newcommand{\xourseChapter}[1]{ - \ifonlineTF{\chapter{#1}} - { - \chapterstyle\def\thechaptertitle{#1}\title{#1}\begin{abstract}\end{abstract}\maketitle}}} - - -\xourseChapter{Some chapter defined as a part} %% Part needs to be redefined in xmPreamble -\sectionstyle -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} - -\xourseChapter{The next chapter defined as a part} -\sectionstyle -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} - - - - -\chapterstyle -\activity{chapterLevelActivity} -\sectionstyle -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} - - -\chapterstyle -\activity{chapterLevelActivity} -\sectionstyle -\activity{sectionLevelActivity} -\activity{sectionLevelActivity} - -\end{document} \ No newline at end of file