public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "Günter Dannoritzer" <dannoritzer-S0/GAf8tV78@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: ODT with some, but not all, graphics aligned on the right margin
Date: Wed, 8 Feb 2023 03:10:28 -0800 (PST)	[thread overview]
Message-ID: <2a798e1d-13d6-4a1d-a348-cda27ce363a4n@googlegroups.com> (raw)
In-Reply-To: <a556d276-429e-b2db-2e83-7d89d26a74c7-GsmfYmMHemE@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3268 bytes --]

Hi Eelco,

I created a LUA-Filter that uses the Align-Classes and provides for docx 
the correct alignment. Maybe it helps for adjusting and using for odt.

Regards,
Günter



if FORMAT ~= "docx" then
  print("Only docx target -- not: ", FORMAT)
  print("... ending")
  return
end


function Image (img)

  align = 'left'
  for k, v in pairs(img.classes) do
    --print('-->', k, v)
    if v == 'center' then
      align = 'center'
    elseif v == 'right' then
      align = 'right'
    end
  end

  ret_img = {
  pandoc.RawInline('openxml', string.format('<w:pPr><w:jc 
w:val="%s"/></w:pPr>', align)),
  img

  }

  return ret_img
end


Eelco Vriezekolk schrieb am Dienstag, 7. Februar 2023 um 22:05:00 UTC+1:

> Hmm, that's a disappointment. Please have my vote for addition of 
> styles-support in ODT. In my experience, the use of styles in 
> OpenDocument is superior to that in Miicrosoft Word.
> But for now, I will make do with Word and docx.
>
> Thanks for the clarification!
>
> On 07/02/2023 17:53, John MacFarlane wrote:
> > I don't think there's an easy way to do this in ODT. custom-style works 
> for docx but not odt.
> > You could probably use a filter that emits raw opendocument XML, but I 
> don't have time to walk through that now.
> >
> >> On Feb 7, 2023, at 8:12 AM, Eelco Vriezekolk <ee...-GsmfYmMHemE@public.gmane.org> wrote:
> >>
> >> Hello,
> >>
> >> From Markdown I want to create a manual in various formats, including 
> HTML and ODT (OpenDocument).
> >> My manual contains images. Most are figures (in their own paragraph), 
> but others should appear inside a paragraph, with text flowing around it. 
> For HTML this works:
> >>
> >> <Screenshot 2023-02-07 at 17.07.25.png>
> >>
> >> The .float-class is defined in a CSS-stylesheet, and works fine:
> >>
> >>
> >>
> >> However, I cannot get this to work right in the ODT output. I define a 
> 'float' graphics style in the reference file, but it is not being picked up 
> in the ODT-output. No amount of experimenting and searching the web have 
> helped so far.
> >> I can get *all* figures to be right-aligned, but that is not what I 
> want. I want to be able to indicate that some selected images appear inline.
> >>
> >> Can this be done? How?
> >>
> >>
> >>
> >> -- 
> >> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/d6ae917b-a037-4e03-a442-a050fdb7d368n%40googlegroups.com
> .
> >> <Screenshot 2023-02-07 at 17.07.25.png>
>
> -- 
> Eelco Vriezekolk
>
>

-- 
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/2a798e1d-13d6-4a1d-a348-cda27ce363a4n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4763 bytes --]

      parent reply	other threads:[~2023-02-08 11:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 16:12 Eelco Vriezekolk
     [not found] ` <d6ae917b-a037-4e03-a442-a050fdb7d368n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-07 16:53   ` John MacFarlane
     [not found]     ` <2D74B45D-A8A8-439D-9B60-F7711A1E6139-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-02-07 21:04       ` Eelco Vriezekolk
     [not found]         ` <a556d276-429e-b2db-2e83-7d89d26a74c7-GsmfYmMHemE@public.gmane.org>
2023-02-08 11:10           ` Günter Dannoritzer [this message]

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=2a798e1d-13d6-4a1d-a348-cda27ce363a4n@googlegroups.com \
    --to=dannoritzer-s0/gaf8tv78@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).