## Re: displaying dashes

 Subject: Re: displaying dashes From: "Lassi A. Tuura" Date: Mon, 22 Nov 1999 12:00:17 +0100
> Got a problem with double-dashes in DocBook:

Here's another patch to jade from about a year ago.  Hope someone
integrates either this or Brandon's patch into openjade one day...

Cheers,
//lat
--
C makes it too easy to slice your fingers off, and programmers all
over the world are doing so with great regularity.  --Steven Bellovin
--- Begin Message ---
 Subject: Re: DAVENPORT: sgml2latex for docbook? From: "Lassi A. Tuura" Date: Tue, 21 Sep 1999 10:22:03 +0200
>> Interesting.  The original example was about -- in the <screen>
>> environment.  I'm still not quite sure whether hacking on this should
>> take place in the jadetex.dtx file or what...
>
> better hack it in Jade's TeXFOTBuilder.cxx, to be honest,
> in "TeXFOTBuilder::characters". My memory is declining with old age
> --- didn't someone make this patch last year? I don't have a current
> Jade source on this box

I sent a patch last October to do exactly that, maybe that's what you
remembereed.  My patch disables many ligatures in TexFOTBuilder
(including --' and <<'), leaving usually-wanted ligatures (like fi)
enabled.  I've attached my mail exchanges with Sebastian and James from
would be nice if they did.

FWIW, I've run with this patch ever since and have been happy with it.
As somebody else said, just make sure your fixed-width fonts don't have
the other normal ligatures (fi, ffi, ...) defined, and this patch will
take care of the conveninence ligature hacks.  Why anybody ever came up
with the idea to handle and remap these things as deep inside TeX as in
font ligatures I have no idea :-)

Cheers and hope this helps,
//lat
--
Conversation, n.:
A vocal competition in which the one who is catching his
breath is called the listener.
--- Begin Message ---
 Subject: Yet another solution for avoiding ligatures From: "Lassi A. Tuura" Date: Thu, 22 Oct 1998 20:23:03 +0200 (CET)
Hi,

OK, I came up with yet another solution to the ligature problem.  Could
you let me know if it works?

The solution consists of:
- this code in void TeXFOTBuilder::characters(const Char *s, size_t n)':
case '-':
case '<':
case '>':
os() << "\\NoLigCharacter{" << int(*s) << "}";
break;

\def\NoLigCharacter#1{\char#1{}\ifnum\Mathcount>1\relax\else\mbox{}\fi}

That is, it adds \mbox{}' after the character to avoid ligature
composites -- but only if we are not in a math flow object (I think :-).

If you approve this change, I'll send a patch to James.

Cheers,
//lat
--
With sufficient thrust, pigs fly just fine.  However, this is not
necessarily a good idea.  It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  --RFC1925, "The Twelve Networking Truths"



--- End Message ---
--- Begin Message ---
 Subject: Re: Yet another solution for avoiding ligatures From: Sebastian Rahtz Date: Fri, 23 Oct 1998 10:14:35 +0100 ( )
Lassi A. Tuura writes:
> OK, I came up with yet another solution to the ligature problem.  Could
> you let me know if it works?
>
my tests indicate that the solution is workable.

>  - this code in void TeXFOTBuilder::characters(const Char *s, size_t n)':
>       case '-':
>       case '<':
>       case '>':
>         os() << "\\NoLigCharacter{" << int(*s) << "}";
>         break;

\NoLigCharacter is rather long. Just \\NoLig will do. and
easier to do

os() << "\\NoLig{" << char(*s) << "}";

and
>      \def\NoLigCharacter#1{\char#1{}\ifnum\Mathcount>1\relax\else\mbox{}\fi}
>
\def\NoLig#1{#1\ifmmode\else{}\fi}

James, I cannot see any reason not to go with this. Lassi has a
genuine point, that ligatures like "--" should be disabled in JadeTeX,
and this is an inelegant, but working answer.

However, David Carlisle and I want to make some more changes to
TeXFOTBuilder in the moderately short term, for processing MathML; so
unless you need to re-release Jade anyway, I suggest we keep this on
hold for a bit, and let Lassi use his locally patched version

sebastian


--- End Message ---

--- End Message ---