octavetexexport-to-pdf

How to adjust page size while publishing?


Software: Octave v7.1.0


Solution

  • As directed by @cris-luengo in the pointer comment to the linked manual, one solution can be to edit (or create) the function files (to used by the publish function) with the desired changes to specify the paper size.

    The function files location can be found by:

    There, among other files, 2 files will be:

    __publish_html_output__.m
    __publish_latex_output__.m
    

    Edit the _latex_ containing file to add ,a4paper (or other predefined size in latex) alongwith 10pt in the line '\documentclass[10pt]{article}',, optionally with a comment in a proceeding newline as a reminder that you added it, something like: '% Modification: specify a4paper',

    If pdf format were directly specified as a new function file, then I'd have preferred to modify its copy and calling that directly in publish(), but since the publish pdf eventually calls publish latex, so, the only option at hand in this method seems to edit the original publish latex function file itself.