From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32634 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 15:18:11 +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="28623"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBNV5R2RQMGQE7E4W4TY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 16 17:18:18 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f59.google.com ([209.85.221.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pywRO-0007FH-9f for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 16 May 2023 17:18:18 +0200 Original-Received: by mail-wr1-f59.google.com with SMTP id ffacd0b85a97d-3062a46bf21sf8561626f8f.1 for ; Tue, 16 May 2023 08:18:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684250298; cv=pass; d=google.com; s=arc-20160816; b=MR59hz0i/1QTi0h8vJiwNsWQ6ck7PYYj6OHLpgDPiXZpFwlDR/1BX6/Jjv8nKyV3qi hychG9/Oul+4h7BTU53kip1qFce4ALUeITFoI25MjUWTTnAejimLM8foYM02Urj+tSeI Ye0jvcIHF+fDVYEJoHbQatdFhvPtQ2GclTkcdygoiQOC2SO2hu/NrOq2OXe73hyv2glO yK+TBavJ6d1jyhZilqUCZnrgG7ysunu2LoL9uCvSHJsnOPcS9t6LH8tIs1Ks26t+jx/k YgZha+d+3TKt0PeLvTzrUHAYKxm2yAB6q87FqOnJZynbqOJbVxefnQbluQmFVpa3mAXG Ri2w== 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=6AX6Vo2snOYJECiy9gwzmYSnpBI3gO1fjzwL4+xFmk0=; b=DP+0rwu6a0fUm49cZvkKvE7I+m5UwEEpYDWTGAsB7w4P7OgahAI0Ai/MR7nuL54Fo+ lP8ZJkgn+IoKFKm7Ih3IxH8+9zjIjsQuA0JysHHB4KczuSxwHUtS0SDxc1s64rsbd68W nY2VhmNXAPiWHij4XdLbmiOxbsZZvAtEDXAvA6FKLFtqQwaNKJrOjJ4zi9ohkEEZcWbD HuAX3DW3txe//2vGhICX+BesabzKoeCs1FELwlYKWojCwounTlRrWw5g2zYKTfM5ZLYr SsRpYm707J7u2ezzHeadMZuzExBNela68fgVtpElxcT9MM85gieO44Wa3gTOTdYM0UE3 4dBg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=px4WrLCs; 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=1684250298; x=1686842298; 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=6AX6Vo2snOYJECiy9gwzmYSnpBI3gO1fjzwL4+xFmk0=; b=H+ueyh3LYSGfDuyeCtgxuQiNIlEVnR7MYn95VnBgbP6oyFKnT8eljq3DYC+jbSPkYJ gYsXaXw5BFU2PoUUq7u5JNBL+n+6MYEECSEbfJujdGaSJ6DZhJjpoT+V+62QiVMdgVeE isfuOMBg+jDuescauZyET6F+WU68PZ4nDCn+vka/KKh+8BtVgpVyLBkJoPs2Am6gQicw hx7wkIOKlrYPL7cieS8aboONEAQWqblynYHBUYG+2w3GdiOzg+fcaz904P9BJC1kBZ+g a+nnT65TbXQ6ICvpq X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684250298; x=1686842298; 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=6AX6Vo2snOYJECiy9gwzmYSnpBI3gO1fjzwL4+xFmk0=; b=K0Q7hRF7tkg/lCBGx3BnPaGl80JDGV5EE7ZerOyDn115jwMp7BwdFX0JEjD8OeoycY 1VdVIfu6OljWFwjMfob2GESVBMv1zXN2+9aBBQrhfd8pn5bwGCj9X+Thq3HiPCAe/X9+ TEyEd5874riuj3sVpUqg7LiuHJCGQ9hXOr3613aRlGGyDh9C3wtc2+1NCGDSeZbNjvAl AJ8nr34CcWSTwZXMSUGnqwibPH9W Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDwr6jwX9hVW0IW3JYqCWXwvkYY9npSvnJdEdI6oaRRhEgaYUPGR WYIy0oltOM42DwrSRIOBf2U= X-Google-Smtp-Source: ACHHUZ5zhzGD7nZUtc8yGrMFefaXXbzanBA1smlWtkUfZCfkLAr3jV0RZrGd+UKGhd8K8B5N1LZkqw== X-Received: by 2002:a5d:604e:0:b0:2f7:49cf:2b75 with SMTP id j14-20020a5d604e000000b002f749cf2b75mr6306808wrt.7.1684250297843; Tue, 16 May 2023 08:18:17 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6000:a18:b0:306:28af:9a26 with SMTP id co24-20020a0560000a1800b0030628af9a26ls173604wrb.0.-pod-prod-gmail; Tue, 16 May 2023 08:18:13 -0700 (PDT) X-Received: by 2002:a5d:4dc1:0:b0:307:97d9:d9a with SMTP id f1-20020a5d4dc1000000b0030797d90d9amr22877449wru.13.1684250293157; Tue, 16 May 2023 08:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684250293; cv=none; d=google.com; s=arc-20160816; b=cbTxIM51m1rFHHfopJv5GWOzAlQvVIpdYKr+gq4X7qWlyLVAs9CQHYHqAZSHUlK38n kb1xQQgS484tE1eCbpdnk2ppUKy4GEEFD0RbYr49gr/Kj9UY/JWVpvgjGO8S+UcavO7b xi+iZ0JghNlaxITgM5dI1cX8oTfoIsZm9dkK3vggZROJPNUuez3aoboHSRcTAkMcLqk9 k3ovjJeY8EksyfuSBhuaXUyz3miEsE8heYDe2+4bOwWZVy55LQ9B1LHV7OwYIm33kkTX Cs325SWsOahmzJfocT3uLwA2Xhf/rPj3QOUY0IDhwIT7aoZPuwoMdVutOmok+IzuzsXW 8BOg== 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=kuC9PSXQ4yTXWepIBMnNjWvpcMtYDT88a0mhMd8yx2c=; b=baCpHIryEN5cEppGt17mQZvBSnhMrHpZyQ4KvWttf5AOxYciPzh9pz3/vfl29bM7kX Aom3tGJeabp+kAvwpFf91IQCv09kj/SHB5ACfHa7csTINU6TfBSXfSFctV9+t1zY3S8/ zjCatRKQOrG4oZctWh2yXb+ZrCeFnFjoZ8orxvPHlVeM76PvEd+Z0N1b0nA5n1Kx/+E6 4LTm7gzld1013wKIZ9t3ikCdjWPyHmo/hZVybADtCBOTTdh1XkGRDawMt5dQiEvOF654 BabLVHGnaSjZw3YzxzhZOS3ffyOcAfT/caS4vM921EhIXXb4tyivl7noCLYM+WB1FrsB HmoQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=px4WrLCs; 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 o2-20020a5d58c2000000b003062765f97esi123769wrf.6.2023.05.16.08.18.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 08:18:13 -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 BCA7624003C for ; Tue, 16 May 2023 17:18:12 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QLKch2v9yz6tw3 for ; Tue, 16 May 2023 17:18:12 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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=px4WrLCs; 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:32634 Archived-At: pandoc -t latex -o your-output-file.tex --metadata-file=3Dyour-metadata-fil= e.yaml your-source-file.odt Le Tuesday 16 May 2023 =C3=A0 04:09:18PM, Ian Fantom a =C3=A9crit : > Thanks. Is that >=20 > libreoffice --metadata-file >=20 > I'm not getting anything. >=20 > Ian >=20 > On 16/05/2023 11:59, Bastien DUMONT wrote: > > Indeed, Pandoc does not seem to extract the title and the subtitle. I j= ust created an ODT file with the following body: > >=20 > > ``` > > Title > > subtitle > > > > A= header > > ``` > >=20 > > The two first elements are handled as normal paragraph. However, the la= st element is correctly read as a header level 3. > >=20 > > You could set the title and the subtitle in a metadata file (called wit= h --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 you= r file (are, better, a sample of your file reduced to the strict minimum). > >=20 > > To get the default file for LaTeX, run pandoc -D latex. > >=20 > > 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 misunder= standing > > > 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 fil= e for odt, > > > but if I enter 'pandoc -D tex' I get "Could not find data file templa= tes/ > > > 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 gettin= g chapter > > > 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, Hea= der3. > > >=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 en= larging the > > > font and applying bold font rather than applying the "Headin= g 1" etc > > > named paragraph styles. Only the latter will be recognised a= s headings > > > 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-0jttZa1E5sS4UlQgPVntAg@public.gmane.org= uk> skrev: > > >=20 > > > I've tried converting a book in .odt (LibreOffice Writer= / Ubuntu) > > > to > > > .tex and viewing it in Texstudio. > > >=20 > > > It's not converting any of the headings and subheadings = - just > > > producing > > > normal text. I used the '-s' and the '-o' options. > > >=20 > > > I think there must be something I haven't understood in = the Pandoc > > > 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 conve= rted to: > > > '\protect\hypertarget{anchor-4}{}{}Preface' and appears = as normal > > > 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 Google > > > Groups "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails= from it, > > > send an email to [5]pandoc-discuss+unsubscribe@googlegro= ups.com. > > > 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 Goog= le Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it= , send an > > > email to [7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [8]https://groups.googl= e.com/d/ > > > msgid/pandoc-discuss/3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4%40fant= om.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 [9]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [10]https://groups.google.co= m/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-f3= bc-a6b5-4eedaf3b5146%40fantom.org.uk > > > [7] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [8] https://groups.google.com/d/msgid/pandoc-discuss/3BA7371B-D3AC-43= A2-B8E3-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-a= bf5-1e0b-09e0c40186fd%40fantom.org.uk?utm_medium=3Demail&utm_source=3Dfoote= r >=20 > --=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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/df607dbb-adfd-e034-7f88-0510ecdfdc3a%40fantom.org.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 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/ZGOeszZgcJiJdMNb%40localhost.