This is the mail archive of the davenport@berkshire.net mailing list for the Davenport project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DAVENPORT: I Can't Write--Without My Em-Dash


/ Bob Van Valzah <Bob@WhiteBarn.Com> was heard to say:
| I've found that &mdash; will give me a real em-dash with the print back
| end. However, there doesn't seem to be an &mdash; entity defined in the
| HTML stylesheet--I just get my same old &mdash; showing up in the HTML.

That's a browser bug, but nevermind.

| As a work around, can I define it only when it's not already defined?
| (Can you tell I'm a DocBook newbie?) Or do I just define it only for the
| HTML stylesheet? I'd be appreciative if anybody has the necessary code
| handy.

Here's a quick-and-dirty answer: create your own DTD that defines these
entities to map to something that the browser will display. For example,
create 'mydocbook.dtd' which contains the following:

<!ENTITY % outputforhtml "IGNORE">
<![%outputforhtml;[
<!ENTITY mdash "--">
]>
<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
%docbook;

And use that DTD instead of straight DocBook. When you want to produce
HTML output, pass "-i outputforhtml" to jade. Um, of course, if you're
using something else to produce your output this technique may not work
so easily.

Good luck.

                                        Cheers,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | The fundamental delusion of
http://www.oasis-open.org/docbook/ | humanity is to suppose that I am
Member, DocBook Editorial Board    | here and you are out
                                   | there.--Yasutani Roshi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]