From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32423 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: George Emad Newsgroups: gmane.text.pandoc Subject: Re: What happens when the -t option is different from the file extension after -o Date: Thu, 30 Mar 2023 01:23:27 -0700 (PDT) Message-ID: <861a1c66-4b78-40ae-9e89-8856ac1a6847n@googlegroups.com> References: <51f74822-bf97-46c2-864d-1ba0183086e6n@googlegroups.com> <87tty3yco7.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_412_1570172990.1680164607391" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40854"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD77F6VHVQJBBAEOSWQQMGQENJFJIFY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Mar 30 10:23:31 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f56.google.com ([209.85.160.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1phnZD-000APg-Ga for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 30 Mar 2023 10:23:31 +0200 Original-Received: by mail-oa1-f56.google.com with SMTP id 586e51a60fabf-17268e44df1sf9472774fac.9 for ; Thu, 30 Mar 2023 01:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1680164610; 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:message-id:reply-to; bh=SBoKciRz+9hGwS/6AkKT3kyyXCyydXxKDG17pk62UCo=; b=tM7rpSxAEb600DKYfxRyvU79TtEkWTHzOCqGi7aYtTHyMXtuMQOTo+ItFbI4s+VBHa IvQjorYayesCBObINkthhwfDPFvWTySdoBzEn+EpGSY5yvMdLcl9D0JRR9iG6S747ePP qsxuj3FVgOc1XQx4KlvxMtVtDe5zqrp2igMuApfU2zp4B+GoBdTa269NbSf8D/+oh+lv DgxWF08CKJGJje9jYCoPcE4mEaT+kNv/vVFGPG2XULdaO2qXHlOJrTKw9fXJhnTiJK8v N6w15Pexw5o9Av2OgLulApjN7tzXo8ZnlejxObXcngd97AFTg8DJjeO8ZObSNq0jJjGe KUBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680164610; 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:message-id:reply-to; bh=SBoKciRz+9hGwS/6AkKT3kyyXCyydXxKDG17pk62UCo=; b=FLaRLCVI+BSG8W4OzVrpn3zJsM++fyJdf+JuyFvPM/Df7kk5ojySSiQ9ocqYGrsLwr aPuv4dIsO4Pz0mYoMcCgw4CixeGAh6ii4jn/ku099FIDYoPuXWtPlNbojhCNne0qnfpF 5vY7QY+QiyJikoAgG85gK65KD6rJmOi1lbqnM/SGrEeUcTOIBFFhoDwk7vr9GcG244sC tYJzf5SgVk9W6MNwQ+nRxPTC9XvrMUXATLOezSkoBxuq+Q7S5igTozlb1o3JeyiNA+6x dBDWDy+qaI3G9jZxCETPSorx5OaPPE1G4xxMyuYQGyE58utw915FyypxIJaPLhccIhBI UdiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680164610; 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:message-id:reply-to; bh=SBoKciRz+9hGwS/6AkKT3kyyXCyydXxKDG17pk62UCo=; b=Be5AT2M+RfbbgIljuHnKGOGddhsrZUeqNCHYiJk/OvCpX/P5Y1KNQ7EYQycmNLDTdE zZodQJOJy0cBRp4GX7fkANlNTd7LDVgKDvEVbNMcIW6BLC4YnetxJ2OGCfqm1v2JAjV2 s9/RScjp/qClKheMzJMBo07/Wi9ci7B2Rwj45eow064WtQfByoAS0QCT5xaewBlvNO7i y+kAL4O8TjWoaLHhJtsnXvqBoxZRBAmvdXu+pRky7aQrqVUzp96NvKT9KwFb5zodhdsh deGbD5pXJUnMRM+pJ7Jqx7cfD1oNwafZSNGk+MV+2U4NalsvPp1NKvZe40JApz5K1Fni Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AAQBX9fbU+mjUFYcCDTNQfdWynphBraWzUmLbU4nrTMUxdPaKyxOS5gB Uob6JV1kvsbpOyTqfMdtvYw= X-Google-Smtp-Source: AKy350alLjFAvmpavk1y7RjbtTqS5zmSwZuJYbpvHdlrq7a+V4d50qH+Fn72/T9ZsxlibO8LwRwb/A== X-Received: by 2002:a05:6830:1515:b0:6a1:342f:7ba4 with SMTP id k21-20020a056830151500b006a1342f7ba4mr4971926otp.0.1680164610494; Thu, 30 Mar 2023 01:23:30 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5c86:0:b0:69f:70dd:ec04 with SMTP id a6-20020a9d5c86000000b0069f70ddec04ls178363oti.10.-pod-prod-gmail; Thu, 30 Mar 2023 01:23:28 -0700 (PDT) X-Received: by 2002:a9d:77d0:0:b0:6a1:1bd4:d8c4 with SMTP id w16-20020a9d77d0000000b006a11bd4d8c4mr6319511otl.6.1680164607988; Thu, 30 Mar 2023 01:23:27 -0700 (PDT) In-Reply-To: X-Original-Sender: engr.georgeemad-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:32423 Archived-At: ------=_Part_412_1570172990.1680164607391 Content-Type: multipart/alternative; boundary="----=_Part_413_769471870.1680164607391" ------=_Part_413_769471870.1680164607391 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello William,=20 Thanks you for your reply,=20 I can't share the whole output as it includes the whole document, but using= =20 the verbose option it proved my theory,=20 that it do print the html file after generating it, thanks for the tip. no obvious error messages and the here is the command passed to wkhtmltopdf= =20 ``` wkhtmltopdf "--margin-bottom" "1.2in" "--margin-top" "1.25in"=20 "--margin-right" "1.25in" "--margin-left" "1.25in"=20 "--enable-local-file-access" "./html2pdf1272404-0.html"=20 "./html2pdf1272404-1.pdf" then the TOC in the html is like so=20 ```=20 ```=20 then the reset of the pdf and the last couple of lines are=20 ``` Loading page (1/2) Printing pages (2/2) =20 Done =20 ``` I am not sure if that enough for analysis, but I will also try to analyze= =20 it later, will go with weasyprint for now. Regards,=20 George=20 On Wednesday, March 29, 2023 at 3:29:41=E2=80=AFPM UTC+2 William Lupton wro= te: > George, > > If you set pandoc's --verbose flag then you get a lot of detailed output,= =20 > including the wkhtmltopdf command line and the generated HTML (that is=20 > passed to wkhtmltopdf). > > If you'd be happy to share any or all of this output (or send it to me=20 > directly), I'd be happy to take a look and see whether anything obvious i= s=20 > going on. > > Cheers, > William > > On Wed, 29 Mar 2023 at 13:17, Albert Krewinkel = =20 > wrote: > >> Hi George, >> >> George Emad writes: >> >> > 1) Is this a normal use case when I use different file extension than >> > the format after -t ? >> >> Absolutely. Pandoc supports multiple PDF engines, and both the `-t` and >> `--pdf-engine` parameters are taken into account when deciding which >> format and which engine should be used. If the `--pdf-engine` parameter >> is given, then pandoc uses that engine together with the appropriate >> output format; if `-t`/`--to` is given then a engine is picket. >> >> Here's the list of formats and suitable engines: >> >> - latex: pdflatex, lualatex, xelatex, latexmk, tectonic >> - html: wkhtmltopdf, weasyprint, pagedjs, prince >> - context: context >> - ms: pdfroff >> - typst: typst >> >> The first engine for each format is the default engine. So by using `-t` >> you triggered PDF generation through wkhtmltopdf, which, it appears, is >> installed on your system. >> >> > 2) How can I fix this bug with the TOC ? >> >> My recommendation would be to try one of the alternative engines. If >> that doesn't work, please file a bug report in the issue tracker at >> https://github.com/jgm/pandoc/issues >> >> >> --=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 Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> 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/87tty3yco7.fsf%40zeitkr= aut.de >> . >> > --=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/861a1c66-4b78-40ae-9e89-8856ac1a6847n%40googlegroups.com. ------=_Part_413_769471870.1680164607391 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello William,=C2=A0
Thanks you for your reply,=C2=A0

I can= 't share the whole output as it includes the whole document, but using the = verbose option it proved my theory,=C2=A0
that it do print the html fi= le after generating it, thanks for the tip.

no obvious error mes= sages and the here is the command passed to wkhtmltopdf=C2=A0
``` wkht= mltopdf "--margin-bottom" "1.2in" "--margin-top" "1.25in" "--margin-right" = "1.25in" "--margin-left" "1.25in" "--enable-local-file-access" "./html2pdf1= 272404-0.html" "./html2pdf1272404-1.pdf"
then the TOC in the html is l= ike so=C2=A0
=C2=A0```=C2=A0
<nav id=3D"TOC" role=3D"doc-toc"&g= t;
<ul>
<li><a href=3D"#introduction">Introduct= ion</a>
<ul>
.
.
.
<= /ul></li>
</ul>
</nav>
```= =C2=A0

then the reset of the pdf and the last co= uple of lines are=C2=A0

```
Loading page (1= /2)
Printing pages (2/2) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
Done =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
```

I am not sure if th= at enough for analysis, but I will also try to analyze it later, will go wi= th weasyprint for now.

Regards,=C2=A0
George=C2=A0
On Wednesday= , March 29, 2023 at 3:29:41=E2=80=AFPM UTC+2 William Lupton wrote:
Geor= ge,

If you set pandoc's --verbose flag then you get = a lot of detailed=C2=A0output, including the wkhtmltopdf command line and t= he generated HTML (that is passed to wkhtmltopdf).

If you'd be happy to share any or all of this output (or send it to me= directly), I'd be happy to take a look and see whether anything obviou= s is going on.

Cheers,
William

On Wed, 29 Mar 2023 at 13:17, Albert Krewinke= l <albert...-9EawChwDxG8hFhg+JK9F0w@public.gmane.org= > wrote:
Hi George,

George Emad <engr.ge...@gmail= .com> writes:

> 1) Is this a normal use case when I use different file extension than<= br> > the format after -t ?

Absolutely. Pandoc supports multiple PDF engines, and both the `-t` and
`--pdf-engine` parameters are taken into account when deciding which
format and which engine should be used. If the `--pdf-engine` parameter
is given, then pandoc uses that engine together with the appropriate
output format; if `-t`/`--to` is given then a engine is picket.

Here's the list of formats and suitable engines:

=C2=A0 - latex: pdflatex, lualatex, xelatex, latexmk, tectonic
=C2=A0 - html: wkhtmltopdf, weasyprint, pagedjs, prince
=C2=A0 - context: context
=C2=A0 - ms: pdfroff
=C2=A0 - typst: typst

The first engine for each format is the default engine. So by using `-t` you triggered PDF generation through wkhtmltopdf, which, it appears, is
installed on your system.

> 2) How can I fix this bug with the TOC ?

My recommendation would be to try one of the alternative engines. If
that doesn't work, please file a bug report in the issue tracker at
https://githu= b.com/jgm/pandoc/issues


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe=C2=A0 e836 388d c0b2 1f63 1124

--
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 pandoc-discus...@googleg= roups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pand= oc-discuss/87tty3yco7.fsf%40zeitkraut.de.

--
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/861a1c66-4b78-40ae-9e89-8856ac1a6847n%40googlegroups.= com.
------=_Part_413_769471870.1680164607391-- ------=_Part_412_1570172990.1680164607391--