Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This file describes changes in the AutoDoc package.
Markdown-like text; `@listing`, `@example`, and `@log` info strings
select the corresponding GAPDoc element
- Add `@Index` command for generating index entries
- Allow overriding the LaTeX bibliography style via `scaffold.bibstyle`
- In Markdown-like inline backtick code spans, emit
`<Keyword>...</Keyword>` for GAP keywords (as returned by
`ALL_KEYWORDS()`), otherwise as before `<Code>...</Code>`
Expand Down
6 changes: 5 additions & 1 deletion gap/AutoDocMainFunction.gi
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ InstallGlobalFunction( CreateMainPage,
fi;

if IsBound( opt.bib ) and opt.bib <> false then
AppendTo( filestream, "<Bibliography Databases=\"", opt.bib, "\"/>\n" );
AppendTo( filestream, "<Bibliography Databases=\"", opt.bib, "\"" );
if IsBound( opt.bibstyle ) then
AppendTo( filestream, " Style=\"", opt.bibstyle, "\"" );
fi;
AppendTo( filestream, "/>\n" );
fi;

if IsBound( opt.index ) and opt.index = true then
Expand Down
9 changes: 9 additions & 0 deletions gap/Magic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
#! then it is assumed that you want to use this as your bibliography.
#! </Item>
#!
#! <Mark><A>bibstyle</A></Mark>
#! <Item>
#! Overrides the bibliography style used for LaTeX output.
#! This is written as the <C>Style</C> attribute of the generated
#! <C>&lt;Bibliography .../&gt;</C> element, so valid values are the
#! bibliography style names understood by &GAPDoc; and BibTeX, such
#! as <C>alpha</C>, <C>alphaurl</C>, or <C>plain</C>.
#! </Item>
#!
#! <Mark><A>entities</A></Mark>
#! <Item>
#! A record whose keys are taken as entity names, set to the corresponding
Expand Down
1 change: 1 addition & 0 deletions tst/AutoDocTest/makedoc-entities-list.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AutoDoc(rec(
includes := [ "chapter1.xml" ],
appendix := [ "appendix1.xml" ],
bib := "AutoDocTest.bib",
bibstyle := "alphaurl",
entities := [
"Legacy Package",
[ "Package", "LegacyListEntity" ],
Expand Down
1 change: 1 addition & 0 deletions tst/AutoDocTest/makedoc-entities-record.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AutoDoc(rec(
includes := [ "chapter1.xml" ],
appendix := [ "appendix1.xml" ],
bib := "AutoDocTest.bib",
bibstyle := "alphaurl",
entities := rec(
AutoDocTestTag := "<Package>RecordEntity</Package>",
RECORDNOTE := "record entity",
Expand Down
1 change: 1 addition & 0 deletions tst/AutoDocTest/makedoc.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ AutoDoc(rec(
includes := [ "chapter1.xml" ],
appendix := [ "appendix1.xml" ],
bib := "AutoDocTest.bib",
bibstyle := "alphaurl",
),
));
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</Body>
<#Include SYSTEM "appendix1.xml">
<#Include SYSTEM "_AutoDocAppendicesMainFile.xml">
<Bibliography Databases="AutoDocTest.bib"/>
<Bibliography Databases="AutoDocTest.bib" Style="alphaurl"/>
<TheIndex/>
</Book>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</Body>
<#Include SYSTEM "appendix1.xml">
<#Include SYSTEM "_AutoDocAppendicesMainFile.xml">
<Bibliography Databases="AutoDocTest.bib"/>
<Bibliography Databases="AutoDocTest.bib" Style="alphaurl"/>
<TheIndex/>
</Book>
2 changes: 1 addition & 1 deletion tst/AutoDocTest/tst/manual.expected/AutoDocTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</Body>
<#Include SYSTEM "appendix1.xml">
<#Include SYSTEM "_AutoDocAppendicesMainFile.xml">
<Bibliography Databases="AutoDocTest.bib"/>
<Bibliography Databases="AutoDocTest.bib" Style="alphaurl"/>
<TheIndex/>
</Book>
8 changes: 8 additions & 0 deletions tst/manual.expected/_Chapter_Reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@
If this key is not set, but there is a file <F>doc/PACKAGENAME.bib</F>
then it is assumed that you want to use this as your bibliography.
</Item>
<Mark><A>bibstyle</A></Mark>
<Item>
Overrides the bibliography style used for LaTeX output.
This is written as the <C>Style</C> attribute of the generated
<C>&lt;Bibliography .../&gt;</C> element, so valid values are the
bibliography style names understood by &GAPDoc; and BibTeX, such
as <C>alpha</C>, <C>alphaurl</C>, or <C>plain</C>.
</Item>
<Mark><A>entities</A></Mark>
<Item>
A record whose keys are taken as entity names, set to the corresponding
Expand Down
Loading