From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31106 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=27Kriszti=C3=A1n_Hofst=C3=A4dter=27_via_pandoc=2Ddiscuss?= Newsgroups: gmane.text.pandoc Subject: Re: How can I use figure placement specifiers with Markdown, e.g. [p] for special place? Date: Tue, 26 Jul 2022 02:55:43 -0700 (PDT) Message-ID: References: <87czdud1v5.fsf@zeitkraut.de> <0a6a41d3-fb62-43e9-a85e-edb09e53dc79n@googlegroups.com> <878roicwo8.fsf@zeitkraut.de> <1d05b65b-70c3-41f4-b4be-b1578db89f55n@googlegroups.com> <874jz5cvqx.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_602_1734456925.1658829343878" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35375"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCLPH74HTUARBIHU72LAMGQEACKSUPI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 26 11:55:48 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yw1-f188.google.com ([209.85.128.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oGHI3-000968-Rw for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 26 Jul 2022 11:55:47 +0200 Original-Received: by mail-yw1-f188.google.com with SMTP id 00721157ae682-31f4450c963sf15250617b3.19 for ; Tue, 26 Jul 2022 02:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=FX+KIi5Hp5y6OjsRMuRv7LOo3GXfLxshK7YCZkEWgb4=; b=Ha2oFR3wlyw02cvX05jlAVflsiLVCkbNntFjxvMeLKmVdFlD4f/ks1tah4CvlNKs6F Hof/Tl31skEDTDdEsCwaMYgS0eCZ1JipI+dcNO2SAyrYe0ePls/nbJpK0QHko0mAeT/m qNqoocvxjCxoiMgi5PgahpOvtaiLZv0UqNFQ6R+WdbnA+CuYpXFHFjUmib6RCc8VD+73 zL1T20cBh1eMNK669oidZXsUChqWcccO3S5jz+tTcym2n2554Qn5p65Kcd2P98qEMHDE yhS5rY06jP5avVTP1RoDNyK6Xd6m2v40XUgn8LESfEnDnhCnzSlHCDKOQIeI0W+7x0eQ e1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:x-original-sender:reply-to:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=FX+KIi5Hp5y6OjsRMuRv7LOo3GXfLxshK7YCZkEWgb4=; b=mkU3kWr20v2Iw6ppE0rkeyn2FSR+2y5amTC5e+4/3N4XUMtl4+UCXvzE7TYfxipyti sY8/s+rzHIVVeaqnejrHY9Ym9r+FoOdFmZKB1RfGaTelFqSikKuse1px+qiblxfI63eG h9X8joUPYz8Bo+9H0gQBSlV134Mm17GxAtRENYa932nMiPIsjdpBFv/z1n5eNitB3/VL 9F6mWhkj4Zzx5m+AJDVP3JShMObZGJiVLItcqxoT1Agpz78n2DPfxm4cWjYYl9QQ1oSP lowgXq3Jgjow+Du5bGU49Wz0BsXOABszTB2t81CkGVSP7H7mYPGNiDLHwIo2RV7DH/te sdbQ== X-Gm-Message-State: AJIora+giAPRIvv43WdCrcRNQfEK/t2v0mh3vq0SMN8h+WCUBGPHA+LU hbitSBo6NsVdfQNkybXSFZQ= X-Google-Smtp-Source: AGRyM1uTkjGu6AZMdwGRHeso+ocHupcCHMvD1Zr99LOMFZMkw7z1iLqEpWyXcXXphNjSX8rgO0pJuA== X-Received: by 2002:a25:34d2:0:b0:66f:fc01:5d7 with SMTP id b201-20020a2534d2000000b0066ffc0105d7mr12489940yba.412.1658829346798; Tue, 26 Jul 2022 02:55:46 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:690c:c0e:b0:31e:f1e:dbbc with SMTP id cl14-20020a05690c0c0e00b0031e0f1edbbcls1202378ywb.2.-pod-prod-gmail; Tue, 26 Jul 2022 02:55:44 -0700 (PDT) X-Received: by 2002:a0d:cf84:0:b0:31e:7901:19e9 with SMTP id r126-20020a0dcf84000000b0031e790119e9mr14162501ywd.7.1658829344461; Tue, 26 Jul 2022 02:55:44 -0700 (PDT) In-Reply-To: <874jz5cvqx.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: tedor2-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org X-Original-From: =?UTF-8?Q?Kriszti=C3=A1n_Hofst=C3=A4dter?= 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:31106 Archived-At: ------=_Part_602_1734456925.1658829343878 Content-Type: multipart/alternative; boundary="----=_Part_603_570809029.1658829343878" ------=_Part_603_570809029.1658829343878 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Albert,=20 Unfortunately, none of the snippets above worked :( The more conservative one removed the title pages as well.=20 Hmm... I will simply my files and test again! Danke!! k=20 On Monday, July 25, 2022 at 11:49:51 AM UTC+1 Albert Krewinkel wrote: > > 'Kriszti=C3=A1n Hofst=C3=A4dter' via pandoc-discuss =20 > writes: > > > Brilliant! Thanks Albert :-) > > You're welcome, happy it works =F0=9F=98=8A > > > Now that I'm on it, .... how could I also convert the Contents, List of > > Figures and Tables when making the docx file? > > (When converting to PDF they are all there.) > > The Lua filter is a bit too eager and also parses LaTeX blocks that > should be consumed by pandoc-crossref. Try to modify it like this: > > ``` > if raw.format:match 'tex' and not raw.text:match '\\listof' then > return pandoc.read(raw.text, 'latex').blocks > end > ``` > > or, more conservatively > > ``` > if raw.format:match 'tex' and raw.text:match '\\begin%{figure%}' then > return pandoc.read(raw.text, 'latex').blocks > end > ``` > > --=20 > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > --=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/b7ff6d15-f0cc-4d97-9b14-91ea92218edfn%40googlegroups.com. ------=_Part_603_570809029.1658829343878 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Albert, 

Unfortunately, none of the snippets= above worked :(

The more conservative one removed the title pages a= s well. 

Hmm... I will simply my files and test again!

D= anke!! k 

On Monday, July 25, 2022 at 11:49:51 AM UTC+1 Albert Kre= winkel wrote:

'Kriszti=C3=A1n Hofst=C3=A4dter' via pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wri= tes:

> Brilliant! Thanks Albert :-)

You're welcome, happy it works =F0=9F=98=8A

> Now that I'm on it, .... how could I also convert the Contents= , List of
> Figures and Tables when making the docx file?
> (When converting to PDF they are all there.)

The Lua filter is a bit too eager and also parses LaTeX blocks that
should be consumed by pandoc-crossref. Try to modify it like this:

```
if raw.format:match 'tex' and not raw.text:match '\\listof&= #39; then
return pandoc.read(raw.text, 'latex').blocks
end
```

or, more conservatively

```
if raw.format:match 'tex' and raw.text:match '\\begin%{figu= re%}' then
return pandoc.read(raw.text, 'latex').blocks
end
```

--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
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/b7ff6d15-f0cc-4d97-9b14-91ea92218edfn%40googlegroups.= com.
------=_Part_603_570809029.1658829343878-- ------=_Part_602_1734456925.1658829343878--