public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Force use of attributes in jats writer
Date: Thu, 13 Jan 2022 09:24:05 +0000	[thread overview]
Message-ID: <Yd/vtdosfda4eefI@localhost> (raw)
In-Reply-To: <b68835526c9e4d45afb6d3d122b7da91-NSENcxR/0n0@public.gmane.org>

I guess that it is can now be achieved using pandoc.write:

  * Create a new Pandoc object containing your Div;
  * Pass it to pandoc.write;
  * Modify the returned string;
  * Return it as the content of a RawBlock.

By the way, this could also solve the problem discuss here, but I would like to test it before closing the issue: https://github.com/jgm/pandoc/issues/7262

Le Thursday 13 January 2022 à 05:37:04AM, denis.maier-NSENcxR/0n0@public.gmane.org a écrit :
> Well, the invalid file will only be temporary. 
> Let's say I a div with content-type="parallel" for parallel texts. In some cases the one column or both will have righttoleft text, so I need for multiple attributes:
> 
> content-type="parallel-left-rtl"
> content-type="parallel-right-rtl"
> content-type="parallel-both-rtl"
> 
> But this will cause redundant rules in the xslt for post-processing:
> 
> I could do this:
> 
> content-type="parallel right-rtl"
> content-type="parallel left-rtl"
> content-type="parallel both-rtl"
> 
> Also not ideal (because processing such lists is ugly in XSLT). I thought about this:
> 
> 
> content-type="parallel" right-dir="rtl"
> content-type="parallel" left-dir="rtl"
> content-type="parallel" left-dir="rtl" right-dir="rtl"
> 
> I would then pick this up via xslt and construct valid colgroups based on the values of right-dir and left-dir. But maybe there's an easier way?
> 
> Denis
> 
> > -----Ursprüngliche Nachricht-----
> > Von: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
> > Gesendet: Donnerstag, 13. Januar 2022 01:50
> > An: Maier, Denis Christian (UB) <denis.maier-NSENcxR/0n0@public.gmane.org>; pandoc-
> > discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > Betreff: Re: Force use of attributes in jats writer
> > 
> > 
> > I don't understand.  You want to create an invalid JATS document, with an
> > attribute that is not supported for that element?
> > 
> > <denis.maier-NSENcxR/0n0@public.gmane.org> writes:
> > 
> > > Hi
> > >
> > > Is there a way to < convince > pandoc to use an attribute on a div that is not
> > in the list for boxed-text in the list of allowed attributes in the jats writer?
> > > Background: I want to use some non-standard attributes and pick them up
> > later during post-processing. (The intermediary jats file will not be valid, the
> > final result will be.) I can add that stuff to one of the allowed attributes, but
> > that will make post-processing with xslt more complex.
> > >
> > > Best,
> > > Denis
> > >
> > > --
> > > 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/b4b8786382dd497bb7bb231edcc5f93a%40unibe.ch.
> 
> -- 
> 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/b68835526c9e4d45afb6d3d122b7da91%40unibe.ch.

-- 
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/Yd/vtdosfda4eefI%40localhost.


  parent reply	other threads:[~2022-01-13  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 11:04 denis.maier-NSENcxR/0n0
     [not found] ` <b4b8786382dd497bb7bb231edcc5f93a-NSENcxR/0n0@public.gmane.org>
2022-01-12  7:56   ` AW: " denis.maier-NSENcxR/0n0
2022-01-13  0:50   ` John MacFarlane
     [not found]     ` <yh480kfspsjw77.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-01-13  5:37       ` AW: " denis.maier-NSENcxR/0n0
     [not found]         ` <b68835526c9e4d45afb6d3d122b7da91-NSENcxR/0n0@public.gmane.org>
2022-01-13  9:24           ` Bastien DUMONT [this message]
2022-01-13 17:18             ` pandoc.write in Lua and simple tables in JSON (filters) (was: Force use of attributes in jats writer) BPJ
     [not found]               ` <CADAJKhBfgeEPm7jGd34-jqpKuniqwRTR7+epft3hWchcAGiX5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-01-13 17:32                 ` BPJ

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=Yd/vtdosfda4eefI@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@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).