PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : colorbox bei monochrome



Bert444
03-08-2014, 22:56
Wie kann man colorbox trotz der Optionen monochrome dazu überreden Farben (hier b/w) wie gewünscht darzustellen.


\documentclass[ fontsize=12pt,
monochrome]
{scrreprt}

\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{etoolbox}

% To insert dummy text
\usepackage{blindtext}

\setkomafont{chapter}{\LARGE\bfseries}

%Set font to times
%\usepackage{txfonts}

% Define own Chapter style
% Pretty chapter pages
%------------------------------------------
\usepackage{soul}
\usepackage{pdfpages}
\usepackage{eqparbox}


\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{black}{\eqmakebox[L]{\color{white}\bfseries\sffamily\thechapter}}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\useb ox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\use box{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1.25cm][r]{\usebox\feline@chapter}%
}}

\renewcommand*{\chapterformat}{%
\hspace{\leftmargin} \feline@chm[2.5cm] % Height of the colored box
\hspace{1.2cm}
}



\patchcmd{\@@makechapterhead}
{\size@chapter{#1}}
{\size@chapter{\parbox[b]{\dimexpr\textwidth-4cm\relax}{\raggedright#1}}}
{}
{}
\makeatother

%------------------------------------------


\begin{document}

\chapter{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. }
\blindtext[2]

\end{document}

u_fischer
04-08-2014, 12:04
Soweit ich sehen kann, gar nicht.

If this option is selected the colour commands are all disabled so that they do not
generate errors, but do not generate colour either. This is useful if previewing
with a previewer that can not produce colour.

Du wirst schon mindestens gray oder sowas auswählen müssen.