public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pdfroff invalid argument on cygwin
@ 2020-11-24  0:50 jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found] ` <ebc14024-ee13-479d-8ef5-8a14080e3d69n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-24  0:50 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 683 bytes --]

Hello!

I'm having trouble running `pandoc -t ms -o filename.pdf filename.md` on 
cygwin. The LaTeX backend seemed to work, but pdfroff fails with the 
following message.

pandoc.exe: pdfroff: createProcess: invalid argument (Invalid argument)

I don't know what's wrong.

-- 
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/msgid/pandoc-discuss/ebc14024-ee13-479d-8ef5-8a14080e3d69n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1064 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found] ` <ebc14024-ee13-479d-8ef5-8a14080e3d69n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-24  1:50   ` John MacFarlane
       [not found]     ` <m2y2irbk0j.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2020-11-24  1:50 UTC (permalink / raw)
  To: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss


It will help to know the version of pandoc you're using,
the OS, and whether it matters what the contents of filename.md
are...

Also, you will get more information about how pdfroff is
being called if you add the --verbose flag.

"jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jlrn77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello!
>
> I'm having trouble running `pandoc -t ms -o filename.pdf filename.md` on 
> cygwin. The LaTeX backend seemed to work, but pdfroff fails with the 
> following message.
>
> pandoc.exe: pdfroff: createProcess: invalid argument (Invalid argument)
>
> I don't know what's wrong.
>
> -- 
> 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/msgid/pandoc-discuss/ebc14024-ee13-479d-8ef5-8a14080e3d69n%40googlegroups.com.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]     ` <m2y2irbk0j.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-24  1:51       ` John MacFarlane
       [not found]         ` <m2v9dvbjya.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2020-11-24  1:51 UTC (permalink / raw)
  To: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss


And pdfroff version, of course!

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

> It will help to know the version of pandoc you're using,
> the OS, and whether it matters what the contents of filename.md
> are...


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]         ` <m2v9dvbjya.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-24 17:00           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]             ` <385521f0-4f35-4b60-bc3d-245dc1eeed6fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-24 17:00 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

--verbose reports, on -t ms

[makePDF] Command line:
pdfroff "-ms" "-mpdfmark" "-mspdf" "-e" "-t" "-k" "-KUTF-8" "-i"

while on -t latex

[makePDF] Command line:
pdflatex "-halt-on-error" "-interaction" "nonstopmode" "-output-directory" 
"./tex2pdf.-573d55defdd5e31a" "./tex2pdf.-573d55defdd5e31a/input.tex"

So somehow the command line seems to be incomplete for the -ms option: it 
does not point to the input source.

This is pandoc 2.11.2, running on CYGWIN_NT-10.0 (uname info).

Moreover: I can't see the difference between pandoc.discuss and the bug 
tracker system on github. Any policy on this subject?



On Monday, 23 November 2020 at 19:52:13 UTC-6 John MacFarlane wrote:

>
> And pdfroff version, of course!
>
> John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
>
> > It will help to know the version of pandoc you're using,
> > the OS, and whether it matters what the contents of filename.md
> > are...
>

-- 
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/msgid/pandoc-discuss/385521f0-4f35-4b60-bc3d-245dc1eeed6fn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2123 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]             ` <385521f0-4f35-4b60-bc3d-245dc1eeed6fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-24 18:02               ` John MacFarlane
       [not found]                 ` <m2blfmbpkl.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2020-11-24 18:02 UTC (permalink / raw)
  To: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss

"jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jlrn77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> --verbose reports, on -t ms
>
> [makePDF] Command line:
> pdfroff "-ms" "-mpdfmark" "-mspdf" "-e" "-t" "-k" "-KUTF-8" "-i"
>
> while on -t latex
>
> [makePDF] Command line:
> pdflatex "-halt-on-error" "-interaction" "nonstopmode" "-output-directory" 
> "./tex2pdf.-573d55defdd5e31a" "./tex2pdf.-573d55defdd5e31a/input.tex"
>
> So somehow the command line seems to be incomplete for the -ms option: it 
> does not point to the input source.

