Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #57961
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | vallor <vallor@cultnix.org> |
| Newsgroups | comp.os.linux.misc |
| Subject | Document processing -- modern deroff(1)? |
| Date | 15 Aug 2024 05:30:25 GMT |
| Lines | 43 |
| Message-ID | <li5i3hFl6f1U1@mid.individual.net> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net /TvbbQEFjZpCrrYcHBR0mAdCRl1U31JmKMIqfY33U+JzG7aqk0 |
| Cancel-Lock | sha1:fcu3ttFePt6+x7p0xa2VCWCVFiI= sha256:5GJdxER7ryeUc1rgJp8HDOmfcGO7DBWkixsWUdIrC+k= |
| X-Face | +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl CaKku`)]}.V/"6rISCIDP` |
| User-Agent | Pan/0.160 (Toresk; f608461; Linux-6.11.0-rc3) |
| Xref | csiph.com comp.os.linux.misc:57961 |
Show key headers only | View raw
So I'm (finally) writing a book, and using groff -mom macros
for typesetting. Wanted to run what I have so far through
style(1) and diction(1), which on Linux requires one to
run the input through deroff(1) first.
Linux doesn't seem to have deroff.
So, here is my q&d solution:
$ cat mini_deroff.pl
#!/usr/bin/perl
%roffchars = ('.',1,' ',1,"\\",1);
while(<>)
{
if(/^\.PP/) { print "\n"; }
next if (exists($roffchars{substr($_,0,1)}));
print;
}
exit 0;
Constructive comments appreciated.
BTW, if there's interest in the document processing, I have
a Makefile that eases the pain of processing, including
a "make look" rule that gens the pdf and views it.
Also, if anyone knows where there is source for a working
Linux deroff(1), would very much appreciate the pointer.
So far I found the OpenBSD one, but it seems to rely on
a lot of preprocessor macros that Linux doesn't have.
Finally, one last look on Google, and I found a version
of deroff for Debian... but it seems to be dated 1996, and doesn't
grok -mom macros. (It is, however, written in lex, which
might be an opportunity for me to learn that lingo and
fix it...)
--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
OS: Linux 6.11.0-rc3 Release: Mint 21.3 Mem: 258G
"Cause of crash: Inadvertent contact with the ground."
Back to comp.os.linux.misc | Previous | Next — Next in thread | Find similar
Document processing -- modern deroff(1)? vallor <vallor@cultnix.org> - 2024-08-15 05:30 +0000
Re: Document processing -- modern deroff(1)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-15 06:24 +0000
Re: Document processing -- modern deroff(1)? Nuno Silva <nunojsilva@invalid.invalid> - 2024-08-15 11:39 +0100
Re: Document processing -- modern deroff(1)? vallor <vallor@cultnix.org> - 2024-08-16 14:04 +0000
Re: Document processing -- modern deroff(1)? Rich <rich@example.invalid> - 2024-08-15 14:33 +0000
Re: Document processing -- modern deroff(1)? vallor <vallor@cultnix.org> - 2024-08-16 01:59 +0000
Re: Document processing -- modern deroff(1)? "Carlos E.R." <robin_listas@es.invalid> - 2024-08-15 23:25 +0200
Re: Document processing -- modern deroff(1)? Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2024-08-17 15:14 +1000
csiph-web