Description of problem: I am using Publican3.2 on Centos6. When I use docname in publican.cfg to override the <title> tag in the Book_Info.xml and run the following command, publican build --formats html,pdf --langs en-US --config publican.cfg I get the following error: Cannot locate main XML file: '<value of docname>.xml' at /bin/publican line 936. Version-Release number of selected component (if applicable): How reproducible: Easy to reproduce. For me atleast. Steps to Reproduce: 1. Create a book 2. Add docname to publican.cfg 3. Run command 'publican build --formats html,pdf --langs en-US --config publican.cfg' Actual results: Cannot locate main XML file: '<value of docname>.xml' at /bin/publican line 936. Expected results: The title should be different from the book name Additional info:
Hi Cheryl -- this isn't a bug -- Publican lets you decouple the document title from the name of the package that deploys the document (with the docname parameter that you've found), but also to use any arbitrary XML file as the top of the XML tree for the book (with the mainfile parameter). In this case, just add an extra line to your publican.cfg to point Publican to the mainfile of the doc. For example, if your project is set up with Bar.xml and Bar.ent as the main XML and entity files, but you want to use Foo as the docname, set: docname: Foo mainfile: Bar Does this work for you now?
Hi, Thanks for your quick response! I followed what you said. In addition to 'docname', I also added 'mainfile'. I'm not getting the "Cannot locate main XML file ..." error anymore and everything builds fine. HOWEVER, the <title> in BookInfo.xml does not get overridden with the value of 'docname' Steps to Reproduce: 1. Create a book 2. Add docname and mainfile to publican.cfg 3. Run command 'publican build --formats html,pdf --langs en-US --config publican.cfg' Actual results: The <title> remains the same Expected results: The title should grab the docname value from publican.cfg
Right, but that's not what docname is for: it's an override used for RPM packaging. If you want to change the title of the doc, you just need to change whatever's in the <title> tags in the Book_Info.xml file. So Publican lets you set whatever you want as the <title> for the doc, and decouple this from the name of the mainfile of the doc, and from the RPM package name used to deploy the doc (they can be three different things if you really want).
Ok, this works. thanks!