============================================================================================================================== How to install Publican and produce pdf and html files in various translated languages | Dimitris Tzemos ============================================================================================================================== files including this guide are on http://people.salixos.org/djemos/startup-guide/files-fonts/ A. Installation of Publican and deps ===================================== 1. Installation of publican Just run as root publican-install-slackware-13.37.sh (download from http://people.salixos.org/djemos/startup-guide/files-fonts/publican-install-slackware-13.37.sh) 2. Then read section B. Produce pdf and html docs bellow in this quide. thats all !!! In case there are any problems Read the rest quide. ========================= Detailed quide ========================= 1. Run as root the publican-install.sh ( download from http://people.salixos.org/djemos/startup-guide/files-fonts/publican-install.sh) or Make a coffee until finished. 2. After this install the following fonts http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-batang-fonts-2.2-30.fc15.noarch.tgz http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-fonts-common-2.2-30.fc15.noarch.tgz http://people.salixos.org/djemos/startup-guide/files-fonts/baekmuk-ttf-hline-fonts-2.2-30.fc15.noarch.tgz http://people.salixos.org/djemos/startup-guide/files-fonts/cjkuni-uming-fonts-0.2.20080216.1-47.fc15.noarch.tgz 3. install jdk with slapt-get -i jdk 4. with slapt-src install the following packages slapt-src -i ant-contrib slapt-src -i apache-ant slapt-src -i xmlgen 5. 5.1 As root, untar fop-1.0-src.tar.gz in /usr/local (download file from http://people.salixos.org/djemos/startup-guide/files-fonts/fop-1.0-src.tar.gz) 5.2 cd to /usr/local/fop-1.0 5.3 to build fop type ant 6. 6.1 Edit /etc/profile.d/jdk.sh and add the lines in the end of the file. CLASSPATH=$CLASSPATH:/usr/local/fop-1.0/build/fop.jar export CLASSPATH 6.2 Save it and run source /etc/profile.d/jdk.sh so CLASSPATH is known to the system 7. 7.1 Unzip the file offo-hyphenation-fop-stable_v1.2.zip and copy fop-hyph.jar to /usr/local/fop-1.0/lib/ (download file from http://people.salixos.org/djemos/startup-guide/files-fonts/offo-hyphenation-fop-stable_v1.2.zip) 7.2 create a link ln -sf /usr/local/fop-1.0/fop /usr/bin/fop so publican can find fop script. 8. Install the following packages with slapt-src with that order slapt-src -i perl-Probe-Perl slapt-src -i perl-IPC-Run3 slapt-src -i perl-Test-Script slapt-src -i perl-File-Which 9. 9.1 Download from svn startup-guide svn co https://salix.svn.sourceforge.net/svnroot/salix/startup-guide/trunk/ 9.2 Enter inside trunk folder cd trunk 9.3 As root, Move publican-SalixOS to /usr/share/publican/Common_Content mv publican-SalixOS /usr/share/publican/Common_Content 10. Then go in file /usr/share/publican/xsl/defaults.xsl and turn draft mode off to not appear the druft background image in every pdf page. To turn draft mode off, change yes to no in line 49 of /usr/share/publican/xsl/defaults.xsl like bellow. no Thats all !!! B. Produce pdf and html docs ============================= 11. Now run from trunk directory as normal user publican build --langs=en-US --formats=pdf,html You will find the pdf in tmp folder under trunk folder 12. 12.1 To build pdf's in other languages (e.g greek) move or copy el-GR folder under /usr/share/publican/Common_Content/publican-SalixOS to /usr/share/publican/Common_Content/common mv /usr/share/publican/Common_Content/publican-SalixOS/el-GR /usr/share/publican/Common_Content/common The el-GR folder has the 3 translated files in greek. Legal_Notice.xml, Feedback.xml, Conventions.xml The same has to be done for every language file 12.2 Run build --langs=el-GR --formats=pdf,html to create greek pdf and html or run publican build --langs=en-US,el-GR --formats=html,pdf to create html and pdf for en-US and el-GR langs 13. 13.1 Upload your pdf files in a dir in your server 13.2 Upload the folder html under tmp in the trunk directory on your web server and put a link in your web page so users can visit and read the guide. e.g for Greek pdf file http://people.salixos.org/djemos/startup-guide/pdf/el-GR/SalixOS-13.37-Startup_Guide-el-GR.pdf for Greek html pages http://people.salixos.org/djemos/startup-guide/el/ for English pdf file http://people.salixos.org/djemos/startup-guide/pdf/en-US/SalixOS-13.37-Startup_Guide-en-US.pdf for English html pages http://people.salixos.org/djemos/startup-guide/en-US Dimitris