Important — Availability in repositories
su -
$
yum install publican publican-doc
$
yum install publican-brand
redhat
, fedora
, jboss
, ovirt
, or gimp
. Refer to Chapter 5, Branding for more information on branding.
Important — Unsupported software
Important — Dependencies available only internally to Red Hat
su -
$
yum install publican publican-doc
$
yum install publican-brand
redhat
, fedora
, jboss
, ovirt
, or gimp
. Refer to Chapter 5, Branding for more information on branding.
$
sudo apt-get install publican
su -
$
apt-get install publican
$
publican -v
version=2.8
Important — Installing more recent packages using Apt-Pinning
su -
/etc/apt/sources.list
file in a text editor. For example, to edit the file in gedit run:
$
gedit /etc/apt/sources.list
#### testing ######### deb http://ftp.us.debian.org/debian testing main contrib non-free
/etc/apt/preferences
file in a text editor. For example, to edit the file in gedit run:
$
gedit /etc/apt/preferences
Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin: release a=testing Pin-Priority: 400 Package: * Pin: release o=Debian Pin-Priority: -10
$
apt-get update
$
apt-get -t testing install publican
Which indicates that you might need to upgrade libxml2 and libxslt to the testing repository version too. This can be done by searching to find the likely library:$
publican
Warning: program compiled against libxml 209 using older 208
Warning: XML::LibXML compiled against libxml2 20901, but runtime libxml2 is older 20800
Warning: program compiled against libxml 209 using older 208
Warning: XML::LibXSLT compiled against libxslt 10128, but runtime libxslt is older 10126
Can't open publican: No such file or directory at /usr/bin/publican line 430.
(and the same again for libxml2)$
apt-get search libxslt
gambas3-gb-xml-xslt - Gambas XSLT component
libidzebra-2.0-mod-alvis - IDZebra filter alvis (XSLT filter for XML)
libidzebra-2.0-mod-dom - IDZebra filter 'dom' (XML DOM internal document model with XSLT)
libical-parser-html-perl - generates HTML calendars from iCalendars
libxsltc-java - XSL Transformations (XSLT) compiler from Xalan-Java
libxml-filter-xslt-perl - Perl module for XSLT as a SAX Filter
libxml-libxslt-perl - Perl interface to the GNOME libxslt library
libxslt1-dbg - XSLT 1.0 processing library - debugging symbols
libxslt1-dev - XSLT 1.0 processing library - development kit
libxslt1.1 - XSLT 1.0 processing library - runtime library
python-libxslt1 - Python bindings for libxslt1
python-libxslt1-dbg - Python bindings for libxslt1 (debug extension)
python-lxml - pythonic binding for the libxml2 and libxslt libraries
python-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
python-lxml-doc - pythonic binding for the libxml2 and libxslt libraries (documentation)
python3-lxml - pythonic binding for the libxml2 and libxslt libraries
python3-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
php5-xsl - XSL module for php5
libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxslt
libsp-gxmlcpp1 - S+P C++ wrapper for Gnome libxml2/libxslt
swfmill - xml2swf and swf2xml processor
libxslthl-java - XSLT syntax highlighting
$
apt-get -t testing upgrade libxml2 libxslt1.1
$
sudo zypper install perl-Config-Simple perl-DateTime \ perl-DateTime-Format-DateParse perl-DBD-SQLite perl-DBI \ perl-File-Find-Rule perl-File-Which perl-HTML-Format \ perl-Locale-MakeText-Gettext perl-Template-Toolkit \ perl-Test-Deep perl-Test-Pod perl-XML-LibXSLT \ perl-YAML liberation-fonts
Note
Liberation-fonts
is most likely already installed, but it is required. Zypper will not reinstall it if it is already present.
$
sudo sh cpan File::pushd File::Copy::Recursive Locale::PO pp \ Syntax::Highlight::Engine::Kate XML::TreeBuilder exit
$
cd ~ mkdir -p SourceCode/publican cd SourceCode/publican svn checkout http://svn.fedorahosted.org/svn/publican/branches/publican-2x ./
$
perl Build.PL
WARNING: the following files are missing in your kit:
META.yml
Please inform the author.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Publican' version '2.9'
File/pushd.pm
is reported as missing, you would use this to install it:
$
sudo sh cpan File::pushd exit
Build.PL
script will have created a new script named Build
which we will use to create, test and install Publican 2.9.
$
./Build
DEBUG: Publican::Builder: end of build
$
./Build test
Test Summary Report
-------------------
t/910.publican.Users_Guide.t (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 5
Non-zero exit status: 1
t/pod-coverage.t (Wstat: 256 Tests: 9 Failed: 1)
Failed test: 7
Non-zero exit status: 1
Files=10, Tests=68, 420 wallclock secs ( 0.31 usr 0.17 sys + 246.87 cusr 18.73 csys = 266.08 CPU)
Result: FAIL
Failed 2/10 test programs. 2/68 subtests failed.
ghostscript-fonts-std
as opposed to ghostscript-fonts
) wkhtmltopdf will not run even if force installed with no dependency checks.
Note
$
JFEARN=http://jfearn.fedorapeople.org/wkhtmltopdf/f15 MYSYSTEM=i686 ## For 64bit system use MYSYSTEM=x86_64 instead. wget $JFEARN/$MYSYSTEM/wkhtmltopdf-qt-4.7.1-1.git20110804.fc15.i686.rpm wget $JFEARN/$MYSYSTEM/wkhtmltopdf-0.10.0_rc2-1.fc15.i686.rpm
Note
MYSYSTEM
appropriately.
$
sudo sh rpm -ivh wkhtmltopdf-qt* rpm -ivh --nodeps wkhtmltopdf-0* exit
ghostscript-fonts
problem described above.
$
sudo sh ./Build test exit
$
publican create --type=book --product=testing --version=1.2.3 --name=TestPublican
Processing file en-US/Author_Group.xml -> en-US/Author_Group.xml Processing file en-US/Book_Info.xml -> en-US/Book_Info.xml Processing file en-US/Chapter.xml -> en-US/Chapter.xml Processing file en-US/Preface.xml -> en-US/Preface.xml Processing file en-US/Revision_History.xml -> en-US/Revision_History.xml Processing file en-US/TestPublican.xml -> en-US/TestPublican.xml$
cd TestPublican/ publican build --lang=all --formats=html,html-single,html-desktop,txt,pdf,epub
Note
runtime error: file /usr/share/publican/xsl/epub.xsl element choose
Variable 'epub.embedded.fonts' has not been declared.
at /usr/lib/perl5/site_perl/5.14.2/Publican/Builder.pm line 915
SourceCode/TestPublican/tmp/en-US/
and view the various output formats that you find there.
Note
This will take some time, as it downloads a fedora based container, and then the dependencies needed for publican$
docker pull svendowideit/publican
$
echo 'alias publican="docker run -t -i -v $(pwd):/mnt svendowideit/publican"' >> ~/.bashrc
$
publican --version
version=3.2.1
Publican-Installer-version.exe
.
Publican-Installer-version.exe
file.
Main
in the installer window), a number of brands (including RedHat
, JBoss
, and fedora
), and two DocBook components (the DocBook Data Type Definition (DTD) and DocBook Extensible Stylesheet Language (XSL) stylesheets). The three brands are grouped under the collapsible heading Brands
and the DocBook components are grouped under the collapsible heading DocBook
in the installer window. Refer to Chapter 5, Branding for an explanation of brands in Publican. Publican uses the DTD and the XSL stylesheets to render XML documents in other presentation formats (such as HTML and PDF). If you do not install these components, Publican must download this data from the Internet every time it processes a document, which creates lengthy delays.
Publican
within the %ProgramFiles%
folder of your computer — typically C:\Program Files\Publican
. You can manually edit the path displayed in the Destination Folder box to select a different folder.
Completed
.
Note
/opt/local
, away from your normal OS files.
$
sudo port install
docbook-xml docbook-xsl docbook-sgml-4.2 perl5 bash-completion p5-file-pushd p5-config-simple p5-file-find-rule p5-file-slurp p5-class-trigger p5-time-hires p5-list-moreutils p5-ipc-run3 p5-class-accessor p5-test-perl-critic p5-xml-libxslt p5-locale-gettext p5-image-size p5-file-copy-recursive p5-datetime p5-archive-zip p5-timedate p5-html-format p5-dbd-sqlite p5-xml-simple p5-devel-cover p5-test-pod p5-test-pod-coverage p5-template-toolkit
$
sudo cpan
Locale::Maketext::Gettext Locale::PO DateTime::Format::DateParse Syntax::Highlight::Engine::Kate XML::TreeBuilder File::Inplace String::Similarity HTML::FormatText::WithLinks::AndTables
$
sudo port install
fop
$
echo
"FOP_OPTS='-Xms50m -Xmx700m'" > ~/.foprc
/Users/yourusername
$
git clone
git://git.fedorahosted.org/publican.git
$
cd
publican/publican
Build.pl
. Verify that you are in the correct directory, then run the following command. Ignore all the messages you get.
$
perl ./Build.PL
$
./Build
/opt/local
:
$
sudo ./Build install
Procedure 1.1. Create and build a book
$
publican create
--name=testbook
$
cd testbook
$
publican build
--formats=html --langs=en-US
tmp/en-US/html/index.html
file in a browser to prove that it built correctly.
Procedure 1.2. Install a brand
$
find /opt/local/share/publican
-type f
|xargs sudo chmod 644
$
cd publican/publican-jboss
$
publican build
--formats=xml --langs=all --publish
$
sudo publican install_brand
--path=/opt/local/share/publican/Common_Content
publican.cfg
file or specifying the --brand
option when creating your book.