Re: [docbook-apps] Indexing.
On 06/05/12 22:45, John W. Shipman wrote: There are certain very specific fetishes I have about indexing that I see violated quite often. !Not sure you should be talking about your fetishes in public John!! The index to the Guide to LaTeX by Helmut Kopka has an example of a horrible flaw that severely compromises its usefulness: if a major topic is continued over a page break, the major topic is NOT repeated on the continuation column. ?? Continuation column? topic page 4 - 5 Is the '5' the continuation column? Think about how you use an index: you depend on the top words of each column to be in alphabetical order. But on page 584 of Kopka's book, the entire column is a continuation of major topic package, but the first entry is amsmath. So you think you're in the a section of the index, but you're actually in the p section! I think I interpret your 'continuation column' as meaning the part of the back of the book index which happens to have a page break in the middle of a main entry? Is that right? It should look like this, but in many books I don't see a line like the first one: package (continued) amsmath, 191, 269-270 amsopn, ... a) I don't think (someone correct me if I'm wrong) that we'd see the first line in a db output? Happens with table headers but indexes? I.e. we'd only see amsmath, 191, 269-270 amsopn, ... Where the reader has to infer the sub-topic from the indent? An obvious application for marks. Yes. My next suggestion may slightly increase the page count, so I never mentioned it back in the day when dead trees were the only route to publication. However, the increase is small, and inexcusable if you expect most people will e-read your book. As an example, the discussion of the amsmath package should have two entries: amsmath package, 372 packages, 366 amsmath, 372 In general, if an indexable phrase has more than one important word, it should appear in the index under each of those words. +1 with your example. Covered in the book I'm reading, though the author cations on making it an iron rule. Again the reader comes first. I can't give you any useful suggestions on current tools. Back in the day I just invented a file format for entering all the indexable references and then wrote my own software in C to generate the index in TeX. This approach assumes that the page numbers are all cast in stone, which was fine because in my cases the rest of the book had all been put to bed. Which is the case the author talks about (quite endlessly in fact) but not so in my case. I'm thinking I may be able to have a two swipe go at it, but that's for the future. Thanks John. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - 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] Image maps in PDF output
Hi Bob, Thank you. I guess I'll have to do something else then if hotspots on graphics are not supported in PDFs. I did some more searching and apparently PDFs do support this (http://www.authorst.com/hot_graphics_in_pdf_file.php) so I guess it is a limitation of the DocBook XSL to PDF conversion (which I guess is what you're saying below although I don't quite understand the concept of extensions in this context.) Thank you for your time, -Tyson On 2012/05/06 1:00 AM, Bob Stayton wrote: Hi Tyson, That message you referred to did not cover imagemaps. It was referring to using callout icons in a programlisting. In that case, an extension function is needed to preprocess the text in the programlisting to place the callout images in with the text, and that mix is then processed by DocBook XSL into PDF output. There is no equivalent extension for mixing callouts or other hot spots with images, as far as I know. I hope someone proves me wrong. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Tyson Marchuk tmarc...@cdlsystems.com To: docbook-apps@lists.oasis-open.org Sent: Friday, May 04, 2012 4:09 PM Subject: [docbook-apps] Image maps in PDF output Hello, I'm new to Docbook and I'm trying to create an image map (click-able image where clicking different sections of the image results in going to different locations in the document) in a PDF document. I've run across this reference (http://www.sagehill.net/docbookxsl/Imagemaps.html) which seems to suggest this can't be done in PDFs with Docbook but it was published in 2007 and I saw a post on this mailing list from 2012 (http://lists.oasis-open.org/archives/docbook-apps/201202/msg00010.html) which seems to suggest it should work in PDFs. I've used the example code from the first link with slight modifications (copied below) on one of my graphics and changed the stylesheet to only use numbers and while the output does have the numbers and text below the graphic there does not appear to be any linking going on in the document between the graphic and callouts. Is this a limitation of PDFs or Docbook or am I doing something wrong? Thank you for your time and help, Tyson Marchuk mediaobjectco imageobjectco areaspec id=map1 units=calspair area linkends=callout1 coords=0,0 5000,1 id=area1/ area linkends=callout2 coords=5000,0 1,1 id=area2/ /areaspec imageobject imagedata fileref=images/myImage.png / /imageobject calloutlist callout arearefs=area1 id=callout1 paraMy only callout1/para /callout callout arearefs=area2 id=callout2 paraMy only callout2/para /callout /calloutlist /imageobjectco /mediaobjectco - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - 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] Image maps in PDF output
Hi Tyson, In general docbook documents are transformed to an intermediate representation before they are processed to pdf. The intermediate representation is FO (formatting objects). Have you tried to write down a couple of formatting objects (FO) that FOP is capable of processing them to pdf as you want? If you were able to do that, it shouldn't be much work to put that stuff into the right place within a docbook document and adapt the respective stylesheets to process that data so that it will work in the future. Cheers, Dominik -Original Message- From: Tyson Marchuk [mailto:tmarc...@cdlsystems.com] Sent: Monday, May 07, 2012 4:29 PM To: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Image maps in PDF output Hi Bob, Thank you. I guess I'll have to do something else then if hotspots on graphics are not supported in PDFs. I did some more searching and apparently PDFs do support this (http://www.authorst.com/hot_graphics_in_pdf_file.php) so I guess it is a limitation of the DocBook XSL to PDF conversion (which I guess is what you're saying below although I don't quite understand the concept of extensions in this context.) Thank you for your time, -Tyson On 2012/05/06 1:00 AM, Bob Stayton wrote: Hi Tyson, That message you referred to did not cover imagemaps. It was referring to using callout icons in a programlisting. In that case, an extension function is needed to preprocess the text in the programlisting to place the callout images in with the text, and that mix is then processed by DocBook XSL into PDF output. There is no equivalent extension for mixing callouts or other hot spots with images, as far as I know. I hope someone proves me wrong. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Tyson Marchuk tmarc...@cdlsystems.com To: docbook-apps@lists.oasis-open.org Sent: Friday, May 04, 2012 4:09 PM Subject: [docbook-apps] Image maps in PDF output Hello, I'm new to Docbook and I'm trying to create an image map (click-able image where clicking different sections of the image results in going to different locations in the document) in a PDF document. I've run across this reference (http://www.sagehill.net/docbookxsl/Imagemaps.html) which seems to suggest this can't be done in PDFs with Docbook but it was published in 2007 and I saw a post on this mailing list from 2012 (http://lists.oasis-open.org/archives/docbook-apps/201202/msg00010.html) which seems to suggest it should work in PDFs. I've used the example code from the first link with slight modifications (copied below) on one of my graphics and changed the stylesheet to only use numbers and while the output does have the numbers and text below the graphic there does not appear to be any linking going on in the document between the graphic and callouts. Is this a limitation of PDFs or Docbook or am I doing something wrong? Thank you for your time and help, Tyson Marchuk mediaobjectco imageobjectco areaspec id=map1 units=calspair area linkends=callout1 coords=0,0 5000,1 id=area1/ area linkends=callout2 coords=5000,0 1,1 id=area2/ /areaspec imageobject imagedata fileref=images/myImage.png / /imageobject calloutlist callout arearefs=area1 id=callout1 paraMy only callout1/para /callout callout arearefs=area2 id=callout2 paraMy only callout2/para /callout /calloutlist /imageobjectco /mediaobjectco - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - 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] Image maps in PDF output
FYI, dblatex supports callouts on images (see http://dblatex.sourceforge.net/example/dblatex/example.pdf, section 5.1). The only constraint to have relevant coordinates. Regards, BG On Mon, 07 May 2012 16:29:16 +0200, Tyson Marchuk tmarc...@cdlsystems.com wrote: Hi Bob, Thank you. I guess I'll have to do something else then if hotspots on graphics are not supported in PDFs. I did some more searching and apparently PDFs do support this (http://www.authorst.com/hot_graphics_in_pdf_file.php) so I guess it is a limitation of the DocBook XSL to PDF conversion (which I guess is what you're saying below although I don't quite understand the concept of extensions in this context.) Thank you for your time, -Tyson On 2012/05/06 1:00 AM, Bob Stayton wrote: Hi Tyson, That message you referred to did not cover imagemaps. It was referring to using callout icons in a programlisting. In that case, an extension function is needed to preprocess the text in the programlisting to place the callout images in with the text, and that mix is then processed by DocBook XSL into PDF output. There is no equivalent extension for mixing callouts or other hot spots with images, as far as I know. I hope someone proves me wrong. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Tyson Marchuk tmarc...@cdlsystems.com To: docbook-apps@lists.oasis-open.org Sent: Friday, May 04, 2012 4:09 PM Subject: [docbook-apps] Image maps in PDF output Hello, I'm new to Docbook and I'm trying to create an image map (click-able image where clicking different sections of the image results in going to different locations in the document) in a PDF document. I've run across this reference (http://www.sagehill.net/docbookxsl/Imagemaps.html) which seems to suggest this can't be done in PDFs with Docbook but it was published in 2007 and I saw a post on this mailing list from 2012 (http://lists.oasis-open.org/archives/docbook-apps/201202/msg00010.html) which seems to suggest it should work in PDFs. I've used the example code from the first link with slight modifications (copied below) on one of my graphics and changed the stylesheet to only use numbers and while the output does have the numbers and text below the graphic there does not appear to be any linking going on in the document between the graphic and callouts. Is this a limitation of PDFs or Docbook or am I doing something wrong? Thank you for your time and help, Tyson Marchuk mediaobjectco imageobjectco areaspec id=map1 units=calspair area linkends=callout1 coords=0,0 5000,1 id=area1/ area linkends=callout2 coords=5000,0 1,1 id=area2/ /areaspec imageobject imagedata fileref=images/myImage.png / /imageobject calloutlist callout arearefs=area1 id=callout1 paraMy only callout1/para /callout callout arearefs=area2 id=callout2 paraMy only callout2/para /callout /calloutlist /imageobjectco /mediaobjectco - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - 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] Image maps in PDF output
Ben and Tyson: Callouts on images are very different than image maps. To get image callouts to work with docbook you have to use either Saxon or Xalan as they need extension packages written for the specific processors (the functionality does not work with XSLT 1.0 stylesheets) These packages come as part of the stylesheet distribution under the extension directory. Pick the one that matches the processor you are using (I strongly suggest Saxon) and make sure that it is in your Java classpath. You can find more and better instructions in Bob's book: http://sagehill.net/docbookxsl/AnnotateListing.html#CalloutsGraphics Carlos On Mon, May 7, 2012 at 7:55 AM, ben.guillon ben.guil...@gmail.com wrote: FYI, dblatex supports callouts on images (see http://dblatex.sourceforge.* *net/example/dblatex/example.**pdfhttp://dblatex.sourceforge.net/example/dblatex/example.pdf, section 5.1). The only constraint to have relevant coordinates. Regards, BG On Mon, 07 May 2012 16:29:16 +0200, Tyson Marchuk tmarc...@cdlsystems.com wrote: Hi Bob, Thank you. I guess I'll have to do something else then if hotspots on graphics are not supported in PDFs. I did some more searching and apparently PDFs do support this (http://www.authorst.com/hot_** graphics_in_pdf_file.phphttp://www.authorst.com/hot_graphics_in_pdf_file.php) so I guess it is a limitation of the DocBook XSL to PDF conversion (which I guess is what you're saying below although I don't quite understand the concept of extensions in this context.) Thank you for your time, -Tyson On 2012/05/06 1:00 AM, Bob Stayton wrote: Hi Tyson, That message you referred to did not cover imagemaps. It was referring to using callout icons in a programlisting. In that case, an extension function is needed to preprocess the text in the programlisting to place the callout images in with the text, and that mix is then processed by DocBook XSL into PDF output. There is no equivalent extension for mixing callouts or other hot spots with images, as far as I know. I hope someone proves me wrong. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Tyson Marchuk tmarc...@cdlsystems.com To: docbook-apps@lists.oasis-**open.orgdocbook-apps@lists.oasis-open.org Sent: Friday, May 04, 2012 4:09 PM Subject: [docbook-apps] Image maps in PDF output Hello, I'm new to Docbook and I'm trying to create an image map (click-able image where clicking different sections of the image results in going to different locations in the document) in a PDF document. I've run across this reference (http://www.sagehill.net/**docbookxsl/Imagemaps.htmlhttp://www.sagehill.net/docbookxsl/Imagemaps.html) which seems to suggest this can't be done in PDFs with Docbook but it was published in 2007 and I saw a post on this mailing list from 2012 ( http://lists.oasis-open.org/**archives/docbook-apps/201202/** msg00010.htmlhttp://lists.oasis-open.org/archives/docbook-apps/201202/msg00010.html) which seems to suggest it should work in PDFs. I've used the example code from the first link with slight modifications (copied below) on one of my graphics and changed the stylesheet to only use numbers and while the output does have the numbers and text below the graphic there does not appear to be any linking going on in the document between the graphic and callouts. Is this a limitation of PDFs or Docbook or am I doing something wrong? Thank you for your time and help, Tyson Marchuk mediaobjectco imageobjectco areaspec id=map1 units=calspair area linkends=callout1 coords=0,0 5000,1 id=area1/ area linkends=callout2 coords=5000,0 1,1 id=area2/ /areaspec imageobject imagedata fileref=images/myImage.png / /imageobject calloutlist callout arearefs=area1 id=callout1 paraMy only callout1/para /callout callout arearefs=area2 id=callout2 paraMy only callout2/para /callout /calloutlist /imageobjectco /mediaobjectco --**--** - To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.orgdocbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-** open.org docbook-apps-h...@lists.oasis-open.org --**--** - To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.orgdocbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-** open.org docbook-apps-h...@lists.oasis-open.org --**--**- To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.orgdocbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-**open.orgdocbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Image maps in PDF output
Ben: After reading the section I indicated from Bob's book I realized that you're correct. You can not do callouts on image files even when using the Java Extensions. The explanation for using the callout images as explained in Bob's book is still valid. Question for the Java/XSL experts on the list. Would it be possible to use callouts or links in an image if we set the z-index on the image to a negative number and then just put the image/link with a possitive z-index so they'll be above the image and thus appear as an image map? Carlos On Mon, May 7, 2012 at 8:46 AM, Carlos Araya carlos.ar...@gmail.com wrote: Ben and Tyson: Callouts on images are very different than image maps. To get image callouts to work with docbook you have to use either Saxon or Xalan as they need extension packages written for the specific processors (the functionality does not work with XSLT 1.0 stylesheets) These packages come as part of the stylesheet distribution under the extension directory. Pick the one that matches the processor you are using (I strongly suggest Saxon) and make sure that it is in your Java classpath. You can find more and better instructions in Bob's book: http://sagehill.net/docbookxsl/AnnotateListing.html#CalloutsGraphics Carlos On Mon, May 7, 2012 at 7:55 AM, ben.guillon ben.guil...@gmail.com wrote: FYI, dblatex supports callouts on images (see http://dblatex.sourceforge. **net/example/dblatex/example.**pdfhttp://dblatex.sourceforge.net/example/dblatex/example.pdf, section 5.1). The only constraint to have relevant coordinates. Regards, BG On Mon, 07 May 2012 16:29:16 +0200, Tyson Marchuk tmarc...@cdlsystems.com wrote: Hi Bob, Thank you. I guess I'll have to do something else then if hotspots on graphics are not supported in PDFs. I did some more searching and apparently PDFs do support this (http://www.authorst.com/hot_** graphics_in_pdf_file.phphttp://www.authorst.com/hot_graphics_in_pdf_file.php) so I guess it is a limitation of the DocBook XSL to PDF conversion (which I guess is what you're saying below although I don't quite understand the concept of extensions in this context.) Thank you for your time, -Tyson On 2012/05/06 1:00 AM, Bob Stayton wrote: Hi Tyson, That message you referred to did not cover imagemaps. It was referring to using callout icons in a programlisting. In that case, an extension function is needed to preprocess the text in the programlisting to place the callout images in with the text, and that mix is then processed by DocBook XSL into PDF output. There is no equivalent extension for mixing callouts or other hot spots with images, as far as I know. I hope someone proves me wrong. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: Tyson Marchuk tmarc...@cdlsystems.com To: docbook-apps@lists.oasis-**open.orgdocbook-apps@lists.oasis-open.org Sent: Friday, May 04, 2012 4:09 PM Subject: [docbook-apps] Image maps in PDF output Hello, I'm new to Docbook and I'm trying to create an image map (click-able image where clicking different sections of the image results in going to different locations in the document) in a PDF document. I've run across this reference (http://www.sagehill.net/**docbookxsl/Imagemaps.htmlhttp://www.sagehill.net/docbookxsl/Imagemaps.html) which seems to suggest this can't be done in PDFs with Docbook but it was published in 2007 and I saw a post on this mailing list from 2012 ( http://lists.oasis-open.org/**archives/docbook-apps/201202/** msg00010.htmlhttp://lists.oasis-open.org/archives/docbook-apps/201202/msg00010.html) which seems to suggest it should work in PDFs. I've used the example code from the first link with slight modifications (copied below) on one of my graphics and changed the stylesheet to only use numbers and while the output does have the numbers and text below the graphic there does not appear to be any linking going on in the document between the graphic and callouts. Is this a limitation of PDFs or Docbook or am I doing something wrong? Thank you for your time and help, Tyson Marchuk mediaobjectco imageobjectco areaspec id=map1 units=calspair area linkends=callout1 coords=0,0 5000,1 id=area1/ area linkends=callout2 coords=5000,0 1,1 id=area2/ /areaspec imageobject imagedata fileref=images/myImage.png / /imageobject calloutlist callout arearefs=area1 id=callout1 paraMy only callout1/para /callout callout arearefs=area2 id=callout2 paraMy only callout2/para /callout /calloutlist /imageobjectco /mediaobjectco --**--** - To unsubscribe, e-mail: docbook-apps-unsubscribe@** lists.oasis-open.org docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-** open.org docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Python to PDF via XSL-FO
As much as I love XSLT (half-kidding here), I have several applications to generate PDFs from databases, and from other sources that XSLT can't reach directly. Since I discovered SQLAlchemy (http://www.sqlalchemy.org), life is much nicer: In Python, I can pull data from SQL databases without getting any actual SQL on my paws. These applications use Python and its wonderful lxml module to produce XSL-FO files, which I can then run through XEP or FOP. I've built a little Python module to assist in the generation of XSL-FO: http://www.nmt.edu/tcc/projects/fohelpers If anyone finds this module useful, or if you have feedback on its usefulness, I would be delighted to hear from you. Are there other mailing lists that might reach potential users? Best regards, John Shipman (j...@nmt.edu), Applications Specialist, NM Tech Computer Center, Speare 146, Socorro, NM 87801, (575) 835-5735, http://www.nmt.edu/~john ``Let's go outside and commiserate with nature.'' --Dave Farber - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org