From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32625 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Converting headings (.odt -> .tex) Date: Tue, 16 May 2023 10:59:15 +0000 Message-ID: References: <1201761b-53e9-f3bc-a6b5-4eedaf3b5146@fantom.org.uk> <3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4@fantom.org.uk> <7316b85d-27a0-abf5-1e0b-09e0c40186fd@fantom.org.uk> 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="35133"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBBWERWRQMGQED446V4Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 16 12:59:23 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f59.google.com ([209.85.167.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pysOo-0008yE-O5 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 16 May 2023 12:59:22 +0200 Original-Received: by mail-lf1-f59.google.com with SMTP id 2adb3069b0e04-4f381431472sf1713145e87.3 for ; Tue, 16 May 2023 03:59:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684234762; cv=pass; d=google.com; s=arc-20160816; b=uWWjhlQn/Od5c5k1c8gsBVsr6lwr85hgLy1HUbhOj3DlaWXWChvGWhjPrUlKzMDwsx ewKs5Kq5CTP8LknJZRc7UI2fPgWQFsUJu10QDFCUNSMFOpJGiktLbvMEyRyKlHJArQcP Us+vgxvIlbH/LrKcLZQxY4xuLEnVbfeETCiOxQs1CESUIDuL7c9dVNCRtaFY29zsic35 Y14cMmcm5KPvTwQknjWaXR0jLegH/dT2fSebWbYZTxKiV4HoM6fa3jogdo4fuXFcpc52 MUhDazmRoWZlibFPvYzsBom9F1DhMmyM379I9qc1NWGdSg6poQVYNnx2Cb6fY2V2Jfj/ /vdg== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=D9y9yP2qcuXc50kU290XAg8iciULZ2SfmEx+s0MOTlw=; b=f5iIHDJniW5IqUPImIgAfK3tSsNcDNfVejGzQLvyVl4mBkNsKvf2i76qTE+xlCFQAn oaygysQ8T8f2SSno5Fm/otO1LFL8dllVmuVhQCEx7RMUNh/SrcT+ZRUWjHodoVWZflUf WnYsYDT6aCm5krRsm+Nwl0jEYOvtnC0Ut92eEMX+4XKxX+NOhDc+67fbtdwcH4w0MEc/ tdAG7U2miC5JkFuX88FfXTpwGv1HlpIl4asnQQ0Q723Pcw1oizjwwhY3sKEt7MnDRA7k yx4l9bjmjVTa3xHYBSeKgpG9Rx18P4ysIdetDgFsdOzFgknNQZ0OHpsHB9/dtgUyikxR QRYQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=OrIMrYw9; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1684234762; x=1686826762; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=D9y9yP2qcuXc50kU290XAg8iciULZ2SfmEx+s0MOTlw=; b=bUQz2CKJCsUhNBzrEYNr1Rh/3aaAnU3GK/aOl5QS1/LW5e7wE7nO/grKWOVgtRa2JB DmxKZPQT5DceU5EaUf3Yd436jFTxltmdmaJEqO5wM61iQWjiO5jesnmLZ8gtrVI5pFPf Elmkjm1VQJ81Pf0LfA7wZhFyPaRirKilr81i47DAoUcu2LL4Qi0RKaSXct9D++DyRxVW 6YCZ5euqfaf3AX4lTEIzJBkaYEq273lfH4w+Lhr4pE3J/ww52WxpGgJNa/OrICRWvxy2 zaWVQsdxQIB2JmbmX X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684234762; x=1686826762; 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=D9y9yP2qcuXc50kU290XAg8iciULZ2SfmEx+s0MOTlw=; b=hfGmVg/PBd5YmtndRMWoe/rhr/OWvOu8jMO0R0E4U/I2cqEg0yoWChM6XzxEhIOIKc CvLrkyxr+6+B5Yug6tgmrv+RkXDEF4BXT1Qk7PeAVioNcOQDhBvs/QHnj3J2LdS+ah3M Gwz3U91DLWQR2jbMQ5lScbZjmxOzMi8JVTPC0cOQUAY0LoLsXsCQn1Db2RN/qRrJeqEC ngNHLCTq7eow+KuweTT2nrF9nHEa Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDzQcg82hifT9OLaCh2DZyb46LbCrWRGJtE/rkNROn6XQ0lpN1PF uDUyeWAkWB1erpgYuebVS14= X-Google-Smtp-Source: ACHHUZ7yLteeJRUJZHXR2066Px0/zHBWfNh1767KsLcczJiFxbgDeoGX4kNBdTjsqHfY2KBMjxDeZA== X-Received: by 2002:ac2:5390:0:b0:4f3:79af:fcc2 with SMTP id g16-20020ac25390000000b004f379affcc2mr2260665lfh.10.1684234762160; Tue, 16 May 2023 03:59:22 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:311c:b0:4f1:4c37:e1cc with SMTP id n28-20020a056512311c00b004f14c37e1ccls1184801lfb.0.-pod-prod-07-eu; Tue, 16 May 2023 03:59:17 -0700 (PDT) X-Received: by 2002:ac2:4d19:0:b0:4eb:1048:1285 with SMTP id r25-20020ac24d19000000b004eb10481285mr6361615lfi.47.1684234757335; Tue, 16 May 2023 03:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684234757; cv=none; d=google.com; s=arc-20160816; b=om9D8OCL4P8O9zmg8DLC1uDbuZd2OLhNFOJNNB9xw7isXZR/BmI6H3rcn7zaEyoLcI g1HOjXNnvctdWWLX0+MiOdkQPkVKyKW1vFdkLSvZXXY6woxmMzUAjVV3pNXLmrM1CNOt 5ABup8xVlwGF6V52etMBoDZ+ULLAq8L5s2tcqjLTxGGmBTPUm5a2PxKjXsdE79TZ7s8N 61BvzESOL54fNiKxw972Su0KhwHxOqEV2AFuXMJf5eB3btibKX/4GEvI7o9e1q78NyF0 8TgzIoyJJUktrRdtIk0XVI8Ofm85JHua+SSZCpqeqb4VwIU0apVdWrvJ9bgXvB0UI9xk /K/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=KQx5zMILFQTu7lQbmUiK+vCzLmDYtxKbB+C9cc7Cy8Q=; b=v7AYUouiANHtdCQjxWKtGFpQF16LX8qQSGy+FR9GtsTz2OtXBQ5Ks5bk2V++TPIFQ9 52Mmb3TGjrnGqFjEFNkzmK1xPi6FBU/5woEZYF1Tc5rCh5q8TqGuHfV8A+uzbaWHYy7m 1rO6HUx1rIhaSqoqcDet/weJHZCdj6d99IHQ7eByaDDennS6M3tjgtWiNn85zaL0H9Xq lbbsEesOREtPh51btb9YoGWyEURWB98fOF0xOpac+bjdn4g/ORYcjLIXdAlVPp3aYqKX sxosOKOB2oG+yepmCpCldepGQYOox30gW6i46q9gfygVUQpeJa66wCn/at181bKNc3Db Vngw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=OrIMrYw9; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id q15-20020a19430f000000b004f175e991fasi2030047lfa.13.2023.05.16.03.59.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 03:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ADAC6240035 for ; Tue, 16 May 2023 12:59:16 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QLCsw1wJVz9rxB for ; Tue, 16 May 2023 12:59:16 +0200 (CEST) Content-Disposition: inline In-Reply-To: <7316b85d-27a0-abf5-1e0b-09e0c40186fd-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=OrIMrYw9; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:32625 Archived-At: Indeed, Pandoc does not seem to extract the title and the subtitle. I just = created an ODT file with the following body: ``` Title subtitle A head= er ``` The two first elements are handled as normal paragraph. However, the last e= lement is correctly read as a header level 3. You could set the title and the subtitle in a metadata file (called with --= metadata-file) and remove them from your odt file. As for your headers, we = cannot know why Pandoc does not recognize them without looking into your fi= le (are, better, a sample of your file reduced to the strict minimum). To get the default file for LaTeX, run pandoc -D latex. Le Tuesday 16 May 2023 =C3=A0 11:32:32AM, Ian Fantom a =C3=A9crit : > I'm still puzzled on how the correspondences work. I must be misunderstan= ding > something in the Manual ([1]https://pandoc.org/chunkedhtml-demo/ > 6-templates.html). >=20 > If I enter 'pandoc -D odt' then I get the contents of the default file fo= r odt, > but if I enter 'pandoc -D tex' I get "Could not find data file templates/ > default.tex". >=20 > The odt default file contains the lines: >=20 > - --------------- >=20 > $for(header-includes)$ > =C2=A0 $header-includes$ >=20 > ... >=20 > $if(title)$ > $title$ > $endif$ > $if(subtitle)$ > $subtitle$ > $endif$ >=20 >=20 > - ----------------------- >=20 > The odt book title is of type 'Title', and the chapter titles are of type > 'Subtitle'. Subheadings are of type 'Header 3'. But instead of getting ch= apter > headings I get eg: >=20 > \protect\hypertarget{anchor-4}{}{}Preface >=20 > Perhaps someone=C2=A0 could explain. >=20 > Many thanks, >=20 > Ian >=20 >=20 > On 15/05/2023 20:26, Ian Fantom wrote: >=20 > Well the .odt file uses styles from Writer: Title, Subtitle, Header3. >=20 > Would looking up the code used in the .fodt help? >=20 > Ian >=20 >=20 > On 15 May 2023 18:15:06 BST, BPJ [2] wrote: >=20 > Probably whoever wrote the ODT file faked the headings by enlargi= ng the > font and applying bold font rather than applying the "Heading 1" = etc > named paragraph styles. Only the latter will be recognised as hea= dings > by Pandoc. There are a lot of such files in the wild. >=20 > Den m=C3=A5n 15 maj 2023 18:35Ian Fantom <[3]ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org> s= krev: >=20 > I've tried converting a book in .odt (LibreOffice Writer / Ub= untu) > to > .tex and viewing it in Texstudio. >=20 > It's not converting any of the headings and subheadings - jus= t > producing > normal text. I used the '-s' and the '-o' options. >=20 > I think there must be something I haven't understood in the P= andoc > User > Guide ([4]https://pandoc.org/MANUAL.html) >=20 > I was expecting some way of defining a conversion table from = Writer > to > Latex. For instance: >=20 > 'Preface' is in style 'subtitle' in Writer, and is converted = to: > '\protect\hypertarget{anchor-4}{}{}Preface' and appears as no= rmal > text > in .tex. >=20 > Any ideas how I should proceed? >=20 > Thanks, Ian Fantom >=20 >=20 > -- > You received this message because you are subscribed to the G= oogle > Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from= it, > send an email to [5]pandoc-discuss+unsubscribe@googlegroups.c= om. > To view this discussion on the web visit [6]https:// > groups.google.com/d/msgid/pandoc-discuss/ > 1201761b-53e9-f3bc-a6b5-4eedaf3b5146%40fantom.org.uk. >=20 > -- > You received this message because you are subscribed to the Google Gr= oups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, sen= d an > email to [7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [8]https://groups.google.com= /d/ > msgid/pandoc-discuss/3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4%40fantom.or= g.uk. >=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= email > to [9]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [10]https://groups.google.com/d/= msgid/ > pandoc-discuss/7316b85d-27a0-abf5-1e0b-09e0c40186fd%40fantom.org.uk. >=20 > References: >=20 > [1] https://pandoc.org/chunkedhtml-demo/6-templates.html > [2] mailto:bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org > [3] mailto:ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org > [4] https://pandoc.org/MANUAL.html > [5] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [6] https://groups.google.com/d/msgid/pandoc-discuss/1201761b-53e9-f3bc-a= 6b5-4eedaf3b5146%40fantom.org.uk > [7] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [8] https://groups.google.com/d/msgid/pandoc-discuss/3BA7371B-D3AC-43A2-B= 8E3-C6FAB0A977E4%40fantom.org.uk?utm_medium=3Demail&utm_source=3Dfooter > [9] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [10] https://groups.google.com/d/msgid/pandoc-discuss/7316b85d-27a0-abf5-= 1e0b-09e0c40186fd%40fantom.org.uk?utm_medium=3Demail&utm_source=3Dfooter --=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/ZGNiA4yZCZI07UYs%40localhost.