Re: [Patch 0/5] Create single PDF for all HTML files

2012-10-15 Thread Michael J Gruber
Jeff King venit, vidit, dixit 08.10.2012 00:52:
 On Sun, Oct 07, 2012 at 10:14:28AM +0200, Thomas Ackermann wrote:
 
 There are patched QT and unpatched QT versions of wkhtmltopdf
 (see http://code.google.com/p/wkhtmltopdf/). I am using V0.9.9 for Windows
 which is patched QT.
 
 That's a definite compatibility question for taking your patches into
 upstream git.
 
 There is one drawback with wkhtmltopdf: At least on my Netbook (Win7 64bit,
 Pentium 1.5GHz) it is very slow. It takes more than 3 hrs to create 
 git-doc.pdf.

 If you want to have a quick look on the resulting pdf just clone 
 https://github.com/tacker66/git-docpdf.git. This repo contains
 a current version of user.manual.pdf and git-doc.pdf 
 
 It does look better than the output generated by the man -Tdvi loop I
 posted. It retains more styling from the HTML and it has a nice table of
 contents. But 3 hours? Yeesh. Mine took 11 seconds.
 
 I wonder if a more sane route is to drop HTML entirely, convert the
 asciidoc to docbook (which we already do for manpages), and then create
 a docbook document that is a collection of all elements, which can then

Hmm, I think the html output often looks better than the man output
(tables and such), and it is a formatted, reflowable, interlinked format
fit for many puposes.

 be converted to pdf, epub, or whatever. I would not be surprised if
 somebody has solved this problem before (but it is not really my itch,
 so I did not look very far).

I'd rather ditch docbook and have one toolchain (asciidoc, unless we
want to switch to something else) only... We've been hunting asciidoc as
well as docbook compatibility (between versions) and interoperability
(between them) issues again and again.

In fact, if I remember correctly, that's what has been keeping us from
using *real* tables in the doc (but hasn't kept us from using tables ;) ).

Michael
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 0/5] Create single PDF for all HTML files

2012-10-15 Thread Jeff King
On Mon, Oct 15, 2012 at 01:55:51PM +0200, Michael J Gruber wrote:

  I wonder if a more sane route is to drop HTML entirely, convert the
  asciidoc to docbook (which we already do for manpages), and then create
  a docbook document that is a collection of all elements, which can then
 
 Hmm, I think the html output often looks better than the man output
 (tables and such), and it is a formatted, reflowable, interlinked format
 fit for many puposes.

It does look better, but that is because the docbook-roff step is where
things get ugly. In theory, docbook is at least as expressive as HTML,
and has lots of nice semantic markup that gives us flexibility in what
the final product looks like.

There are docbook-epub converters (I think xmlto will do this out of
the box), as well as a host of other formats. But convincing docbook to
create a collection of refentry (their term for manpage) articles is
harder than you'd think. I tried a few things when this thread started
and couldn't get anything simple to work (xml has managed to make the
simple act of include this document in this other document insanely
complex). But I only spent a few minutes on it.

  be converted to pdf, epub, or whatever. I would not be surprised if
  somebody has solved this problem before (but it is not really my itch,
  so I did not look very far).
 
 I'd rather ditch docbook and have one toolchain (asciidoc, unless we
 want to switch to something else) only... We've been hunting asciidoc as
 well as docbook compatibility (between versions) and interoperability
 (between them) issues again and again.

Yeah, I really hate our doc toolchain. It just seems like everything
else is even worse. We can ditch docbook, but then how do we make
manpages?

-Peff
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Re: [Patch 0/5] Create single PDF for all HTML files

2012-10-08 Thread Philip Oakley

From: Thomas Ackermann th.acke...@arcor.de


