1 |
It's easy to miss some places that have to be updated when adding a new |
2 |
EAPI. This hack fixes that. It works like this: |
3 |
|
4 |
In pms.tex, at the top, we say |
5 |
|
6 |
\CurrentEAPIIs{4} |
7 |
|
8 |
Then everywhere where we have EAPI dependent content, we put |
9 |
|
10 |
\ChangeWhenAddingAnEAPI{4} |
11 |
|
12 |
which we can then grep for. Also, if you change the current EAPI, and |
13 |
forget to change any of the markers, an error is produced. |
14 |
|
15 |
I've not updated everywhere that needs this yet; there's just one |
16 |
example. There might be a better way of getting the same effect. If not, |
17 |
I'll go through carefully and put these in before we start work on 5. |
18 |
--- |
19 |
dependencies.tex | 1 + |
20 |
pms.cls | 5 +++++ |
21 |
pms.tex | 3 +++ |
22 |
3 files changed, 9 insertions(+) |
23 |
|
24 |
diff --git a/dependencies.tex b/dependencies.tex |
25 |
index 0f74b3b..5f91eb5 100644 |
26 |
--- a/dependencies.tex |
27 |
+++ b/dependencies.tex |
28 |
@@ -76,6 +76,7 @@ be surrounded on both sides by whitespace, except at the start and end of the st |
29 |
|
30 |
In particular, note that whitespace is not optional. |
31 |
|
32 |
+\ChangeWhenAddingAnEAPI{4} |
33 |
\begin{centertable}{EAPIs supporting \t{SRC\_URI} arrows} \label{tab:uri-arrows-table} |
34 |
\begin{tabular}{ l l } |
35 |
\toprule |
36 |
diff --git a/pms.cls b/pms.cls |
37 |
index db2fd48..a37d78a 100644 |
38 |
--- a/pms.cls |
39 |
+++ b/pms.cls |
40 |
@@ -147,6 +147,11 @@ |
41 |
% margin. |
42 |
\areaset[-30mm]{400pt}{700pt} |
43 |
|
44 |
+% To find everywhere that needs updating when we add an EAPI |
45 |
+\newcommand{\CurrentEAPIIs}[1]{\def\TheCurrentEAPI{#1}} |
46 |
+\newcommand{\ChangeWhenAddingAnEAPI}[1]{\ifthenelse{\equal{\TheCurrentEAPI}{#1}}{}{\errmessage{This |
47 |
+needs to be updated for EAPI \TheCurrentEAPI}}} |
48 |
+ |
49 |
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : |
50 |
|
51 |
%%% Local Variables: |
52 |
diff --git a/pms.tex b/pms.tex |
53 |
index 4ada8ec..1c9ed30 100644 |
54 |
--- a/pms.tex |
55 |
+++ b/pms.tex |
56 |
@@ -1,5 +1,8 @@ |
57 |
\documentclass{pms} |
58 |
|
59 |
+\CurrentEAPIIs{4} |
60 |
+\ChangeWhenAddingAnEAPI{4} |
61 |
+ |
62 |
\begin{document} |
63 |
\maketitle |
64 |
|
65 |
-- |
66 |
1.7.10.1 |