2

How to rid of overprint issues using tikz and tcolorbox packages in my tex files? Please find my MWE file is as below:

\documentclass{book}
%\usepackage{color}
\usepackage[most]{tcolorbox}
\usepackage{%color, % automatically loaded by overprint
  overprint}

\newtcolorbox{casestudy}{enhanced,boxrule=0pt,boxsep=0pt,colframe=red,colback=yellow,
sharp corners, arc=5pt, rounded corners=southwest,left=9pt,right=0pt,top=5.5pt,bottom=3.8pt,
toptitle=0pt,bottomtitle=0pt,lefttitle={0pt},toprule=0pt,bottomrule=0pt,leftrule=0pt,rightrule=0pt,
width=420.56pt,after skip=0pt,before skip=0pt,
titlerule=0pt,titlerule style={green,line width=0pt},frame hidden,
}


\definecolor{mg}{cmyk}{0,1,0,0}
\definecolor{cn}{cmyk}{1,0,0,0}
\definecolor{bk}{cmyk}{0,0,0,1}

\begin{document}
\colorbox{mg}{bk test-1}

\colorbox{mg}{bk test-2}

\colorbox{cn}{text}

\colorbox{mg}{text}%

\colorbox{cn}{text}

\bigskip

\begin{casestudy}
Throughout the unit, students will apply the design and development
stages of the problem-solving methodology. They will acquire and apply
the knowledge and skills to work with different data types to create
solutions that can be used to persuade, educate, inform and entertain.
This unit also examines the role of networked information systems
in the communication of data within a global environment and an
exploration of mobile devices.
\end{casestudy}

\end{document}

enter image description here

4
  • package overprinet, for what you need it? it is not available on CTAN. what is your problem, what you like to obtain? – Zarko Jul 15 '19 at 10:22
  • I tried below link and copied style file from following site to rid of overprint issues? tex.aanhet.net/overprint – Rajesh N Jul 15 '19 at 10:32
  • What is your problem? What would you expect to happen instead? – Ulrike Fischer Jul 15 '19 at 10:36
  • This is printer issues, files will not moved with overprint issues, in Acrobat professional PDF when we turnoff black color, white should not appear in the PDF. – Rajesh N Jul 15 '19 at 10:42
3

Update

Here's a very simple overprint implementation for XeLaTeX. It works with (and in fact requires) pgf. tcolorbox loads pgf so this is no problem.

\documentclass{book}
\usepackage[cmyk]{xcolor}
\usepackage{tcolorbox}
\newtcolorbox{casestudy}{%
  sharp corners, colback=yellow, left=0pt, right=0pt, top=0pt, bottom=0pt,
  before skip=0pt, after skip=0pt, frame empty}

% Simple overprint implementation for XeLaTeX. Does not respect the colour
% stack, so you have to explicitly turn it on and off.
\makeatletter
\special{pdf:obj @spcko << /Type /ExtGState /op false /OP false >>}
\special{pdf:obj @spcop  << /Type /ExtGState /op true /OP true /OPM 1 >>}
\pgf@sys@addpdfresource@extgs@plain{/SPCko @spcko /SPCop @spcop}
\def\overprinton{\special{pdf:literal direct /SPCop gs}}
\def\overprintoff{\special{pdf:literal direct /SPCko gs}}
\makeatother

\begin{document}
\textcolor{cyan}{Cyan}
\textcolor{magenta}{Magenta}
\textcolor{yellow}{Yellow}
\textcolor{black}{Black}

\colorbox{magenta}{\overprinton text\overprintoff}

\colorbox{cyan}{\overprinton text\overprintoff}

\begin{casestudy}
  \overprinton
  Throughout the unit, students will apply the design and development stages
  of the problem-solving methodology. They will acquire and apply the
  knowledge and skills to work with different data types to create solutions
  that can be used to persuade, educate, inform and entertain. This unit also
  examines the role of networked information systems in the communication of
  data within a global environment and an exploration of mobile devices.
  \overprintoff
\end{casestudy}
\end{document}

Original answer

I take it you want to overprint the black text on the coloured screens. You can do this using the colorspace package.

MWE

