From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31474 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antonio Piccolboni Newsgroups: gmane.text.pandoc Subject: Re: missing figures in latex/pdf output Date: Tue, 27 Sep 2022 20:41:17 -0700 (PDT) Message-ID: References: <1AF44C44-B3C7-4872-BA10-980739F20F72@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_472_1236937154.1664336477619" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13086"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC4KDA7JYIPRBX4EZ6MQMGQEMRJ6NYY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 28 05:41:23 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f58.google.com ([209.85.210.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1odNwo-0003Cd-Vs for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 28 Sep 2022 05:41:23 +0200 Original-Received: by mail-ot1-f58.google.com with SMTP id a11-20020a9d6e8b000000b00656442abf2esf5588793otr.21 for ; Tue, 27 Sep 2022 20:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date; bh=dxGXgBLrZo99+W+WSRsJ8sno/aySZwxY1SpuF0kAYL8=; b=lC2VRP9HFMkwxiK1h2otfOImXAGzrlAb7yLs4ksdnTScmZgeKejf/ZtRhEeTOll/9f UZTIFM/LgX0rkiQPwUD+Sn+iUT6wIL6uOlMydoYqSk4lTqn3m3iXQMt57V1D8inEX8qL OxVtnYe5kRwvpX1EdodKjypgU/v2cwOILi1zq31ccs8L43zwayQ4e+8vAXGeKshfNKY5 V+XliCTdKrZPvdnsQcp2wIpadkDxnHFPDw2CvtILxTSXNub0X3yOKSeLCChrGKg/JMLt T94LJjZMAwgWQqVN3ayNmMuYR26Lq4wONZ6qbfYSKW3we6A6yFhJYIq5VyOICksBwSc+ Y0EQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date; bh=dxGXgBLrZo99+W+WSRsJ8sno/aySZwxY1SpuF0kAYL8=; b=OEAZLASHufTf7Pmv7VSKcbqisiSbajWAimuuBkK90yKphjOfkiwfJqhjeybGfFdMJa 5Ja85dWmMyQOGfm7/0XJXqcUXnhzAAVdFdwb2HuMwuxbp1nfkDH6c5x6hnPRjzfqZNIx i7C2LmdCktE5EXgFMMlqPb5qYNpiO/o+MTPDAA3lC5E/e8Jri/FKYBcdD5ZwT/6VzAhH h9/oQ1BVta/sjDIc1kkOsTRPPyG/QPO6WC78m8e7YzXQRvN0mw6sdzwrjRNnwANpJ8XD 8J1Vtbv3yMyLFqNLZ7MhcnhNEEDZ6fNuGf6/BNYnpf9nX0UnonEDmWYbMzKuY4Vkx5k1 OovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date; bh=dxGXgBLrZo99+W+WSRsJ8sno/aySZwxY1SpuF0kAYL8=; b=OOzdZ1rzPsXPX3XsLnduY52VmOioyWYcIs6v13PnsmLACJjOOmKtkCFz7yIJD496N7 46TxafA4pqLi1xQ4pnc+iLpHqTC2VREtShA7OGE/0cSXpFAz7wK4v4DOUzKfP0fadlix WJP6lpHf+b4cFrR4NB9YauNtlY2yedo6FXXoqSrhdFVFG6VxMnch8+XEq/gvs4+XEG4Y taTKBsRSPvHmu9jUe+iZg0Ed8AcALrqhmuSqROrUekgTD6l5pBdUiQmlG5ODYkl/I0ip /Iri7aoS/hY47zFjaRSyrTJ2coJKdUmeqbI+O55FH37+q9adpiFR4WCzcu4Gs2jXl6Xq 9MUw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf2oQI7zeVJ+CUmN2Z3HjaHS9jZwjTJ5K0s30FWWTgcim7d/+vVt NRooCFULxB8nwQH9DpXQsoo= X-Google-Smtp-Source: AMsMyM7v5PgUbg0cKjaQmBouguxT3ND6+EkhoIOVtffqefTPhy90uKsvx7mFUWLm7WgBDvglZDZcjQ== X-Received: by 2002:a05:6808:25a:b0:34d:8e1d:771f with SMTP id m26-20020a056808025a00b0034d8e1d771fmr3378418oie.185.1664336481724; Tue, 27 Sep 2022 20:41:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a54:4e0d:0:b0:351:63bc:deb2 with SMTP id a13-20020a544e0d000000b0035163bcdeb2ls697588oiy.0.-pod-prod-gmail; Tue, 27 Sep 2022 20:41:18 -0700 (PDT) X-Received: by 2002:a05:6808:30b:b0:350:653c:fa5c with SMTP id i11-20020a056808030b00b00350653cfa5cmr3348293oie.123.1664336478531; Tue, 27 Sep 2022 20:41:18 -0700 (PDT) In-Reply-To: <1AF44C44-B3C7-4872-BA10-980739F20F72-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: piccolbo-Re5JQEeQqe8AvxtiuMwx3w@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:31474 Archived-At: ------=_Part_472_1236937154.1664336477619 Content-Type: multipart/alternative; boundary="----=_Part_473_735420224.1664336477619" ------=_Part_473_735420224.1664336477619 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks both Martin and John for the advice. Just a comment from a long time= =20 Markdown user, more recent pandoc user with multiformat output ambitions. Until now I had assumed that markdown was a superset of html. It wasn't a= =20 pandoc extension, it is what the Markdown format says: you can mix in html= =20 when markdown syntax is not enough. It was the backstop that made it easy= =20 to pick markdown without future regret. So not converting the html in=20 markdown is not in keeping with the format definition according to my=20 assumptions. That said, markdown doesn't have an official standard and I=20 may very well be wrong.=20 There are indeed quite a few filters that translate html to tex. One of=20 them is pandoc itself. So it seems to me the tech is there to do it, it is= =20 just a decision about the role of html within markdown, an extension=20 devoted to maximizing control on html output only, like the other=20 raw_ extensions, or part of the markdown format itself as per my= =20 old assumption. Perhaps I could generate html first and then a pdf from the= =20 html if I felt adventurous. In my specific case the solution is to use just markdown as Martin=20 suggested. The reason I had switched to html is that, for some reason, the= =20 calibre epub viewer ignores the caption when using the Markdown syntax.=20 Apple books doesn't have this problem. So I will just ignore the calibre=20 viewer. I had a few other uses for html tags like sup and span, but I can= =20 work around those, mostly. Thanks! Antonio On Tuesday, September 27, 2022 at 6:11:56 PM UTC-7 mfhepp wrote: > In general, if you aim at multiple output formats, it=E2=80=99s best to u= se=20 > Markdown syntax / elements for the authoritative master document, and=20 > delegate required modifications to format-specific Pandoc filters (or=20 > writers, but less common). > > There are quite some filters out there that try to translate HTML element= s=20 > to TeX syntax (e.g. text color) and other formats, but this is typically= =20 > second-best, in particular more difficult to implement in a robust way. > > Except for tables, Markdown in the Pandoc flavor, is likely the best=20 > compromise for a output-format-agnostic representation of documents, in= =20 > particular thanks to fenced divs support. > > Best wishes > Martin > > --------------------------------------- > martin hepp > www: https://www.heppnetz.de/ > > > > On 27. Sep 2022, at 23:06, John MacFarlane wrote: > >=20 > > =EF=BB=BFIt=E2=80=99s not a bug. Raw HTML is only passed through to for= mats that support=20 > it (e.g. Markdown, EPUB, and HTML). > > It isn=E2=80=99t parsed into a native Pandoc structure and then rerende= red in=20 > the target format. > >=20 > >> On Sep 27, 2022, at 1:26 PM, Antonio Piccolboni =20 > wrote: > >>=20 > >> Hi, > >> if one includes some graphics with the ![]() syntax, the graphics is= =20 > present in the pdf output. But if one uses
, no such luck. Both= =20 > work with epub output. (I momentarily forgot why I am alternating between= =20 > the two forms, I think I needed some extra control on image size). This i= s=20 > a minimal example. Markdown: > >>=20 > >> ``` > >> ![Some image](assets/IBM650.jpg) > >>=20 > >>
> >> > >>
Some image 2 > >>
> >>
> >> ``` > >>=20 > >> Tex output: > >>=20 > >> ``` > >> \begin{figure} > >> \centering > >> \includegraphics{assets/IBM650.jpg} > >> \caption{Some image} > >> \end{figure} > >>=20 > >> Some image 2 > >> ``` > >>=20 > >> Of the second image, only the caption is left. Is this a bug or am I= =20 > missing something? Thanks > >>=20 > >>=20 > >>=20 > >> Antonio > >>=20 > >>=20 > >> --=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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/8bd75451-cad3-4a83-80e3-= 7a983091bcadn%40googlegroups.com > . > >=20 > > --=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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/D0DAD6A1-3B30-4F46-8FAB-= 5F484F65D700%40gmail.com > . > --=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/c2b0c867-fb97-4aee-86f4-fcf160ff0303n%40googlegroups.com. ------=_Part_473_735420224.1664336477619 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks both Martin and John for the advice. Just a comment from a long time= Markdown user, more recent pandoc user with multiformat output ambitions.<= div>
Until now I had assumed that markdown was a superset of = html. It wasn't a pandoc extension, it is what the Markdown format says: yo= u can mix in html when markdown syntax is not enough. It was the backstop t= hat made it easy to pick markdown without future regret.  So not conve= rting the html in markdown is not in keeping with the format definition acc= ording to my assumptions. That said, markdown doesn't have an official stan= dard and I may very well be wrong. 

There are= indeed quite a few filters that translate html to tex. One of them is pand= oc itself.  So it seems to me the tech is there to do it, it is just a= decision about the role of html within markdown, an extension devoted to m= aximizing control on html output only, like the other raw_<Format> ex= tensions, or part of the markdown format itself  as per my old assumpt= ion. Perhaps I could generate html first and then a pdf from the html if I = felt adventurous.

In my specific case the solution= is to use just markdown as Martin suggested. The reason I had switched to = html is that, for some reason, the calibre epub viewer ignores the caption = when using the Markdown syntax. Apple books doesn't have this problem. So I= will just ignore the calibre viewer. I had a few other uses for html tags = like sup and span, but I can work around those, mostly. Thanks!
<= br>
Antonio


On Tuesday, September 27, 2= 022 at 6:11:56 PM UTC-7 mfhepp wrote:
In general, if you aim at multiple output formats,= it=E2=80=99s best to use Markdown syntax / elements for the authoritative = master document, and delegate required modifications to format-specific Pan= doc filters (or writers, but less common).

There are quite some filters out there that try to translate HTML eleme= nts to TeX syntax (e.g. text color) and other formats, but this is typicall= y second-best, in particular more difficult to implement in a robust way.

Except for tables, Markdown in the Pandoc flavor, is likely the best co= mpromise for a output-format-agnostic representation of documents, in parti= cular thanks to fenced divs support.

Best wishes
Martin

---------------------------------------
martin hepp
www: https://www.heppnetz.de/


> On 27. Sep 2022, at 23:06, John MacFarlane <fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> =EF=BB=BFIt=E2=80=99s not a bug. Raw HTML is only passed through = to formats that support it (e.g. Markdown, EPUB, and HTML).
> It isn=E2=80=99t parsed into a native Pandoc structure and then re= rendered in the target format.
>=20
>> On Sep 27, 2022, at 1:26 PM, Antonio Piccolboni <picc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>=20
>> Hi,
>> if one includes some graphics with the ![]() syntax, the graph= ics is present in the pdf output. But if one uses <figure>, no such l= uck. Both work with epub output. (I momentarily forgot why I am alternating= between the two forms, I think I needed some extra control on image size).= This is a minimal example. Markdown:
>>=20
>> ```
>> ![Some image](assets/IBM650.jpg)
>>=20
>> <figure>
>> <img src=3D"assets/IBM650.jpg"></img>
>> <figcaption>Some image 2
>> </figcaption>
>> </figure>
>> ```
>>=20
>> Tex output:
>>=20
>> ```
>> \begin{figure}
>> \centering
>> \includegraphics{assets/IBM650.jpg}
>> \caption{Some image}
>> \end{figure}
>>=20
>> Some image 2
>> ```
>>=20
>> Of the second image, only the caption is left. Is this a bug o= r am I missing something? Thanks
>>=20
>>=20
>>=20
>> Antonio
>>=20
>>=20
>> --=20
>> You received this message because you are subscribed to the Go= ogle Groups "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from = it, send an email to pandoc-disc= us...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8bd75451= -cad3-4a83-80e3-7a983091bcadn%40googlegroups.com.
>=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-discus..= .@googlegroups.com.
> To view this discussion on the web visit ht= tps://groups.google.com/d/msgid/pandoc-discuss/D0DAD6A1-3B30-4F46-8FAB-5F48= 4F65D700%40gmail.com.

--
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/c2b0c867-fb97-4aee-86f4-fcf160ff0303n%40googlegroups.= com.
------=_Part_473_735420224.1664336477619-- ------=_Part_472_1236937154.1664336477619--