There are patched QT and unpatched QT versions of wkhtmltopdf
(see http://code.google.com/p/wkhtmltopdf/). I am using V0.9.9 for 
Windows

which is patched QT.

There is one drawback with wkhtmltopdf: At least on my Netbook (Win7 
64bit,
Pentium 1.5GHz) it is very slow. It takes more than 3 hrs to create 
git-doc.pdf.


If you want to have a quick look on the resulting pdf just clone
https://github.com/tacker66/git-docpdf.git. This repo contains
a current version of user.manual.pdf and git-doc.pdf



Even as a 'draft' I found it to be useful to see all the documentation 
collated together in one place/pdf. All 763 pages!


Even just reading through the contents list (34 pages) showed the scale 
of the git documentation, and areas of documentation I wasn't aware of.


Putting the Tutorials, Everyday GIT and workflows at the beginning 
looked good.


For a polished version it would be good if the major breaks (e.g. 
between ToC, gittutorial, git-add [should start with git(1)], 
gitattributes, GIT Howto, API, Git Index Format, ReleaseNotes) could 
start on a new page.


A few minor nits: I wasn't sure if the 'fighting regressions with git 
bisect', and 'a short git tools survey' were in the right place. There 
appear to be two 'git-send-pack' titles, though they are different. And 
the HowTo section would need some beefed up headings to give them enough 
prominence in the ToC once it all hangs together.




- Original Nachricht 
Von: Jeff King p...@peff.net
An:  Thomas Ackermann th.acke...@arcor.de
Datum:   06.10.2012 21:32
Betreff: Re: [Patch 0/5] Create single PDF for all HTML files


On Sat, Oct 06, 2012 at 05:51:15PM +0200, Thomas Ackermann wrote:

 I wanted to have a single PDF file which contains the complete Git
documentation
 (except user-manual) for easier reading on my tablet. The simplest 
 way to

do
 this was by using wkhtmltopdf which can combine a set of HTML files 
 into a

sinlge
 PDF file and also apply some reformatting. To this end HTML files 
 for all

the missing
 files in Documentation/technical and Documentation/howto and also 
 for all

the
 release notes in Documentation/RelNotes were created.

It seems like a reasonable goal. I do not have a strong opinion on 
the

approach or how the final output looks, but I wasn't able to actually
get output at all after applying your patches. Running make fullpdf
(after installing dblatex) got me:

  The switch --book, is not support using unpatched qt, and will be
  ignored.The switch --footer-html, is not support using unpatched 
qt,

  and will be ignored.The switch --disable-external-links, is not
  support using unpatched qt, and will be ignored.

after which wkhtmltopdf began pegging my CPU. I let it run for 10
minutes before giving up.

Another way of doing this would be to format the individual troff
manpages into dvi or postscript, convert that into pdf, and then
concatenate that. Something like:

  for i in *.[157]; do
man -Tdvi -l $i $i.dvi
dvipdfm $i
  done
  pdftk *.[157].pdf cat output full.pdf

works for me, though obviously that does not handle some of the 
non-man

items you included. No idea on how the output compares to yours, but
it's something you may want to look at.

-Peff



---
Thomas
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2677 / Virus Database: 2591/5813 - Release Date: 
10/06/12




--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Aw: Re: [Patch 0/5] Create single PDF for all HTML files

2012-10-07 Thread Thomas Ackermann

There are patched QT and unpatched QT versions of wkhtmltopdf
(see http://code.google.com/p/wkhtmltopdf/). I am using V0.9.9 for Windows
which is patched QT.

There is one drawback with wkhtmltopdf: At least on my Netbook (Win7 64bit,
Pentium 1.5GHz) it is very slow. It takes more than 3 hrs to create git-doc.pdf.

If you want to have a quick look on the resulting pdf just clone 
https://github.com/tacker66/git-docpdf.git. This repo contains
a current version of user.manual.pdf and git-doc.pdf 


- Original Nachricht 
Von: Jeff King p...@peff.net
An:  Thomas Ackermann th.acke...@arcor.de
Datum:   06.10.2012 21:32
Betreff: Re: [Patch 0/5] Create single PDF for all HTML files

 On Sat, Oct 06, 2012 at 05:51:15PM +0200, Thomas Ackermann wrote:
 
  I wanted to have a single PDF file which contains the complete Git
 documentation 
  (except user-manual) for easier reading on my tablet. The simplest way to
 do 
  this was by using wkhtmltopdf which can combine a set of HTML files into a
 sinlge 
  PDF file and also apply some reformatting. To this end HTML files for all
 the missing 
  files in Documentation/technical and Documentation/howto and also for all
 the 
  release notes in Documentation/RelNotes were created. 
 
 It seems like a reasonable goal. I do not have a strong opinion on the
 approach or how the final output looks, but I wasn't able to actually
 get output at all after applying your patches. Running make fullpdf
 (after installing dblatex) got me:
 
   The switch --book, is not support using unpatched qt, and will be
   ignored.The switch --footer-html, is not support using unpatched qt,
   and will be ignored.The switch --disable-external-links, is not
   support using unpatched qt, and will be ignored.
 
 after which wkhtmltopdf began pegging my CPU. I let it run for 10
 minutes before giving up.
 
 Another way of doing this would be to format the individual troff
 manpages into dvi or postscript, convert that into pdf, and then
 concatenate that. Something like:
 
   for i in *.[157]; do
 man -Tdvi -l $i $i.dvi
 dvipdfm $i
   done
   pdftk *.[157].pdf cat output full.pdf
 
 works for me, though obviously that does not handle some of the non-man
 items you included. No idea on how the output compares to yours, but
 it's something you may want to look at.
 
 -Peff
 

---
Thomas
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 0/5] Create single PDF for all HTML files

2012-10-06 Thread Jeff King
On Sat, Oct 06, 2012 at 05:51:15PM +0200, Thomas Ackermann wrote:

 I wanted to have a single PDF file which contains the complete Git 
 documentation 
 (except user-manual) for easier reading on my tablet. The simplest way to do 
 this was by using wkhtmltopdf which can combine a set of HTML files into a 
 sinlge 
 PDF file and also apply some reformatting. To this end HTML files for all the 
 missing 
 files in Documentation/technical and Documentation/howto and also for all the 
 release notes in Documentation/RelNotes were created. 

It seems like a reasonable goal. I do not have a strong opinion on the
approach or how the final output looks, but I wasn't able to actually
get output at all after applying your patches. Running make fullpdf
(after installing dblatex) got me:

  The switch --book, is not support using unpatched qt, and will be
  ignored.The switch --footer-html, is not support using unpatched qt,
  and will be ignored.The switch --disable-external-links, is not
  support using unpatched qt, and will be ignored.

after which wkhtmltopdf began pegging my CPU. I let it run for 10
minutes before giving up.

Another way of doing this would be to format the individual troff
manpages into dvi or postscript, convert that into pdf, and then
concatenate that. Something like:

  for i in *.[157]; do
man -Tdvi -l $i $i.dvi
dvipdfm $i
  done
  pdftk *.[157].pdf cat output full.pdf

works for me, though obviously that does not handle some of the non-man
items you included. No idea on how the output compares to yours, but
it's something you may want to look at.

-Peff
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html