понедельник, 2 июля 2018 г.

DocBook on FreeBSD: installation and Hello World!

Preface

After a couple times when LibreOffice 5 accidentally and totally removed the content of my files during Ctrl+S, I decided to switch to DocBook.

This form of documents writing and styling looks hard, but I believe that ed(1) is much more stable than LibreOffice. XML files (DocBook is just a set of tags) is much easier for version control and so on. I'm feared about styling a bit for now...

Algorithm

But, let's talking about installation. How to generate the Hello World PDF?

1. Install all the next DocBook packages

docbook-1.5
docbook-sgml-4.5_1
docbook-utils-0.6.14_13
docbook-xml-5.0_3
docbook-xsd-1.0.b1
docbook-xsl-1.76.1,1
docbook-xsl-ns-1.78.1_4
dsssl-docbook-modular-1.79_1,1
sdocbook-xml-1.1_2,2

2. Install fop and satellites

I'm not sure which of these packages is required for fop. But fop will save your day when jade (docbook2* tools) can only out tons of error messages like this.
Script started on Tue Jul  3 08:48:30 2018
Command: docbook2pdf shortest.xml
Using catalogs: /usr/local/share/sgml/catalog, /usr/local/share/sgml/iso8879/catalog, /usr/local/share/sgml/docbook/4.5/catalog, /usr/local/share/sgml/docbook/dsssl/modular/print/catalog, /usr/local/share/sgml/docbook/dsssl/modular/html/catalog, /usr/local/share/sgml/docbook/dsssl/modular/dtds/html/catalog, /usr/local/share/sgml/docbook/dsssl/modular/common/catalog, /usr/local/share/sgml/docbook/dsssl/modular/catalog, /usr/local/share/sgml/docbook/catalog, /usr/local/share/sgml/jade/catalog
Using stylesheet: /usr/local/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /home/vblinkov/projects/dbk/shortest.xml
jade:/home/vblinkov/projects/dbk/shortest.xml:3:56:E: URL not supported by this version
jade:/home/vblinkov/projects/dbk/shortest.xml:3:56:E: DTD did not contain element declaration for document type name
jade:/home/vblinkov/projects/dbk/shortest.xml:4:9:E: there is no attribute "id"
jade:/home/vblinkov/projects/dbk/shortest.xml:4:18:E: element "book" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:5:9:E: element "title" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:6:15:E: there is no attribute "id"
jade:/home/vblinkov/projects/dbk/shortest.xml:6:22:E: element "chapter" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:7:12:E: element "title" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:8:11:E: element "para" undefined
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:8:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:9:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:10:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:11:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:12:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:13:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:14:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:15:28:E: "1257" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:16:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:17:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:18:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:19:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:20:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:21:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:22:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:23:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:24:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:25:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:26:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:27:28:E: "1089" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:28:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:29:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:30:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:31:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:32:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:33:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:34:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:35:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:36:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:37:28:E: "1046" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:38:28:E: "1078" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:39:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:40:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:41:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:42:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:43:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:44:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:45:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:46:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:47:28:E: "1063" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:48:28:E: "1063" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:49:28:E: "1095" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:50:28:E: "1198" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:51:28:E: "1199" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:54:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:55:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:56:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:57:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:58:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:59:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:60:28:E: "1198" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:61:28:E: "1199" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:62:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:63:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:64:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:65:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:66:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:67:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:68:28:E: "1257" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:69:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:70:28:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:71:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:72:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:73:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:74:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:75:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:76:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:77:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:78:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:79:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:80:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:81:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:84:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:85:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:86:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:87:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:88:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:91:28:E: "1045" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:92:28:E: "1077" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:93:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:94:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:95:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:96:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:97:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:98:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:99:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:100:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:101:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:102:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:103:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:104:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:105:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:106:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:107:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:108:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:109:28:E: "1062" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:110:28:E: "1094" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:111:28:E: "1094" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:112:28:E: "1062" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:113:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:114:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:115:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:116:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:117:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:118:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:119:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:120:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:121:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:122:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:123:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:124:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:125:28:E: "1089" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:126:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:127:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:129:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:130:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:131:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:132:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:133:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:136:31:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:137:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:138:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:139:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:140:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:141:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:142:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:143:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:144:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:145:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:146:28:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:147:34:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:148:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:149:33:E: "1088" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:150:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:151:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:152:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:153:29:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:154:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:155:28:E: "1054" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:156:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:157:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:158:28:E: "1046" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:159:28:E: "1078" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:160:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:161:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:162:29:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:163:29:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:164:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:165:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:166:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:167:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:168:28:E: "1069" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:169:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:170:29:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:171:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:172:29:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:173:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:174:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:175:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:176:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:177:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:178:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:179:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:180:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:69:11:E: general entity "Appendix" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:70:15:E: general entity "appendix" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:77:11:E: general entity "Chapter" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:78:15:E: general entity "chapter" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:79:35:E: general entity "Equation" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:80:35:E: general entity "Example" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:81:35:E: general entity "Figure" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:85:35:E: general entity "Part" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:87:35:E: general entity "Procedure" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:88:35:E: general entity "Reference" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:90:11:E: general entity "Section" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:91:15:E: general entity "section" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:110:39:E: general entity "sidebar" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:111:35:E: general entity "step" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:112:35:E: general entity "Table" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:120:34:E: general entity "xrefto" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:121:30:E: general entity "nonexistantelement" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:122:13:E: general entity "unsupported" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:132:16:E: general entity "in" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:150:35:E: general entity "Abstract" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:151:33:E: general entity "Answer" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:153:34:E: general entity "Article" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:154:38:E: general entity "Bibliography" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:155:31:E: general entity "Book" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:157:34:E: general entity "Caution" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:159:35:E: general entity "Copyright" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:160:36:E: general entity "Dedication" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:161:34:E: general entity "Edition" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:165:35:E: general entity "Glossary" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:166:35:E: general entity "GlossSee" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:167:38:E: general entity "GlossSeeAlso" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:168:35:E: general entity "Important" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:169:32:E: general entity "Index" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:170:35:E: general entity "Colophon" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:171:35:E: general entity "SetIndex" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:173:37:E: general entity "LegalNotice" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:174:33:E: general entity "MsgAud" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:175:35:E: general entity "MsgLevel" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:176:34:E: general entity "MsgOrig" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:177:31:E: general entity "Note" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:179:34:E: general entity "Preface" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:181:34:E: general entity "Published" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:182:35:E: general entity "Question" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:185:34:E: general entity "RefName" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:186:36:E: general entity "RevHistory" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:190:40:E: general entity "RefSynopsisDiv" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:191:35:E: general entity "Revision" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:199:32:E: general entity "see" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:200:35:E: general entity "seealso" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:201:30:E: general entity "Set" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:202:34:E: general entity "Sidebar" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:205:30:E: general entity "Tip" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:206:30:E: general entity "TableofContents" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:207:34:E: general entity "Warning" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:217:34:E: general entity "unexpectedelementname" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:372:32:E: general entity "ListofTables" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:373:34:E: general entity "ListofExamples" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:374:33:E: general entity "ListofFigures" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:375:35:E: general entity "ListofEquations" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:384:30:E: general entity "ListofUnknown" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:399:33:E: general entity "Editedby" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:402:34:E: general entity "Revisedby" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:407:27:E: general entity "and" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:413:34:E: general entity "Pgs" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:415:32:E: general entity "Notes" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:417:38:E: general entity "TableNotes" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:425:28:E: general entity "nav-prev" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:428:28:E: general entity "nav-prev-sibling" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:431:28:E: general entity "nav-next-sibling" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:434:28:E: general entity "nav-next" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:437:28:E: general entity "nav-up" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:440:28:E: general entity "nav-home" not defined and no default entity

