Closed
Bug 961398
Opened 10 years ago
Closed 10 years ago
Let rst2pdf build the PDF documentation if pdflatex is not available
Categories
(Bugzilla :: Documentation, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(2 files, 1 obsolete file)
1.33 MB,
application/pdf
|
Details | |
7.43 KB,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
texlive-texmf size is 1.1Gb. That's HUGE! Way too big for me to install just to generate a PDF from time to time. Instead, we should use rst2pdf, which is way smaller. With all its dependencies, it requires less than 50Mb. Much better! And the output is pretty good.
Comment 1•10 years ago
|
||
I like the idea of reducing the size of the deps :-) Can you attach a sample PDF from rst2pdf? Is it packaged for many OSes? Gerv
Comment 2•10 years ago
|
||
Remember also that our official PDFs are going to be generated by ReadTheDocs using the texlive-texmf method, so we may want to keep both. My suspicion is that as devs we will almost never generate the PDFs, unless someone reports a bug with the generation, which is unlikely, because Sphinx is well tested. We'll just let RTD do it for us. Gerv
Assignee | ||
Comment 3•10 years ago
|
||
If pdflatex is installed, use it, else fall back to rst2pdf. I use the File::Which module which is not part of the perl core distribution and so may not be installed on your machine. But it's a popular module, so maybe it's already installed. If that's a problem, I can easily copy File::Which::which() into Bugzilla::Util as it's a very small module which has no dependencies outside core Perl modules. You will notice that the PDF file generated by rst2pdf has not section numbering. That's due to rst2pdf not understanding :numbered:, see https://code.google.com/p/rst2pdf/issues/detail?id=392.
Attachment #8362173 -
Flags: review?(gerv)
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #1) > I like the idea of reducing the size of the deps :-) Can you attach a sample > PDF from rst2pdf? Is it packaged for many OSes? It's available on Windows and several Linux distros: http://pkgs.org/search/?keyword=rst2pdf&search_on=name
Assignee | ||
Comment 5•10 years ago
|
||
The PDF file matches very closely the HTML style.
Assignee | ||
Updated•10 years ago
|
Summary: Use rst2pdf instead of LaTeX to build the PDF documentation → Let rst2pdf build the PDF documentation if pdflatex is not available
Comment 6•10 years ago
|
||
Comment on attachment 8362173 [details] [diff] [review] patch, v1 Unfortunately, this patch gives errors if rst2pdf is not installed :-( If we can fix that, it looks good to me. The output's not as nice but, as you say, the dependencies are much lighter. Who do we think would use this, though, given that anyone can just get a nice PDF from ReadTheDocs? Gerv
Attachment #8362173 -
Flags: review?(gerv) → review-
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #6) > Unfortunately, this patch gives errors if rst2pdf is not installed :-( Yeah, I'm going to fix that. Thanks for catching that. > Who do we think would use this, though, given that anyone can just get a > nice PDF from ReadTheDocs? Those customizing their doc to match their needs, and devs when reviewing changes in the documentation. About being nice or not, I personally prefer the shiny colorful PDF generated by rst2pdf than this coldish PDF generated by RTD. So it's a question of taste. :)
Assignee | ||
Comment 8•10 years ago
|
||
Now load rst2pdf conditionally.
Attachment #8362173 -
Attachment is obsolete: true
Attachment #8362606 -
Flags: review?(gerv)
Comment 9•10 years ago
|
||
Comment on attachment 8362606 [details] [diff] [review] patch, v2 r=gerv. Gerv
Attachment #8362606 -
Flags: review?(gerv) → review+
Updated•10 years ago
|
Flags: approval?
Assignee | ||
Comment 10•10 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified docs/makedocs.pl modified docs/en/Makefile modified docs/en/make.bat modified docs/en/rst/conf.py modified docs/en/rst/index.rst Committed revision 8878.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•