[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: A good tag for representing a very long URL
Bang, Steinar wrote: > I wrote earlier: >>What would be a good DocBook tag for representing very long >>URLs? >> >>I've tried <userinput> and <programlisting>, but the problem >>is that they become too long, when rendered by Fop. The >>URLs continue past the right edge of the paper. > > I just tried <command>, and it gave a better result with > Fop. I guess it won't break on '/' or '.', but the > chosen font was more compact, so it fits on a single line. > No offense, but you might want to take a more "correct" approach to solving the problem. It appears to me that what you are doing is marking up based on expected output rather than document content. For example, a URL might be <userinput> if a user has to input it somewhere, but its probably not a <programlisting> or a <command> in "real life" unless you are dealing with a pretty unusual situation. What you are looking for is good output, in this case a font condensed enough to fit on one line when generated by Fop, and the <command> tag happens to create that output. But by doing it that way, you lose much of the benefit of using Docbook. I know it means more work :-( , but the typical approach is to mark up the URL with a tag like <filename> or something more related to what it actually is. To modify the output, you can give it a role attribute like this: <filename role="URL">, and then customize your stylesheet to assign a font for the output you need. Also, I believe there was some discussion on this list several months ago about wrapping URLs for PDF output, but I don't recall if it was via Fop, or some other toolchain. You can check the archives. Cheerio! Bob --------------------------------------- Robert McIlvride (robert@cogent.ca) Cogent Real-Time Systems (www.cogent.ca)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC