Debian Codegraph @

texmf-dist/doc/latex/printcolormanager/printcolormanager-en.tex

raw
1 % Set document class to article with 11pt font size and A4 paper
2 \documentclass[11pt, a4paper]{article}
3
4 % Font and input encoding for proper character rendering
5 \usepackage[T1]{fontenc} % Uses T1 font encoding
6 \usepackage[utf8]{inputenc} % Allows UTF-8 encoded characters
7 \usepackage[english]{babel} % English hyphenation and language rules
8
9 % Page layout settings
10 \usepackage{geometry} % Package to adjust page margins
11 \geometry{margin=3cm} % Sets all margins to 3 cm
12
13 % Load xcolor for coloring text and code blocks in this manual
14 \usepackage{xcolor}
15
16 % Setup hyperlinks in the PDF
17 \usepackage{hyperref}
18 \hypersetup{
19 colorlinks=true, % Colors the text of the links instead of drawing boxes
20 linkcolor=blue, % Color for internal links (TOC)
21 urlcolor=blue, % Color for external URLs
22 pdftitle={printcolormanager Documentation}, % PDF metadata title
23 pdfauthor={Zsolt Bihari} % PDF metadata author (Change this to your name!)
24 }
25
26 % Code listing configuration for showing LaTeX examples
27 \usepackage{listings}
28 \lstset{
29 language=[LaTeX]TeX, % Defines the language as LaTeX
30 basicstyle=\ttfamily\small, % Monospaced font for code
31 backgroundcolor=\color{gray!10},% Light gray background for code blocks
32 frame=single, % Draws a frame around the code
33 keywordstyle=\color{blue}, % LaTeX commands in blue
34 commentstyle=\color{green!60!black}, % Comments in dark green
35 stringstyle=\color{orange} % Strings in orange
36 }
37
38 % Title page information
39 \title{\textbf{The \texttt{printcolormanager} Package}\\ \large User Manual}
40 \author{Zsolt Bihari \\ \href{mailto:[email protected]}{[email protected]}} % Change to your details!
41 \date{Version 1.0 -- \today} % Automatically inserts the current date
42
43 % Begin the actual document
44 \begin{document}
45
46 \maketitle % Generates the title page based on \title, \author, \date
47
48 % Abstract environment for a short summary
49 \begin{abstract}
50 The \texttt{printcolormanager} is a LaTeX package providing an automated and unified color management workflow for print and digital publications. It allows users to compile the same document into CMYK (prepress), RGB (screen), or Grayscale formats simply by changing a single package option.
51 \end{abstract}
52
53 \tableofcontents % Generates the Table of Contents
54 \vspace{2em} % Adds vertical space after the TOC
55
56 % Section: Introduction
57 \section{Introduction}
58 While LaTeX's built-in \texttt{xcolor} package is powerful, handling different color spaces consistently for professional prepress workflows can be challenging. Relying on mathematical RGB-to-CMYK conversions often results in "muddy" or inaccurate printed colors.
59
60 The \texttt{printcolormanager} solves this by defining a global target color space and using dedicated macros to explicitly set exact values for each color space, ensuring perfect color fidelity across different media.
61
62 % Section: Loading the package
63 \section{Loading the Package and Options}
64 Load the package in your preamble (after \verb|\documentclass|) with the desired target color space option:
65
66 % lstlisting environment to display code
67 \begin{lstlisting}
68 \usepackage[CMYK]{printcolormanager}
69 \end{lstlisting}
70
71 Supported options include:
72 \begin{itemize}
73 \item \texttt{CMYK} or \texttt{cmyk}: Four-color print output.
74 \item \texttt{RGB} or \texttt{rgb}: Three-color digital/screen output.
75 \item \texttt{gray}: Continuous grayscale output (0.0 to 1.0).
76 \item \texttt{GRAY}: Discrete grayscale output (integer scale).
77 \item \texttt{HSB}: Hue, Saturation, Brightness.
78 \item \texttt{Lab}: CIE Lab color space.
79 \end{itemize}
80
81 % Section: Defining custom colors
82 \section{Defining Custom Colors}
83 The core of this package is the \verb|\definePrintColor| macro. It allows you to specify exact, manual values for a single color across all supported color spaces.
84
85 \subsection{Syntax}
86 \begin{lstlisting}
87 \definePrintColor{Name}{RGB}{CMYK}{GRAY}{HSB}{Lab}
88 \end{lstlisting}
89
90 \textbf{Example for a custom brand color:}
91 \begin{lstlisting}
92 \definePrintColor{BrandRed}{210, 40, 40}{0.05, 0.95, 0.90, 0.0}%
93 {0.55}{0, 80, 80}{50, 65, 45}
94 \end{lstlisting}
95 When compiling, the package checks the global option (e.g., \texttt{[CMYK]}) and automatically applies the specific values (in this case \texttt{0.05, 0.95, 0.90, 0.0}) without relying on inaccurate automatic conversions.
96
97 % Section: Prepress Blacks
98 \section{Pure Black vs. Rich Black}
99 In professional prepress, typographic text black must be separated from background black. The package provides two predefined macros:
100 \begin{itemize}
101 \item \verb|\textcolor{PureBlack}{text}|: Uses \texttt{0.0, 0.0, 0.0, 1.0} in CMYK. Ideal for thin lines and text to prevent registration issues on the press.
102 \item \verb|\textcolor{RichBlack}{text}|: Uses \texttt{0.40, 0.0, 0.0, 1.0} in CMYK. Adds cyan to create a deeper, darker black for large printed areas.
103 \end{itemize}
104
105
106 \subsection{Mandatory Parameters and Empty Values}
107 The \verb|\definePrintColor| macro strictly expects \textbf{six parameters}. You cannot omit any curly braces; doing so will result in a LaTeX compilation error (\textit{Runaway argument}).
108
109 If you do not know or do not wish to specify certain values (for example, HSB or Lab), you must still provide the empty braces. You can either use fallback values or leave the brackets empty:
110
111 \begin{lstlisting}
112 % Correct usage with empty HSB and Lab values:
113 \definePrintColor{ExampleColor}{255,0,0}{0,1,1,0}{0.5}{}{}
114 \end{lstlisting}
115
116 \textbf{Warning:} If you leave a parameter completely empty (e.g., \texttt{\{\}}), ensure that you never compile the document using the corresponding global package option (in this example, \texttt{[HSB]} or \texttt{[Lab]}). Passing an empty value to the underlying \texttt{xcolor} engine will cause an error! For maximum safety, it is recommended to provide valid numerical values for all six parameters.
117
118 \end{document} % Ends the document