summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/halloweenmath/halloweenmath.ins
blob: 1aced78b5b5b61d641e5cc81554149614c9d88be (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
171
172
173
174
%
% This is file `halloweenmath.ins'.
%
% This file is part of a work named "halloweenmath package".
%
% Copyright (C) 2019 by Gustavo MEZZETTI.
% 
% The halloweenmath package may be distributed and/or modified under
% the conditions of the LaTeX Project Public License, either version 1.3
% 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.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% 
% The halloweenmath package has the LPPL maintenance status
%   "author-maintained".
% 
% The file `manifest.txt' that comes along with this file specifies
% what the halloweenmath package consists of; more precisely, it explains
% how the locutions "Work" and "Compiled Work", used in the LaTeX Project
% Public License, are to be interpreted in the case of this work.
% 
% Note that the distribution of this file alone is "distribution of
% only part of the Work" in the sense of the LaTeX Project Public
% License, and should be avoided.
% 
% November 1, 2019 (vers. 0.11)
%
\input docstrip

\def\filename{halloweenmath.dtx}

\newif\ifWritingToDirectoryOfTDS
\WritingToDirectoryOfTDSfalse

\edef\WriteToDir{\WriteToDir}
\def\TryToUseMyDir{%
  \usedir{tex/latex/halloweenmath}
  \ifx \destdir\WriteToDir \else
    \WritingToDirectoryOfTDStrue
  \fi
}
\def\Y{Y}



\Msg{----------------------------------------------------------------}
\Msg{}
\Msg{Unpacking the halloweenmath package.}
\Msg{}
\Msg{Please note: \space I will now try to install the generated files into}
\Msg{their own TeX directory, using the \string\usedir\space facility of DocStrip;}
\Msg{if that fails, they will be just saved in the current directory.}
\Msg{In this case, in order to finish the installation, you will have}
\Msg{to move them into a directory where LaTeX can find them: see the}
\Msg{documentation specific to your TeX implementation to learn where}
\Msg{such directories are located on your system.}
\Msg{}

\catcode`\@ = 11

\ifx \usedir\alt@usedir

\Msg{On your system, the name of the installation directory should be}
\Msg{}
\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}}
\Msg{}
\Msg{Please make sure that the above directory exists on your system,}
\Msg{and that you have permission to create or overwrite files in it;}
\Msg{if so, you may choose to put the generated files directly there.}
\Msg{}
\Msg{----------------------------------------------------------------}
\Msg{}
\Msg{Put files directly in suggested directory}
\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}}
\Ask\answer{or not? [y/n]}

\ifx \answer\yes
  \TryToUseMyDir
\else \ifx \answer\y
  \TryToUseMyDir
\else \ifx \answer\Y
  \TryToUseMyDir
\fi \fi \fi

\else % of \ifx \usedir\alt@usedir

\Msg{It seems that the configuration of your system does not allow us}
\Msg{to use the \string\usedir\space facility: writing files to current directory.}

\fi % of \ifx \usedir\alt@usedir

\catcode`\@ = 12

\Msg{}

\ifWritingToDirectoryOfTDS

\Msg{Trying to install files directly in the proposed directory.}
\Msg{}

\else

\Msg{Either you chose NOT to install files in the proposed directory,}
\Msg{or, despite your choice, your system is not configured to permit}
\Msg{you to do so. \space Therefore all files will be placed in the current}
\Msg{directory and you will have to move them to a suitable directory}
\Msg{by hand. \space At the end of this run, you will be presented with the}
\Msg{complete list of the files you need to move.}
\Msg{}
\Ask\answer{Press \space <return> \space to continue
    (your \string\answer\space will be ignored).}

\fi

\preamble

This is a generated file.
It is part of a work named "halloweenmath package".

Copyright (C) 2019 by Gustavo MEZZETTI.

The halloweenmath package may be distributed and/or modified under
the conditions of the LaTeX Project Public License, either version 1.3
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.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.

The halloweenmath package has the LPPL maintenance status
  "author-maintained".

The file `manifest.txt' that comes along with this file specifies
what the halloweenmath package consists of; more precisely, it explains
how the locutions "Work" and "Compiled Work", used in the LaTeX Project
Public License, are to be interpreted in the case of this work.

Note that the distribution of this file alone is "distribution of
only part of the Work" in the sense of the LaTeX Project Public
License, and should be avoided.

November 1, 2019 (vers. 0.11)

\endpreamble

\askonceonly

\generate{
  \file{halloweenmath.sty}{\from{\filename}{halloweenmath}}
}

\Msg{}

\ifWritingToDirectoryOfTDS

\Msg{Installation finished. \space Check that the proposed directory}
\Msg{\space\space\space\space\showdirectory{tex/latex/halloweenmath}}
\Msg{has been correctly updated.}

\else

\Msg{To finish the installation, please move the following files into}
\Msg{a directory where LaTeX looks for inputs files:}
\Msg{}
\Msg{\space\space\space\space halloweenmath.sty}

\fi

\Msg{}
\Msg{Happy TeXing!}

\endbatchfile