Command exit status: 8
Script done on Tue Jul  3 08:48:30 2018
So, just install the next packages to avoid this headache: xmlto (lifesaver!), tex-xmltex, libxslt, fop (a thingie for xmlto).

Do not forget to rehash if you use the tcsh.

3. Create the first book

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book id="csnpro1">
   <title>Alternative Computer Science</title>
   <chapter id="intro">
      <title>The Intro</title>
      <para>Just one line of text.</para>
   </chapter>
</book>
Save it under /tmp/hello.xml for example and cd to /tmp/.

4. Compile the book

Probably, you will want to create a Makefile for your book project ;-)

4.1. Compile FO from XML

xmlto fo hello.xml
This will generate hello.fo file.

4.2. Compile PDF from FO

fop hello.fo -pdf hello.pdf
This will generate desired hello.pdf.

Appendix

A1. Makefile

pdf:
 xmlto fo hello.xml
 fop hello.fo -pdf hello.pdf

show:
 atril hello.pdf &

all: pdf
To create a PDF file from a DocBook one use the next command
make
or the next one.
make pdf
To open created PDF file in your favorite documents viewer use
make show
It is possible to compile PDF and open it using the one command.
make pdf show

Many thanks to:

1. https://www.xul.fr/en-xml-docbook.php#example
2. https://sourceforge.net/p/libusb/mailman/message/10722501/
3. https://forums.gentoo.org/viewtopic-t-187340-start-0.html



Комментариев нет:

Отправить комментарий