summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
blob: 981494211d16b46932c514231b9ab6b5ce23c210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
%%
%% This is file `novel-FileData.sty', part of class `novel'.
%% Copyright 2017 Robert Allgeyer.
%%
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%%
\ProvidesFile{novel-FileData.sty}%
[2017/11/12 v1.43.1 LaTeX file (File Data settings)]
%% 


%% FILE DATA (PDF Metadata)
%% -----------------------------------------------------------------------------
%%
% \title{} or \SetTitle{}
% Copied to File Data at end of Preamble, unless not set.
% Provides \theTitle anywhere.
% If not set, PDF cannot conform to PDF/X.
\gdef\SetTitle#1{\gdef\@title{#1}} % for stylistic consistency
\gdef\title#1{\gdef\@title{#1}}
\gdef\thetitle{\@title} % for convenience
\gdef\theTitle{\@title}
\SetTitle{}
%
% \author{} or \SetAuthor{}
% Copied to File Data at end of preamble, unless not set.
% Provides \theAuthor anywhere.
\gdef\SetAuthor#1{\gdef\@author{#1}} % for stylistic consistency
\gdef\author#1{\gdef\@author{#1}}
\gdef\theauthor{\@author} % for convenience
\gdef\theAuthor{\@author}
\SetAuthor{}
%
% \subtitle{}  or \SetSubtitle{}  (if any)
% Not copied to File Data by itself, as there is no such metadata entry.
% Provides \theSubtitle anywhere.
\gdef\SetSubtitle#1{\gdef\@subtitle{#1}} % for stylistic consistency
\gdef\subtitle#1{\gdef\@subtitle{#1}}
\gdef\thesubtitle{\@subtitle} % compatibility
\gdef\theSubtitle{\@subtitle}
\SetSubtitle{}
%
% \SetApplication{}  (rarely used)
% Also known as CreatorTool.
% Name of the software that created the source document.
% Changing this does not change the software, it just changes the name.
% Normally leave as default, but can change if urgent.
\gdef\SetApplication#1{\gdef\@novelApplication{#1}}
\SetApplication{LuaLaTeX with novel and microtype} % default
%
% \SetProducer{}  (rarely used)
% Name of the software that compiles to source to make PDF.
% Changing this does not change the software, it just changes the name.
% Normally leave as default, but can change if urgent.
\gdef\SetProducer#1{\gdef\@novelProducer{#1}}
\SetProducer{LuaLaTeX with novel-pdfx and hyperref} % default
%
% Although some other data fields could have been added,
%   they do not pertain to fiction, especially if your book is print-on-demand.
% For example, subject, keywords and description are not read from PDF metadata,
%   you enter them in a form, when you obtain the ISBN.
% No need to set copyright in metadata, since your book is only for use by
%   the print service, and is not being distributed as a PDF e-book.
%   Your copyright notice is on the printed page, where it should be.
% Particularly note that your print service is NOT the publisher: YOU are!
%
%% End file data.


%% SET PDF/X ARGUMENTS
%% -----------------------------------------------------------------------------
%% Arguments: [embed-icc or no-embed]{compliance standard}{output intent}
%% Default option is no-embed.
%% When this command is not used, it is equivalent to compliance `off'.
%
\newif \if@chosenComplianceOK
\newif \if@chosenEmbedOK
\newif \if@gotConformance
\newif \if@noembedicc \@noembedicctrue
\newif \ifpdfx@isOFF \pdfx@isOFFtrue
% These will get meaningful info when an output intent file is loaded:
\gdef\@OIidentifier{}
\gdef\@OIcondition{}
\gdef\@OIinfo{}
\gdef\@OIregistry{}
\gdef\@OIprofile{}
%
%%
\gdef\SetPDFX{\@ifstar\@setpdfxst\@setpdfxns}
\newcommand\@setpdfxst[2][CGATSTR001]{
  \global\@noembediccfalse
  \@setpdfx{#1}{#2}
}
\newcommand\@setpdfxns[2][CGATSTR001]{
  \global\@noembedicctrue
  \@setpdfx{#1}{#2}
}
%
\newcommand\@setpdfx[2]{
  \ifthenelse{\equal{#2}{off}}{
    \global\pdfx@isOFFtrue
    \@chosenComplianceOKtrue
  }{}
  \ifthenelse{\equal{#2}{X-1a:2001}}{
    \pdfx@isOFFfalse
    \@chosenComplianceOKtrue
    \gdef\@PDFversion{PDF/X-1}
    \gdef\@PDFXversion{PDF/X-1a:2001}
    \gdef\@PDFXconformance{PDF/X-1a:2001}
    \global\@gotConformancetrue
    \global\pdfminorversion=3
  }{}
  \ifthenelse{\equal{#2}{X-1a:2003}}{
    \pdfx@isOFFfalse
    \@chosenComplianceOKtrue
    \gdef\@PDFversion{PDF/X-1}
    \gdef\@PDFXversion{PDF/X-1a:2003}
    \gdef\@PDFXconformance{PDF/X-1a:2003}
    \global\@gotConformancetrue
    \global\pdfminorversion=3
  }{}
  \ifthenelse{\equal{#2}{X-3:2002}}{
    \pdfx@isOFFfalse
    \@chosenComplianceOKtrue
    \gdef\@PDFversion{PDF/X-3}
    \gdef\@PDFXversion{PDF/X-3:2002}
    \global\pdfminorversion=3
  }{}
  \ifthenelse{\equal{#2}{X-3:2003}}{
    \pdfx@isOFFfalse
    \@chosenComplianceOKtrue
    \gdef\@PDFversion{PDF/X-3}
    \gdef\@PDFXversion{PDF/X-3:2003}
    \global\pdfminorversion=4
  }{}
  \if@chosenComplianceOK\else
    \ClassError{novel}{Bad compliance argument for \string\SetPDFX}%
     {Choose: off, X-1a:2001, X-1a:2003, X-3:2002, X-3:2003.^^J}%
  \fi
  %
  \ifpdfx@isOFF\else % Output Intent ignored if compliance is `off'.
    % Grab the file that defines the output intent information:
    \makeatletter % Apparently needed when non-*.sty is input within a command!
    \IfFileExists{novel-#1.clo}{\input{novel-#1.clo}}{
      \ClassError{novel}{Bad Output Intent argument for \string\SetPDFX}%
       {Use filename (without~extension) of a file with *.clo~extension. ^^J%
        Filename must begin with novel- ^^J%
        The file must be where TeX can find it. Or use standard code: ^^J%
        CGATSTR001, FOGRA39, JC200103.}%
    }
    \makeatother % back to usual
  \fi
} % end \@setpdfx
%
%%



%%
%% End of file `novel-FileData.sty'.