|
Subject: Re: displaying dashes From: Brandon Ibach <bibach@xxxxxxxxxxxxxx> Date: Mon, 22 Nov 1999 00:27:41 -0600 |
Quoting Frank A. Christoph <christo@xxxxxxxxxxxxxxxxxx>:
> Brandon Ibach wrote:
> > Well, short of someone patching the OpenJade backend to fix this on
> > input...
> >
Yep, I just *had* to take a shot at it. The following patch should
be applied in the "jade" directory of the source distribution. It was
generated against 1.2.2, but I expect it should apply relatively
cleanly to newer versions, as well.
This has the TeX backend break up sequences of two or more dashes
with "{}" between them. It also adds some code to turn the Unicode
endash and emdash (hex 2013 and 2014, respectively) characters into
the TeX sequences of "--{}" and "---{}", respectively.
If anyone finds any problems with the way this works, let me know.
-Brandon :)
*** TeXFOTBuilder.cxx-dist Tue Jul 13 04:44:14 1999
--- TeXFOTBuilder.cxx Mon Nov 22 00:07:33 1999
***************
*** 29,32 ****
--- 29,35 ----
#endif
+ #define ENDASH (Char)0x2013
+ #define EMDASH (Char)0x2014
+
// --------- TeXTmpOutputByteStream ------------------------------------------
***************
*** 1832,1835 ****
--- 1835,1843 ----
// will need special treatment.
if (*s > 255) {
+ if (*s == ENDASH)
+ os() << "--{}";
+ else if (*s == EMDASH)
+ os() << "---{}";
+ else
// set("Ch",(unsigned long)(*s));
// insertAtomic("Character");
***************
*** 1843,1846 ****
--- 1851,1866 ----
default:
os() << char(*s);
+ #ifdef OUTLINES
+ if (needToCollect()){
+ addHeadedText(s,1);
+ //top(parStack_).headingText_.append(s,1);
+ }
+ #endif
+ break;
+ case '-':
+ if (n > 1 && *(s + 1) == '-')
+ os() << "-{}";
+ else
+ os() << char(*s);
#ifdef OUTLINES
if (needToCollect()){
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: displaying dashes, Frank A. Christoph | Thread | Re: displaying dashes, David Carlisle |
| Re: displaying dashes, Bek Oberin | Date | Re: displaying dashes, Brandon Ibach |
| Month |