1

I am setting a worksheet for math class using the "schule" package. In the teacher's "solutions" page, I want to color the solutions to make them stand out more.

I am using xcolor for it, but have tried standart colors as well as the extra colors with no visible effect.

I am using TexWorks and thought that maybe I set it up to display everything in greyscale, but trying a different program lead to the same results.

The documentation of the "schule"-package also did not give any hints about worksheets being generated in grey scale - or more accurate: black and white. Which makes me believe I must have set up something incorrectly. Can somebody spot my error, please? (I am a newbie when it comes to Latex, so I guess my packages might be a bit redundant in some cases).

If I remove the schule package, I get my colors back, so there seems to be some overwriting happening?

\documentclass[11pt, a4paper,DIV=11]{scrartcl}
\usepackage[postscript]{ucs}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{amsmath,amssymb,amstext}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=3cm]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[all,defaultlines=2]{nowidow}
\usepackage{multicol}
\usepackage{color}

\usepackage{booktabs}
\usepackage{array}
\usepackage{ragged2e}
\usepackage{tabularx}
\usepackage{tabto}
\usepackage{tikz}
\usetikzlibrary{patterns}
\makeatletter
                    \newcommand{\bigcdot}{}% Check if undefined
                    \DeclareRobustCommand{\bigcdot}{%
                        \mathbin{\mathpalette\bigcdot@{}}%
                    }
                    \newcommand{\bigcdot@scalefactor}{.5}
                    \newcommand{\bigcdot@widthfactor}{1.15}
                    \newcommand{\bigcdot@}[2]{%
                        % #1: math style
                        % #2: unused
                        \sbox0{$#1\vcenter{}$}% math axis
                        \sbox2{$#1\cdot\m@th$}%
                        \hbox to \bigcdot@widthfactor\wd2{%
                            \hfil
                            \raise\ht0\hbox{%
                                \scalebox{\bigcdot@scalefactor}{%
                                    \lower\ht0\hbox{$#1\bullet\m@th$}%
                                }%
                            }%
                            \hfil
                        }%
                    }
                    \makeatother
\usepackage[sfdefault]{roboto}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage[inline,shortlabels]{enumitem}
\usepackage[fach=Mathematik, typ=ab, seitenzahlen=auto, loesungen=keine, notenOhneTendenz, notenschema={15 = .95, 14 = .9, 13 = .85, 12 = .8, 11 = .75, 10= .7, 9 = .65, 8 = .6, 7 = .55, 6 = .5, 5 = .45, 4 = .39, 3 = .33, 2 = .27,1 = .2}, module={Symbole,Bewertung, Papiertypen}]{schule}
\setlength{\columnsep}{25mm}
\setlength{\columnseprule}{1pt}
\renewcommand{\columnseprulecolor}{\color{BrickRed}}

\title{Mathematik Übungsblätter}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{N}{@{}m{0pt}@{}}
\begin{document}
\begin{multicols}{2}
\begin{aufgabe}[points=1]
\begin{teilaufgaben}
\teilaufgabe a $=$ 9,12 mm\newline b $=$ 32,98 mm\newline b $=$ 9,12 mm $\bigcdot$  32,98 mm\newline A $\approx$ \textcolor{Maroon}{300,78} mm² \normalcolor

\end{teilaufgaben}
\end{aufgabe}

\end{multicols}
\end{document}
5
  • Welcome. // Hm, quite a lot of packages for almost no text to typeset. To localize your problem I suggest removing them systematically, until it produces some result. For systematic processes kindly have a look here tex.stackexchange.com/a/651159/245790 and here tex.meta.stackexchange.com/a/9027/245790 .
    – MS-SPO
    Jan 28, 2023 at 12:55
  • Thank you =) Yes, the "real" document is going to be much longer, but I agree the amount of packages is rather excessive for the small example text. I removed the "schule" package and get my colors displayed correctly, but wonder why - schule is supposed to use the color package :/
    – Christina
    Jan 28, 2023 at 13:07
  • Did you try to load schule with the farbig option? Jan 28, 2023 at 13:15
  • do you really need ucs and the postscript option?? And how do you compile then? Jan 28, 2023 at 13:18
  • 1
    @samcarter_is_at_topanswers.xyz I did not! Thank you so much, now it works finally! I had been looking for any kind of "Farbe" or "Schwarz/weiß" or combinations, but not for "farbig".
    – Christina
    Jan 28, 2023 at 13:24

2 Answers 2

1

The package schule has a special farbig option which seems to bring colour back to your document:

\documentclass{scrartcl}

\usepackage[
farbig,
typ=ab, 
]{schule}

\title{text}

\begin{document}

\textcolor{red}{300,78} 

\end{document}

As soundtrack, while enabling this option, I suggest watching

2
0

So as a start, and to illustrate the process of localizing trouble, let's create this output from your code:

result from code given below

Disabling (almost) everything

I commented out the documentclass, replaced it by simpler options, left the document "bare" besides a "huhu" Text, just to encourage the compiler.

Stepwise "recall"

I had to uncomment many parts to get aboves output:

  • \usepackage{multicols}
  • \usepackage{schule}
  • \title

After allowing my MikTex console to install about 10 required packages for schule and disabling the \bigdot for now, I finally ended up here:


    \documentclass[11pt]{scrartcl}% why not using simpler options?
    %\documentclass[11pt, a4paper,DIV=11]{scrartcl}
    %\usepackage[postscript]{ucs}
    %\usepackage[T1]{fontenc}
    %\usepackage[ngerman]{babel}
    %\usepackage{amsmath,amssymb,amstext}
    %\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=3cm]{geometry}
    %\usepackage[usenames,dvipsnames]{xcolor}
    %\usepackage[all,defaultlines=2]{nowidow}
    \usepackage{multicol}% needed
    %\usepackage{color}
    %
    %\usepackage{booktabs}
    %\usepackage{array}
    %\usepackage{ragged2e}
    %\usepackage{tabularx}
    %\usepackage{tabto}
    %\usepackage{tikz}
    %\usetikzlibrary{patterns}
    %\makeatletter
    %                    \newcommand{\bigcdot}{}% Check if undefined
    %                    \DeclareRobustCommand{\bigcdot}{%
    %                        \mathbin{\mathpalette\bigcdot@{}}%
    %                    }
    %                    \newcommand{\bigcdot@scalefactor}{.5}
    %                    \newcommand{\bigcdot@widthfactor}{1.15}
    %                    \newcommand{\bigcdot@}[2]{%
    %                        % #1: math style
    %                        % #2: unused
    %                        \sbox0{$#1\vcenter{}$}% math axis
    %                        \sbox2{$#1\cdot\m@th$}%
    %                        \hbox to \bigcdot@widthfactor\wd2{%
    %                            \hfil
    %                            \raise\ht0\hbox{%
    %                                \scalebox{\bigcdot@scalefactor}{%
    %                                    \lower\ht0\hbox{$#1\bullet\m@th$}%
    %                                }%
    %                            }%
    %                            \hfil
    %                        }%
    %                    }
    %                    \makeatother
    %\usepackage[sfdefault]{roboto}
    %\usepackage[T1]{fontenc}
    %\usepackage{microtype}
    %\usepackage[inline,shortlabels]{enumitem}
    
    % needed to compile:
    \usepackage[fach=Mathematik, typ=ab, seitenzahlen=auto, loesungen=keine, notenOhneTendenz, notenschema={15 = .95, 14 = .9, 13 = .85, 12 = .8, 11 = .75, 10= .7, 9 = .65, 8 = .6, 7 = .55, 6 = .5, 5 = .45, 4 = .39, 3 = .33, 2 = .27,1 = .2}, module={Symbole,Bewertung, Papiertypen}]{schule}
    %\setlength{\columnsep}{25mm}
    %\setlength{\columnseprule}{1pt}
    %\renewcommand{\columnseprulecolor}{\color{BrickRed}}
    %
    \title{Mathematik Übungsblätter}% needed to compile
    %\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
    %\newcolumntype{N}{@{}m{0pt}@{}}
    
    \begin{document}
    huhu% needed while disabling everything inside multicols-environment
        \begin{multicols}{2}
        \begin{aufgabe}[points=1]
            \begin{teilaufgaben}
            \teilaufgabe a $=$ 9,12 mm\newline b $=$ 32,98 mm\newline b $=$ 9,12 mm 
            
            %$\bigcdot$% ok, this will be above's definition
            *% replace for now by some symbol just to obtain output
            32,98 mm\newline A $\approx$ \textcolor{Maroon}{300,78} mm² \normalcolor
            
            \end{teilaufgaben}
        \end{aufgabe}
        
        \end{multicols}
    
    \end{document}

How to proceed?

Uncomment more parts and get it running.

Either discard, what's not really needed, or continue uncommenting, until you create a black page. The you are quite close to the trouble maker.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .