tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Heirloom Troff for NetBSD



On 09.06.2015 14:58, Mouse wrote:
>> I'm arguing that
> 
>> 	.B here
> 
>> is better than
> 
>> 	<b>here</b>
> 
>> because that ratio is 3/4 (counting the space after ".B") versus 7/4.
>> IOW, troff supports the tersest markup language.  And that's a good
>> thing because it minimizes the author's work.

Markdown's *here* is shorter.

My last article was prototyped in GitBook https://www.gitbook.com/

Quick how-to:
1. Install from pkgsrc: lang/nodejs
2. Type the following command (as the root user for not unprivileged):
$ npm install gitbook-cli -g

And we are done.

For your first GitBook please follow:
https://github.com/GitbookIO/gitbook
http://help.gitbook.com/index.html.

I wrote my thesis in Lout -- it's pretty good option for a simple book,
but unlikely good for general typesetting. The show stopper is immanent
lack of UTF-8. I was looking for a sane light alternative to LaTeX and
found Lout.

Lout's syntax is limited for its use-case and at times misguiding, like
a line "//" resembling a comment in C is a part of syntax and general
NOP (no operatin) in code. My impression was that Lout tries to ignore
bad syntax on the cost of generating trash output.

My front page was done with LaTeX as it was impossible to do it with
Lout and match requirements.

(Thanks uwe@ for his helping and narrowing the problem of mine at that
time! I was already a NetBSD user at that time without valgrind at
hand... to debug memory corruption)

> I think troff syntax is a good thing to
> use not because it's terse but rather because it has a lot of history
> behind it (documents written using it, people knowing it), enough to
> outweigh the minor advantages of switching away from it (all IMO).
> 

I'm a roff ignorant, I just write man-pages in mandoc(1).

My suggestions for a good groff replacement for typesetting:
- liberal license,
- i18n and UTF-8 support,
- lightweight, minimal and C,
- not reimplementing half of libc,
- simple to use,
- feature complete (not leaved alone with stubs in implementation),
- not reimplementing *roff syntax, at least partly groff compatible,
- drop-in replacement for existing *roff basic documents,
- export to Post Script.

Nice to have:
- active users and developers,
- export to html,
- extensible with Lua.

In general the base tool should be good enough for daily use.
Professional DTP or master thesis will be done with tools from pkgsrc,
like LaTeX, XML et hoc genus omne.

I don't see need for PDF/DVI generation from a base tools, it's rather
complex and something "extra", easily doable with the ps2pdf or ps2dvi
tools.

Heirloom seems to fit the needs well, even supporting hyphenation! Its
overall syntax is legible [1] for an ignorant and the output [2] pretty
good.

[1]
https://github.com/n-t-roff/heirloom-doctools/blob/master/stuff/demo/troffdemo.tr
[2] http://heirloom.sourceforge.net/doctools/troffdemo.pdf


Home | Main Index | Thread Index | Old Index