* [9fans] troff fonts with special characters
@ 2010-09-10 12:14 Rudolf Sykora
2010-09-11 19:18 ` Rudolf Sykora
0 siblings, 1 reply; 10+ messages in thread
From: Rudolf Sykora @ 2010-09-10 12:14 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hello,
I've been trying to regularly use troff for my writings. Being a
physicist I generally write a lot of math. What I miss quite often are
special math characters like Dirac brackets, in TeX \langle, \rangle
(so far I've replaced them just with < and >; but then I sometimes
need them bigger...), but also others.
I want to ask if somebody tried to add such characters using some
fonts or at least can give some instructions as to what needs to be
done.
If I understand right, troff only needs to know widths of characters,
i.e. /sys/lib/troff/font/devutf/'font_description'. Is that all troff
needs?
Then I need to both somehow see the characters on screen and get them
to the postscript result, i.e. have a real font file for both.
Is there any documentation about how this should be done?
Is there anywhere any documentation about how 'dpost' (tr2post) works?
Thanks
Ruda
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-10 12:14 [9fans] troff fonts with special characters Rudolf Sykora
@ 2010-09-11 19:18 ` Rudolf Sykora
2010-09-11 22:18 ` Russ Cox
0 siblings, 1 reply; 10+ messages in thread
From: Rudolf Sykora @ 2010-09-11 19:18 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hello,
this starts to be daunting...
When I use troff with the R font, troff uses metrics from /sys/lib/troff/font/R.
Then something, when dpost -f is running, must take the real glyphs
and put them into the final ps.
I guess that something must read /sys/lib/postscript/troff/R to find
out that characters 0-0xFF are now from Times-Roman while above (at
least to 0x25FF) are from LucidaSansUnicodeXX (XX=01--25). Finally ps
is somehow generated (btw. there is no man page for neither
aux/tr2post, nor addpsfonts).
Now, if I want to add some characters which I miss in troff
(mathematics, like U27E8) while using Times-Roman for basic text, it
seems I have to
- find some font that covers my characters
- get the metrics (widths) of my characters (afm2troff.c for T1, some
other tool for TrueType, OpenType)
- add the metrics for troff (e.g. add characters to /sys/lib/troff/font/R)
- add an entry to the table in /sys/lib/postscript/troff/R saying the
name of the new font
- put the font somewhere where gs will find it
- find some bitmap font so that I can also see the characters on
screen, or produce such with ttf2subf
- prey :)
This, if it's really so, sounds really above my powers...
Am I wrong?
Thanks
Ruda
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-11 19:18 ` Rudolf Sykora
@ 2010-09-11 22:18 ` Russ Cox
2010-09-12 9:25 ` Rudolf Sykora
2010-09-13 14:05 ` Jeff Sickel
0 siblings, 2 replies; 10+ messages in thread
From: Russ Cox @ 2010-09-11 22:18 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
That sounds about right, unfortunately.
You might be better off just using TeX.
It's better at math, it runs on Plan 9,
and your colleagues who don't use
Plan 9 will still be able to collaborate
on documents with you.
Russ
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-11 22:18 ` Russ Cox
@ 2010-09-12 9:25 ` Rudolf Sykora
2010-09-12 18:25 ` Akshat
2010-09-13 14:05 ` Jeff Sickel
1 sibling, 1 reply; 10+ messages in thread
From: Rudolf Sykora @ 2010-09-12 9:25 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On 12 September 2010 00:18, Russ Cox <rsc@swtch.com> wrote:
> That sounds about right, unfortunately.
> You might be better off just using TeX.
> It's better at math, it runs on Plan 9,
> and your colleagues who don't use
> Plan 9 will still be able to collaborate
> on documents with you.
>
> Russ
Thanks for the answer.
I've actually used TeX and LaTeX for more than 15 years. LaTeX is de
facto standard for physics journals.
But for private work LaTeX is a no-way for me --- plain TeX is much
simpler without illegible complex macros.
When acquianted with troff, tbl, eqn, grap, pic, I started to like
their simplicity, smallness. And basically I can do almost all my work
with them.
Ok. I will have to think. Maybe TeX really is the right choice for me now.
But, generally. If troff in plan9 is to be a serious tool in the
future, the procedure must be simplified, I believe. I think that
plan9 troff should be able to use (read metrics) from otf/t1/ttf fonts
(like the Heirloom troff can).
Thank you
Ruda
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-12 9:25 ` Rudolf Sykora
@ 2010-09-12 18:25 ` Akshat
2010-09-12 19:38 ` Rudolf Sykora
0 siblings, 1 reply; 10+ messages in thread
From: Akshat @ 2010-09-12 18:25 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
If you like the cleanliness and simplicity of troff files for writing
papers, and would like to avoid the hideousness of TeX, then you might
want to try Lout. I ported it to Plan 9 earlier this year and just
copied it to my contrib: contrib/akumar/lout.tgz
Best of luck,
ak
On Sep 12, 2010, at 2:25, Rudolf Sykora <rudolf.sykora@gmail.com> wrote:
> On 12 September 2010 00:18, Russ Cox <rsc@swtch.com> wrote:
>> That sounds about right, unfortunately.
>> You might be better off just using TeX.
>> It's better at math, it runs on Plan 9,
>> and your colleagues who don't use
>> Plan 9 will still be able to collaborate
>> on documents with you.
>>
>> Russ
>
> Thanks for the answer.
> I've actually used TeX and LaTeX for more than 15 years. LaTeX is de
> facto standard for physics journals.
> But for private work LaTeX is a no-way for me --- plain TeX is much
> simpler without illegible complex macros.
> When acquianted with troff, tbl, eqn, grap, pic, I started to like
> their simplicity, smallness. And basically I can do almost all my work
> with them.
>
> Ok. I will have to think. Maybe TeX really is the right choice for
> me now.
>
> But, generally. If troff in plan9 is to be a serious tool in the
> future, the procedure must be simplified, I believe. I think that
> plan9 troff should be able to use (read metrics) from otf/t1/ttf fonts
> (like the Heirloom troff can).
>
> Thank you
> Ruda
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-12 18:25 ` Akshat
@ 2010-09-12 19:38 ` Rudolf Sykora
2010-09-12 20:49 ` Akshat
0 siblings, 1 reply; 10+ messages in thread
From: Rudolf Sykora @ 2010-09-12 19:38 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On 12 September 2010 20:25, Akshat <akumar@mail.nanosouffle.net> wrote:
> If you like the cleanliness and simplicity of troff files for writing
> papers, and would like to avoid the hideousness of TeX, then you might want
> to try Lout. I ported it to Plan 9 earlier this year and just copied it to
> my contrib: contrib/akumar/lout.tgz
>
>
> Best of luck,
> ak
Thanks for the idea.
Actually I was considering this a while ago. I even printed out the
manual.(I have lout in linux.)
However, from what I read there I gained the feeling that
-- it doesn't know utf (thus you can't really just write a single
letter 'alpha' as you can in troff)
-- it somehow seems to be an 'all together software' (as opposed to
tbl/pic/eqn/...), which I don't like.
-- the syntax for writing math is more complicated than in eqn. The
syntax is rather closer to TeX, which I wanted to avoid, though the
results, I feel, are no better than eqn's.
True, I haven't actually tried the software much. May be that I am
also wrong in some points.
Well, don't take me wrong. I have not much against (plain)TeX. When I
was about 15 and got a printed version of TeXBook, METAFONT, I was
amazed. Its documentation can't be better (nothing to compare to
anything). The algorithms are superior. It's not so big either
(although today's distributions are horrible, >1GB [this I really
hate]; but the core, as someone here is trying to put up, is fine; I
mean KerTeX or what). It's only that troff is even much simpler and
yet good enough. And also that the notation is much more human. Making
a table with tbl or a simple graph with grap is a pleasure. Equations
written for eqn can be read back from the source, without seeing
millions of \\\\\\\.This is, I would say, what totally grabbed me. And
the documentation as written by Kernighan is also awesome --- short,
answers many potential questions right away, explains things clearly.
This is why I also like plan 9, generally (though almost whatever I
try doesn't work). TeX is very 'strict', precise; but you must have a
good knowledge of it to talk it into something. Troff is more
straightforward, simpler, and is more fun, some things are playful,
e.g. traps.
Thanks
Ruda
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-12 19:38 ` Rudolf Sykora
@ 2010-09-12 20:49 ` Akshat
0 siblings, 0 replies; 10+ messages in thread
From: Akshat @ 2010-09-12 20:49 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
You are right in that Lout cannot handle non-ASCII input, which is
something that kept me from using it much, as well. However, the
overall approach to the syntax and what not is much nicer than TeX.
Also, I would argue that Lout has much nicer output than both, troff
and TeX.
On Sep 12, 2010, at 12:38, Rudolf Sykora <rudolf.sykora@gmail.com>
wrote:
> On 12 September 2010 20:25, Akshat <akumar@mail.nanosouffle.net>
> wrote:
>> If you like the cleanliness and simplicity of troff files for writing
>> papers, and would like to avoid the hideousness of TeX, then you
>> might want
>> to try Lout. I ported it to Plan 9 earlier this year and just
>> copied it to
>> my contrib: contrib/akumar/lout.tgz
>>
>>
>> Best of luck,
>> ak
>
> Thanks for the idea.
> Actually I was considering this a while ago. I even printed out the
> manual.(I have lout in linux.)
> However, from what I read there I gained the feeling that
> -- it doesn't know utf (thus you can't really just write a single
> letter 'alpha' as you can in troff)
> -- it somehow seems to be an 'all together software' (as opposed to
> tbl/pic/eqn/...), which I don't like.
> -- the syntax for writing math is more complicated than in eqn. The
> syntax is rather closer to TeX, which I wanted to avoid, though the
> results, I feel, are no better than eqn's.
> True, I haven't actually tried the software much. May be that I am
> also wrong in some points.
>
> Well, don't take me wrong. I have not much against (plain)TeX. When I
> was about 15 and got a printed version of TeXBook, METAFONT, I was
> amazed. Its documentation can't be better (nothing to compare to
> anything). The algorithms are superior. It's not so big either
> (although today's distributions are horrible, >1GB [this I really
> hate]; but the core, as someone here is trying to put up, is fine; I
> mean KerTeX or what). It's only that troff is even much simpler and
> yet good enough. And also that the notation is much more human. Making
> a table with tbl or a simple graph with grap is a pleasure. Equations
> written for eqn can be read back from the source, without seeing
> millions of \\\\\\\.This is, I would say, what totally grabbed me. And
> the documentation as written by Kernighan is also awesome --- short,
> answers many potential questions right away, explains things clearly.
> This is why I also like plan 9, generally (though almost whatever I
> try doesn't work). TeX is very 'strict', precise; but you must have a
> good knowledge of it to talk it into something. Troff is more
> straightforward, simpler, and is more fun, some things are playful,
> e.g. traps.
>
> Thanks
> Ruda
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-11 22:18 ` Russ Cox
2010-09-12 9:25 ` Rudolf Sykora
@ 2010-09-13 14:05 ` Jeff Sickel
2010-09-13 14:28 ` ron minnich
2010-09-13 14:30 ` erik quanstrom
1 sibling, 2 replies; 10+ messages in thread
From: Jeff Sickel @ 2010-09-13 14:05 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Sep 11, 2010, at 5:18 PM, Russ Cox wrote:
> That sounds about right, unfortunately.
> You might be better off just using TeX.
> It's better at math, it runs on Plan 9,
> and your colleagues who don't use
> Plan 9 will still be able to collaborate
> on documents with you.
Has anyone experimented with using TeX to generate equations, store them as .eps, and then insert them into troff in some way that makes:
.BP eqn1.eps
.EP
look like
.EQ (1)
sqrt{ {x sup 2 + x + 1} over {x - 1}}
.EN
Only without the broken font/line drawing when converted from postscript to pdf?
Convoluted I know, but it sure would make $\sqrt{ {{x^2 + x + 1}\over {x-1}} }$ look more acceptable in a PDF generated on Plan 9 from troff source.
-jas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-13 14:05 ` Jeff Sickel
@ 2010-09-13 14:28 ` ron minnich
2010-09-13 14:30 ` erik quanstrom
1 sibling, 0 replies; 10+ messages in thread
From: ron minnich @ 2010-09-13 14:28 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Sep 13, 2010 at 7:05 AM, Jeff Sickel <jas@corpus-callosum.com> wrote:
> Has anyone experimented with using TeX to generate equations, store them as .eps, and then insert them into troff in some way that makes:
>
> .BP eqn1.eps
> .EP
>
> look like
>
> .EQ (1)
> sqrt{ {x sup 2 + x + 1} over {x - 1}}
> .EN
>
> Only without the broken font/line drawing when converted from postscript to pdf?
>
> Convoluted I know, but it sure would make $\sqrt{ {{x^2 + x + 1}\over {x-1}} }$ look more acceptable in a PDF generated on Plan 9 from troff source.
now you're getting silly :-)
ron
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9fans] troff fonts with special characters
2010-09-13 14:05 ` Jeff Sickel
2010-09-13 14:28 ` ron minnich
@ 2010-09-13 14:30 ` erik quanstrom
1 sibling, 0 replies; 10+ messages in thread
From: erik quanstrom @ 2010-09-13 14:30 UTC (permalink / raw)
To: 9fans
> .EQ (1) sqrt{ {x sup 2 + x + 1} over {x - 1}} .EN
>
> Only without the broken font/line drawing when converted from
> postscript to pdf?
>
> Convoluted I know, but it sure would make $\sqrt{ {{x^2 + x + 1}\over
> {x-1}} }$ look more acceptable in a PDF generated on Plan 9 from troff
> source.
i know i did something with this. i think i was convinced
that part of the problem was eqn was using the wrong font.
- erik
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-09-13 14:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-10 12:14 [9fans] troff fonts with special characters Rudolf Sykora
2010-09-11 19:18 ` Rudolf Sykora
2010-09-11 22:18 ` Russ Cox
2010-09-12 9:25 ` Rudolf Sykora
2010-09-12 18:25 ` Akshat
2010-09-12 19:38 ` Rudolf Sykora
2010-09-12 20:49 ` Akshat
2010-09-13 14:05 ` Jeff Sickel
2010-09-13 14:28 ` ron minnich
2010-09-13 14:30 ` erik quanstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).