From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: exporting a big project in multiple files to both pdf and html Date: Thu, 1 Feb 2018 20:09:52 +0900 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehCkd-0000hN-M4 for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 06:09:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehCkc-0008Mt-GN for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 06:09:55 -0500 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:37381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehCkc-0008Md-8s for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 06:09:54 -0500 Received: by mail-lf0-x231.google.com with SMTP id 63so25575658lfv.4 for ; Thu, 01 Feb 2018 03:09:54 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Alan Schmitt Cc: emacs-orgmode Hi, On Thu, Feb 1, 2018 at 5:45 PM, Alan Schmitt wrote: > On 2018-02-01 11:17, Yasushi SHOJI writes: >> On Fri, Jan 26, 2018 at 2:37 AM, Alan Schmitt >> wrote: >>> My question is about pdf export. Is it possible to take a document made >>> of multiple org files and generate a single book from it? I'm worried >>> that if I use a master org file that includes the other ones, the links >>> between chapters would break. >> >> You can just use '#+INCLUDE' construct and Org will take care. > > My problem is links. To give a concrete example, here is the file I want > to split in two: > > * A headline > :PROPERTIES: > :CUSTOM_ID: head1 > :END: > > This is the first file. > > * Second headline > > The first headline is number [[#head1]] > > > How do I change the link in the second headline so that I can split the > second headline into its own file and export it by itself? Using [[*A headline]] ? I might be still missing something but I got following: $ cat a.org * A headline This is the first file. #+INCLUDE: b.org :minlevel 1 $ cat b.org * Second headline The first headline is number [[*A headline]] $ org-export.sh a.org $ cat a.tex % Created 2018-02-01 Thu 20:08 % Intended LaTeX compiler: pdflatex \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{grffile} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} \author{Yasushi SHOJI} \date{\today} \title{} \hypersetup{ pdfauthor={Yasushi SHOJI}, pdftitle={}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.0.91 (Org mode 9.1.6)}, pdflang={English}} \begin{document} \tableofcontents \section{A headline} \label{sec:org0ac96d1} This is the first file. \section{Second headline} \label{sec:org2092415} The first headline is number \ref{sec:org0ac96d1} \end{document} hmm... latex export will generate \ref{sec:\#head} if you have CUSTOM_ID set. html exporter works, though. Is it a bug? -- yashi