Skip to content
Open
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
2 changes: 1 addition & 1 deletion gap/Magic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -402,5 +402,5 @@ DeclareGlobalFunction( "AutoDoc" );

#! @Section Examples
#!
#! Some basic examples for using <C>AutoDoc</C> were already shown in
#! Some basic examples for using <Ref Func="AutoDoc"/> were already shown in
#! Chapter <Ref Label='Tutorials'/>.
23 changes: 21 additions & 2 deletions gap/Magic.gi
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
pkgdirstr, docdirstr,
title_page, tree, is_worksheet,
position_document_class,
args;
args,
outputstring, outputstream;

if Length( arg ) >= 3 then
Error( "too many arguments" );
Expand Down Expand Up @@ -589,8 +590,18 @@
Add( args, "nopdf" );
fi;

# Finally, invoke GAPDoc
# Finally, invoke GAPDoc (and collect info messages)
outputstring := "";
outputstream := OutputTextString( outputstring, true );
SetPrintFormattingStatus( outputstream, false );
SetInfoOutput( InfoGAPDoc, outputstream );
SetInfoOutput( InfoWarning, outputstream );
CallFuncList( MakeGAPDocDoc, args );
CloseStream( outputstream );
UnbindInfoOutput( InfoGAPDoc );
UnbindInfoOutput( InfoWarning );
Print( outputstring );
outputstring := ReplacedString( outputstring, "\c", "" );

# NOTE: We cannot just write CopyHTMLStyleFiles(doc_dir) here, as
# CopyHTMLStyleFiles its argument directly to Directory(), leading
Expand Down Expand Up @@ -665,5 +676,13 @@
AUTODOC_ExtractMyManualExamples( pkgname, pkgdir, doc_dir, gapdoc.main, gapdoc.files, extract_examples );
fi;

if IsBound( outputstring ) then
# If wanted then set an exit code for GAP.
if Number( SplitString( outputstring, "\n" ),
x -> StartsWith( x, "#W " ) and not

Check warning on line 682 in gap/Magic.gi

View check run for this annotation

Codecov / codecov/patch

gap/Magic.gi#L682

Added line #L682 was not covered by tests
StartsWith( x, "#W There are overfull boxes" ) ) > 0 then
GapExitCode( false );

Check warning on line 684 in gap/Magic.gi

View check run for this annotation

Codecov / codecov/patch

gap/Magic.gi#L684

Added line #L684 was not covered by tests
fi;
fi;
return true;
end );
2 changes: 1 addition & 1 deletion makedoc.g
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

LoadPackage("AutoDoc");

AutoDoc( rec(
AutoDoc( rec(
autodoc := true,
gapdoc := rec(
LaTeXOptions := rec( EarlyExtraPreamble := """
Expand Down
2 changes: 1 addition & 1 deletion tst/manual.expected/_Chapter_AutoDoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
<Heading>Examples</Heading>

<P/>
Some basic examples for using <C>AutoDoc</C> were already shown in
Some basic examples for using <Ref Func="AutoDoc"/> were already shown in
Chapter <Ref Label='Tutorials'/>.
</Section>

Expand Down
Loading