\documentclass{book}
\usepackage[cmyk]{xcolor}
\usepackage[overprint]{colorspace}
\usepackage{tcolorbox}
\newtcolorbox{casestudy}{%
  sharp corners, colback=yellow, left=0pt, right=0pt, top=0pt, bottom=0pt,
  before skip=0pt, after skip=0pt, frame empty}
\begin{document}
\textcolor{cyan}{Cyan}
\textcolor{magenta}{Magenta}
\textcolor{yellow}{Yellow}
\textcolor{black}{Black}

\colorbox{magenta}{\textoverprint{text}}

\colorbox{cyan}{\textoverprint{text}}

\begin{casestudy}
  \overprintstate{1}%
  Throughout the unit, students will apply the design and development stages
  of the problem-solving methodology. They will acquire and apply the
  knowledge and skills to work with different data types to create solutions
  that can be used to persuade, educate, inform and entertain. This unit also
  examines the role of networked information systems in the communication of
  data within a global environment and an exploration of mobile devices.
\end{casestudy}
\end{document}

Composite output

Composite output

Cyan plate

Cyan plate

Magenta plate

Magenta plate

Yellow plate

Yellow plate

Black plate

Black plate

14
  • following errors shown while compiling above document. (./colorspace.sty Package: colorspace 2019/03/25 v1.3 PDF color spaces ! Undefined control sequence. l.561 \immediate\spc@Obj {<< /Type /ExtGState /op false /OP false >>}% – Rajesh N Jul 15 '19 at 12:07
  • @DavidPurton I get no error. – Ulrike Fischer Jul 15 '19 at 12:16
  • @RajeshN, if it works for Ulrike, then check to make sure your TeX distribution is up to date. colorspace 1.3 is the latest version. – David Purton Jul 15 '19 at 12:17
  • In PDFLaTeX, tcolorbox output hidden. we using XeLaTeX which shows an undefined control sequence as shown above error. – Rajesh N Jul 15 '19 at 12:29
  • 1
    You could probably with xelatex do \AtBeginShipout{\AtBeginShipoutAddToBox{\special{pdf:code /SPCop gs}}} to activate it on all pages. – Ulrike Fischer Jul 15 '19 at 14:05
3

You should load xcolor with the cmyk option so that the default color color is cmyk:

\documentclass{book}
\usepackage[cmyk]{xcolor}
\usepackage[overprint]{colorspace}
\usepackage[most]{tcolorbox}

\newtcolorbox{casestudy}{enhanced,boxrule=0pt,boxsep=0pt,colframe=red,colback=yellow,
sharp corners, arc=5pt, rounded corners=southwest,left=9pt,right=0pt,top=5.5pt,bottom=3.8pt,
toptitle=0pt,bottomtitle=0pt,lefttitle={0pt},toprule=0pt,bottomrule=0pt,leftrule=0pt,rightrule=0pt,
width=420.56pt,after skip=0pt,before skip=0pt,
titlerule=0pt,titlerule style={green,line width=0pt},frame hidden,
}


\definecolor{mg}{cmyk}{0,1,0,0}
\definecolor{cn}{cmyk}{1,0,0,0}
\definecolor{bk}{cmyk}{0,0,0,1}

\begin{document}

\colorbox{mg}{bk test-2}

\colorbox{mg}{bk test-2}

\begin{casestudy}
Throughout the unit, students will apply the design and development
stages of the problem-solving methodology. They will acquire and apply
the knowledge and skills to work with different data types to create
solutions that can be used to persuade, educate, inform and entertain.
This unit also examines the role of networked information systems
in the communication of data within a global environment and an
exploration of mobile devices.
\end{casestudy}

\end{document}

enter image description here

3
  • Please advise that is the \usepackage[overprint]{colorspace} works in all types of TeX, i.e., LaTeX -> dvips -> ps2pdf, PDFLaTeX, XeLaTeX, etc.? – MadyYuvi Jul 15 '19 at 12:23
  • @MadyYuvi colorspace works only for pdflatex and lualatex. It uses colorstacks and I don't know if it is possible to extend it to xelatex. dvips could work with \special{ps:true setoverprint} (untested). – Ulrike Fischer Jul 15 '19 at 12:28
  • Thanks a lot Ulrike.... – MadyYuvi Jul 15 '19 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.