From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OERqLY3mDGfW7gAA62LTzQ:P1 (envelope-from ) for ; Mon, 14 Oct 2024 09:38:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id OERqLY3mDGfW7gAA62LTzQ (envelope-from ) for ; Mon, 14 Oct 2024 11:38:21 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=christianmoe.com header.s=x header.b=nNrJ2IgQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=christianmoe.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728898701; a=rsa-sha256; cv=none; b=iBoE+RSoezGO3J9mWdKz3uRrb5151Ncd88tVPg8LSNkuq9DB86U6XAeBF0vuXbBDpPWNoI utKwaZScEcovlpZ3d6BYsFuOpJ3/X4x47ndIgz306PfNkTemQuZCehPziZMfK1Fp0Zn5QE JFFp72BWvePKr24W/WzlBhOlMIC94fsMEuZ3suGpkZaC2nbwyGQaH2bins5gGybY4S4iXX IV2YRFpUE8s+lVABGq4dnNkzEItznI2mxGAI/Iym1bN8Xepq6IOeR6HntwCd214hdmpouH Z7dxrdAcCUsOwNPSZs9qi1P9vYIF/ND31iTp7z6Hf1layd73bGxmzepehaPOOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=christianmoe.com header.s=x header.b=nNrJ2IgQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=christianmoe.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728898701; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=erdfYudaEFl2AXrWaU9vyzlL4CWDZjIP/mzzlmUV9s0=; b=B/zaLxzkDqNe2y0l60aSzAfH1vTwmt3In7VNqX6Knu2M95WSXf3pDXMI8z0fU7Xl6lWKW7 cI3eCM+lz5+xlIl36NTu8JdgzC0ovrUhV6oSRFwpP89k/jmqNYQ7gQekEI88KhgPBPrjFg 37Dfpol45ONRsab6a8/27a19qH0PC1QvybZcIELQSuutiMalUDgCYCrkplkGLgPf8ZZGxh 6JhFSX7jo1ZzpbATX9a4beF4FGAa/yUYsh+/6tjHS4MY7+LLT6Ku7RkyMNrgONlvIhPzH+ F5qLQBdynWf3iWS1Oii1pehTUf8TF8A5e7/YCqH8GfLfafBkMgmOPFwX5zjbXw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 785B21C35B for ; Mon, 14 Oct 2024 11:38:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0Gwg-0004zC-PN; Mon, 14 Oct 2024 05:00:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0Gvn-0004pD-H0 for emacs-orgmode@gnu.org; Mon, 14 Oct 2024 04:59:59 -0400 Received: from mailer-211-152.hitrost.net ([91.185.211.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0Gvl-0001hg-ET for emacs-orgmode@gnu.org; Mon, 14 Oct 2024 04:59:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=christianmoe.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc:To:From:References:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=erdfYudaEFl2AXrWaU9vyzlL4CWDZjIP/mzzlmUV9s0=; b=nNrJ2IgQzmNMqsl5h7HbPzjhuA pL32IH2bfR5FZ1UlcQr0Kmd0Valk0D1I1bTBMhx9ZgB735Mkxcxx9WTqxZhSaPCPjb6x9aquxxktZ Q6qc3PH87o06QMivAxiq715BWK/RnZtKbElJOL5eojwdTJBUByrmMf7waNbp84tBelSEm+YRXjYDO K9sux5AxU3TZn1mPsjkChtzzH5c/cpK83Sb9YNun7WYPeob3dCr1XAzEkKVrtCYNmLHwJQcCNUW2Z 907wBJN4IXrJD0nTBqFl+vU2sYTYDHyoTvnPHs4LQdFHNJCyTlATkv1sDsEtzLdIj6QmB/BYopH9w koQlnKeA==; Received: from 84-20-225-53.dynamic.telemach.net ([84.20.225.53] helo=MacMint) by b1.hitrost.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1t0GcZ-0000000Bl93-1eik; Mon, 14 Oct 2024 10:40:07 +0200 References: <871q0j3iv2.fsf@city17.xyz> User-agent: mu4e 1.6.10; emacs 27.1 From: Christian Moe To: jman Cc: emacs-orgmode@gnu.org Subject: Re: Understanding Publish (ox-publish.el) Date: Mon, 14 Oct 2024 10:37:59 +0200 In-reply-to: <871q0j3iv2.fsf@city17.xyz> Message-ID: <87jzeb9ixl.fsf@christianmoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GeoIP: Country [IP], SI [84.20.225.53] X-Authenticated-Id: mail@christianmoe.com Received-SPF: pass client-ip=91.185.211.152; envelope-from=mail@christianmoe.com; helo=mailer-211-152.hitrost.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 1.57 X-Spam-Score: 1.57 X-Migadu-Queue-Id: 785B21C35B X-Migadu-Scanner: mx12.migadu.com X-TUID: 5fKbtQhwRWx6 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 ins= tead: #+latex: \let\oldsection\section\renewcommand\section{\clearpage\oldsecti= on} #+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=3Dtrue'. You can play with the color options as well; to get you started: (setq org-latex-hyperref-template=20 "\\hypersetup{\n pdfauthor=3D{%a},\n pdftitle=3D{%t},\n pdfkeywords=3D{%k},\n pdfsubject=3D{%d},\n pdfcreator=3D{%c},\n pdflang=3D{%L},\n colorlinks=3Dtrue,\n urlcolor=3Dblue,\n linkcolor=3Dblue\= n, citecolor=3Dgreen}") Yours, Christian jman writes: > Hello, > > I'm trying to learn more about the publish export option or Org mode. Spe= cifically I am using the=20 > function `org-latex-publish-to-pdf` to export Orgmode files into PDF. > > Since this export backend is transparently using Latex, there is stuff go= ing on behind my back that=20 > 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=3D4cm,bottom=3D4cm]{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" (h= ow is it called in Latex=20 > lingo? `\documentclass`?) used by `org-latex-publish-to-pdf` does not han= dle content exceeding the=20 > 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=20 > 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=20 > 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 custo= mization difficult. Where=20 > are these defaults? > > How can I get a feeling of what's happening when using this PDF publish o= ption? I think I need a bit=20 > of a high-level overview, hope the author David O=E2=80=99Toole is around= for some support :-) > > Ideally I'm looking into a simple way to export from Orgmode to PDF, with= out needing to learn Latex. > > Thank you for suggestions, ideas, etc. > > Best,