From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31088 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: How can I use figure placement specifiers with Markdown, e.g. [p] for special place? Date: Mon, 25 Jul 2022 12:39:02 +0200 Message-ID: <874jz5cvqx.fsf@zeitkraut.de> References: <87czdud1v5.fsf@zeitkraut.de> <0a6a41d3-fb62-43e9-a85e-edb09e53dc79n@googlegroups.com> <878roicwo8.fsf@zeitkraut.de> <1d05b65b-70c3-41f4-b4be-b1578db89f55n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27299"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBS7K7GLAMGQEPGZCYII-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jul 25 12:49:53 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f191.google.com ([209.85.208.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oFvep-0006wK-Ow for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 25 Jul 2022 12:49:51 +0200 Original-Received: by mail-lj1-f191.google.com with SMTP id z7-20020a2e9b87000000b0025dff163157sf1068297lji.5 for ; Mon, 25 Jul 2022 03:49:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658746191; cv=pass; d=google.com; s=arc-20160816; b=PIfxCmLoRfsD/RFtoKIRcb7dBKTwFYL+BsP781LVAok2mpfuvD9emMCns2XhEOg9Br En3ngUgDleRRZ4dSe19imemC/wl7nG8EGiC7eGKplM9AXguLmx4sSe5QZ58fiIqxFOpy 8c24YrBa5jmhV/8yKwxuhPT6eS3CdvoTDid4RvbTvLVy7y4zzIKpp9psw/bcCgqCDold nD2cWIRDR1qBfGrSdMvD5uuqO30DVQlHTe8MCJTiPZbjS8eriTml/iuEO2tpSuDdLO5e rsyZJ1poSFPEuq05c6TVDYohdDyWMytiN4E72Ln8k2nlHZEiT36a2AEyfBzOKZ2buk4h 9mMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:in-reply-to:date:subject:to:from:references :sender:dkim-signature; bh=C5z39JEWVleVG+9TWtmEOl3fcCMxJj64OQ5dzd5VqIU=; b=yr+CiMB/J1SVnS/g8duqrjY6qIJpnlNwr0zxxT0E5fSq1xlmjbUZ1YmrbFDbbBwhqU XadwEoZO9Z2tuLRkPcc9Hw3hf0iocdZAYGsNKg1ICooQIGTa4SenotM7WSfWKdr3mCLb c/3qKUmTikfPVE6D2qaz4JPePl2KAlyrkxAvmgxRXtrSPQh87ijzZ02RU/gfaMnAryZ5 HhjqJkjn3fUpffqCergBjk2vAkP7CB5OazFIok8RUeRoVgMi4iC8k/+e2hsmn1f6nYvB o0x8TGfuyOodUPZOLwyijVEAEeYB1F7skpByfRrnO5wTNe8eJ09XfnUVOnBNBvQjcRpo I5uA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:from:to:subject:date:in-reply-to:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=C5z39JEWVleVG+9TWtmEOl3fcCMxJj64OQ5dzd5VqIU=; b=aXMKDfvYYZ3vf1FrhsAegxA0GvwQgywe9mjG2OUcohVe2QyZs9g/j6eUrLnHLHt/h8 s5XdZUMnyMXnxqzF1aCftCrDV2XMyav0xDjG7JAai3cfkIJwsl9o1d3eAbh+Cbfa++mm G9UVb1xstWfFVswb6gKIzrVYwf4uvqpn0NXexbuFI44DKp4VG0k2S1Vp3ivVDgMDehhE Pqs2l9up/fLakiz7T30WHeRQs5kq+NDNDQfcO3+vsuCrjo28jN+p8HESPl4B9bEMBp+w +Bcgqhne1ZHxKJtC18CPz0msensl613yFdFPLqw5IsKZo+eFSVD/9KMt8mPEqP1KhRJB Pk7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:from:to:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=C5z39JEWVleVG+9TWtmEOl3fcCMxJj64OQ5dzd5VqIU=; b=odw7AcBgsGfEuVfXVCiEPVk/cTYesqIeuT6PsTerJRRG1OXvg4aQLSOkYGLuV41YjH lc9C7asOmL4UEN1xO1wc5zU5yrDdmSLyshGG7x1Y0eKf4RszJCM/ALB91vSZEymCgoAN pImF9USG99KKLaBxzYJ6ipssjoZDeH6fNX0lA9LzV/Kxj2lDe5hxoKUc7GDSYh8/JWOr SnZa/MUhoUQ6NUZtHBMyV46WpxCgjdVqs0unDEnRblLBN9Qi2tQWXP5obVOx04+66sYu DIjwsoq49Ous1gm7z+dtZlV/xSKCphcUvkn3XsBOnNiURjSOlF3oOekx+eK4A0SFmyTc Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9KfdGGYV30r9pFRdNRfiH4YLO2l4sBpR74c3IBuevXpQ4cb9Qx GMAFBzqyvvLgZ47pn7/sUng= X-Google-Smtp-Source: AGRyM1vAuEAa9CzZ5lkI6DfWD76qsZjZ+pTbCh9ZL/yXqhQiuG/4j8Sz1Qd2O8NHkbQA1YhSbvvlvQ== X-Received: by 2002:a2e:9941:0:b0:25b:c885:3143 with SMTP id r1-20020a2e9941000000b0025bc8853143mr4295770ljj.477.1658746191291; Mon, 25 Jul 2022 03:49:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:3316:0:b0:25a:6ed4:32a3 with SMTP id d22-20020a2e3316000000b0025a6ed432a3ls649853ljc.1.-pod-prod-gmail; Mon, 25 Jul 2022 03:49:46 -0700 (PDT) X-Received: by 2002:a2e:b754:0:b0:25d:fbdb:1bf7 with SMTP id k20-20020a2eb754000000b0025dfbdb1bf7mr3208626ljo.171.1658746186543; Mon, 25 Jul 2022 03:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658746186; cv=none; d=google.com; s=arc-20160816; b=KBoZG2ztq+23rBEzcCzzXhZz2UKu5ud1UjaP4u5bC79Vw8HwmIl9XeTFPiYm3hh1vD zgaCLpJtwAE0NSpIdaeb2XHj+u+izxyYfXymLImXL5t9h/nOhO5z/iuc6SwGauBD8Jqx NfkUyikTUhBuPSZe5cI/qoErpLanz3J9VtjF0Uol2u4izARlJT2hBtX+U340Q2BkmUNZ 7qmO2EroGsVUhJUeHmBuU7C70v0CJUfE9RgAw87JW49DcDn/c0zrVcTmRmrYeBPDKK4c NfIFHV1PLGI6KV7VpwiSwwTTJFXnDq88eviA5lp3NVPcDQAjXaIj5JMVypFwmlh/iW/Z TAWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references; bh=3WftastB+YTbfcONjVq2MeHjJ4Pj6ufwTTonI83NJQg=; b=CiG/FaLp4++Mqicx6K3CKSRDSg1dTfkcaUyDgJZi5oaTDXEv2YrXy/zvlBPHL5BU3A m848lJcN8x4goPlixoOjFx8YSoMWkJlAShZx5JqALVE8bgzDXqB7uz1nzemXz9O80u8k QKoeJWCcG9s2tjXAaRPLd3e3dav8uR6BX9QURZlsQhcaXg5Cus0bYD8mkEMaGFZBC4DL YsZlNgYXgHB61Qsx/wJOPjF7uDVpUgPGhPUh8Uwf3/AgBPyAoKA9Fza1iBKDoB8CjIXW 9FbuyaYVsw0kU3nhWIfbWkgfzfiIc6deRoS1FFa3KsR+aMsug2nvMYByRDlGqGBtHgQW bjCQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org. [2001:67c:2050:0:465::102]) by gmr-mx.google.com with ESMTPS id g4-20020a056512118400b0048a6c3cdc7csi382151lfr.13.2022.07.25.03.49.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 03:49:46 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::102 as permitted sender) client-ip=2001:67c:2050:0:465::102; Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Lrxd41Hnxz9sRG for ; Mon, 25 Jul 2022 12:49:44 +0200 (CEST) In-reply-to: <1d05b65b-70c3-41f4-b4be-b1578db89f55n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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:31088 Archived-At: 'Kriszti=C3=A1n Hofst=C3=A4dter' via pandoc-discuss 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/874jz5cvqx.fsf%40zeitkraut.de.