[docbook-apps] Listitem overwrites text in orderedlist
Hi everybody, I'm just learning, since 3 months, to use docbook and to write the stylesheets. Now I have this problem: in the orderedlist of the FO the distance from the listitem to the text is not dynamic and if the listitem number (dot included) takes more space because it's made by 2 or more numbers (eg. 16. instead of 1.) it enters in the text space and mixes with it, in other words overwrites the text. I'm not able to find a property of the list block to arrange this problem, or (more probably) I'm using it in a wrong way. I tried in these ways, but without success: /1)/ xsl:attribute-set name=list.block.spacing xsl:attribute name=space-after20px/xsl:attribute /xsl:attribute-set /2)/ !--xsl:attribute-set name=list.item.label xsl:attribute name=margin-right20/xsl:attribute /xsl:attribute-set-- /3)//(I've found this one in a website)/ xsl:attribute-set name=list.label.spacing xsl:attribute name=right xsl:choose xsl:when test=self::orderedlist2em/xsl:when xsl:otherwise0pt/xsl:otherwise /xsl:choose /xsl:attribute /xsl:attribute-set-- I even tried with different properties of each attribute-set... Have you ever had this problem? Do you have any suggestion? Matteo
Re: [docbook-apps] Listitem overwrites text in orderedlist
Hi Matteo, Setting orderedlist.label.width, http://docbook.sourceforge.net/release/xsl/current/doc/fo/orderedlist.label.width.html, seemed to help. Setting that to 1.8em instead of the default 1.2em seemed to fix the problem for lists having a double-digit number of items, http://sources.forgerock.org/changelog/commons?cs=433, at least in my case. Perhaps the exact setting will be different for you. Hope it helps. Regards, Mark On Oct 1, 2013, at 8:29 AM, Matteo Regazzo wrote: Hi everybody, I'm just learning, since 3 months, to use docbook and to write the stylesheets. Now I have this problem: in the orderedlist of the FO the distance from the listitem to the text is not dynamic and if the listitem number (dot included) takes more space because it's made by 2 or more numbers (eg. 16. instead of 1.) it enters in the text space and mixes with it, in other words overwrites the text. I'm not able to find a property of the list block to arrange this problem, or (more probably) I'm using it in a wrong way. I tried in these ways, but without success: 1) xsl:attribute-set name=list.block.spacing xsl:attribute name=space-after20px/xsl:attribute /xsl:attribute-set 2) !--xsl:attribute-set name=list.item.label xsl:attribute name=margin-right20/xsl:attribute /xsl:attribute-set-- 3)(I've found this one in a website) xsl:attribute-set name=list.label.spacing xsl:attribute name=right xsl:choose xsl:when test=self::orderedlist2em/xsl:when xsl:otherwise0pt/xsl:otherwise /xsl:choose /xsl:attribute /xsl:attribute-set-- I even tried with different properties of each attribute-set... Have you ever had this problem? Do you have any suggestion? Matteo
Re: [docbook-apps] Listitem overwrites text in orderedlist
On Tue, October 1, 2013 7:29 am, Matteo Regazzo wrote: I'm just learning, since 3 months, to use docbook and to write the stylesheets. Now I have this problem: in the orderedlist of the FO the distance from the listitem to the text is not dynamic and if the listitem number (dot included) takes more space because it's made by 2 or more numbers (eg. 16. instead of 1.) it enters in the text space and mixes with it, in other words overwrites the text. I'm not able to find a property of the list block to arrange this problem, or (more probably) I'm using it in a wrong way. ... I even tried with different properties of each attribute-set... Have you ever had this problem? Do you have any suggestion? You want to set the combination of 'provisional-distance-between-starts', 'provisional-label-separation', and the label's 'start-indent'. See the graphic at http://www.w3.org/TR/xsl11/#d0e12377. FYI, the Print and Page Layout Community Group at the W3C has developed an XSLT extension function for running an XSL formatter (FOP only so far) to get an area tree that you can use mid-transform to work out the formatted size of things. One of the motivations is adjusting the width of list item labels: http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt#Example_4_-_List_item_label_width Regards, Tony Graham tgra...@mentea.net Consultant http://www.mentea.net Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- XML, XSL-FO and XSLT consulting, training and programming Chair, Print and Page Layout Community Group @ W3C - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Listitem overwrites text in orderedlist
Thank you Mark, I tried to add /xsl:param name=orderedlist.label.width1.8em/xsl:param/ and it has immediately worked. Thanks even to Tony Graham, I tried to understand how to integrate your customization in my stylesheet (and I even tried to do it), but I'm too young on using these instruments and even if it's surely more interesting to have a customized regulation on every list, I need to improve my knowledge before... Thank you again, Matteo Il 01/10/2013 09:52, Mark Craig ha scritto: Hi Matteo, Setting orderedlist.label.width, http://docbook.sourceforge.net/release/xsl/current/doc/fo/orderedlist.label.width.html, seemed to help. Setting that to 1.8em instead of the default 1.2em seemed to fix the problem for lists having a double-digit number of items, http://sources.forgerock.org/changelog/commons?cs=433, at least in my case. Perhaps the exact setting will be different for you. Hope it helps. Regards, Mark On Oct 1, 2013, at 8:29 AM, Matteo Regazzo wrote: Hi everybody, I'm just learning, since 3 months, to use docbook and to write the stylesheets. Now I have this problem: in the orderedlist of the FO the distance from the listitem to the text is not dynamic and if the listitem number (dot included) takes more space because it's made by 2 or more numbers (eg. 16. instead of 1.) it enters in the text space and mixes with it, in other words overwrites the text. I'm not able to find a property of the list block to arrange this problem, or (more probably) I'm using it in a wrong way. I tried in these ways, but without success: /1)/ xsl:attribute-set name=list.block.spacing xsl:attribute name=space-after20px/xsl:attribute /xsl:attribute-set /2)/ !--xsl:attribute-set name=list.item.label xsl:attribute name=margin-right20/xsl:attribute /xsl:attribute-set-- /3)//(I've found this one in a website)/ xsl:attribute-set name=list.label.spacing xsl:attribute name=right xsl:choose xsl:when test=self::orderedlist2em/xsl:when xsl:otherwise0pt/xsl:otherwise /xsl:choose /xsl:attribute /xsl:attribute-set-- I even tried with different properties of each attribute-set... Have you ever had this problem? Do you have any suggestion? Matteo
Re: [docbook-apps] Faster WebHelp XSL
On 10/01/2013 09:55 AM, Maxime Bégnis wrote: ... the files showing how we did it preserving the highlighting of the current tree item. Basically we generated an id attribute for each tree item and a javascript variable containing the current id for each page. After that the transformation took 45 minutes to finish. We hope it will be useful. This sounds great! It should help performance in the browser as well. I'll give it a shot. Thanks, David - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Equations in docbook not working
Hello, First make sure your DOCTYPEs are correctly used. I corrected the included file's DOCTYPE before it would legally compile. Next, you can use mathphrase: !DOCTYPE equation PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; equationtitleFermat's Last Theorem/title altx^n + y^n ne; z^n forall; n gt; 2/alt mathphrasexsuperscriptn/superscript + ysuperscriptn/superscript ≠ zsuperscriptn/superscript ∀ n ≠ 2/mathphrase /equation This compiled correctly on my system. I use MathML for all of my equations. See Bob Stayton's book for a better explanation of how to integrate MathML equations. http://www.sagehill.net/docbookxsl/index.html Hope this helps. Regards, Dean Nelson In a message dated 10/1/2013 1:13:59 P.M. Pacific Daylight Time, rodrigues.joac...@gmail.com writes: Yes sorry So i have downloaded this docbook complete project that is open source. with this command git clone https://github.com/sonatype/m2eclipse-book.git and from the source code to generate the PDF i did cd m2eclipse-book and mvn clean install this generates the pdf and it's ok my problem is when i create a file named test.xml with !DOCTYPE equation PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; equationtitleFermat's Last Theorem/title altx^n + y^n ne; z^n forall; n gt; 2/alt graphic fileref=figures/fermat.png/ /equation and in the m2eclipse-book/m2ebook-content/src/main/resources/foreword.xml file, i include xi:include href=test.xml xmlns:xi=http://www.w3.org/2001/XInclude; / to have this : ?xml version=1.0 encoding=UTF-8? !DOCTYPE preface PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; preface id=foreword titleForeword: ${project.version}/title xi:include href=test.xml xmlns:xi=http://www.w3.org/2001/XInclude; / paraIf you would like to receive updates whenever there is a change to this book, you can subscribe to our Book Announcement mailing list. To subscribe to this mailing list, send an email to: ulink url=mailto:_book-notify-subscribe@sonatype.org_ (mailto:book-notify-subscr...@sonatype.org) _book-notify-subscribe@sonatype.org_ (mailto:book-notify-subscr...@sonatype.org) /ulink/para paraWe welcome your feedback, please do not hesitate to contact the Sonatype team with any questions or ideas you may have about the product./para So i'm expecting to have an equation just before the text : If you would but i'm getting blank paragraph Equation 1. Fermat's Last Theorem If you would like to receive updates whenever thanks for your help On Tue, Oct 1, 2013 at 12:29 AM, _DeanNelson@aol.com_ (mailto:deannel...@aol.com) wrote: Hello! For us to help you, we would need to know a little more about your issue. Equations can be a bit tricky for all formats, but I think you are trying to get it to work in eBook format? Can you tell us what you have tried, specifically? It would help us understand your issue. Regards, Dean Nelson In a message dated 9/30/2013 1:07:28 P.M. Pacific Daylight Time, _rodrigues.joachim@gmail.com_ (mailto:rodrigues.joac...@gmail.com) writes: Hi i have downloaded a free ebook : https://github.com/sonatype/m2eclipse-book because i'm learning how to write a book. I need to write equations so i simply added this example http://www.docbook.org/tdg/en/html/equation.html to a xml file of the free ebook. but it does't wort at all. Can somebody help ? thanks