It's functioning as a pipe in this case; pandoc sends the text
of the source file to stdin in the process.

These options are exactly what I see, and it works fine for me.
So I'm at a loss.

Do you get any informative error message?

What pdfroff version?

Does it fail for any input (even a simple "hello world") or
does the failure depend on some specific feature of the input?

Can you try creating an .ms file using 'pandoc -t ms -s' and
compiling it manually with pdfroff?  Maybe your pdfroff setup
is not right.

> Moreover: I can't see the difference between pandoc.discuss and the bug 
> tracker system on github. Any policy on this subject?

pandoc-discuss is for questions and open-ended discussion,
the tracker is for more focused bug reports.  This type of
thing could go either place; if you think it might not be a bug but
user error or an issue with your setup, going to pandoc-discuss
first is best.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]                 ` <m2blfmbpkl.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-24 22:58                   ` Luis Rivera
  2020-11-25 19:07                   ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  1 sibling, 0 replies; 9+ messages in thread
From: Luis Rivera @ 2020-11-24 22:58 UTC (permalink / raw)
  Cc: pandoc-discuss

Luis Rivera


On Tue, 24 Nov 2020 at 12:03, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
> "jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jlrn77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > --verbose reports, on -t ms
> >
> > [makePDF] Command line:
> > pdfroff "-ms" "-mpdfmark" "-mspdf" "-e" "-t" "-k" "-KUTF-8" "-i"
> >
> > while on -t latex
> >
> > [makePDF] Command line:
> > pdflatex "-halt-on-error" "-interaction" "nonstopmode" "-output-directory"
> > "./tex2pdf.-573d55defdd5e31a" "./tex2pdf.-573d55defdd5e31a/input.tex"
> >
> > So somehow the command line seems to be incomplete for the -ms option: it
> > does not point to the input source.
>
> It's functioning as a pipe in this case; pandoc sends the text
> of the source file to stdin in the process.
>

I tested with a busybox-w32 and a native windows port of groff with
the same results.

I fear the problem is that the windows executable I'm forced to use on
Cygwin doesn't support pipes, or the pipe gets somehow broken. So, the
workaround to fix this problem is by providing the pipe explicitly

pandoc -s -t ms 3oc.md | pdfroff -KUTF-8 -ms -e -t -mpdfmark -mspdf - > 3oc.pdf

A simple shell script does the job.

The man page for groff implies that the call to -k with -K is redundant.

Cheers,


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]                 ` <m2blfmbpkl.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  2020-11-24 22:58                   ` Luis Rivera
@ 2020-11-25 19:07                   ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]                     ` <8db6b0f8-d31c-451f-8ada-0abdbc240474n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-25 19:07 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1728 bytes --]



On Tuesday, 24 November 2020 at 12:03:08 UTC-6 John MacFarlane wrote:

> "jlr..." <jlr...> writes: 
>
> > --verbose reports, on -t ms 
> > 
> > [makePDF] Command line: 
> > pdfroff "-ms" "-mpdfmark" "-mspdf" "-e" "-t" "-k" "-KUTF-8" "-i" 
> > 
> > while on -t latex 
> > 
> > [makePDF] Command line: 
> > pdflatex "-halt-on-error" "-interaction" "nonstopmode" 
> "-output-directory" 
> > "./tex2pdf.-573d55defdd5e31a" "./tex2pdf.-573d55defdd5e31a/input.tex" 
> > 
> > So somehow the command line seems to be incomplete for the -ms option: 
> it 
> > does not point to the input source. 
>
> It's functioning as a pipe in this case; pandoc sends the text 
> of the source file to stdin in the process. 
>
> These options are exactly what I see, and it works fine for me. 
> So I'm at a loss. 
>
>
 After a bit of research, it seems that indeed the problem is the call to 
the system to process pandoc's output through stdin: windoze is infamous 
for that; since the other processors go through temporary files, the output 
call proceeds flawlessly, as the cmd shell has an input file to find.

So perhaps the only solution, not the workaround, is to ask pdfroff to 
process a tmp file generated by pandoc, as other pdf-engines do. Not as 
elegant as calling the pipe, but probably more portable.

With my apologies,

-- 
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/msgid/pandoc-discuss/8db6b0f8-d31c-451f-8ada-0abdbc240474n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2509 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]                     ` <8db6b0f8-d31c-451f-8ada-0abdbc240474n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-26  2:30                       ` John MacFarlane
       [not found]                         ` <m2d0006e9o.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2020-11-26  2:30 UTC (permalink / raw)
  To: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss


