Skip to content

Instantly share code, notes, and snippets.

@fingolfin
Created January 16, 2013 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fingolfin/4546963 to your computer and use it in GitHub Desktop.
Save fingolfin/4546963 to your computer and use it in GitHub Desktop.
makedoc.g file for libsing
LoadPackage("gapdoc");;
MakeGAPDocDoc( ".", "libsing", [ "../PackageInfo.g" ], "libsing" );;
LoadPackage( "GAPDoc" );
# Determine GAPROOT
if IsRecord(GAPInfo.SystemEnvironment) and
IsBound(GAPInfo.SystemEnvironment.GAPROOT) then
GAPROOT:=GAPInfo.SystemEnvironment.GAPROOT;
else
GAPROOT:="../../..";
fi;
Display(GAPROOT);
# Some settings
SetGapDocLaTeXOptions( "utf8" );
# Update bib
#bib := ParseBibFiles( "doc/libsing.bib" );
#WriteBibXMLextFile( "doc/libsing.bib.xml", bib );
# List of files to scan
files := [ "../PackageInfo.g" ];;
HasSuffix := function(list, suffix)
local n; n := Length(list);
return Length(list) >= Length(suffix) and list{[n-Length(suffix)+1..n]} = suffix;
end;
dir:=Directory("../lib");;
candidates := Filtered(DirectoryContents(dir), fname -> HasSuffix(fname, ".gd"));
dir := Directory(dir);
Append(files, List(candidates, fname -> Filename(dir, fname)));
# Generate the documentation
main := "libsing";;
bookname := "libsing";;
MakeGAPDocDoc( ".", main, files, bookname, GAPROOT, "MathJax" );;
# Copy over the style files (only available in newer GAPDoc versions)
if IsBound(CopyHTMLStyleFiles) then
CopyHTMLStyleFiles(".");
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment