From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32624 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ian Fantom Newsgroups: gmane.text.pandoc Subject: Re: Converting headings (.odt -> .tex) Date: Tue, 16 May 2023 11:32:32 +0100 Message-ID: <7316b85d-27a0-abf5-1e0b-09e0c40186fd@fantom.org.uk> References: <1201761b-53e9-f3bc-a6b5-4eedaf3b5146@fantom.org.uk> <3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4@fantom.org.uk> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------UBwMG4BK4QrcEZrhbnanSyRW" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBC66F66HUMPBBRFXRWRQMGQE6D5XLPI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 16 12:32:41 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f61.google.com ([209.85.167.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pyryy-00047m-F9 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 16 May 2023 12:32:40 +0200 Original-Received: by mail-lf1-f61.google.com with SMTP id 2adb3069b0e04-4f139de8c55sf1925874e87.0 for ; Tue, 16 May 2023 03:32:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684233160; cv=pass; d=google.com; s=arc-20160816; b=fexUrZfTK9bhgrte4F07pQEZBrJ422juozkcFLTINW5OIrs5XNnpsntREDCJprpMtC FwBoPUtN7Jm2xzpeD3L3riUKFM9AwbZ60aXQFfahLX8Z6wC73cMc8X03EfLSU16H/FdQ 3cQ2rXDNkdghOugFuRv/b4QEfu66USD2cLH5c96yYnYmMU2anx8gQYWoUmsVZ048c7Iv j1rokMttTm6XDyejevn0jW6P8+vZEJmxCZMSLde292kBomARja+pBjKSIWXWQhq9FgWG +ryMoEH2nw1nHHljw3WnVJvqrR3VJiEiUn3HIoEGi5lOQkx5gFKkxuEUW/X4bni0FkKe DmsA== 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:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=Bczp8T/dEKNWcBLAIBGzn3gJdYkPAh6kFXbgsgaB61o=; b=oWJg5jS36I558VzEg3AQODcl2+ZkjC1s7L+dGpH7QRkJKWtVGhzF7u1Qh1MfePU4Fj CMq5bP6LcgvBZ+hB0N2UCXesqRn4st8S2EcTGPwUjuj/zftvFzDBY3ekB/lpBvdnI3um mT980NZLZEekT1sRCUJTRvGxoYFxAvNY3ZJQG0Z8RsnJxEZek+EoQ3S0xezSQKKnNqOi ksy+S6SHDclEBrUCvxw24EYjPAf/mtYrtY0fncXNFY/Zf3yF4F83eDcEvFDWJCwo9TIm yzAnXeeQn3WSSuNCh5y3Cp+IpOTvG5hCLBf70nzdmfJNLmYfDjyGb24IElranibtYivE WE3g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@fantom.org.uk header.s=cb32aubc header.b=X3OFvkmq; spf=pass (google.com: domain of ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org designates 82.153.230.170 as permitted sender) smtp.mailfrom=ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1684233160; x=1686825160; 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 :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=Bczp8T/dEKNWcBLAIBGzn3gJdYkPAh6kFXbgsgaB61o=; b=L17hGIUUCRkJuJf8jeVuKSq9gJBs67TD8r3VOHuwAohIBfK+XPuqDG5/5SC3IlqsT4 YAPxfUtP3HfYad2p5MUgLh2TqTTnM6XKPPODkfMQQO3KMj+1UeH86w/q1/81zsnMul5o 4cXORGaHRR1jtXpKCJEiGhoLOBvDKH4+9dHo7m7h06bagusP7Rpi5Xh+3tw1bfcOTabO k6XR5Q39/Vz5Uo86o+YOUtX+T+2Edg1djXc0vE+ySUfIscstLyzjgdaGLqHQxXiLHsFx vHkFfZBoFLhQWwAxAYJ95oAp7EDzysHvWGOZ+RXoyv1iR X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684233160; x=1686825160; 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 :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=Bczp8T/dEKNWcBLAIBGzn3gJdYkPAh6kFXbgsgaB61o=; b=aRIC2T/iIqH3RAFCgfiu+36oO7fOIIohtPT6dsGGOgdG8bk1K6iNUO1skdJVJYyCeU QQmuKyUxeCOyvaG6NtzhOgut2Kzgdlx7betE0EpyP80XLg9Gck4uMoxGOXz5F4T1qfal 9FhpSdI0rHrjgKFF067fas7oxIg/MlqFvO6G7xqTdOoD0GCs3bjY6l9+FF4fHB+VjEmb ZWMIP1N1/Cf3YW4zMCwPrezK7SZz8oso5g0hdQJyLKjssZDdnH7sqhUL Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDw8Q7bwlu3/ak7BQX2kkhp7AYRjrXphGZ9rWqqcujzorofyi2Ps 49pkDbAk2yn6zMjPHsF9i2g= X-Google-Smtp-Source: ACHHUZ4qrDkUYzTpDqcTKyeYMTsYRJK40EBcpfNxAdL4FOwtcQJrytN5/4ltFWO4ITnD0d/j0VrEUA== X-Received: by 2002:a05:6512:3719:b0:4e8:49cc:6744 with SMTP id z25-20020a056512371900b004e849cc6744mr7856486lfr.1.1684233159946; Tue, 16 May 2023 03:32:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:651c:1c7:b0:2a7:7aab:9cae with SMTP id d7-20020a05651c01c700b002a77aab9caels1787512ljn.1.-pod-prod-05-eu; Tue, 16 May 2023 03:32:35 -0700 (PDT) X-Received: by 2002:a05:6512:984:b0:4f2:6a9d:9a31 with SMTP id w4-20020a056512098400b004f26a9d9a31mr4461900lft.51.1684233154878; Tue, 16 May 2023 03:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684233154; cv=none; d=google.com; s=arc-20160816; b=EQ22fCT5E/KEXfeS+wxuCgtNkfqzzoIVzQHXlaqVEjw+bdrYEvNNF4OVIR4x5Ft4au zhSnxDCfYt114YKs8Xx+6IE+Ga2eskoaEQp+8PextnZn1Fqtr1pKaAGv7Sxl2QHcEzjb QIfcr5z1SMHS32bqOm/u3E5Ia7bAt1RwlIt0iVEqXwH00wDk6GAd5LQp/26DQH1Wj724 +OW1p5VsW46qdB1oEu8Kh304eVjX7Y0dNFaRWr5qvubNtWxiw/QFEBhxDBxhG/Eo83Y8 huqjGxwGC/KL5KOtsg/aQ1eByEHiKm+GHHko4WurZivRmx0EDfo1gtPJmWPmx52Ulzzf 3TOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=DJ6x1sd6ML/e/1cD1Oi408dQrASPhbebE/KMgqyBcQc=; b=ht5lQOgFu5uVOQ6+Tk2QtLM+McmkS6QjlqoUMhg4mOs6fcWKqiaQQ6KCt/ilbKto5M DKHLkZ/lT49tpIGJN7DD6vqC5rwDSFq0CzqXJR+et7XLHHrmGK4LM+0alNfsWyeRY7hG CbdmVJ6p/R0WAC0yh3rMuaGTy/g6C/mGZNtq95EuMT+ykK0YDQbXNlZEmz1eNvLlWTR+ DsZBKBfmfXyiK/LBWNM4lvGye7o9ISnOIv5+FPj1FngujrjHjS4FlzamdyCqsW4mAhOb qo68c5G7i98tNPolEfWVVDeJSld69mvIj1XROSaiyrSorA06BFla9qvLPe5DYWYRhg+y 2oTg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@fantom.org.uk header.s=cb32aubc header.b=X3OFvkmq; spf=pass (google.com: domain of ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org designates 82.153.230.170 as permitted sender) smtp.mailfrom=ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org Original-Received: from galileo.newbury.coolfactor.org (newbury.coolfactor.org. [82.153.230.170]) by gmr-mx.google.com with ESMTPS id j6-20020a056512398600b004f145238b58si1291037lfu.4.2023.05.16.03.32.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 03:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org designates 82.153.230.170 as permitted sender) client-ip=82.153.230.170; Original-Received: from office.newbury.coolfactor.org ([192.168.42.30]) by galileo.newbury.coolfactor.org with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95) (envelope-from ) id 1pyryd-0005bt-Jh for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Tue, 16 May 2023 11:32:32 +0100 Content-Language: en-US In-Reply-To: <3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org> X-Original-Sender: ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@fantom.org.uk header.s=cb32aubc header.b=X3OFvkmq; spf=pass (google.com: domain of ian-0jttZa1E5sTe9xe1eoZjHA@public.gmane.org designates 82.153.230.170 as permitted sender) smtp.mailfrom=ian-0jttZa1E5sTe9xe1eoZjHA@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:32624 Archived-At: This is a multi-part message in MIME format. --------------UBwMG4BK4QrcEZrhbnanSyRW Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable I'm still puzzled on how the correspondences work. I must be=20 misunderstanding something in the Manual=20 (https://pandoc.org/chunkedhtml-demo/6-templates.html). If I enter 'pandoc -D odt' then I get the contents of the default file=20 for odt, but if I enter 'pandoc -D tex' I get "Could not find data file=20 templates/default.tex". The odt default file contains the lines: - --------------- $for(header-includes)$ =C2=A0 $header-includes$ ... $if(title)$ $title$ $endif$ $if(subtitle)$ $subtitle$ $endif$ - ----------------------- The odt book title is of type 'Title', and the chapter titles are of=20 type 'Subtitle'. Subheadings are of type 'Header 3'. But instead of=20 getting chapter headings I get eg: \protect\hypertarget{anchor-4}{}{}Preface Perhaps someone=C2=A0 could explain. Many thanks, Ian On 15/05/2023 20:26, Ian Fantom wrote: > Well the .odt file uses styles from Writer: Title, Subtitle, Header3. > > Would looking up the code used in the .fodt help? > > Ian > > > On 15 May 2023 18:15:06 BST, BPJ wrote: > > Probably whoever wrote the ODT file faked the headings by > enlarging the font and applying bold font rather than applying the > "Heading 1" etc named paragraph styles. Only the latter will be > recognised as headings by Pandoc. There are a lot of such files in > the wild. > > Den m=C3=A5n 15 maj 2023 18:35Ian Fantom skrev: > > I've tried converting a book in .odt (LibreOffice Writer / > Ubuntu) to > .tex and viewing it in Texstudio. > > It's not converting any of the headings and subheadings - just > producing > normal text. I used the '-s' and the '-o' options. > > I think there must be something I haven't understood in the > Pandoc User > Guide (https://pandoc.org/MANUAL.html) > > I was expecting some way of defining a conversion table from > Writer to > Latex. For instance: > > 'Preface' is in style 'subtitle' in Writer, and is converted to: > '\protect\hypertarget{anchor-4}{}{}Preface' and appears as > normal text > in .tex. > > Any ideas how I should proceed? > > Thanks, Ian Fantom > > > --=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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/1201761b-53e9-f3= bc-a6b5-4eedaf3b5146%40fantom.org.uk. > > --=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/3BA7371B-D3AC-43A2-B8E3-= C6FAB0A977E4%40fantom.org.uk=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 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/7316b85d-27a0-abf5-1e0b-09e0c40186fd%40fantom.org.uk. --------------UBwMG4BK4QrcEZrhbnanSyRW Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I'm still puzzled on how the correspondences work. I must be misunderstanding something in the Manual (https://pandoc.org/chunkedhtml-demo/6-template= s.html).

