From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32153 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=BCnter_Dannoritzer?= Newsgroups: gmane.text.pandoc Subject: Re: ODT with some, but not all, graphics aligned on the right margin Date: Wed, 8 Feb 2023 03:10:28 -0800 (PST) Message-ID: <2a798e1d-13d6-4a1d-a348-cda27ce363a4n@googlegroups.com> References: <2D74B45D-A8A8-439D-9B60-F7711A1E6139@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1460_497464117.1675854628165" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34431"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDB6FUFYFIIKLBUOT4DBUBA4XXHO4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Feb 08 12:10:33 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f56.google.com ([209.85.210.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pPiLQ-0008oo-Lg for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 08 Feb 2023 12:10:32 +0100 Original-Received: by mail-ot1-f56.google.com with SMTP id w9-20020a9d5a89000000b0068bc6c8621esf8932751oth.9 for ; Wed, 08 Feb 2023 03:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=hEwmyt8mqns67Dn01kr0UnWf5F/9v123/k+JK1AX3r8=; b=JN+EmVlkJKKkxjpBhYY37JoBbGHaJfV8w/Tt4e+za0rWmhjjg+uN5vwa/wWxlrshji Sm+aLp7NrGVebn19ZphtqS3a5kZ6RQx6qaXsd4ZUpS0g27MYJZlrHvm60KaLE/keWXcz B7axNif+XkSL0zMEwtyrVnmZYwtmaPtBtRmq1J/DIxEPhyxGMA3P4oppp99FzHbO2O75 ztCSv+z5gOAk2xM424JmAc/u6cEP6V2Hqlvyz/NUhgtbY0bLM9lzIqbD+vS8z1q/xEFr Y0+YJyPf356CNSnB6/0RIUPWrM1eK/N8jzJcK7ZqydzBNm1br+OKE0TwQKhCp+1/VMD9 oltw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=hEwmyt8mqns67Dn01kr0UnWf5F/9v123/k+JK1AX3r8=; b=CC+I5ew8LimwriIYnH9LgwRAoZuCXLYg8hHGbz41mFub4BJePOJKQCbHuxV0u45asY AURHuak6YLoyq33Jgr7c078XX6XoDUKhz4GIeMqamZBozT4iDT+lGrLqyLBExLwTQawi CHH8vke0c39ohTXu4dP+0z+a4Jzv02Iy4lbHpy7gUqvEeqQU/3rjkYUwO9hhBCPAo2O7 0VCIU8iTX0QoyMXHBXAI4YU3eg0x8bp5/1ol7OE/laHHecNt/9RLBmGuWLi3/rm9FC57 eV/NDPphOeby/ZQDU4ytcSGuKUSSNpWCTX4GAu4pvQkkNGpQURt4JgB3Ajx8qA7TDYuU iH+w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKX5NBdJsxf+P6ukVj86yRTRNnHooFGBoxWH5yiGGOVG+A0VAl3o 3hvUWbuKaYp/7hnAdZ4r9bY= X-Google-Smtp-Source: AK7set+WyMse9AkdFGGkefALJtsVYWXhb3jP0hTewAdJ2B+cuRy6LCCGLLTlLFJJ6cZ12Gdv2R26RA== X-Received: by 2002:a05:6870:f153:b0:16a:5ea0:78af with SMTP id l19-20020a056870f15300b0016a5ea078afmr326836oac.267.1675854631458; Wed, 08 Feb 2023 03:10:31 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:264e:b0:68b:ba52:71f8 with SMTP id f14-20020a056830264e00b0068bba5271f8ls889932otu.5.-pod-prod-gmail; Wed, 08 Feb 2023 03:10:29 -0800 (PST) X-Received: by 2002:a9d:7e84:0:b0:66c:5685:5415 with SMTP id m4-20020a9d7e84000000b0066c56855415mr589642otp.125.1675854629068; Wed, 08 Feb 2023 03:10:29 -0800 (PST) In-Reply-To: X-Original-Sender: dannoritzer-S0/GAf8tV78@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32153 Archived-At: ------=_Part_1460_497464117.1675854628165 Content-Type: multipart/alternative; boundary="----=_Part_1461_1762776885.1675854628165" ------=_Part_1461_1762776885.1675854628165 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Eelco, I created a LUA-Filter that uses the Align-Classes and provides for docx=20 the correct alignment. Maybe it helps for adjusting and using for odt. Regards, G=C3=BCnter if FORMAT ~=3D "docx" then print("Only docx target -- not: ", FORMAT) print("... ending") return end function Image (img) align =3D 'left' for k, v in pairs(img.classes) do --print('-->', k, v) if v =3D=3D 'center' then align =3D 'center' elseif v =3D=3D 'right' then align =3D 'right' end end ret_img =3D { pandoc.RawInline('openxml', string.format('', 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=20 > styles-support in ODT. In my experience, the use of styles in=20 > 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= =20 > for docx but not odt. > > You could probably use a filter that emits raw opendocument XML, but I= =20 > don't have time to walk through that now. > > > >> On Feb 7, 2023, at 8:12 AM, Eelco Vriezekolk wrote: > >> > >> Hello, > >> > >> From Markdown I want to create a manual in various formats, including= =20 > HTML and ODT (OpenDocument). > >> My manual contains images. Most are figures (in their own paragraph),= =20 > but others should appear inside a paragraph, with text flowing around it.= =20 > For HTML this works: > >> > >> > >> > >> 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= =20 > 'float' graphics style in the reference file, but it is not being picked = up=20 > in the ODT-output. No amount of experimenting and searching the web have= =20 > helped so far. > >> I can get *all* figures to be right-aligned, but that is not what I=20 > want. I want to be able to indicate that some selected images appear inli= ne. > >> > >> Can this be done? How? > >> > >> > >> > >> --=20 > >> You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group. > >> To unsubscribe from this group and stop receiving emails from it, send= =20 > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/d6ae917b-a037-4e03-a442-= a050fdb7d368n%40googlegroups.com > . > >> > > --=20 > Eelco Vriezekolk > > --=20 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 e= mail 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. ------=_Part_1461_1762776885.1675854628165 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eelco,

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

Regards,
G=C3=BCnter



if FO= RMAT ~=3D "docx" then
=C2=A0 print("Only docx target -- not: ", FORMAT= )
=C2=A0 print("... ending")
=C2=A0 return
end

function Image (img)

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

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

=C2=A0 }

=C2=A0 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 addi= tion of=20
styles-support in ODT. In my experience, the use of styles in=20
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. cust= om-style works for docx but not odt.
> You could probably use a filter that emits raw opendocument XML, b= ut 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, i= ncluding HTML and ODT (OpenDocument).
>> My manual contains images. Most are figures (in their own para= graph), but others should appear inside a paragraph, with text flowing arou= nd 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 fin= e:
>>
>>
>>
>> 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 no= t being picked up in the ODT-output. No amount of experimenting and searchi= ng the web have helped so far.
>> I can get *all* figures to be right-aligned, but that is not w= hat I want. I want to be able to indicate that some selected images appear = inline.
>>
>> Can this be done? How?
>>
>>
>>
>> --=20
>> You received this message because you are subscribed to the Go= ogle Groups "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from = it, send an email to pandoc-disc= us...-/JYPxA39Uh5TLH3MbocFFw@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>

--=20
Eelco Vriezekolk

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_1461_1762776885.1675854628165-- ------=_Part_1460_497464117.1675854628165--