|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
images and quickbookAll,
I'm having some issues with images in my rewrite of the Boost.Graph docs. I have two basic questions - I think. 1. Is there any way to center an image with respect to its container (table or paragraph)? 2. Is there any way to create a caption for the table such that [link ...] or something similar would create a hyperlink to that image/ Thanks, Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
> All, > > I'm having some issues with images in my rewrite of the Boost.Graph > docs. I have two basic questions - I think. > > 1. Is there any way to center an image with respect to its container > (table or paragraph)? I believe not at present: you would have to escape down to Docbook and insert the XML yourself at present :-( IMO this is something that *should* be supported though. > 2. Is there any way to create a caption for the table such that > [link ...] or something similar would create a hyperlink to that > image/ I don't follow, tables can have captions, but what's that got to do with images? HTH, John. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookOn 7/18/07, John Maddock <john@...> wrote:
> Andrew Sutton wrote: > > All, > > > > I'm having some issues with images in my rewrite of the Boost.Graph > > docs. I have two basic questions - I think. > > > > 1. Is there any way to center an image with respect to its container > > (table or paragraph)? > > I believe not at present: you would have to escape down to Docbook and > insert the XML yourself at present :-( > > IMO this is something that *should* be supported though. 100% Agree. Please read this: http://tinyurl.com/2nqwzl King regards Matias ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbook>> 2. Is there any way to create a caption for the table such that
>> [link ...] or something similar would create a hyperlink to that >> image/ > > I don't follow, tables can have captions, but what's that got to do > with > images? Sorry... Mistyped. I was on my way out when I wrote that. Also, I don't really know anything about Docbook DTD, so if I ask something trivial, give me an e-whack on the head. 2. Is there any way to create a caption for an image and then create links to within the text of the surrounding page (or technically any page)? Actually, I'm pretty sure there's no good way to do this in quickbook, but I want to do something like: [$path_to_image text]] So that this generates the image, plus a "Figure n + text" label below the image. The "n" should probably be automatically generated by the number of images on the page. It should also create an anchor onto the image (called current_page#figure_n or something like that). The text should just be freeform. This would allow references from within the surrounding text (or other text) like: [link some_page.figure_2] Or something similar. Unfortunately, I'm pretty sure that the [$path text] stuff would require a change to the Quickbook grammar. Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookMatias Capeletto wrote:
> On 7/18/07, John Maddock <john@...> wrote: >> Andrew Sutton wrote: >>> All, >>> >>> I'm having some issues with images in my rewrite of the Boost.Graph >>> docs. I have two basic questions - I think. >>> >>> 1. Is there any way to center an image with respect to its container >>> (table or paragraph)? >> I believe not at present: you would have to escape down to Docbook and >> insert the XML yourself at present :-( >> >> IMO this is something that *should* be supported though. > > 100% Agree. > Please read this: > http://tinyurl.com/2nqwzl I think Rene will have something similar as soon as he gets the standard template stuff in. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
> 2. Is there any way to create a caption for an image and then create > links to within the text of the surrounding page (or technically any > page)? > > Actually, I'm pretty sure there's no good way to do this in > quickbook, but I want to do something like: > > [$path_to_image text]] > > So that this generates the image, plus a "Figure n + text" label > below the image. The "n" should probably be automatically generated > by the number of images on the page. It should also create an anchor > onto the image (called current_page#figure_n or something like that). > The text should just be freeform. > > This would allow references from within the surrounding text (or > other text) like: > > [link some_page.figure_2] > > Or something similar. Unfortunately, I'm pretty sure that the [$path > text] stuff would require a change to the Quickbook grammar. Quickbook sections and headings can be linked to. If you put your image after a heading, then you can link to it using [link...]. To make it easy, just grab the link to it by right clicking the heading and copying the link location. HTH. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
>>> 2. Is there any way to create a caption for the table such that >>> [link ...] or something similar would create a hyperlink to that >>> image/ >> >> I don't follow, tables can have captions, but what's that got to do >> with >> images? > > Sorry... Mistyped. I was on my way out when I wrote that. Also, I > don't really know anything about Docbook DTD, so if I ask something > trivial, give me an e-whack on the head. > > 2. Is there any way to create a caption for an image and then create > links to within the text of the surrounding page (or technically any > page)? > > Actually, I'm pretty sure there's no good way to do this in > quickbook, but I want to do something like: > > [$path_to_image text]] > > So that this generates the image, plus a "Figure n + text" label > below the image. The "n" should probably be automatically generated > by the number of images on the page. It should also create an anchor > onto the image (called current_page#figure_n or something like that). > The text should just be freeform. > > This would allow references from within the surrounding text (or > other text) like: > > [link some_page.figure_2] > > Or something similar. Unfortunately, I'm pretty sure that the [$path > text] stuff would require a change to the Quickbook grammar. I'm sure you can do this with a template, but you'll need to dig into DocBook and experiment a bit to get what you want: I'm sure others would be interested too if you can get this to work :-) Looks like you want a mediaobject block which can contain a "caption" child as well as an "imageobject". There's a trivial example here: http://docbook.org/tdg/en/html/imageobject.html Sadly while you can give a caption tag an explicit alignment (centre for example), I can't see anything similar for mediaobject or imageobject. You may have to assign the mediaobject a "role" and then set alignment in the stylesheet, but then that won't work so well for PDF's I guess? Oh wait, "imagedata" can contain alignment requirements as well as lots of other goodies, see http://docbook.org/tdg/en/html/imagedata.html. Hmm, like I said, some experimentation is needed :-) Good luck! John. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbook> Looks like you want a mediaobject block which can contain a
> "caption" child > as well as an "imageobject". There's a trivial example here: > http://docbook.org/tdg/en/html/imageobject.html > > Sadly while you can give a caption tag an explicit alignment > (centre for > example), I can't see anything similar for mediaobject or > imageobject. You > may have to assign the mediaobject a "role" and then set alignment > in the > stylesheet, but then that won't work so well for PDF's I guess? Oh > wait, > "imagedata" can contain alignment requirements as well as lots of > other > goodies, see http://docbook.org/tdg/en/html/imagedata.html. > > Hmm, like I said, some experimentation is needed :-) > > Good luck! You mean it's up to /me/ to make it work? :) Thanks for the ideas. They sound promising. I'll post back later today and give an update on how far I get. Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbook> You mean it's up to /me/ to make it work? :) Thanks for the ideas.
> They sound promising. I'll post back later today and give an update > on how far I get. All, I got everything worked out except the linking - which doesn't seem to be too feasible since I don't know how to generate automatically incrementing links. Here's the basic template for generating centered images. It's pretty trivial: [template figure[path caption] ''' <mediaobject> <imageobject> <imagedata fileref="'''[path]'''" align="center"/> </imageobject> <caption> <para>'''[caption]'''</para> </caption> </mediaobject> ''' ] And here's how I'm actually calling it: [figure images/reference/connected_components_after.png [*Figure 1.] Components found after running [boost_connected_components] ] So it turns out that this will center the image, but not the caption, regardless of the options applied to caption or para elements. I had to re-style it with CSS. That follows: /* This centers the paragraph inside the caption. */ div.caption p { text-align: center; } This is very advanced CSS for me :) , but it seems to work. It also works for PDF (miraculously) so It's not too bad of a solution. If anybody sees any more graceful ways to write this template, I'd like to know. Otherwise, it might be worthwhile to add the macro to the quickbook "library" (if we have one) and put this CSS into the styling somewhere. Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
>> You mean it's up to /me/ to make it work? :) Thanks for the ideas. >> They sound promising. I'll post back later today and give an update >> on how far I get. > > All, I got everything worked out except the linking - which doesn't > seem to be too feasible since I don't know how to generate > automatically incrementing links. I think you can do that with a custom XSL rule, but don't ask me how :-) The current Docbook stylesheets let you number just about everything else except images :-( > Here's the basic template for > generating centered images. It's pretty trivial: > > [template figure[path caption] > ''' > <mediaobject> > <imageobject> > <imagedata fileref="'''[path]'''" align="center"/> > </imageobject> > <caption> > <para>'''[caption]'''</para> > </caption> > </mediaobject> > ''' > ] > > And here's how I'm actually calling it: > > [figure > images/reference/connected_components_after.png > [*Figure 1.] Components found after running > [boost_connected_components] > ] > > So it turns out that this will center the image, but not the caption, > regardless of the options applied to caption or para elements. I had > to re-style it with CSS. That follows: Not sure, but I think you can center the caption by adding an align="center" attribute to it. HTH, John. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbook> Not sure, but I think you can center the caption by adding an
> align="center" > attribute to it. I thought so to, but for caption, align only has the values top, bottom, left and right - and none of those seem to have any effect. I actually tried a bunch of other stuff to, but none of it had any effect on the centering of the text. I think it has to be CSS. Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
>> Not sure, but I think you can center the caption by adding an >> align="center" >> attribute to it. > > I thought so to, but for caption, align only has the values top, > bottom, left and right - and none of those seem to have any effect. I > actually tried a bunch of other stuff to, but none of it had any > effect on the centering of the text. I think it has to be CSS. Yep, you're right, looking again it seems that the align option for "caption" is probably only intended to specify which side of the image the caption goes on :-( BTW it occurs to me that the Docbook XSL maintainers might be interested in supporting numbered figures - maybe with a TOC for them as well. After all it's quite a common thing to require. Might be worth asking them if they'd be willing to add this, or even if it's there already and we've missed it :-) John. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbook> Yep, you're right, looking again it seems that the align option for
> "caption" is probably only intended to specify which side of the > image the > caption goes on :-( Yeah... That's what I got out of it. Curiously, it has no real bearing on the HTML docs anyways. Go figure. > BTW it occurs to me that the Docbook XSL maintainers might be > interested in > supporting numbered figures - maybe with a TOC for them as well. > After all > it's quite a common thing to require. Might be worth asking them > if they'd > be willing to add this, or even if it's there already and we've > missed it > :-) Googling "numbered figures" for Docbook gives some results that seem to indicate built-in support, but I didn't follow up enough to find anything significantly interesting. It might be there already. Numbered and captioned tables might be nice too. Andrew Sutton asutton@... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
|
|
Re: images and quickbookAndrew Sutton wrote:
>> BTW it occurs to me that the Docbook XSL maintainers might be >> interested in >> supporting numbered figures - maybe with a TOC for them as well. >> After all >> it's quite a common thing to require. Might be worth asking them >> if they'd >> be willing to add this, or even if it's there already and we've >> missed it >> :-) > > Googling "numbered figures" for Docbook gives some results that seem > to indicate built-in support, but I didn't follow up enough to find > anything significantly interesting. It might be there already. > Numbered and captioned tables might be nice too. I think it is there already after all: see http://www.dpawson.co.uk/docbook/markup.html#d373e404 I'm fairly sure numbered tables work too, but I don't recall the details :-( John. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Boost-docs mailing list Boost-docs@... Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs |
| Free embeddable forum powered by Nabble | Forum Help |