Pierre Labastie wrote:
On 01/03/2017 11:56, Jeremy Henty wrote:
Is there a reason why there is no PDF of the BLFS book at the download
site[1]?  The  LFS download site[2]  has a PDF  of the LFS  book.  Why
should there be a difference between the two?

[1] http://www.linuxfromscratch.org/blfs/downloads/8.0/
[2] http://www.linuxfromscratch.org/lfs/downloads/8.0/

Bruce may answer more completely than I, but I think generating
a pdf book needs a lot of tweaks (to have lines fit on the page width,
specially). For LFS, this is manageable, but for BLFS, the book is to
big and its layout changes too often.

The above is correct, but in addition, I think the pdf version is too big to be useful. It is over 2000 pages. Copy/paste in pdf versions of LFS are problematical, so the same is probably true for a BLFS pdf.

That said, a user always has to option of creating a pdf version of the book using the instructions in the LFS Makefile as a template:

RENDERTMP=$(HOME)/tmp
BASEDIR=~/blfs-book
PDF_OUTPUT=BLFS-BOOK.pdf
REV=sysv   # or systemd
ROOTID=

   echo "Creating and cleaning $(RENDERTMP)"
   mkdir -p $(RENDERTMP)
   rm -f $(RENDERTMP)/*lfs*.xml
   rm -f $(RENDERTMP)/*wget*
   rm -f $(RENDERTMP)/*md5sum*
   rm -f $(RENDERTMP)/*pdf.fo

   echo "Adjusting for revision $(REV)..."
   xsltproc --nonet                               \
            --xinclude                            \
            --output $(RENDERTMP)/blfs-html2.xml  \
            --stringparam profile.revision $(REV) \
            stylesheets/lfs-xsl/profile.xsl       \
            index.xml

   echo "Validating the book..."
   xmllint --nonet                       \
           --noent                       \
           --postvalid                   \
           -o $(RENDERTMP)/blfs-full.xml \
           $(RENDERTMP)/blfs-html2.xml

   echo "Generating profiled XML for PDF..."
   xsltproc --nonet \
            --stringparam profile.condition pdf \
            --output $(RENDERTMP)/blfs-pdf.xml  \
            stylesheets/lfs-xsl/profile.xsl     \
            $(RENDERTMP)/blfs-html2.xml

   echo "Generating FO file..."
   xsltproc --nonet                            \
            --stringparam rootid "$(ROOT_ID)"  \
            --output $(RENDERTMP)/blfs-pdf.fo  \
            stylesheets/blfs-pdf.xsl           \
            $(RENDERTMP)/blfs-pdf.xml

   echo "Generating PDF file..."
   mkdir -p $(BASEDIR)

   fop -q  $(RENDERTMP)/blfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log
   echo "$(BASEDIR)/$(PDF_OUTPUT) created"


# Not tested

  -- Bruce


--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to