aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2020-11-01 14:47:23 +0100
committerLudovic Courtès2020-11-01 14:50:03 +0100
commit3e68da0a38250825f9d28b8ff6f448b4bdc72c77 (patch)
tree8ceac6be710b0ec23e835f39fd0d4c73a80610f9
parent47fd87d615102e20ec9b6ea648401caf91828711 (diff)
downloadskribilo-3e68da0a38250825f9d28b8ff6f448b4bdc72c77.tar.gz
skribilo-3e68da0a38250825f9d28b8ff6f448b4bdc72c77.tar.lz
skribilo-3e68da0a38250825f9d28b8ff6f448b4bdc72c77.zip
info: Emit dir-category and dir-entry.
Reported by nly <nly@disroot.org>. * src/guile/skribilo/package/base.scm (document): Add :info-dir-category and :info-dir-entry. * doc/user/document.skb: Document them. * doc/user/user.skb: Pass :info-dir-category. * src/guile/skribilo/engine/info.scm (scribe-document->info): Create INFO-DIR-CATEGORY and START-INFO-DIR-ENTRY.
-rw-r--r--doc/user/document.skb6
-rw-r--r--doc/user/user.skb4
-rw-r--r--src/guile/skribilo/engine/info.scm10
-rw-r--r--src/guile/skribilo/package/base.scm7
4 files changed, 22 insertions, 5 deletions
diff --git a/doc/user/document.skb b/doc/user/document.skb
index 94c9785..477b972 100644
--- a/doc/user/document.skb
+++ b/doc/user/document.skb
@@ -1,7 +1,7 @@
;;; document.skb -- Document and author
;;; -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2008 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2008, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Manuel Serrano
;;; Copyright 2008 Christopher Allan Webber <cwebber@dustycloud.org>
;;;
@@ -56,6 +56,10 @@ or markups. The keywords will not appear in the final document but only
as meta-information (e.g., using the HTML `meta' tag) if the engine used
supports it.")
(:env "A counter environment.")
+ (:info-dir-category "The name of a category for the
+\"directory\" mechanism of the GNU Info documentation system.")
+ (:info-dir-entry "Name of the entry for the GNU Info
+directory.")
(#!rest node... "The document nodes."))
:see-also '(author chapter toc))
diff --git a/doc/user/user.skb b/doc/user/user.skb
index 885dbb3..6491e42 100644
--- a/doc/user/user.skb
+++ b/doc/user/user.skb
@@ -1,6 +1,6 @@
;;; user.skb -- The Skribilo user manual. -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2006, 2007, 2008, 2009, 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2007, 2008, 2009, 2012, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2001, 2002, 2003, 2004 Manuel Serrano
;;;
;;;
@@ -90,6 +90,8 @@
(document :title "Skribilo User Manual"
:keywords '("Skribilo" "Skribe" "User Manual" "text processing"
"HTML" "LaTeX" "Lout" "PostScript" "PDF")
+ :info-dir-category "Document authoring"
+ :info-dir-entry "Authoring documents with Skribilo."
:env '((example-counter 0) (example-env ()))
:author (list (author :name "Érick Gallesio"
:affiliation "Université de Nice - Sophia-Antipolis"
diff --git a/src/guile/skribilo/engine/info.scm b/src/guile/skribilo/engine/info.scm
index a66acde..4379cf8 100644
--- a/src/guile/skribilo/engine/info.scm
+++ b/src/guile/skribilo/engine/info.scm
@@ -291,6 +291,16 @@
(output-newline)
(output-flush *margin*))))
+ (let ((category (markup-option obj :info-dir-category))
+ (entry (markup-option obj :info-dir-entry))
+ (name (basename (info-dest) ".info")))
+ (when category
+ (format #t "INFO-DIR-SECTION ~a~%" category)
+ (format #t "START-INFO-DIR-ENTRY~%")
+ (format #t "* ~a: (~a). ~a~%"
+ name name (or entry ""))
+ (format #t "END-INFO-DIR-ENTRY~%")))
+
;; the main node
(receive (next prev top)
(node-next+prev+up obj e)
diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm
index c28027b..cfc59d3 100644
--- a/src/guile/skribilo/package/base.scm
+++ b/src/guile/skribilo/package/base.scm
@@ -1,7 +1,6 @@
;;; base.scm -- The base markup package of Skribe/Skribilo.
-;;; -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2006, 2007, 2008, 2009, 2013, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2007, 2008, 2009, 2013, 2015, 2016, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Manuel Serrano
;;;
;;;
@@ -81,7 +80,9 @@
:key
(ident #f) (class "document")
(title #f) (html-title #f) (author #f)
- (ending #f) (keywords '()) (env '()))
+ (ending #f) (keywords '()) (env '())
+ (info-dir-category #f)
+ (info-dir-entry ""))
(new document
(markup 'document)
(ident (or ident