If I enter 'pandoc -D odt' then I get the contents of the default file for odt, but if I enter 'pandoc -D tex' I get "Could not find data file templates/default.tex".

The odt default file contains the lines:

- ---------------

$for(header-includes)$
=C2=A0 $header-includes$

...

$if(title)$
<text:p text:style-name=3D"Title">$title$</text:p>
$endif$
$if(subtitle)$
<text:p text:style-name=3D"Subtitle">$subtitle$</text:p> $endif$

- -----------------------

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 chapter headings I get eg:

\protect\hypertarget{anchor-4}{}{}Preface

Perhaps someone=C2=A0 could explain.

Many thanks,

Ian


On 15/05/2023 20:26, Ian Fantom wrote:
Well the .odt file uses styles from Writer: Title, Subtitle, Header3.

Would looking up the code used in the .fodt help?

Ian


On 15 May 2023 18:15:06 BST, BPJ &= lt;bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> wrote:
Probably whoever wrote the ODT file faked the headings by enlarging the font and applying bold font rather than applying the "Heading 1" etc named paragraph styles. Only the latter will be recognised as headings by Pandoc. There are a lot of such files in the wild.

Den m=C3=A5n 15 maj 2023 18:35Ian Fantom <ia= n@fantom.org.uk> skrev:
I've tried converting a book in .odt (LibreOffice Writer / Ubuntu) to
.tex and viewing it in Texstudio.

It's not converting any of the headings and subheadings - just producing
normal text. I used the '-s' and the '-o' options.

I think there must be something I haven't understood in the Pandoc User
Guide (ht= tps://pandoc.org/MANUAL.html)

I was expecting some way of defining a conversion table from Writer to
Latex. For instance:

'Preface' is in style 'subtitle' in Writer, and is converted to:
'\protect\hypertarget{anchor-4}{}{}Preface' and appears as normal text
in .tex.

Any ideas how I should proceed?

Thanks, Ian Fantom


--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit ht= tps://groups.google.com/d/msgid/pandoc-discuss/1201761b-53e9-f3bc-a6b5-4eed= af3b5146%40fantom.org.uk.
--
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-dis= cuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-d= iscuss/3BA7371B-D3AC-43A2-B8E3-C6FAB0A977E4%40fantom.org.uk.

--
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/msg= id/pandoc-discuss/7316b85d-27a0-abf5-1e0b-09e0c40186fd%40fantom.org.uk.=
--------------UBwMG4BK4QrcEZrhbnanSyRW--