Re: [O] exporting a big project in multiple files to both pdf and html
On 2018-02-02 18:41, Yasushi SHOJI writes: > https://github.com/yashi/multi-html-single-pdf > > I have to use macro expansion and `org-export-global-macros` to swap the link. > I don't think we have conditionals to switch an internal and an external link. > > HTML outputs are still not good at all (wrong chapter number, excess toc, > etc.), > but at least you can see the body of the text. This is impressive, thanks a lot. Changing the macro just before calling the exporter is a great idea. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature
Re: [O] exporting a big project in multiple files to both pdf and html
> What you want is to have multiple pdf files, say a.pdf and b.pdf, and link > from > a.pdf to some specific page on the b.pdf, right? No, I want multiple html files and a single pdf file generated from multiple org files. It seems the simplest solution is to call a function that fixes the links for the pdf export. I'll report here once I have that function. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature
Re: [O] exporting a big project in multiple files to both pdf and html
Hi, On Fri, Feb 2, 2018 at 4:41 PM, Alan Schmitt wrote: >> What you want is to have multiple pdf files, say a.pdf and b.pdf, and link >> from >> a.pdf to some specific page on the b.pdf, right? > > No, I want multiple html files and a single pdf file generated from > multiple org files. It seems the simplest solution is to call a function > that fixes the links for the pdf export. I'll report here once I have > that function. https://github.com/yashi/multi-html-single-pdf I have to use macro expansion and `org-export-global-macros` to swap the link. I don't think we have conditionals to switch an internal and an external link. HTML outputs are still not good at all (wrong chapter number, excess toc, etc.), but at least you can see the body of the text. -- yashi
Re: [O] exporting a big project in multiple files to both pdf and html
Hi, On Thu, Feb 1, 2018 at 9:29 PM, Alan Schmitt wrote: > Not here. If I try to export the second file (the one with the link to > the first file), I get an error: > > user-error: Unable to resolve link: "*A headline" I now see that I totally misread your message. What you want is to have multiple pdf files, say a.pdf and b.pdf, and link from a.pdf to some specific page on the b.pdf, right? I thought you want to generate one pdf from multiple org files. Since you said "generate a single book from it". Anyway, I don't know anything about latex, but how do you write such a link in latex? Something like this?: https://tex.stackexchange.com/q/41539 -- yashi
Re: [O] exporting a big project in multiple files to both pdf and html
On 2018-02-01 13:56, Nicolas Goaziou writes: >> Not here. If I try to export the second file (the one with the link to >> the first file), I get an error: >> >> user-error: Unable to resolve link: "*A headline" >> >> This is why I think I need to have the target file name in the link when >> exporting it as a standalone file. > > If you don't mind broken links, there's also > `org-export-with-broken-links'. Unfortunately I need working links, so I'll try something else. Thanks, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature
Re: [O] exporting a big project in multiple files to both pdf and html
Hello, Alan Schmitt writes: > On 2018-02-01 20:09, Yasushi SHOJI writes: > >>> 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]] > > … > >> hmm... latex export will generate \ref{sec:\#head} >> if you have CUSTOM_ID set. html exporter works, though. > > Not here. If I try to export the second file (the one with the link to > the first file), I get an error: > > user-error: Unable to resolve link: "*A headline" > > This is why I think I need to have the target file name in the link when > exporting it as a standalone file. If you don't mind broken links, there's also `org-export-with-broken-links'. Regards, -- Nicolas Goaziou
Re: [O] exporting a big project in multiple files to both pdf and html
On 2018-02-01 20:09, Yasushi SHOJI writes: >> 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]] … > hmm... latex export will generate \ref{sec:\#head} > if you have CUSTOM_ID set. html exporter works, though. Not here. If I try to export the second file (the one with the link to the first file), I get an error: user-error: Unable to resolve link: "*A headline" This is why I think I need to have the target file name in the link when exporting it as a standalone file. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature
Re: [O] exporting a big project in multiple files to both pdf and html
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
Re: [O] exporting a big project in multiple files to both pdf and html
On 2018-02-01 11:17, Yasushi SHOJI writes: > On Fri, Jan 26, 2018 at 2:37 AM, Alan Schmitt > wrote: >> I'm working on a project that is becoming too big to manage as a single >> file, so I'm looking at splitting it in several files. This would also >> have the benefit of generating several smaller html pages instead of a >> single huge one. > > Does Org support this? or do you just export each file? I was planning on exporting each file individually. (It's the main goal, actually, as exporting the whole thing is taking too long.) >> 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? Right now it cannot resolve the link. Maybe a solution would be to create a custom link with different ways to export it… > In the html-master.org, you use links to connect. And > in the pdf-master.org, you can just #+INCLUDE your files. This is the plan, if I find out how to deal with links. > BTW, I don't think we have direct pdf exporter. So, you must be talking about > the latex exporter, right? Yes, sorry for the confusion. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature
Re: [O] exporting a big project in multiple files to both pdf and html
Hi, On Fri, Jan 26, 2018 at 2:37 AM, Alan Schmitt wrote: > I'm working on a project that is becoming too big to manage as a single > file, so I'm looking at splitting it in several files. This would also > have the benefit of generating several smaller html pages instead of a > single huge one. Does Org support this? or do you just export each file? > 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. But that will break your follow of exporting html files described above. How about having two master files, one for html and one for pdf. In the html-master.org, you use links to connect. And in the pdf-master.org, you can just #+INCLUDE your files. It'd be nice if we could tell exporters that we want multiple files from one org file. BTW, I don't think we have direct pdf exporter. So, you must be talking about the latex exporter, right? -- yashi
[O] exporting a big project in multiple files to both pdf and html
Hello, I'm working on a project that is becoming too big to manage as a single file, so I'm looking at splitting it in several files. This would also have the benefit of generating several smaller html pages instead of a single huge one. 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. Is this something you have tackled with? How did you do it? Thanks, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-12: 406.82, 2016-12: 404.42 signature.asc Description: PGP signature