From bf570e46f929036eb2f44da01698db3716ec05fe Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 27 May 2026 15:36:36 +0200 Subject: [PATCH] Use AutoDoc to build manual ... mainly so that one does not have to edit the version in PackageInfo.g twice --- PackageInfo.g | 16 +++++++++++----- doc/float.xml | 2 +- makedoc.g | 20 +++++++++----------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/PackageInfo.g b/PackageInfo.g index 46f5058..dab97f7 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -8,10 +8,6 @@ Subtitle := "Integration of mpfr, mpfi, mpc, fplll and cxsc in GAP", Version := "1.0.9", Date := "26/08/2025", # dd/mm/yyyy format License := "GPL-2.0-or-later", -## <#GAPDoc Label="Version"> -## -## -## <#/GAPDoc> Persons := [ rec( LastName := "Bartholdi", @@ -109,5 +105,15 @@ BannerFunction := function(info) end, TestFile := "tst/testall.g", -Keywords := ["floating-point"] +Keywords := ["floating-point"], + +AutoDoc := rec( + entities := rec( + Version := ~.Version, + Date := ~.Date, + ), + MainPage := false, + TitlePage := false, +), + )); diff --git a/doc/float.xml b/doc/float.xml index a267df2..2621981 100644 --- a/doc/float.xml +++ b/doc/float.xml @@ -2,7 +2,7 @@ $\to$--&tgt;'> - <#Include Label="Version"> + <#Include SYSTEM "_entities.xml"> ]> diff --git a/makedoc.g b/makedoc.g index e92d1ad..7b5c5fb 100644 --- a/makedoc.g +++ b/makedoc.g @@ -1,11 +1,9 @@ -#if fail = LoadPackage("AutoDoc", ">= 2016.01.21") then -# Error("AutoDoc 2016.01.21 or newer is required"); -#fi; -#AutoDoc(rec(gapdoc := rec(files:=["PackageInfo.g"]))); - -MakeGAPDocDoc("doc","float", - ["../lib/float.gd","../lib/pslq.gi","../PackageInfo.g"],"float","MathJax"); -CopyHTMLStyleFiles("doc"); -GAPDocManualLab("Float"); - -QUIT; +if fail = LoadPackage("AutoDoc", ">= 2022.07.10") then + Error("AutoDoc 2022.07.10 or newer is required"); +fi; +AutoDoc(rec( + gapdoc := rec( + main:="float.xml", + LaTeXOptions := rec( InputEncoding := "latin1" ), + ) +));