skribilo-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [skribilo-users] Floating tables


From: Ludovic Courtès
Subject: Re: [skribilo-users] Floating tables
Date: Mon, 09 Jan 2017 16:15:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Roger,

Sorry for the delay, and happy new year! :-)

Roger Mason <address@hidden> skribis:

> (markup-writer '&latex-floating-table-stop
>              :options '(:legend :ident)
>              :action (lambda (n e)
>                        (let ((legend (markup-option n :legend))
>                              (ident (markup-ident n)))
>                          (format #t "\\caption{\\label{~a}" 
> (string-canonicalize ident)) ;(expecting string): #f

[…]

>            (when (eq? floating #t)
>                (output (new markup
>                             (markup '&latex-floating-table-stop)
>                             (class "table")
>                             (options `((legend ,(markup-option n :legend))
>                                        (ident ,(markup-ident n)))))
>                        e)
>                  )

[…]

> In ../../../skribilo-0.9.3/src/guile/skribilo/engine/latex.scm:
> 1165: 2 [#<procedure 2959df50 at 
> ../../../skribilo-0.9.3/src/guile/skribilo/engine/latex.scm:1162:23 (n e)> # 
> ...]
> In ../../../skribilo-0.9.3/src/guile/skribilo/utils/strings.scm:
>   52: 1 [string-canonicalize #f]
> In unknown file:
>    ?: 0 [string-length #f]
>
> ERROR: In procedure string-length:
> ERROR: In procedure string-length: Wrong type argument in position 1
> (expecting string): #f

The problem seems to be that the (new markup (markup
'&latex-floating-table-stop) …) expression above does not provide an
‘ident’ field, so the ‘ident’ remains #f.

The “normal” way is like this (taken from (skribilo package base)):

--8<---------------cut here---------------start------------->8---
  (new markup
     (markup '~)
     (ident (symbol->string (gensym "~")))  ; <– here
     (class class)
     (loc   &invocation-location)
     (required-options '())
     (options (the-options opts :class))
     (body (the-body opts)))
--8<---------------cut here---------------end--------------->8---

HTH!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]