[Booki-dev] xinha config and page break after

adam hyde adam at flossmanuals.net
Tue Jun 22 05:59:13 PDT 2010


objavi II supports many more options for page layout than objavi I, so i
think we should use xinha a bit more for controlling layout options in
the chapter source...we can actually support the rendering of equations
etc produced by xinha as well as foot notes etc...so i think we should
use this for the xina config as listed in the template
lib/booki/editor/templates/editor/edit_book.html


----------------
xinha_config.pageStyle = 'body {font-family : trebuchet,verdana,
sans-serif; font-size: 12px; line-height:17px;}' + 'h1 {font-size:
24px;font-family : Arial,verdana, sans-serif; font-weight : Bold;
margin-bottom: 10px;  margin-top: 0px; line-height: 32px;
letter-spacing: -1px; }' + 'h2 {font-size: 18px; font-family :
Arial,verdana, sans-serif; font-weight : Bold; margin-bottom: 10px;
margin-top: 15px; padding-top : 15px;}' + 'h3 {font-size:
14px;font-family : Arial,verdana, sans-serif;font-weight :
Bold;margin-bottom: 5px; }' + 'pre { font-size:12px; line-height:1.5em;
background-color:#FFE5CC; border: 0px solid #000000; margin-left :
0.5em; margin-bottom : 20px; margin-right : 1em; padding-left: 1em;
padding-right: 1em; padding-top: 0.2em; padding-bottom: 0.2em; color :
black; white-space: pre-wrap; white-space: -moz-pre-wrap;white-space:
-pre-wrap;white-space: -o-pre-wrap; word-wrap: break-word;}' + 'ul, li
{margin-bottom: 5px; margin-top: 0px;}';

        xinha_config.toolbar =
[["popupeditor"],["formatblock","fontname","fontsize","bold","italic","underline","strikethrough","forecolor","hilitecolor"],["separator","outdent","indent"],["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],["separator","insertorderedlist","insertunorderedlist"],["separator","createlink","bookiinsert", "inserttable"],(Xinha.is_gecko?[]:["cut","copy","paste","overwrite","saveas"]),["separator","removeformat","killword"],["separator","htmlmode","showhelp","print"]];
----------------


what we should do is make the font drop down list all the fonts that
objavi can handle and also i think we might be able to use xinha to work
around the widows and orhpans issues for now since xinha has a page
break option that objavi II recognises. If you use this widget (now in
the edit interface for xinha at booki.cc) it produces this code:
  <div style="font-size: 1px; page-break-after: always; height: 1px;
background-color: rgb(192, 192, 192);" title="Page Break">
  </div>

this actually creates a page break as expected and hence we can use it
to control page layout to some degree. there are at least 2 issues here
as i see it:
1. the default book PDF css should override the background-color
attribute (while it is necessary to see the page break in the xinha
editor we dont want to see it as a grey line in books unless we
stipulate that)
2. the table of contents created by Objavi II does not account for an
extra page if this tool is used although an extra page is produced. 

there are actually a lot of errors being produced with objavi and the
table of contents - but maybe we can talk about those in irc

adam







 



 
-- 
Adam Hyde
Founder FLOSS Manuals
German mobile : + 49 177 4935122
Email : adam at flossmanuals.net
irc: irc.freenode.net #flossmanuals

"Free manuals for free software"
http://www.flossmanuals.net/about





More information about the Booki-dev mailing list