| 1 |
%% |
| 2 |
%% This is file `colorprofiles.sty', |
| 3 |
%% |
| 4 |
%% Copyright (c) 2018 Ross Moore <[email protected]> |
| 5 |
%% |
| 6 |
%% AIM: ensure that the information for default Color Profiles are recorded, |
| 7 |
%% if those Profiles are indeed available. |
| 8 |
%% |
| 9 |
%% This file may be distributed and/or modified under the conditions |
| 10 |
%% of the LaTeX Project Public License, either version 1.2 of this |
| 11 |
%% license or (at your option) any later version. The latest version |
| 12 |
%% of this license is in: |
| 13 |
%% |
| 14 |
%% http://www.latex-project.org/lppl.txt |
| 15 |
%% |
| 16 |
%% and version 1.2 or later is part of all distributions of LaTeX |
| 17 |
%% version 1999/12/01 or later. |
| 18 |
%% |
| 19 |
\NeedsTeXFormat{LaTeX2e} |
| 20 |
\ProvidesPackage{colorprofiles} |
| 21 |
[2018/11/01 v1.0.1 color profiles for PDF/X and PDF/A support] |
| 22 |
% |
| 23 |
\begingroup |
| 24 |
|
| 25 |
\def\colorprofile@file{colorprofiles} |
| 26 |
\InputIfFileExists{\[email protected]}{}% |
| 27 |
{\PackageWarning{colorprofiles}{The file \[email protected] is not available.} |
| 28 |
\endinput |
| 29 |
}% |
| 30 |
\newcommand*\colorpro@FileNotFound[1]{% |
| 31 |
\PackageWarning{colorprofiles}% |
| 32 |
{The file #1 was not found. Please get it from CTAN or elsewhere.}% |
| 33 |
} |
| 34 |
%% when the default Color Profile is available the following |
| 35 |
%% control sequences will have sensible global expansions: |
| 36 |
%% \colorpro@rgb@{profile,identifier,info,registry} |
| 37 |
%% otherwise all are set globally to \relax . |
| 38 |
%% |
| 39 |
%% Similarly for CMYK these are set globally: |
| 40 |
%% \colorpro@cmyk@{profile,intent,identifier,registry} |
| 41 |
%% else all are set globally to \relax . |
| 42 |
% |
| 43 |
\def\colorpro@rgb@clear{% |
| 44 |
\colorpro@FileNotFound\colorpro@rgb@profile |
| 45 |
\global\let\colorpro@rgb@profile\relax |
| 46 |
\global\let\colorpro@rgb@identifier\relax |
| 47 |
\global\let\colorpro@rgb@info\relax |
| 48 |
\global\let\colorpro@rgb@registry\relax |
| 49 |
} |
| 50 |
\def\colorpro@cmyk@clear{% |
| 51 |
\colorpro@FileNotFound\colorpro@cmyk@profile |
| 52 |
\global\let\colorpro@cmyk@profile\relax |
| 53 |
\global\let\colorpro@cmyk@intent\relax |
| 54 |
\global\let\colorpro@cmyk@identifier\relax |
| 55 |
\global\let\colorpro@cmyk@registry\relax |
| 56 |
} |
| 57 |
\IfFileExists{\colorpro@rgb@profile}{}{\colorpro@rgb@clear} |
| 58 |
\IfFileExists{\colorpro@cmyk@profile}{}{\colorpro@cmyk@clear} |
| 59 |
\endgroup |
| 60 |
\endinput |