>  After a bit of research, it seems that indeed the problem is the call to 
> the system to process pandoc's output through stdin: windoze is infamous 
> for that; since the other processors go through temporary files, the output 
> call proceeds flawlessly, as the cmd shell has an input file to find.
>
> So perhaps the only solution, not the workaround, is to ask pdfroff to 
> process a tmp file generated by pandoc, as other pdf-engines do. Not as 
> elegant as calling the pipe, but probably more portable.

Makes sense probably.  If you submit an issue on the GitHub
tracker, we'll be less likely to lose track.

(Of course, Windows is also a bit of a pain when it comes to tmp
files, but what we're doing for the other methods seems to work.)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: pdfroff invalid argument on cygwin
       [not found]                         ` <m2d0006e9o.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-08-11 22:38                           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  0 siblings, 0 replies; 9+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-08-11 22:38 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1758 bytes --]



Il giorno mercoledì 25 novembre 2020 alle 20:30:44 UTC-6 John MacFarlane ha 
scritto:

>
> > After a bit of research, it seems that indeed the problem is the call to 
> > the system to process pandoc's output through stdin: windoze is infamous 
> > for that; since the other processors go through temporary files, the 
> output 
> > call proceeds flawlessly, as the cmd shell has an input file to find. 
> > 
> > So perhaps the only solution, not the workaround, is to ask pdfroff to 
> > process a tmp file generated by pandoc, as other pdf-engines do. Not as 
> > elegant as calling the pipe, but probably more portable. 
>
> Makes sense probably. If you submit an issue on the GitHub 
> tracker, we'll be less likely to lose track. 
>
> (Of course, Windows is also a bit of a pain when it comes to tmp 
> files, but what we're doing for the other methods seems to work.)


Hello!

In the process of cleaning up my memories (the usbs and other devices) I 
recalled this utility, shc (shell compiler), which produces an exe based on 
a shell script. I compiled a pdfroff.exe based on the bash pdfroff bundled 
with cygwin, and the process goes on flawlessly.

I don't know if I should still open the issue, or post this discussion 
somewhere else on the net, like stackexchange or something...

Curious,

-- 
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/msgid/pandoc-discuss/60aaaf2c-fa98-422a-a0a5-b998e56ebf55n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2389 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-11 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24  0:50 pdfroff invalid argument on cygwin jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <ebc14024-ee13-479d-8ef5-8a14080e3d69n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-24  1:50   ` John MacFarlane
     [not found]     ` <m2y2irbk0j.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-24  1:51       ` John MacFarlane
     [not found]         ` <m2v9dvbjya.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-24 17:00           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]             ` <385521f0-4f35-4b60-bc3d-245dc1eeed6fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-24 18:02               ` John MacFarlane
     [not found]                 ` <m2blfmbpkl.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-24 22:58                   ` Luis Rivera
2020-11-25 19:07                   ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                     ` <8db6b0f8-d31c-451f-8ada-0abdbc240474n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-26  2:30                       ` John MacFarlane
     [not found]                         ` <m2d0006e9o.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-08-11 22:38                           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).