Hi,
The default document class is article. 1. First issue: Not quite sure what you mean by saying that it "does not handle content exceeding the page length". If the problem is with placing images, tables etc., latex does its best, and manually adding \clearpage or \newpage as needed tends to be the way it's done. If what you want is automatic page breaks before every section and subsection, you can try this trick at the beginning of the document: #+latex: \AddToHook{cmd/section/before}{\clearpage} #+latex: \AddToHook{cmd/subsection/before}{\clearpage} (This only kicks in after the table of contents; if you want a page break before the ToC as well, replace #+latex with #+latex_header.) If you have an old latex installation, the above may not work. Try this instead: #+latex: \let\oldsection\section\renewcommand\section{\clearpage\oldsection} #+latex: \let\oldsubsection\subsection\renewcommand\subsection{\clearpage\oldsubsection} 2. Second issue: Getting rid of link borders. To use hidelinks without options clashing, try this: #+latex_class_options: [hidelinks] However, if you just want the ugly borders gone but would prefer the links to stand out, you can instead customize the variable org-latex-hyperref-template by adding `colorlinks=true'. You can play with the color options as well; to get you started: (setq org-latex-hyperref-template "\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n pdfsubject={%d},\n pdfcreator={%c},\n pdflang={%L},\n colorlinks=true,\n urlcolor=blue,\n linkcolor=blue\n, citecolor=green}") Yours, Christian jman <emacs-orgm...@city17.xyz> writes: > Hello, > > I'm trying to learn more about the publish export option or Org mode. > Specifically I am using the > function `org-latex-publish-to-pdf` to export Orgmode files into PDF. > > Since this export backend is transparently using Latex, there is stuff going > on behind my back that > makes it a bit difficult debugging or customizing the formatting. > > My header in the Orgmode file started as simple as: > > #+TITLE: Title of the document > #+OPTIONS: toc:nil date:nil author:nil > > #+latex_header: \usepackage[a4paper,top=4cm,bottom=4cm]{geometry} > > The Orgmode file is nothing but a long ordered list of items: > > * Title > ** Subtitle > (Lots of text) > ** Subtlte II > * Title II > (Lots of text) > ... more ... > > and so on. After compiling to PDF, I learn that the default "template" (how > is it called in Latex > lingo? `\documentclass`?) used by `org-latex-publish-to-pdf` does not handle > content exceeding the > page length so I have to manually add some page breaks, clearly a hack: > > * Title > ** Subtitle > (Lots of text) > > #+latex: \clearpage > ** Subtlte II > > #+latex: \clearpage > * Title II > > (Lots of text) > ... more ... > > Why isn't this handled automatically for me? Is there a setting I should add > in the org file? What's > the default template used by `org-latex-publish-to-pdf`? > > Second issue: I want hyperlinks to other documents to not have a border. On > Latex the solution seems > to use the hyperref package: > > +latex_header: \usepackage[hidelinks]{hyperref} > > again, compiling triggers this error: > > ! LaTeX Error: Option clash for package hyperref. > > This error hints at some defaults I cannot see, making the document > customization difficult. Where > are these defaults? > > How can I get a feeling of what's happening when using this PDF publish > option? I think I need a bit > of a high-level overview, hope the author David O’Toole is around for some > support :-) > > Ideally I'm looking into a simple way to export from Orgmode to PDF, without > needing to learn Latex. > > Thank you for suggestions, ideas, etc. > > Best,