Publish("script.m","pdf"); FAILS

Problem description

publish(“script.m”) produces script.html, as expected.
publish(“script.m”,“pdf”) produces *.jpg of the plots, as expected, but fails to produce script.pdf. It does, however, produce the file script.tex.

My system

  • OS: Linux Mint 20.1, Ubuntu 20.04
  • Octave version: Version 6.1.0
  • Installation method: flatpak

The problem is that flatpak Octave does not have an own pdflatex within the container.

See a recent topic about the very same issue (Pdflatex not found despite being installed and in the PATH - #2 by siko1056) for a possible solution.

It seems that that is not the only problem. I uninstall the flatpak Octave. Then I successfully built and installed my own copy of Octave. The only build fails were expected (XFAIL). Still cannot publish using the “PDF” format.

>> publish("Assignment_5a.m","pfd");
error: publish: Custom output format "pfd" requires the formatter function:

        __publish_pfd_output__

Small typo, please try instead.

>> publish("Assignment_5a.m","pdf");

Well, egg on my face. Corrected typo and got further but not yet successful.

! Package inputenc Error: Invalid UTF-8 byte sequence.

Do you use any non English encoding for your script to be published? Did you create the script yourself and can you show the full error message?

Yes, it is my script. I originally had some Greek character on the comments, but I removed them thinking they might be the source of the error.
Assignment_5a.log (23.1 KB)

Thanks for the investigation. Does it work for you now?

No, removing the Greek characters did not solve the problem. I will upload the .m file.
Assignment_5a.m (4.6 KB)

Ha-ha, that was a tricky one. Line 28: in the expression 1/(1 - x) instead of ascii “minus” (or “dash”)
symbol you used some other UTF symbol.

Dmitri.

1 Like

Marvelous Dmitri!!! Thank you, and Kai as well. The evil text in question was copied from the problem definition put out by my instructor. I will give him appropriate feedback. Thanks, again.