aboutsummaryrefslogtreecommitdiff
path: root/src/guile
AgeCommit message (Collapse)Author
2023-08-29html: Add CSS style declaration abstraction.Arun Isaac
* src/guile/skribilo/engine/html.scm (style-declaration): New function.
2023-08-29html: Remove redundant pair? check on inline CSS.Arun Isaac
The inline-css engine custom is either a string or a list. If it is a string, we coerce it into a singleton list. So, there is no need to check again that it is a pair. * src/guile/skribilo/engine/html.scm (&html-header-style): Remove redundant pair? check on inline CSS.
2023-08-29html: Use call-with-input-file to read inline CSS files.Arun Isaac
* src/guile/skribilo/engine/html.scm: Import (rnrs exceptions). (&html-header-style): Use call-with-input-file, instead of open-input-file and close-input-port, to read inline CSS files.
2023-08-29html: Use get-string-all to read inline CSS files.Arun Isaac
* src/guile/skribilo/engine/html.scm: Import (rnrs io ports). (&html-header-style): Use get-string-all instead of explicit loop to read inline CSS files.
2023-08-29html: Render table of contents as nested ordered lists.Arun Isaac
* src/guile/skribilo/engine/html.scm (&html-header-style): Add CSS to set markers for list items in the table of contents. (toc): Render table of contents as nested ordered lists, not as a table.
2023-08-28html: Avoid single letter variable names.Arun Isaac
* src/guile/skribilo/engine/html.scm: Replace single letter variable names n and e with node and engine respectively.
2023-08-28html: Abstract out opening and closing of HTML tags.Arun Isaac
* src/guile/skribilo/engine/html.scm: Import (srfi srfi-26). (html-open, html-close): New functions. (html-markup-class, &html-head, &html-body, &html-page, &html-header-favicon, &html-header-css, &html-header-javascript, &html-generic-title, &html-footnotes, html-title-authors, author, toc, chapter, html-section-title, paragraph, footnote, linebreak, hrule, color, frame, font, flush, itemize, enumerate, description, item, blockquote, figure, &html-figure-legend, table, tr, tc, image, mailto, mark, ref, url-ref, &prog-line, &bib-entry-label, &the-index-header): Use html-open and html-close.
2023-02-27ast: Rewrite ast->string using string-join.Arun Isaac
* src/guile/skribilo/ast.scm (ast->string): Rewrite using string-join.
2023-02-06html: Use for-each instead of explicit loop.Arun Isaac
* src/guile/skribilo/engine/html.scm (&html-footnotes): Use for-each instead of explicit loop.
2023-02-06html: Use match instead of car and cdr.Arun Isaac
* src/guile/skribilo/engine/html.scm (toc): Use match instead of car and cdr.
2023-02-06html: Do not add br tags before footnotes.Arun Isaac
* src/guile/skribilo/engine/html.scm (&html-footnotes): Do not add br tags before.
2023-01-28html: Do not add br tag after section.Arun Isaac
* src/guile/skribilo/engine/html.scm (section): Do not br tag after.
2023-01-28html: Do not add br tag after chapter.Arun Isaac
* src/guile/skribilo/engine/html.scm (chapter): Do not br tag after.
2022-12-10biblio: Template compiler recognizes 'doi' and 'note'.Ludovic Courtès
* src/guile/skribilo/biblio/template.scm (bibliography-template): Add 'doi' and 'note'.
2022-05-05lncs: Change writers for the LaTeX engine only.Ludovic Courtès
* src/guile/skribilo/package/lncs.scm (&bib-entry-author) (&bib-entry-booktitle, &bib-entry-journal): Add missing LATEX argument to 'markup-writer'.
2022-05-05biblio: Replace template interpreter with a macro (a "compiler").Ludovic Courtès
This allows us to catch invalid templates at macro-expansion time and is more efficient. * src/guile/skribilo/biblio/template.scm (evaluate-bib-entry-template): Remove. (define-template-engine, bibliography-template): New macros. (output-bib-entry-template): Rewrite and remove 'get-field' optional argument. (make-bib-entry-template/default, make-bib-entry-template/skribe): Use 'bibliography-template' instead of quasiquote/unquote. * src/guile/skribilo/package/jfp.scm (le): Likewise. * src/guile/skribilo/package/lncs.scm (bib-entry-template): Likewise. * src/guile/skribilo/biblio.scm (&biblio-template-error): Remove. (handle-biblio-error): Adjust accordingly. * tests/biblio.test: New file. * tests/Makefile.am (TESTS): Add it.
2022-04-13reader: Add Gemtext reader.Arun Isaac
* src/guile/skribilo/reader/gemtext.scm: New file. * configure.ac: Set BUILD_GEMTEXT_READER automake conditional to true if (srfi srfi-171) is found. Else, set it to false. * src/guile/Makefile.am (readers): Add skribilo/reader/gemtext.scm if BUILD_GEMTEXT_READER is true. (EXTRA_DIST): Add skribilo/reader/gemtext.scm if BUILD_GEMTEXT_READER is false. * doc/user/syntax.skb (The Gemtext Syntax): New section. * tests/readers/gemtext.test: New file. * tests/Makefile.am (TESTS): Add readers/gemtext.test if BUILD_GEMTEXT_READER is true. (EXTRA_DIST): Add readers/gemtext.text if BUILD_GEMTEXT_READER is false.
2022-03-16html: Use h2 for section titles.Arun Isaac
* src/guile/skribilo/engine/html.scm (html-engine)[custom]: Use <h2> and </h2> for section-title-start and section-title-stop respectively.
2022-03-10html: Set UTF-8 as the default charset.Arun Isaac
* src/guile/skribilo/engine/html.scm (html-engine): Set UTF-8 as the default charset.
2022-03-10html: Fix year in copyright header for Arun Isaac.Arun Isaac
This copyright header was added in 76136f9e904e8eb17f494d20fa2969ef2d5eb1aa, but the year was wrongly specified as 2021 instead of 2022. * src/guile/skribilo/engine/html.scm: Fix year in copyright header for Arun Isaac.
2022-02-22html: Include custom head outside <style> tag.Arun Isaac
Prior to this commit, the custom head was included inside <style>. That is a bug. * src/guile/skribilo/engine/html.scm (&html-head): Include custom head. (&html-header-style): Do not include custom head.
2021-11-10utils: compat: Set fallback for *skribe-rc-directory*.Arun Isaac
* src/guile/skribilo/utils/compat.scm (*skribe-rc-directory*): Set fallback value in case the HOME environment variable is not set.
2021-02-02info: Mark :info-dir-category and :info-dir-entry as supported.Ludovic Courtès
This is a followup to 3e68da0a38250825f9d28b8ff6f448b4bdc72c77. * src/guile/skribilo/engine/info.scm (document): Add :info-dir-category and :info-dir-entry to :options.
2020-11-01justify: Turn the current justifier into a parameter.Ludovic Courtès
* src/guile/skribilo/utils/justify.scm (*justifiers*): Remove. (*justifier*): New variable. (output-justified, output-token, output-newline) (output-flush, justification-width, with-justification) (with-justification/noflush): Adjust accordingly.
2020-11-01justify: Turn '*margin*' into a parameter.Ludovic Courtès
* src/guile/skribilo/utils/justify.scm (*margin*): Turn into a parameter. (with-justification, with-justification/noflush): Use 'parameterize' instead of 'set!'. * src/guile/skribilo/engine/info.scm: Adjust accordingly. * doc/modules/skribilo/documentation/api.scm (doc-markup): Likewise.
2020-11-01info: Number section titles.Ludovic Courtès
This matches what 'makeinfo' does for numbered sections. * src/guile/skribilo/engine/info.scm (block-number): New procedure. (block-title): Add :number? and honor it. (section, subsection, subsubsection, chapter): Pass :number? #t for the title.
2020-11-01info: Avoid extra leading newline for the first paragraph of a section.Ludovic Courtès
* src/guile/skribilo/engine/info.scm (paragraph): Emit newline only when N is not the first paragraph.
2020-11-01info: Add extra newline after node heading.Ludovic Courtès
This matches what 'makeinfo' does. * src/guile/skribilo/engine/info.scm (info-node): Add extra newline.
2020-11-01info: Emit dir-category and dir-entry.Ludovic Courtès
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.
2020-08-06Remove 'cond-expand' clauses for Guile 1.8.Ludovic Courtès
This is a followup to d183aa487d99baea3746f79759c17cf36c55dfbf. * src/guile/skribilo/debug.scm (with-debug): Remove 'cond-expand' and keep only 'guile-2' version. * src/guile/skribilo/engine/html.scm (&html-generic-document)[set-output-encoding]: Likewise. * src/guile/skribilo/engine/info.scm (document): Likewise. * src/guile/skribilo/engine/latex.scm (document): Likewise. * src/guile/skribilo/engine/lout.scm (document): Likewise. * src/guile/skribilo/evaluator.scm (%evaluate): Likewise. * src/guile/skribilo/location.scm <top level>: Likewise. * src/guile/skribilo/module.scm (maybe-set-module-name!): Likewise. * src/guile/skribilo/package/base.scm <top level>: Likewise. * src/guile/skribilo/utils/syntax.scm (unless, when): Remove. (set-correct-file-encoding!, default-to-utf-8): Keep only 'guile-2' variant. * tests/location.test <top level>: Likewise. * tests/readers/rss-2.test <top level>: Likewise.
2020-08-06Do not use 'guile-2.0' as a 'cond-expand' key since it doesn't exist.Ludovic Courtès
* src/guile/skribilo.scm (skribilo): Reverse 'cond-expand' logic for _IOFBF handling.
2020-08-02lout: Replace more Unicode characters.Ludovic Courtès
* src/guile/skribilo/engine/lout.scm (lout-encoding): Add several diacritics, guillemets, curly quotes, etc.
2020-08-02source: Remove unused procedure.Ludovic Courtès
* src/guile/skribilo/source.scm (split-string-newline): Remove.
2020-08-02Use '_' as the 'match' wildcard.Ludovic Courtès
This addresses '-Wunused-variable' warnings. * doc/modules/skribilo/documentation/api.scm (define-markup?) (make-engine?, make-engine-custom) (define-markup-formals, define-markup-options) (define-markup-rest, exp->skribe): Use '_' instead of 'else' as the 'match' wildcard. * src/guile/skribilo/package/slide/latex.scm (%slide-advi-setup!): Likewise. * src/guile/skribilo/source/lisp.scm (lisp-extractor) (scheme-extractor, stklos-extractor, skribe-extractor) (bigloo-extractor): Likewise. * src/guile/skribilo/sui.scm (load-sui): Likewise. (sui-title, sui-key, sui-find-ref, sui-filter): Likewise.
2020-08-01pie: Prevent inlining of '%ploticus-program'.Ludovic Courtès
* src/guile/skribilo/package/pie.scm (%ploticus-program): Add top-level 'set!'.
2020-08-01Adjust autoload lists.Ludovic Courtès
In preparation for Guile 3 support, adjust #:autoload clauses to include list all the necessary bindings, or replace them with #:use-module.
2020-08-01skribilo: Use _IOFBF on Guile 2.0 only.Ludovic Courtès
* src/guile/skribilo.scm (skribilo): Use _IOFBF on Guile 2.0 only.
2020-08-01build: Remove bundled copy of (srfi srfi-64).Ludovic Courtès
Guile 2.0.14 has it and so do all subsequent versions. * src/guile/srfi/srfi-64.scm, src/guile/srfi/srfi-64.upstream.scm: Remove. * src/guile/Makefile.am (EXTRA_DIST): Adjust accordingly.
2020-08-01build: Remove support for Guile 1.8.Ludovic Courtès
* configure.ac: Remove "1.8" from 'GUILE_PKG'. Remove 'HAVE_GUILE2' conditional. Remove checks for (srfi srfi-34), (srfi srfi-35), and (srfi srfi-37). * guilec.am: Inline what was in HAVE_GUILE2 and remove the alternate. * src/guile/skribilo/debug.scm (debug-item): Remove 'cond-expand' and keep only the 'guile-2' variant. * src/guile/skribilo/engine.scm (engine-loaded?): Likewise. * src/guile/skribilo/lib.scm (&invocation-location, define-markup): Likewise. * src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): Likewise. * web/index.skb: Remove mention of 1.8. * README: Likewise.
2020-08-01Write '#:use-module', '#:export', etc. instead of ':use-module', etc.Ludovic Courtès
Changes made by running: for i in $(git ls-tree -r HEAD --name-only) ; do sed -i $i -e's/:use-module/#:use-module/g ; s/:autoload/#:autoload/g ; s/:export/#:export/g' ; done
2018-04-30build: Install modules and objects in the usual locations.v0.9.4Ludovic Courtès
* configure.ac: Add '--with-guileobjectdir' and substitute 'guileobjectdir'. * guilec.am (nobase_nodist_module_DATA): Rename to... (nobase_nodist_guileobject_DATA): ... this (skr_install_go_files): Change value to 'install-nobase_nodist_guileobjectDATA'. * src/guile/Makefile.am (nobase_nodist_module_DATA): Change "+=" to "=". (nobase_nodist_module_DATA): Rename to... (nobase_nodist_guileobject_DATA): ... this. * src/skribilo.in (GUILE_LOAD_COMPILED_PATH): Use @guileobjectdir@. * substitute.am (substitute): Add @guileobjectdir@.
2018-04-29slide/html: Do not emit <strong> and <big>.Ludovic Courtès
* src/guile/skribilo/package/slide/html.scm (html-slide-title): Remove <strong> and <big>.
2018-04-29html: Do not emit <big> and <strong> for titles.Ludovic Courtès
* src/guile/skribilo/engine/html.scm (&html-generic-title): Do not emit <big> and <strong>.
2018-04-22'base' package: Replace the 'include' form on Guile 2.x.Ludovic Courtès
* src/guile/skribilo/package/base.scm: Add 'cond-expand' form with call to 'module-replace!'.
2018-03-30acmproc: "References" section is unnumbered.Ludovic Courtès
* src/guile/skribilo/package/acmproc.scm (references): Pass :number #f to 'chapter'.
2018-03-30Do not mutate lists that may be literal.Ludovic Courtès
On Guile 2.2 this would lead to a segmentation fault or a 'set-car!' error ("expecting mutable pair") on 2.2.3+. * src/guile/skribilo/engine.scm (engine-custom-set!): Do not mutate CUSTOMS. * src/guile/skribilo/resolve.scm (do-resolve! <pair>): Do not mutate AST. (do-resolve! <node>): Do not mutate OPTIONS. (do-resolve! <document>): Do not mutate the list of customs.
2018-03-30syntax: Rename '_' to 'G_' to avoid issues on Guile 2.2.Ludovic Courtès
Failing to do that, literal '_' would not match in contexts such as 'match' patterns on Guile 2.2. * src/guile/skribilo/utils/syntax.scm (_): Rename to... (G_): ... this. * po/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * src/guile/skribilo.scm, src/guile/skribilo/ast.scm, src/guile/skribilo/biblio.scm, src/guile/skribilo/biblio/author.scm, src/guile/skribilo/condition.scm, src/guile/skribilo/engine.scm, src/guile/skribilo/engine/info.scm, src/guile/skribilo/engine/lout.scm, src/guile/skribilo/index.scm, src/guile/skribilo/package/base.scm, src/guile/skribilo/package/lncs.scm, src/guile/skribilo/reader/rss-2.scm, src/guile/skribilo/source.scm, src/guile/skribilo/sui.scm, src/guile/skribilo/biblio/template.scm, src/guile/skribilo/verify.scm: Use 'G_' instead of '_'.
2016-10-07Use 'define-syntax-parameter' for '&invocation-location'.Ludovic Courtès
Guile >= 2.1.4 expects an explicit syntax parameter declaration. * src/guile/skribilo/lib.scm (&invocation-location) [guile-2]: Define as a syntax parameter.
2016-10-07Remove use of 'getter-with-setter'.Ludovic Courtès
* src/guile/skribilo/reader.scm (reader:name, reader:version) (reader:make): Remove 'getter-with-setter' definitions.
2016-03-01'base' package: Add note about non-translatable bits.Ludovic Courtès
* src/guile/skribilo/package/base.scm (source): Add 'TRANSLATORS' comment. Suggested by Anders Jonsson <anders.jonsson@norsjovallen.se>.