diff --git a/src/packages.dtx b/src/packages.dtx index f1aa14a..61f7cda 100644 --- a/src/packages.dtx +++ b/src/packages.dtx @@ -39,9 +39,10 @@ \RequirePackage{listings} %% is this required??? \RequirePackage{xkeyval} - +\RequirePackage{tcolorbox} \RequirePackage{currfile} \RequirePackage{comment} + % % \end{macrocode} % Various packages must be loaded early to avoid polluting the |.jax| @@ -51,5 +52,6 @@ \RequirePackage{gettitlestring} \RequirePackage{nameref} \RequirePackage{epstopdf} + % % \end{macrocode} diff --git a/src/pdfstyling.dtx b/src/pdfstyling.dtx new file mode 100644 index 0000000..c8e7cb5 --- /dev/null +++ b/src/pdfstyling.dtx @@ -0,0 +1,69 @@ +% \begin{macrocode} +%<*classXimera> +% \end{macrocode} +% \begin{macrocode} +%%% Now we colorbox-ize nested theorems and problems. +% Define default color for colorized boxes now, so they can be edited by user in preamble if desired. +\definecolor{xmNestingColorLevelI}{RGB}{102, 255, 178}% Default top level color is Light Green +\definecolor{xmNestingColorLevelII}{RGB}{102, 178, 255}% Default first nested layer color is Light Blue +\definecolor{xmNestingColorLevelIII}{RGB}{255, 102, 178}% Default second nested layer color is Light Pink +\definecolor{xmNestingColorLevelIV}{RGB}{178, 255, 102}% Default third nested layer color is Bright Green +\definecolor{xmBackground}{RGB}{255,255,255}% Default background color is white. + +\newif\ifdispNest%% Flag for displaying any kind of nesting indicator via tcolorbox +\dispNesttrue% Default to showing nesting behavior via tcolorbox. + +\newif\ifdispNestColors%% Flag to opt for colored nesting indicators +\dispNestColorsfalse% Default to all black boxes, rather than colored by level + +\AtBeginDocument{ + \pdfOnly{ + \ifdispNestColors + \else% If we want non-colored boxes, overwrite the previous color definitions with variations on black. + \definecolor{xmNestingColorLevelI}{RGB}{0,0,0}% Black + \definecolor{xmNestingColorLevelII}{RGB}{35, 35, 35}% Light Blue + \definecolor{xmNestingColorLevelIII}{RGB}{70, 70, 70}% Light Pink + \definecolor{xmNestingColorLevelIV}{RGB}{105, 105, 105}% Bright Green + \fi + + %% Apply colorboxes around theorem-like environments in pdfs only to help see nesting. + \ifdispNest%% If you want to display nesting behavior via tcolorframebox frames, we now apply them. + \tcolorboxenvironment{algorithm}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=transparent} + \tcolorboxenvironment{axiom}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{claim}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{conclusion}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{condition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{conjecture}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{corollary}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{criterion}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{definition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{example}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{explanation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{fact}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{formula}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{idea}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{lemma}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{model}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{notation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{observation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{proposition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{paradox}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{procedure}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{remark}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{summary}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{template}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{warning}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + + %% Apply colorboboxes around problem-like environments in pdfs only to help see nesting. + \tcolorboxenvironment{problem}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{question}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{exploration}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{exercise}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + + \fi + } +} +% \end{macrocode} +% \begin{macrocode} +% +% \end{macrocode} \ No newline at end of file diff --git a/src/problem.dtx b/src/problem.dtx index c015ec2..66e990f 100644 --- a/src/problem.dtx +++ b/src/problem.dtx @@ -41,12 +41,13 @@ % % Configure environment configuration commands % -% The command \verb|\problemNumber| contains all the format code to determine the number (and the format of the number) for any of the problem environments. +% The command \verb|\probNumber| contains all the format code to determine the number (and the format of the number) for any of the problem environments. % % \begin{macrocode} \MakeCounter{Iteration@probCnt} \MakeCounter{problem} -\newcommand{\problemNumber}{ +\newif\ifnoNumberedProblems +\newcommand{\probNumber}{ % First we determine if we have a counter for this question depth level. \ifcsname c@depth\Roman{problem@Depth}Count\endcsname% Check to see if counter exists %If so, do nothing. @@ -69,11 +70,13 @@ \newcommand{\problemEnvironmentStart}[2]{% \stepcounter{problem@Depth}% Started a problem, so we've sunk another problem layer. \def\spaceatend{#1}% +%\edef\probNumDisp{\probNumber} \begin{trivlist}% -\item[\hskip\labelsep\sffamily\bfseries\GetTranslation{#2} \problemNumber% Determine the correct number of the problem, and the format of that number. +\item[\hskip\labelsep\sffamily\bfseries\GetTranslation{#2} \probNumber% Determine the correct number of the problem, and the format of that number. ]% \slshape } + %%%%% Configure environments end content %%%%%% \newcommand{\problemEnvironmentEnd}{%This configures all the end content for a problem. \stepcounter{problem@Depth} @@ -122,38 +125,41 @@ % \begin{macrocode} \newcounter{identification} \setcounter{identification}{0} +\def\probNumDisp{}% Otherwise don't display a problem number. \newcommand{\ConfigureQuestionEnv}[2]{% -\renewenvironment{#1}{ - } - { - }% +\renewenvironment{#1}{}{} \ConfigureEnv{#1} { -% \ifnumberedProblems% The code below is all to generate online problem numbering if option is set. -% \stepcounter{problem@Depth}% Started a problem, so we've sunk another problem layer. -% \ifcsname c@depth\Roman{problem@Depth}Count\endcsname -% \else -% \expandafter\newcounter{depth\Roman{problem@Depth}Count} -% \expandafter\setcounter{depth\Roman{problem@Depth}Count}{0} -% \fi -% \expandafter\stepcounter{depth\Roman{problem@Depth}Count} -% \def\problemNumDisp{ -% \arabic{depthICount}% Top Level Problem Number: X.1.1.1.1 Number. -% \ifcsname c@depthIICount\endcsname\ifnum\value{problem@Depth}>1 .\arabic{depthIICount}\fi% Problem 1.X.1.1.1 Number. -% \ifcsname c@depthIIICount\endcsname\ifnum\value{problem@Depth}>2 .\arabic{depthIIICount}\fi% Problem 1.1.X.1.1 Number. -% \ifcsname c@depthIVCount\endcsname\ifnum\value{problem@Depth}>3 .\arabic{depthIVCount}\fi% Problem 1.1.1.X.1 Number. -% \ifcsname c@depthVCount\endcsname\ifnum\value{problem@Depth}>4 .\arabic{depthVCount}\fi% Problem 1.1.1.1.X Number. -% \fi\fi\fi\fi -% } -% \else - \def\problemNumDisp{}% Otherwise don't display a problem number. -% \fi + \stepcounter{problem@Depth}% Started a problem, so we've sunk another problem layer. + \ifcsname c@depth\Roman{problem@Depth}Count\endcsname + \else + \expandafter\newcounter{depth\Roman{problem@Depth}Count} + \expandafter\setcounter{depth\Roman{problem@Depth}Count}{0} + \fi + \expandafter\stepcounter{depth\Roman{problem@Depth}Count} + \ifnumberedProblems% Because of how conditional syntax works, we need to make sure that the problem numbers are in the else branch so we do this goofy nonsense. + \noNumberedProblemsfalse + \else + \noNumberedProblemstrue + \fi + \ifnoNumberedProblems% The code below is all to generate online problem numbering if option is set. + \def\probNumDisp{} + \else + \def\probNumDisp{ + \space\arabic{depthICount}% Top Level Problem Number: X.1.1.1.1 Number. + \ifcsname c@depthIICount\endcsname\ifnum\value{problem@Depth}>1 .\arabic{depthIICount}\fi% Problem 1.X.1.1.1 Number. + \ifcsname c@depthIIICount\endcsname\ifnum\value{problem@Depth}>2 .\arabic{depthIIICount}\fi% Problem 1.1.X.1.1 Number. + \ifcsname c@depthIVCount\endcsname\ifnum\value{problem@Depth}>3 .\arabic{depthIVCount}\fi% Problem 1.1.1.X.1 Number. + \ifcsname c@depthVCount\endcsname\ifnum\value{problem@Depth}>4 .\arabic{depthVCount}\fi% Problem 1.1.1.1.X Number. + \fi\fi\fi\fi + } + \fi \stepcounter{identification} \ifvmode \IgnorePar \fi \EndP -\HCode{
} +\HCode{
} } { \stepcounter{problem@Depth} @@ -163,6 +169,7 @@ \fi \fi \addtocounter{problem@Depth}{-2}% Exited a problem so we've exited a problem layer. Need -2 because we steppped once at the start to check for needing a depth-level count reset. + \ifvmode \IgnorePar \fi @@ -175,7 +182,6 @@ \ConfigureQuestionEnv{exercise}{Exercise} \ConfigureQuestionEnv{question}{Question} \ConfigureQuestionEnv{exploration}{Exploration} - \ifdefined\xmNotHintAsExpandable \ConfigureQuestionEnv{hint}{hint} % 2024: hint is no longer a 'question-environment'. \fi diff --git a/ximera.4ht b/ximera.4ht index 26cfe34..c1a4a64 100644 --- a/ximera.4ht +++ b/ximera.4ht @@ -61,20 +61,41 @@ \newcounter{identification} \setcounter{identification}{0} +\def\probNumDisp{}% Otherwise don't display a problem number. \newcommand{\ConfigureQuestionEnv}[2]{% -\renewenvironment{#1}{ - } - { - }% +\renewenvironment{#1}{}{} \ConfigureEnv{#1} { - \def\problemNumDisp{}% Otherwise don't display a problem number. + \stepcounter{problem@Depth}% Started a problem, so we've sunk another problem layer. + \ifcsname c@depth\Roman{problem@Depth}Count\endcsname + \else + \expandafter\newcounter{depth\Roman{problem@Depth}Count} + \expandafter\setcounter{depth\Roman{problem@Depth}Count}{0} + \fi + \expandafter\stepcounter{depth\Roman{problem@Depth}Count} + \ifnumberedProblems% Because of how conditional syntax works, we need to make sure that the problem numbers are in the else branch so we do this goofy nonsense. + \noNumberedProblemsfalse + \else + \noNumberedProblemstrue + \fi + \ifnoNumberedProblems% The code below is all to generate online problem numbering if option is set. + \def\probNumDisp{} + \else + \def\probNumDisp{ + \space\arabic{depthICount}% Top Level Problem Number: X.1.1.1.1 Number. + \ifcsname c@depthIICount\endcsname\ifnum\value{problem@Depth}>1 .\arabic{depthIICount}\fi% Problem 1.X.1.1.1 Number. + \ifcsname c@depthIIICount\endcsname\ifnum\value{problem@Depth}>2 .\arabic{depthIIICount}\fi% Problem 1.1.X.1.1 Number. + \ifcsname c@depthIVCount\endcsname\ifnum\value{problem@Depth}>3 .\arabic{depthIVCount}\fi% Problem 1.1.1.X.1 Number. + \ifcsname c@depthVCount\endcsname\ifnum\value{problem@Depth}>4 .\arabic{depthVCount}\fi% Problem 1.1.1.1.X Number. + \fi\fi\fi\fi + } + \fi \stepcounter{identification} \ifvmode \IgnorePar \fi \EndP -\HCode{
} +\HCode{
} } { \stepcounter{problem@Depth} @@ -84,6 +105,7 @@ \fi \fi \addtocounter{problem@Depth}{-2}% Exited a problem so we've exited a problem layer. Need -2 because we steppped once at the start to check for needing a depth-level count reset. + \ifvmode \IgnorePar \fi @@ -96,10 +118,6 @@ \ConfigureQuestionEnv{exercise}{Exercise} \ConfigureQuestionEnv{question}{Question} \ConfigureQuestionEnv{exploration}{Exploration} - -\ifdefined\xmNotHintAsExpandable - \ConfigureQuestionEnv{hint}{hint} % 2024: hint is no longer a 'question-environment'. -\fi \newcommand{\ConfigureTheoremEnv}[1]{% \renewenvironment{#1}[1][]{\refstepcounter{problem}% \ifthenelse{\equal{##1}{}}{}{% diff --git a/ximera.cls b/ximera.cls index 24601ba..6fbf957 100644 --- a/ximera.cls +++ b/ximera.cls @@ -12,13 +12,13 @@ %% src/hyperref.dtx (with options: `classXimera') %% src/suppress.dtx (with options: `classXimera') %% src/makeCounter.dtx (with options: `classXimera') +%% src/only.dtx (with options: `classXimera') %% src/pagesetup.dtx (with options: `classXimera') %% src/metadata.dtx (with options: `classXimera') %% src/macros.dtx (with options: `classXimera') %% src/theorems.dtx (with options: `classXimera') %% src/enumerate.dtx (with options: `classXimera') %% src/proof.dtx (with options: `classXimera') -%% src/only.dtx (with options: `classXimera') %% src/outcomes.dtx (with options: `classXimera') %% src/problem.dtx (with options: `classXimera') %% src/hints.dtx (with options: `classXimera') @@ -51,6 +51,7 @@ %% src/clearEnv.dtx (with options: `classXimera') %% src/hideEnv.dtx (with options: `classXimera') %% src/localization.dtx (with options: `classXimera') +%% src/pdfstyling.dtx (with options: `classXimera') %% src/preamble.dtx (with options: `classXimera') %% ------------:| ------------------------------------------------------------ %% ximera:| Simultaneously writing print and online interactive materials @@ -172,12 +173,14 @@ \RequirePackage{listings} %% is this required??? \RequirePackage{xkeyval} - +\RequirePackage{tcolorbox} \RequirePackage{currfile} \RequirePackage{comment} + \RequirePackage{gettitlestring} \RequirePackage{nameref} \RequirePackage{epstopdf} + \ifdefined\reallyneverever \ifdefined\HCode @@ -261,6 +264,54 @@ } } + +\ifxake + \newenvironment{prompt}{}{} +\else +\ifhandout +\NewEnviron{prompt}{} + % Breaks when put in mathmode ? + % \newenvironment{prompt}{\suppress}{\endsuppress} +\else +\newenvironment{prompt}{\bgroup\color{gray!50!black}}{\egroup} +\fi +\fi +\ifdefined\HCode +\newenvironment{onlyPdf}{\setbox0\vbox\bgroup}{\egroup} +\newenvironment{onlyHtml}{\bgroup}{\egroup} +\newenvironment{onlineOnly}{\bgroup}{\egroup} +\else +\newenvironment{onlyPdf}{\bgroup}{\egroup} +\ifdefined\xmPrintHtmlOnlyAlsoInPdf +\newenvironment{onlyHtml}{\bgroup\color{red!50!black}}{\egroup} +\newenvironment{onlineOnly}{\bgroup\color{red!50!black}}{\egroup} +\else +\newenvironment{onlyHtml}{\setbox0\vbox\bgroup}{\egroup} +\newenvironment{onlineOnly}{\setbox0\vbox\bgroup}{\egroup} +\fi +\fi + + +\ifdefined\HCode +\newcommand{\pdfOnly}[1]{} +\newcommand{\htmlOnly}[1]{#1} +\else +\ifdefined\xmPrintHtmlOnlyAlsoInPdf +\newcommand{\pdfOnly}[1]{#1} +\newcommand{\htmlOnly}[1]{\bgroup\color{red!50!black}#1\egroup} +\else +\newcommand{\pdfOnly}[1]{#1} +\newcommand{\htmlOnly}[1]{} +\fi +\fi + +\providecommand{\ifonlineTF}[2]{\htmlOnly{#1}\pdfOnly{#2}} +\newif{\ifonline} +\ifdefined\HCode +\onlinetrue +\else +\onlinefalse +\fi \setlength{\parindent}{0pt} \setlength{\parskip}{5pt} \oddsidemargin 62pt @@ -339,54 +390,6 @@ {\begin{trivlist}\item[\hskip \labelsep \itshape \bfseries #1{}\hspace{2ex}]} {\qed\end{trivlist}} - -\ifxake - \newenvironment{prompt}{}{} -\else -\ifhandout -\NewEnviron{prompt}{} - % Breaks when put in mathmode ? - % \newenvironment{prompt}{\suppress}{\endsuppress} -\else -\newenvironment{prompt}{\bgroup\color{gray!50!black}}{\egroup} -\fi -\fi -\ifdefined\HCode -\newenvironment{onlyPdf}{\setbox0\vbox\bgroup}{\egroup} -\newenvironment{onlyHtml}{\bgroup}{\egroup} -\newenvironment{onlineOnly}{\bgroup}{\egroup} -\else -\newenvironment{onlyPdf}{\bgroup}{\egroup} -\ifdefined\xmPrintHtmlOnlyAlsoInPdf -\newenvironment{onlyHtml}{\bgroup\color{red!50!black}}{\egroup} -\newenvironment{onlineOnly}{\bgroup\color{red!50!black}}{\egroup} -\else -\newenvironment{onlyHtml}{\setbox0\vbox\bgroup}{\egroup} -\newenvironment{onlineOnly}{\setbox0\vbox\bgroup}{\egroup} -\fi -\fi - - -\ifdefined\HCode -\newcommand{\pdfOnly}[1]{} -\newcommand{\htmlOnly}[1]{#1} -\else -\ifdefined\xmPrintHtmlOnlyAlsoInPdf -\newcommand{\pdfOnly}[1]{#1} -\newcommand{\htmlOnly}[1]{\bgroup\color{red!50!black}#1\egroup} -\else -\newcommand{\pdfOnly}[1]{#1} -\newcommand{\htmlOnly}[1]{} -\fi -\fi - -\providecommand{\ifonlineTF}[2]{\htmlOnly{#1}\pdfOnly{#2}} -\newif{\ifonline} -\ifdefined\HCode -\onlinetrue -\else -\onlinefalse -\fi \newcommand{\preOutcomeLine}{\item } \newcommand{\postOutcomeLine}{} \newcommand{\preOutcomeBlock}{After completing this content, students should be able to: \begin{itemize}} @@ -456,7 +459,8 @@ }% \MakeCounter{Iteration@probCnt} \MakeCounter{problem} -\newcommand{\problemNumber}{ +\newif\ifnoNumberedProblems +\newcommand{\probNumber}{ \ifcsname c@depth\Roman{problem@Depth}Count\endcsname% Check to see if counter exists \else \expandafter\newcounter{depth\Roman{problem@Depth}Count} @@ -477,10 +481,11 @@ \stepcounter{problem@Depth}% Started a problem, so we've sunk another problem layer. \def\spaceatend{#1}% \begin{trivlist}% -\item[\hskip\labelsep\sffamily\bfseries\GetTranslation{#2} \problemNumber% Determine the correct number of the problem, and the format of that number. +\item[\hskip\labelsep\sffamily\bfseries\GetTranslation{#2} \probNumber% Determine the correct number of the problem, and the format of that number. ]% \slshape } + %%%%% Configure environments end content %%%%%% \newcommand{\problemEnvironmentEnd}{%This configures all the end content for a problem. \stepcounter{problem@Depth} @@ -1205,6 +1210,66 @@ Interactive \providecommand{\GetTranslation}[1]{#1}% A little hacky to make sure the theorem environments are actually capitalized correctly. } }% End of 'do this right before begin document' hook. +%%% Now we colorbox-ize nested theorems and problems. +\definecolor{xmNestingColorLevelI}{RGB}{102, 255, 178}% Default top level color is Light Green +\definecolor{xmNestingColorLevelII}{RGB}{102, 178, 255}% Default first nested layer color is Light Blue +\definecolor{xmNestingColorLevelIII}{RGB}{255, 102, 178}% Default second nested layer color is Light Pink +\definecolor{xmNestingColorLevelIV}{RGB}{178, 255, 102}% Default third nested layer color is Bright Green +\definecolor{xmBackground}{RGB}{255,255,255}% Default background color is white. + +\newif\ifdispNest%% Flag for displaying any kind of nesting indicator via tcolorbox +\dispNesttrue% Default to showing nesting behavior via tcolorbox. + +\newif\ifdispNestColors%% Flag to opt for colored nesting indicators +\dispNestColorsfalse% Default to all black boxes, rather than colored by level + +\AtBeginDocument{ + \pdfOnly{ + \ifdispNestColors + \else% If we want non-colored boxes, overwrite the previous color definitions with variations on black. + \definecolor{xmNestingColorLevelI}{RGB}{0,0,0}% Black + \definecolor{xmNestingColorLevelII}{RGB}{35, 35, 35}% Light Blue + \definecolor{xmNestingColorLevelIII}{RGB}{70, 70, 70}% Light Pink + \definecolor{xmNestingColorLevelIV}{RGB}{105, 105, 105}% Bright Green + \fi + + %% Apply colorboxes around theorem-like environments in pdfs only to help see nesting. + \ifdispNest%% If you want to display nesting behavior via tcolorframebox frames, we now apply them. + \tcolorboxenvironment{algorithm}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=transparent} + \tcolorboxenvironment{axiom}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{claim}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{conclusion}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{condition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{conjecture}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{corollary}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{criterion}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{definition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{example}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{explanation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{fact}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{formula}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{idea}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{lemma}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{model}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{notation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{observation}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{proposition}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{paradox}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{procedure}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{remark}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{summary}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{template}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{warning}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + + %% Apply colorboboxes around problem-like environments in pdfs only to help see nesting. + \tcolorboxenvironment{problem}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{question}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{exploration}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + \tcolorboxenvironment{exercise}{colframe=xmNestingColorLevel\Roman{tcblayer},colback=xmBackground} + + \fi + } +} \def\input@path{{./}{../}{../../}{../../../}} % Mmm, do we need to reset it to the previous value ? \providecommand{\xmDefaultPreamble}{xmPreamble.tex} \IfFileExists{\xmDefaultPreamble} diff --git a/ximera.dtx b/ximera.dtx index 2609cd2..7d97db9 100644 --- a/ximera.dtx +++ b/ximera.dtx @@ -91,13 +91,13 @@ Running "make install" installs the files in the local TeX tree. \from{src/hyperref.dtx}{classXimera} \from{src/suppress.dtx}{classXimera} \from{src/makeCounter.dtx}{classXimera} + \from{src/only.dtx}{classXimera} \from{src/pagesetup.dtx}{classXimera} \from{src/metadata.dtx}{classXimera} \from{src/macros.dtx}{classXimera} \from{src/theorems.dtx}{classXimera} \from{src/enumerate.dtx}{classXimera} \from{src/proof.dtx}{classXimera} - \from{src/only.dtx}{classXimera} \from{src/outcomes.dtx}{classXimera} \from{src/problem.dtx}{classXimera} \from{src/hints.dtx}{classXimera} @@ -136,6 +136,7 @@ Running "make install" installs the files in the local TeX tree. % \from{src/validators/multiAns.dtx}{classXimera} % \from{src/validators/equalMatrix.dtx}{classXimera} \from{src/localization.dtx}{classXimera} + \from{src/pdfstyling.dtx}{classXimera} \from{src/preamble.dtx}{classXimera} %% should be last ...? } } diff --git a/ximera.fls b/ximera.fls index 901e961..8c5c344 100644 --- a/ximera.fls +++ b/ximera.fls @@ -1,4 +1,4 @@ -PWD /code/.ximera_local +PWD /code INPUT /usr/local/texlive/2024/texmf.cnf INPUT /usr/local/texlive/2024/texmf-dist/web2c/texmf.cnf INPUT /usr/local/texlive/2024/texmf-var/web2c/pdftex/pdflatex.fmt @@ -14,13 +14,13 @@ INPUT src/tikzexport.dtx INPUT src/hyperref.dtx INPUT src/suppress.dtx INPUT src/makeCounter.dtx +INPUT src/only.dtx INPUT src/pagesetup.dtx INPUT src/metadata.dtx INPUT src/macros.dtx INPUT src/theorems.dtx INPUT src/enumerate.dtx INPUT src/proof.dtx -INPUT src/only.dtx INPUT src/outcomes.dtx INPUT src/problem.dtx INPUT src/hints.dtx @@ -53,6 +53,7 @@ INPUT src/ungraded.dtx INPUT src/clearEnv.dtx INPUT src/hideEnv.dtx INPUT src/localization.dtx +INPUT src/pdfstyling.dtx INPUT src/preamble.dtx INPUT ximera.dtx OUTPUT ./xourse.cls diff --git a/ximera.ins b/ximera.ins index fba0056..ecfc816 100644 --- a/ximera.ins +++ b/ximera.ins @@ -64,13 +64,13 @@ Running "make install" installs the files in the local TeX tree. \from{src/hyperref.dtx}{classXimera} \from{src/suppress.dtx}{classXimera} \from{src/makeCounter.dtx}{classXimera} + \from{src/only.dtx}{classXimera} \from{src/pagesetup.dtx}{classXimera} \from{src/metadata.dtx}{classXimera} \from{src/macros.dtx}{classXimera} \from{src/theorems.dtx}{classXimera} \from{src/enumerate.dtx}{classXimera} \from{src/proof.dtx}{classXimera} - \from{src/only.dtx}{classXimera} \from{src/outcomes.dtx}{classXimera} \from{src/problem.dtx}{classXimera} \from{src/hints.dtx}{classXimera} @@ -103,6 +103,7 @@ Running "make install" installs the files in the local TeX tree. \from{src/clearEnv.dtx}{classXimera} \from{src/hideEnv.dtx}{classXimera} \from{src/localization.dtx}{classXimera} + \from{src/pdfstyling.dtx}{classXimera} \from{src/preamble.dtx}{classXimera} %% should be last ...? } } diff --git a/ximera.pdf b/ximera.pdf index 62edfec..37345ff 100644 Binary files a/ximera.pdf and b/ximera.pdf differ