skribilo-users
[Top][All Lists]
Advanced

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

Re: Question regarding "paragraph" and "p"


From: Michael Vehrs
Subject: Re: Question regarding "paragraph" and "p"
Date: Sun, 17 Jan 2021 07:58:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 1/16/21 7:39 PM, Ludovic Courtès wrote:
Hi,

Michael Vehrs <Michael.Burschik@gmx.de> skribis:

On 1/14/21 3:23 PM, Ludovic Courtès wrote:
Hi,

Michael Vehrs <Michael.Burschik@gmx.de> skribis:

As far as I can tell, this definition from package/base.scm means that p
will only ever call paragraph with the minimum arguments, making it
impossible to extend p:

(define-markup (p :rest opt :key ident (class #f))
     (paragraph :ident ident :class class :loc &invocation-location
        (the-body opt)))

I would consider this a bug. I think it would be better to define p in
the usual way, and to extend markup-writer to handle a list of markup
elements.
Doesn’t that just mean that ‘p’ is an alias for ‘paragraph’, and that
all you have to do is define a markup writer for ‘paragraph’?  Or am I
missing something?

Thanks,
Ludo’.

No, it is not an alias. If I extend paragraph with further :options
(e.g. paragraph alignment), they will not be picked up by "p".
Oh right.  How about making it an actual alias, then?

   (define p paragraph)

Thanks,
Ludo’.

At what point, though? It does not work in the engine definition file,
since paragraph is not bound at that point. You have to add the alias to
the document itself, which is unfortunate.


Regards

Michael





reply via email to

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