Skip to content

Commit 14e7868

Browse files
committed
Merge scaffold settings in PackageInfo.g and makedoc.g
1 parent 0caa5b8 commit 14e7868

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ This file describes changes in the AutoDoc package.
66
slips by GAPDoc; so it caused no problems in practice, but the resulting XML
77
was strictly speaking invalid)
88
- Predefine entities `VERSION`, `RELEASEYEAR`, `RELEASEDATE`
9+
- Allow specifying scaffold settings *simultaneously* in `PackageInfo.g`
10+
and `makedoc.g`; the records are merged, with values from `makedoc.g`
11+
taken precedence if e.g. the same entity is defined in both places
912

1013
2025.10.16
1114
- Make handling `Date` in `PackageInfo.g` more strict (previously some

gap/Magic.gi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function( arg )
215215
if IsBound(scaffold) and IsBound( pkginfo.AutoDoc ) then
216216
for key in RecNames( pkginfo.AutoDoc ) do
217217
if IsBound( scaffold.(key) ) then
218-
Info(InfoAutoDoc, 1, "WARNING: ", key, " specified in both PackageInfo.AutoDoc and opt.scaffold");
218+
AUTODOC_MergeRecords( scaffold.(key), pkginfo.AutoDoc.(key) );
219219
else
220220
scaffold.(key) := pkginfo.AutoDoc.(key);
221221
fi;

tst/manual.expected/_Chapter_AutoDoc.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,24 @@
152152
This allows you to write <Q>&amp;SomePackage;</Q> and <Q>&amp;RELEASEYEAR;</Q>
153153
in your documentation, which will be replaced by respective values specified
154154
in the entities definition.
155+
<P/>
156+
Note that &AutoDoc; predefines several entities:
157+
<List>
158+
<Mark><A>VERSION</A></Mark>
159+
<Item>Set to the <C>Version</C> field your package info record.</Item>
160+
<Mark><A>RELEASEYEAR</A></Mark>
161+
<Item>Set to a string containing the release year, as derived
162+
from the <C>Date</C> field your package info record.</Item>
163+
<Mark><A>RELEASEDATE</A></Mark>
164+
<Item>Derived from the <C>Date</C> field your package info record.</Item>
165+
<Mark><A>SomePackage</A></Mark>
166+
<Item>
167+
The precise name of this entity is derived from the
168+
<C>PackageName</C> field your package info record. Note
169+
that it is case sensitive. The content is defined as
170+
suggested by the example above.
171+
</Item>
172+
</List>
155173
</Item>
156174
<Mark><A>TitlePage</A></Mark>
157175
<Item>

0 commit comments

Comments
 (0)