public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: <kperry-rhKcP+tiLR7by3iVrkZq2A@public.gmane.org>
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: listAttributes not working
Date: Tue, 21 Feb 2023 14:21:33 -0500	[thread overview]
Message-ID: <000001d94629$b6cc3520$24649f60$@blinksoft.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

 

 

I  am either doing something wrong or the listAttributes are not working.
To make sure it was not my filter I did the following:

 

Pandoc -print-default-data-file sample.lua >sample.lua

 

Then I added a log function to sample.lua that was created by the above
command like:

 

local function log (msg)

file = io.open("log.txt","a")

file:write(msg .. "\n")

        file:close()

end

 

 

This was so I could see the output.  Yes it continues to append to log.txt
in the folder but it was just for simple testing.  

 

Finally I added this line to the ordered list function.

 

Log(attributes(items.listAttributes))

 

The attributes function comes in the sample.lua and is supposed to print all
the attributes you send it.  Well this says it is nil and errors.  I have
tried putting if statements and print statements of all kinds in and I can
not get the listAttributes to show up on items.  After doing some testing it
seems the items passed into orderedList is just a table of items so there
are no attributes on it.  

 

When I read the pandoc documents  it explains that an orderedList has
listAttributes.  How do I get them since the above test shows that I can't
get them from items in the orderedList function.  

 

As I said in a previous email I am able to get the style and start values
from json but not from the lua API.  I have to be doing something wrong
unless no one has tried this before and that would be shocking.

 

 

 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/000001d94629%24b6cc3520%2424649f60%24%40blinksoft.com.

[-- Attachment #2: Type: text/html, Size: 4688 bytes --]

             reply	other threads:[~2023-02-21 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 19:21 kperry-rhKcP+tiLR7by3iVrkZq2A [this message]
2023-02-21 19:41 kperry-rhKcP+tiLR7by3iVrkZq2A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001d94629$b6cc3520$24649f60$@blinksoft.com' \
    --to=kperry-rhkcp+tilr7by3ivrkzq2a@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).