Re: [Groff] How remove title?

2015-06-16 Thread Dale Snell
On Mon, 15 Jun 2015 10:20:16 -0500, in message
CABrM6wk=CwdfeHVE0YfvdEUSrJ5tA67Y4iUWQ=lcbvfsm_3...@mail.gmail.com,
Peng Yu wrote:

> > pdfman < $(man -w ls) | groff -Tpdf -mandoc -c > /tmp/ls.pdf
> 
> I got this error. Do you know what is wrong?
> 
> groff: can't find `DESC' file
> groff:fatal error: invalid device `pdf'

It looks to me like the directory

/usr/{share,local/share}/groff/current/font/devpdf

couldn't be found.  Some Linux distributions by default include
only a very cut-down groff installation, useful only for
generating man pages for terminal use.  For general-purpose use,
the entire set of groff packages has to be installed manually.

If you're using a Red Hat system of some sort, it's fairly easy to
determine how much of groff you've got:

$ yum list installed groff\*

If that command returns only something like:

groff-base.x86_64  1.22.2-11.fc21

then all you've got is the minimal, man-page-only installation.
If you've got the entire thing, you should see:

groff.x86_64   1.22.2-11.fc21
groff-base.x86_64  1.22.2-11.fc21
groff-doc.noarch   1.22.2-11.fc21
groff-perl.x86_64  1.22.2-11.fc21
groff-x11.x86_64   1.22.2-11.fc21

(Note that these packages are from my 64-bit Fedora 21 system.
Hence the ".x86_64" and ".fc21" fields.)

If you're running a Debian-based system, synaptic or apt can give
you the same information.  I don't know how to use them, though,
so I can't provide any examples.

Of course, if you've built your groff directly from sources, you
can ignore most of what I wrote above.  Except for the part about
the devpdf directory being missing.  That looks to be your
immediate problem.

Anyway, I hope this helps.

--Dale

-- 
The question of whether computers can think is just like the
question of whether submarines can swim.
-- Edsger W. Dijkstra


pgpmN2cDI_Yhu.pgp
Description: OpenPGP digital signature


Re: [Groff] MIssion statement

2015-07-08 Thread Dale Snell
On Wed, 08 Jul 2015 20:29:28 +0100, in message
20150708192928.4dc4828...@orac.inputplus.co.uk, Ralph Corderoy wrote:

> Hi Peter,
> 
> > > > http://www.gnu.org/software/groff/groff-mission-statement.pdf
> ...
> > When I check the link, the PDF is fine.  It hasn't been touched
> > since it was uploaded.  Anybody else getting "totally unreadable"?
> 
> To confirm we're all using the same bytes,
> 
> $ curl -sS
> http://www.gnu.org/software/groff/groff-mission-statement.pdf |
> > sha1sum
> 93cc5719150cfa2a74fbd265e26cb3876529b4b6  -

I get the same sha1sum here.  I have no trouble reading the mission
statement; the PDF is fine.  I've used Firefox's internal PDF viewer,
and the qppdfview program; both work fine.

--Dale

-- 
"Come, muse, let us sing of rats."  -- James Grainger


pgpOZRMURCHcq.pgp
Description: OpenPGP digital signature


Re: [Groff] How to move page format definition to command line options

2015-10-01 Thread Dale Snell
On Thu, 01 Oct 2015 00:12:32 -0700, in message
dee5c46f-d4b7-4426-8068-571e2eb09...@me.com, Marisa Giancarla wrote:

> Right now i have the pages defined at the top of each with ".PGFORM
> 80 1000 0 1" but i would like to move this to the command line
> arguments so i can use the same content for 80x24 for plain text
> version and 8.5x11 for the PDF version. Can someone give me tips on
> doing this?
> 
> Thanks!
> 
> Marisa


I think you'll need to do some in-document modifications first.
See sections 5.20.1 and 5.20.2 in the Groff manual.  You can use
the .ie and .el requests to set up the different settings you need
for nroff (terminal output) and troff (PDF output).  E.g.,

 .ie n  \" nroff setup
 .el  \" troff setup

If you need more than one line, you can use \{ and \} to build
blocks of code; the manual shows how.

Once that's done, you can create your documents with "nroff -mm ..."
and "troff -mm ...".  Groff will then Do The Right Thing™ and
build your documents the way you want.

Hope this helps.

--Dale

-- 
"It is by caffeine alone I set my mind in motion.  It is by the
beans of Java that thoughts acquire speed, the hands acquire
shakes, the shakes become a warning.  It is by caffeine alone I set
my mind in motion."-- The Programmer's Mantra


pgpIWtlQqF9CL.pgp
Description: OpenPGP digital signature


Re: [Groff] Typesetting Russian text using pdfmom

2015-11-05 Thread Dale Snell
On Fri, 6 Nov 2015 09:35:11 +1300, in message
20151106093511.29117daacdac1c54130fe...@retro-freedom.nz, Koz Ross
wrote:

> I'm trying to compile a document full of Russian, which Emacs renders
> without issue. When I try to call 'pdfmom -K utf-8 sourcefile.mom >
> outputfile.pdf', I get a whole pile of warnings that look like this:
> 
> sourcefile.mom:2: warning: can't find special character `u0410'
> [these repeat a few times with different characters]
> sourcefile.mom:3: warning: can't find special character `u0413'
> [these repeat a few more times with different character codes]
> sourcefile.mom:3: can't translate character code 208 to special
> character `-D' in transparent throughput [these repeat a whole bunch
> of times, with a bunch of codes, many of which appear many times]
> 
> The end result comes out full of garbage symbols. What am I doing
> wrong here?


Which font are you using?  It looks to me like you're using a font
that doesn't have any Cyrillic character glyphs.  So far as I
know, the standard font files do not contain Cyrillic characters.
The "U-*" (e.g., U-PR) font files do, however.  (They also contain
things like "ō", which I use.)

If you are using a font with Cyrillic characters, then I have no
idea what's up.  :-(  In that case, you might want to post a
minimal .mom file that exhibits this problem, so that the denizens
here can look at it and suggest remedies.

Hope this helps.

--Dale

-- 
Imagine if every Thursday your shoes exploded if you tied them the
usual way.  This happens to us all the time with computers, and
nobody thinks of complaining.-- Jeff Raskin


pgpKqQ08grV8_.pgp
Description: OpenPGP digital signature


Re: [Groff] sidebars

2016-04-18 Thread Dale Snell
On Mon, 18 Apr 2016 14:46:05 -0400, in message
20160418144605.a5bbde8b82c39ab43e361...@schemamania.org, James K.
Lowden wrote:

> While I'm in the groff neighborhood, I'd like to ask for advice for a
> style of layout I don't see any direct support for.  
> 
> Readers of this list might have read The Annotated Alice.  The text of
> Alice in Wonderland is full size, and the outer edges of the page have
> copious side-notes whose vertical location coincides with the text
> they're commenting on.  Reading the text, the reader can easily refer
> to the running commentary along the edge.  Depending on mood and
> interest, sometimes the commentary is more interesting than the text
> itself.  
> 
> Like footnotes, the sidenotes are distinguished from the main text by
> the font size.  Unlike footnotes, they alternate location on odd and
> even pages.  
> 
> I don't see any simple way of using .2C in -ms to emulate that layout,
> nor does .MCO in MOM look suitable. I suppose it requires a whole
> different set of macros.  How would you approach it?  

Check out MOM's "Margin Notes".  I've never had need of them, but
they sound like just what you want.

--Dale

-- 
Sign in coffee shop:  "Children left unattended will be given an
espresso and a Free Puppy."


pgpQ2mvT8idCH.pgp
Description: OpenPGP digital signature


Re: [Groff] mom : unicode in .INCLUDE'd files

2017-07-23 Thread Dale Snell
On Sun, 23 Jul 2017 17:01:01 +0200, in message
20170723170101.589b486e@e.h, E. Hoffmann wrote:

>I keep getting the error messages:
> 
> example.mom:12: warning: can't find special character `u004F_0306'
> example.mom:12: warning: can't find special character `u004F_0304'
> example.mom:12: warning: can't find special character `u006F_0306'
> example.mom:12: warning: can't find special character `u006F_0304'
> 
> Which means, Ŏ Ō  and  ŏ ō are nowhere recognized.

Hi Erich,

I suspect that the typeface you're using simply doesn't have the
"char-with-breve" and "char-with-macron" characters.  That
happened to me a while back.  I needed vowels with macrons to
print out some Romaji (romanized Japanese) words.  I kept getting
errors like yours.  I did a bit of digging, and found that the
standard Palatino Roman (P) font didn't have those characters.
However, the U-P font did.  So I switched to that font and haven't
had any trouble since.  The U- fonts should be part of
the standard 1.22.3 version of Groff.

Just a thought.

--Dale

-- 
“Build a man a fire, and he’ll be warm for a day.  Set a man on
fire, and he’ll be warm for the rest of his life.”
-- Sir Terry Pratchett.



Re: [Groff] mom : unicode in .INCLUDE'd files SOLVED

2017-07-23 Thread Dale Snell
On Sun, 23 Jul 2017 19:53:31 +0200, in message
20170723195331.e142bd644d56abfc8b87f...@gmx.de, E. Hoffmann wrote:

> The U- do the trick.
> 
> Now I only have to figure out how mom sets the basic font.
> the .FAMILY macro doesn't accept seem to accept U-***, I have to
> insert the .FT U-TR &c. after each .PP macro.

That's odd, it works fine for me.  I've got

.FAMILY U-P
.FT R

in various .mom files, and I've not had any trouble with the fonts
loading.  Actually, I've put those lines in a "style-sheet" file
that gets loaded into my regular .mom files.  I don't know what
the problem could be.  What error messages are you seeing?

--Dale

-- 
“The clean sleek looks of Star Trek is where we will aim and
Babylon 5 is where we’ll end up.”
   -- Dwight Shultz


pgppfC532Elim.pgp
Description: OpenPGP digital signature


Re: [Groff] mom : unicode in .INCLUDE'd files

2017-07-23 Thread Dale Snell
On Sun, 23 Jul 2017 21:49:08 +0100, in message
10148543.2b2auin...@pip.chuzzlewit.co.uk, Deri James wrote:

> Hi Dale,
> 
> It ought to work if you include:-
> 
> -P-yU
> 
> On the pdfmom command line. This should tell gropdf to use the U-
> foundry, so you don't have to alter the actual mom document.

Thanks, Deri, that's something I didn't know.  I must have missed
it when I read the docs for gropdf.  That or I simply forgot about
that option, since I normally use pdfmom to build my PDFs.

I suppose should re-read the docs.  :-)

--Dale

-- 
When the fog came in on little cat feet last night, it left these
little muddy paw prints on the hood of my car.



Re: [Groff] pdfmom warning: can't find special character `u0065_0304'

2017-08-17 Thread Dale Snell
On Thu, 17 Aug 2017 05:57:18 -0600, in message
20170817055718.b8d3688fb175223088a8e...@xmission.com, Dominic Jones
wrote:

> Good morning,
> 
> I'm trying to insert an e with a macron (unicode u0113) in a document
> using pdfmom.  I've tried several ways of representing the character
> in addition to ''\[u0113]'', which gives me the message:
> 
> warning: can't find special character `u0065_0304'

Hello Dominic,

This sounds like a font problem.  Vowels with a macron accent are
not part of the stock fonts in groff.  Try using the URW fonts
instead.  E.g., 

.FAMILY U-P

 instead of

.FAMILY P

for Palatino.  I had a similar problem some time back, trying to
output Japanese Romaji.  I wound up doing quite a bit of digging
before I realized what was happening.  I wound up adding some
.char requests to my local .tmac file.  E.g.,

.char \[-a] \[u0061_0304]
.char \[-e] \[u0065_0304]

and so on for both lower- and upper-case characters.  So now, all
I need to do is enter \[-o] in my running text to get an "ō"
character.

Anyway, I hope this helps.

--Dale

-- 
I don’t like when people talk to me.  I can’t hear the voices.



Re: [Groff] pdfmom warning: can't find special character `u0065_0304'

2017-08-19 Thread Dale Snell
On Fri, 18 Aug 2017 16:54:12 -0600, in message
20170818165412.0c2a3330b4867c51e2f10...@xmission.com, Dominic Jones
wrote:

> 
> I had tried using the U-P font, but I set it at the command line via
> ''-f''.  I presume the fact that the document had ''.FAMILY P'' in it
> then proceeded to override the command line setting...
> 

"-f" or "-F"?  Both options exist.  In your original posting you
said you had used "-F U-P".  That will not give you what you
wanted.  "-F " searches a directory (or directory path) for
sub-directory  (where devname is the name of the output
device) and the DESC file and font files.  Giving it the font name
won't work at all.  "-f" selects "" as the default font
family.  You'd still have to select the style of font -- R, I, B,
or BI.

As far as I know, any request or macro to change the font family
or style would override the command line option(s).  For myself,
I always set my fonts within my document; I've never used the
command line option.  (Actually, I set the default font in a style
sheet file, e.g., custom-mom.mom, and then make any necessary
changes in the document proper.)

--Dale

-- 
Be comforted, that in the face of all aridity and disillusionment,
And despite the changing fortunes of time,
There is always a big future in computer maintenance.
-- National Lampoon, "Deteriorata"



Re: [Groff] pic.ps

2017-09-27 Thread Dale Snell
On Wed, 27 Sep 2017 11:43:40 -0400, in message
201709271543.v8rfhebu128...@tahoe.cs.dartmouth.edu, Doug McIlroy wrote:

> The Fedora system I have access to lacks /usr/share/doc/groff, and
> in particular the wonderful tutorial /usr/share/doc/groff/pic.ps.
> Was that omitted from groff 1.22.3, or did it get dropped somewhere
> in the chain of custody between there and here?

What version of Fedora are you using?  In my Fedora 25 box, that
file does exist.  Here's the list for the entire directory:

   $ ls -AF /usr/share/doc/groff
   examples/  meintro.me  meintro_fr.me  meref.me  pdf/pic.ps
   html/  meintro.ps  meintro_fr.ps  meref.ps  pic.ms

It occurs to me that the full groff package set may not have been
installed.  Fedora defaults to loading only the package
"groff-base" so that man pages can be displayed.  To actually use
groff for any other purpose, the packages "groff", "groff-doc",
"groff-perl", and "groff-X11" have to be installed.  Annoying, but
there it is.

Hope this helps.

--Dale

-- 
“The more they over-think the plumbing, the easier it is to stop
up the drain.”-- Scotty, “Star Trek III: The Search for Spock”



Re: [Groff] [PATCH] Expand portable escape section of groff_man(7).

2017-10-15 Thread Dale Snell
On Sun, 15 Oct 2017 12:33:06 -0400, in message
20171015163304.4ydwyl5tl6lpg...@crack.deadbeast.net, G. Branden
Robinson wrote:

> 
> Hrm, well, let me just try that again...
> 


If anyone cares, it looks okay to me, with one exception:

+white space or is inserted between the last glyph resulting from this
  ^^^
   white space or what?

Typo, or have I simply not had enough caffeine this morning?

--Dale

-- 
“Rules of combat older than contact with other races.  Did not
mention aliens.  Rules change... caught up in committee.  Not
come through yet.”
-- Drazi Green Leader; Babylon 5, “The Geometry of Shadows>"



Re: [groff] 04/04: tmac: Move macro diagnostics away from `quotes'.

2017-11-20 Thread Dale Snell
On Mon, 20 Nov 2017 11:39:58 +, in message
20171120113958.48c7c20...@orac.inputplus.co.uk, Ralph Corderoy wrote:

> Hi Branden,
> 
> > > What was provided is scheduled for replacement according to ESR.
> >
> > Do you have some more information in this?
> 
> ESR mentioned it on this list, but the archive's search facility broke
> after my first query.
> 


Hi Ralph,

I grepped through my email archive and found what you're looking
for (I think):

Date: Fri, 28 Feb 2014 12:15:35 -0500
From: "Eric S. Raymond" 
Message-ID: <20140228171535.ga2...@thyrsus.com>
Subject: Re: [Groff] man pages (tangential to Future Redux)

Hope this helps.

--Dale

-- 
Lensmen eat Jedi for breakfast.



Re: [groff] seeking fixed-width breakable space

2019-02-22 Thread Dale Snell
You might try using "\:", which is a zero-width break point, similar to
"\%", except that it doesn't have the hyphen.  I have not tested this, but
you should be able to do something like "mrphl\|\:blrphl" and the two words
should be separated by a thinspace
that can break.  At least, I think it should work.

Hope this helps.

--dds

-- 
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_

On Thu, Feb 21, 2019, 11:47 PM Dave Kemper  wrote:

> On 2/21/19, G. Branden Robinson  wrote:
> > At 2019-02-21T19:40:18-0600, Dave Kemper wrote:
> >> As far as I can determine, groff does not offer a fixed-width,
> >> breakable space.
> >
> > Will the digit space (\0) do?
>
> It would if it were breakable.
>
> printf '.ll 1c\na b c d e f g\n' | groff -a
> printf '.ll 1c\na b c d e f g\n' | sed -E 's/ ([b-g])/\\0\1/g' | groff -a
>
>


[groff] Wierd font troubles

2019-03-24 Thread Dale Snell
Hi folks,

I just updated my computer to Fedora 29, and downloaded the latest version
of groff (1.22.4).  When I ran configure, it couldn't find the URW++
fonts.  Turned out I hadn't installed them.  D'oh!  Installed them, but
configure still couldn't find them.  I added the --with-urw-fonts-dir
option, but configure _still_ couldn't find them.  It took me some digging
(and pulling out what little hair I have left), but I found a couple of
problems:

1)  URW++ has changed their file names to something human-readable,
instead of the nigh-password-worthy names they used to use.

2)  URW++ no longer ships *.pfb files in their base35 fonts package.
Insead, they ship *.otf, *.afm, and *.t1 files.

configure looks in the urw-base35 fonts directory
("/usr/share/fonts/urw-base35" in Fedora) for "a010013l.pfb", which is now
"URWGothic-Book.pfb", to determine if the URW++ fonts are there.
Naturally, since the file didn't exist, it decided that there weren't any
fonts to install.  Thinking I could work around the problem, I used
FontForge to create .pfb files out of the .otf files.  Then I created
symbolic links to the apropriate old-style file names and ran configure.
Success!  Huzzah!

Alas, it was too soon to cheer.  When I ran make, BuildFoundries couldn't
build the groff fonts, and I don't know why.  The error message is:

"BuildFoundries: warning: line 77: Failed to create groff font 'U-AB'
by running afmtodit"

where the line number increments by one for each groff font it can't build.

At this point I'm lost.  I am not a Perl programmer, so I don't know what
BuildFoundries is actually doing.  There is probably something very simple
going worng, but I don't know where to look.

Anyway, I gave up on groff installing the fonts automatically and used
Peter Schaffter's "install-fonts.sh" script.  Worked like a charm (thanks
Peter!).  So I installed several other typeface families (Linux Libertine
and TeX Gyre, among others).  All was well, or so I thought.

I did some work on a project file and ran it through groff (via pdfmom) to
build a PDF.  It seemed to have worked until I looked more closely.  Much
to my surprise, the ASCII single-quote character "'" which is supposed to
be rendered as a typographic single-quote, was still coming out as a
typewriter single-quote.  I tried changing font families and found
something very odd.  The fonts that groff installed work as expected.  The
ones I installed have the problem.  I have no idea why.  I can work around
the problem by adding a ".tr '\[cq]" line to the source file.  Still, I'd
like to know where things went wrong so that I can fix it.  Does anyone
have any suggestions?  Right now I have no idea where to start looking.

--Dale

P.S.  What's a .t1 file?  My google-fu failed me; all I could find was a
reference to "male MRI" files.  Funny, I didn't know that MRI files had
gender.  At least, nobody said anything about it when my MRIs were taken.


-- 
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_


Re: [groff] Wierd font troubles

2019-03-24 Thread Dale Snell
*P.S.  What's a .t1 file?*


> T1 = Type 1 font file
<https://en.wikipedia.org/wiki/PostScript_fonts#Type_1>. It's a PostScript
program with an encrypted subset of drawing commands
> which produce letterforms. Note that there's no standard file extension
for Type 1 fonts; pfa and
> pfb are typically more common (PFA and PFB are more-or-less the same,
except the latter uses
> raw binary whilst the former uses ASCII. PFA = "Printer Font ASCII", PFB
= "Printer Font Binary").

Thank you for the explanation.  I wondered if it might not be something
like that, but as I said, the only description I could find was for the MRI
files.  Is there any way to use a .t1 file in groff?  Convert it to .pfa,
for instance?  (I would not be surprised if the answer is no, but I thought
I should ask.)

*When I ran make, BuildFoundries couldn't build the groff fonts, and I
don't know why.*


> I've not looked too thoroughly into Groff's makefiles, but you shouldn't
need to run make to generate
> font descriptions from AFM files. Are you using the afmtodit binary (that
should be) available in your
> $PATH?

Make automatically runs BuildFoundries when Groff is built, it's in the
"build the URW++ Basic35 fonts" part of building Groff.  I didn't have to
do anything special.  And yes, afmtodit is in my $PATH.


*Then I created symbolic links to the apropriate old-style file names and**ran
configure. Success!  Huzzah!*


> Needless to say, you shouldn't have to be doing that. This is something
that should really be fixed
> on Groff's end...

I'll certainly agree with that.  My thought is that Groff should simply
include the URW++ fonts by default.  Given that both Fedora and Debian have
deprecated Type1 support, it probably won't be too much longer before those
fonts won't be available from the distros' repositories at all.
Show quoted text
--Dale

-- 
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_

On Sun, Mar 24, 2019, 2:38 PM John Gardner  wrote:

>
>>
>> *P.S.  What's a .t1 file?  My google-fu failed me; all I could find was
>> areference to "male MRI" files.  Funny, I didn't know that MRI files
>> hadgender.  At least, nobody said anything about it when my MRIs were
>> taken.*
>
>
> T1 = Type 1 font file
> <https://en.wikipedia.org/wiki/PostScript_fonts#Type_1>. It's a
> PostScript program with an encrypted subset of drawing commands which
> produce letterforms. Note that there's no standard file extension for Type
> 1 fonts; pfa and pfb are typically more common (PFA and PFB are
> more-or-less the same, except the latter uses raw binary whilst the former
> uses ASCII. PFA = "Printer Font ASCII", PFB = "Printer Font Binary").
>
> *When I ran make, BuildFoundries couldn't build the groff fonts, and I
>> don't know why.*
>
>
> I've not looked too thoroughly into Groff's makefiles, but you shouldn't
> need to run make to generate font descriptions from AFM files. Are you
> using the afmtodit binary (that should be) available in your $PATH?
>
>
>> *Then I created symbolic links to the apropriate old-style file names 
>> and**ran
>> configure. Success!  Huzzah!*
>
>
> Needless to say, you shouldn't have to be doing that. This is something
> that should really be fixed on Groff's end...
>
> On Mon, 25 Mar 2019 at 07:24, Dale Snell  wrote:
>
>> Hi folks,
>>
>> I just updated my computer to Fedora 29, and downloaded the latest version
>> of groff (1.22.4).  When I ran configure, it couldn't find the URW++
>> fonts.  Turned out I hadn't installed them.  D'oh!  Installed them, but
>> configure still couldn't find them.  I added the --with-urw-fonts-dir
>> option, but configure _still_ couldn't find them.  It took me some digging
>> (and pulling out what little hair I have left), but I found a couple of
>> problems:
>>
>> 1)  URW++ has changed their file names to something human-readable,
>> instead of the nigh-password-worthy names they used to use.
>>
>> 2)  URW++ no longer ships *.pfb files in their base35 fonts package.
>> Insead, they ship *.otf, *.afm, and *.t1 files.
>>
>> configure looks in the urw-base35 fonts directory
>> ("/usr/share/fonts/urw-base35" in Fedora) for "a010013l.pfb", which is now
>> "URWGothic-Book.pfb", to determine if the URW++ fonts are there.
>> Naturally, since the file didn't exist, it decided that there weren't any
>> fonts to install.  Thinking I could work a

Re: [groff] Wierd font troubles

2019-03-25 Thread Dale Snell
Thank you for the info.  The .t1 files in the URW++ base 35 package appear
to be PFB files.  I tried replacing my FontForge-generated PFB files with
symlinks to the .t1 files, plus a link from URWGothic-Book.pfb to
a010013l.pfb.  Then I re-ran configure, without using
--with-urw-fonts-dir=...  configure found everything just as it should
have.  BuildFoundries, alas, still pukes when trying to add the URW++ fonts.

Oh, and as for afmtodit, there are two versions on my system.
/usr/bin/afmtodit is v1.22.3, which is reasonable, since that's the version
of Groff included with Fedora 29.  /usr/local/bin/afmtodit is v1.22.4.
Again reasonable since it comes from the latest Groff tarball.  The local
version is the one my system uses by default.

--Dale

-- 
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_

On Sun, Mar 24, 2019, 6:44 PM John Gardner  wrote:

> *Is there any way to use a .t1 file in groff?*
>
>
> You might find this article
> <https://www.freebsd.org/doc/en/articles/fonts/type1-fonts-groff.html>
> helpful. It was written a while ago, but I doubt anything's changed with
> Groff's font-handling that renders the page obsolete.
>
> *Convert it to .pfa, for instance?*
>
>
> A T1 file *is* a PFA file. Or a PFB, depending on whether the currentfile
> eexec block contains ASCII or binary data. As I said, there's no standard
> file extension for T1 fonts, and T1 itself doesn't say anything about how
> its encrypted portion (the lines after currentfile eexec…) is stored. If
> you open a T1, PFA or PFB file, you'll notice their headers are all
> PostScript source.
>
> On Mon, 25 Mar 2019 at 10:29, Dale Snell  wrote:
>
>>
>>
>> *P.S.  What's a .t1 file?*
>>
>>
>> > T1 = Type 1 font file
>> <https://en.wikipedia.org/wiki/PostScript_fonts#Type_1>. It's a
>> PostScript program with an encrypted subset of drawing commands
>> > which produce letterforms. Note that there's no standard file extension
>> for Type 1 fonts; pfa and
>> > pfb are typically more common (PFA and PFB are more-or-less the same,
>> except the latter uses
>> > raw binary whilst the former uses ASCII. PFA = "Printer Font ASCII",
>> PFB = "Printer Font Binary").
>>
>> Thank you for the explanation.  I wondered if it might not be something
>> like that, but as I said, the only description I could find was for the MRI
>> files.  Is there any way to use a .t1 file in groff?  Convert it to .pfa,
>> for instance?  (I would not be surprised if the answer is no, but I thought
>> I should ask.)
>>
>> *When I ran make, BuildFoundries couldn't build the groff fonts, and I
>> don't know why.*
>>
>>
>> > I've not looked too thoroughly into Groff's makefiles, but you
>> shouldn't need to run make to generate
>> > font descriptions from AFM files. Are you using the afmtodit binary
>> (that should be) available in your
>> > $PATH?
>>
>> Make automatically runs BuildFoundries when Groff is built, it's in the
>> "build the URW++ Basic35 fonts" part of building Groff.  I didn't have to
>> do anything special.  And yes, afmtodit is in my $PATH.
>>
>>
>> *Then I created symbolic links to the apropriate old-style file names 
>> and**ran
>> configure. Success!  Huzzah!*
>>
>>
>> > Needless to say, you shouldn't have to be doing that. This is something
>> that should really be fixed
>> > on Groff's end...
>>
>> I'll certainly agree with that.  My thought is that Groff should simply
>> include the URW++ fonts by default.  Given that both Fedora and Debian have
>> deprecated Type1 support, it probably won't be too much longer before those
>> fonts won't be available from the distros' repositories at all.
>> Show quoted text
>> --Dale
>>
>> --
>> "And finally, _thinking_ is an exercise to which all too few brains are
>> accustomed."  --E.E. "Doc" Smith, _First Lensman_
>>
>> On Sun, Mar 24, 2019, 2:38 PM John Gardner 
>> wrote:
>>
>>>
>>>>
>>>> *P.S.  What's a .t1 file?  My google-fu failed me; all I could find was
>>>> areference to "male MRI" files.  Funny, I didn't know that MRI files
>>>> hadgender.  At least, nobody said anything about it when my MRIs were
>>>> taken.*
>>>
>>>
>>> T1 = Type 1 font file
>>> <https://en.wikipedia.org/wiki/PostScr

[groff] Weird font troubles, redux

2019-04-06 Thread Dale Snell
Hi all,

You may remember my earlier posting regarding troubles I was having with
installing fonts for Groff.  For the most part, things have worked out well
enough.  However, there is still one problem that's hanging on, and that's
the refusal of Groff to properly replace an input typewriter apostrophe
with a typographic single quote.  I came up with a workaround, namely
putting a ".tr '\[cq]" request in my source files.  It kept bothering me
though, since it shouldn't be needed.  I kept trying to think of where the
problem could be coming from, without much success.  Yesterday, though, it
occured to me to change the command I use to build my PDFs, and bingo! it
worked.

Some background:  I normally use the MOM macro set; I really like it.  To
that end, I've taken to using the pdfmom wrapper to build my PDFs.

"pdfmom -k -mdpm inputfile.mom > outputfile.pdf"

where -mdpm refers to my personal Groff macros.  This has worked fine since
I started using it.  There is one error message that shows up, but it seems
harmless:

"troff: inputfile.mom:: can't transparently output node at top
level"
where  is the line number of the MOM .START macro.

When I added the .tr request, I saw eight (always eight) of the following
line:

"troff: inputfile.mom:: can't translate ''' to special
character 'cq' in transparent throughput"

Again,  is the location of the .START macro.  I changed my Groff
command string to

"pdfroff -k -mdpm -mom -mpdfmark --no-toc inputfile.mom >
outputfile.pdf"

and removed the .tr request.  Lo and behold, everything worked the way it
should.  Plus there are no error messages, which makes me happy.

I don't know why pdfroff works and pdfmom doesn't, but I'll leave that to
folks who understand those programs.  I felt that I should let folks know
what was going on, in case anyone besides me was tinkering with this.  (I'm
reminded of what some of my coworkers used to say when they needed to test
some software:  "Give it to Dale, he can break anything!"  Too true, alas.)

--Dale

-- 
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_


Re: [groff] Termux Android app and Groff

2019-05-17 Thread Dale Snell
 On Fri, May 17, 2019 at 10:44 AM Mikkel Meinike Nielsen
 wrote:
>
> Ok so I have teste now. I have got the fonts. It looks like this
>
> /data/data/com.termux/files/usr/share/groff/1.22.4/font
>

As a matter of style and safety, I would suggest putting any fonts
you add into .../groff/site-font/dev.  That way, when
you upgrade Groff, you won't lose your fonts.



> However changing the font family in the dokument does not give
> any result.
>
> For instance
>
> \# -- -- Set font family to Halvetica --- -- #
> \#
> .fam H
> .ft R
> \#
> \# -- -- Define colors -- -- #
>
> Was suppose to render my text in Halvetica
>
> The text however renders in some kind of Roman (Text with feets)

Yes, when Groff can't find the font you've selected, it defaults
to Times Roman.

>
> There are are no masseges in the compilation. It compiles
> "silent".
>
> Any other font family name i try with it gives the same result.
>
> So can you help my trubleshoot fuather??
>

This sounds to me like you haven't added your fonts and font files
to the ../dev{ps,pdf}/download files.  Groff needs those entries
to tell it what user-added font files to use.  Note that the
download files for devps and devpdf are different, though similar.
Peter Schaffter's documentation for his MOM macro package has
excellent instructions for adding fonts, including the entries for
the download files.  Basically, you need to find the internal name
for the font you're installing.  Assuming that you're on
a GNU/Linux system, the command

grep -i internalname 

where  is the name of the font you're adding, will give you
that name.  For the devps/download file, add the name to the file,
followed by a single space, then by the .t42 filename that
corresponds to your font.  (Each internalname/filename pair is on
a line by itself.)  The devpdf/download file is similar, EXCEPT
each line begins with a  character, and the internal name and
font file name are separated by a , NOT a space.  Why?
I don't know.  Hysterical raisins, I guess.

I really suggest reading Peter's documentation, it's much more
complete than anything I can write here.  Plus, his MOM package is
the kittens whiskers of Groff macro packages (IMHO, YMMV, etc.).

> //Mikkel

Hope this helps.

--Dale



Re: [groff] 04/05: {g, n}roff.1.man: Give assistance to pager users.

2019-07-02 Thread Dale Snell
On Tue, Jul 2, 2019 at 7:51 AM John Gardner  wrote:

> BTW, stupid question: how did people in the 70s read
> lengthy files without a pager...? When I ran Unix 7 on
> SIMH, it lacked both less(1) *and* more(1).

If more (or the equivalent) wasn't available, being
adroit with the  and  keys was the
usual way.  Loading the file into ex or the like could
also work, though I don't recall doing that myself.
Some terminals, the Tek 401x series especially, could
be configured to tell the host to stop sending text on
a "page full" condition.  Some sent the proper RS-232
hardware signals, some sent /.  The
Tek terminals I worked with actually sent a bit clock
to the host, which allowed the terminal to accept text
as fast as it could.  On "page full", it stopped
sending the bit clock, which stopped the text in its
tracks.  I suppose this saved trying to coerce the DEC
terminal card into DTRT with hardware signals.  (It's
been a long time, and my memory isn't what it was.)

-- 
--Dale

I have a simple question,
The truth I only wish:
Are all fishermen liars,
Or do only liars fish?



Re: [groff] Unicode fonts output

2019-08-06 Thread Dale Snell
On Tue, Aug 6, 2019, 12:33 PM Jean Louis  wrote
> How do I create U- fonts?

The URW++ fonts (i.e., U-*) should be installed when you build Groff.  One
would hope that your Gnu/Linux distro vendor would include them, but that's
not guaranteed.  Worse, URW++ changed the names of their files a while
back, and not all the distro vendors have caught up.  If the U-* fonts
won't install when you build Groff, you'll need to install new fonts
manually.  I suggest using the "install-font" script that is included with
MOM.  I used that to install the TeX Gyre fonts, which I am quite happy
with.  The TeX Gyre fonts are a replacement for the 35 URW++ PostScript
fonts, and work quite nicely.  (And before you ask, they do have "Č".  :-)
)  Installing the fonts is not difficult, but it is a bit time consuming.
Oh, and I strongly suggest installing them into the site-fonts directory:

/usr/local/share/groff/site-font/

This way you won't lose your fonts when you upgrade Groff.

> Do I need to use devpdf/util/BuildFoundries somehow?


I believe that BuildFoundries is for the internal use of the font
installation part of the Groff installation system.

> Is there example how to use it?

Not that I've ever seen.

Good luck, and I hope this helps!

-- 
--dds

"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_


Re: Two questons: Norwgegian characters and space when switching typeface

2019-11-04 Thread Dale Snell
For the Norwegian characters, you'll need to use constructions like "\[o/]"
and "\[ae]".  Forgive me, I'm away from my computer right now, and I can't
remember how to specify the "a-with-ring" character.  Read the man page for
groff_char(7); that has the whole list of special characters.  Oh, and you
may need to use the URW++ font files.  Those are the ones that start with
"U-".  Those fonts have more characters than the regular files.

As for the unwanted space character, try the following:

There should
.I not\c
be a space after not.

Hope this helps.

-- 
--dds

"And finally, _thinking_ is an exercise to which all too few brains are
accustomed."  --E.E. "Doc" Smith, _First Lensman_

On Sun, Nov 3, 2019, 11:09 PM Xianwen Chen (陈贤文) 
wrote:

> Dear list,
>
> Today is my second day trying out groff. I have over a decade
> experiences with LaTeX and a few years experiences with markdown.
>
> I have two questions.
>
> First question is on Norwegian characters: ø, å, and æ. It seems that
> I cannot type them as plain text, because the produced PDF file gives
> funny output.
>
> Second question is on the space when switching typefaces.
>
> Here is an example:
>
> (See for example,
> I. ABC
> )
>
> Now, this will produce a space between ABC and ). Is there some way
> that I can get rid of the space there?
>
> Yours sincerely,
> Xianwen
>
>


Re: Cannot find the module of “pfbtops"

2019-12-01 Thread Dale Snell
On Sun, 1 Dec 2019, wong kevin (kevinwong...@hotmail.com) wrote:

> Thanks Damian for the reply. I think it's not the 'psutils'
> package, actually 'pfbtops' is a part of 'Groff' package
> (refer to:  https://www.mankier.com/1/pfbtops ). I have
> installed the 'Groff' package as described by
> http://archive.linuxfromscratch.org/
> lfs-museum/5.1-pre1/LFS-BOOK-5.1-PRE1-HTML/chapter06/
> groff.html, but I'm not sure why only a part of it was
> installed. I got some information that someone also
> encountered the same problem
> (https://github.com/UCL-RITS/rcps-buildscripts/issues/163 ),
> but this guy didn't show how to solve this problem.

You are right that pfbtops is part of the Groff distribution.

My experience with Groff as provided by most distros is that there
is a "base Groff" package, which is installed by default.  This is
useful only for building man pages.  For a full Groff
installation, you'll need to pull in all the other groff-*
packages.  However, their version of Groff is likely to be several
years out of date.  (The current version of Groff is 1.22.4.)  IMO,
your best bet for installing Groff is to download it from the
official GNU site, and build it on your system.  The GNU Groff
page is:



and the download page is:



I can't help you with EPACTS, I'm afraid, so I'll just wish you
good luck with it.  :-)

Anyway, I hope this helps.

--Dale

-- 
A child of five could understand this!  Fetch me a child of five!

On Sun, Dec 1, 2019 at 10:42 PM wong kevin  wrote:
>
>
> Thanks Damian for the reply. I think it's not the 'psutils' package, actually 
> 'pfbtops' is a part of 'Groff' package (refer to: 
> https://www.mankier.com/1/pfbtops ). I have installed the 'Groff' package as 
> described by 
> http://archive.linuxfromscratch.org/lfs-museum/5.1-pre1/LFS-BOOK-5.1-PRE1-HTML/chapter06/groff.html,
>  but I'm not sure why only a part of it was installed. I got some information 
> that someone also encountered the same problem 
> (https://github.com/UCL-RITS/rcps-buildscripts/issues/163 ), but this guy 
> didn't show how to solve this problem.
>
>
> Best,
> Kevin
>
> -Original Message-
> From: Damian McGuckin 
> Sent: Monday, December 2, 2019 12:15 PM
> To: wong kevin 
> Cc: 'groff@gnu.org' 
> Subject: Re: Cannot find the module of “pfbtops"
>
> On Mon, 2 Dec 2019, wong kevin wrote:
>
> > checking for pfbtops... no
> > configure: error: Please install pfbtops from groff package at 
> > ftp://ftp.gnu.org/gnu/groff/ before installing.
>
> Isn't this is the 'psutils' package?
>
> Regards - Damian
>
> Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here 
> Views & opinions here are mine and not those of any past or present employer
>



Re: Got those old bad kerning blues

2021-05-08 Thread Dale Snell
On Sat, May 8, 2021 at 6:40 PM G. Branden Robinson
 wrote:
>
> Hi folks,
>
> I don't like the way the roman \[lq] is kerned with
> the bold \[rs] in the attached example, produced with
> "groff -Tpdf".
>
> Who do I complain to?  Er, that is, where should
> I look for the source of the problem?  Is the kerning
> information for the Times family incorrect?  Is my PDF
> viewer (evince) screwing up?  Is the kerning formally
> fine and simply doesn't align with my preferences?

Hi Brandon,

I'd say blame the kerning for the Times family.
I tried this with both TeX-Gyre-Pagella typeface
(which is what I usually use), and Times.  TGPagella
turned out fine.  My version with Times looked the
same as yours.  Ick.  I'd be playing games with MOM's
kerning escapes to get that to look right.  (Hm, be
right back...)  Okay, I just tried it.  Looks like
a \*[FU 4] or \*[FU 5] would fix it.  But of course,
that only works in MOM; I don't know how to fix
kerning in other macro packages.  Besides, this sort
of thing is strictly a band-aid.  It's the typeface
that needs to be fixed, IMHO.

As for the PDF viewer, I don't think it matters.
I used my favorite qpdfview as well as evince, and the
problem was the same in both.

Hope this helps.

--Dale

-- 
“Okay, look.  We’ve both said a lot of things you’re
going to regret.  But I think we can put our
differences behind us.  For Science.  You monster.”
--GLaDOS, Portal 2



Re: [Groff] Equation Number using mom

2013-10-24 Thread Dale Snell
On Wed, 23 Oct 2013 07:20:18 -0700 (PDT)
Caleb  wrote:

> I have just switch from using tex into using groff and I think
> groff is really cool!  Anyway, I have this question: I want my
> equations to be numbered, so I type
>
>
> .EQ (1)
> z sup 2 = x sup 2 + y sup 2
> .EN
>
> It work well using -me, but it doesn't work using -mom, any
> suggestion?

Hello Caleb,

What documentation I have on eqn (and it isn't much), implied that
plain eqn, without a macro package, could insert an equation
number as you did in your example.  So I experimented and found
that I have misunderstood the docs.  Annoying.  I did some more
experimenting and came up with the following:


.PRINTSTYLE TYPESET
.QUAD LEFT
.START
.EQ
x = f ( y sup 2 / 2 ) + y sup 2 / 2
.EN
.BR
.RIGHT
.RLD 1v
(Equation 1-1)
.LEFT


It's rather a hack, I suppose, but it does work.  It would
be nicer if it was used with MOM's TAB and PAD features.  Alas,
I've not needed to use that part of MOM, so you're on your own.
:-)

If you really want, you can do the same thing with bare groff.  In
fact, that's what I came up with first.


.ad l
.EQ L
x = f ( y sup 2 / 2 ) + y sup 2 / 2
.EN
.br
.ad r
\r(Eqn. 2.4a)


Anyway, I hope this helps.

--Dale

--
"Come, muse, let us sing of rats."  -- James Grainger



Re: [Groff] Multiple Lines Equation

2013-10-25 Thread Dale Snell
On Fri, 25 Oct 2013 22:34:02 +0800
Caleb Foong  wrote:

> Hi,
>
> I want my equations to be in multiple lines like this:
>
> z = x + y
> c = a + b
>
> But this doesn't work:
>
> .EQ
> z = x+y
> .br   #.sp also doesn't work
> c = a+b
> .EQ

No, it doesn't.  Groff is in fill mode, so it's all going to be
mooshed together.

> So instead of writing:
> .EQ
> x = x+y
> .EN
> .EQ
> c = a+b
> .EN
>
> Is there any other way?

Not that I know of.  It's one .EQ/.EN pair for each equation,
matrix, whatever.  BTW, you need a .br on a line between your
first .EQ and the second .EN.  Otherwise the two equations will be
run together.

If you don't already have them, go to this site:

  

for the following documents:

  "A Guide to Typesetting Mathematics with GNU eqn" by Ted Harding

  "Typesetting Mathematics -- User's Guide (Second Edition)", by
   Brian W. Kernighan and Lorinda L. Cherry.

These are the docs I've been using.  You'll find a lot more than just
the eqn files on that site.  They all have a lot of useful info.  Many
of them are a bit dated, but are still good.

Hope this helps.

--Dale

--
"Rules of combat older than contact with other races.  Did not
mention aliens.  Rules' change... caught up in committee.  Not come
through yet."  -- Drazi Green Leader, "Babylon 5"



Re: [Groff] Multiple Lines Equation

2013-10-25 Thread Dale Snell
On Fri, 25 Oct 2013 18:51:04 +0200
Tadziu Hoffmann  wrote:

> 
> > BTW, you need a .br on a line between your first .EQ and the
> > second .EN.  Otherwise the two equations will be run together.
> 
> Not necessarily.  It depends on how your EQ/EN macros are defined.
> In the simplest case you can define
> 
>   .de EQ
>   .sp .5
>   .ce 1
>   ..
>   .de EN
>   .sp .5
>   ..
> 
> For something more fancy, try
> 
>   .de EQ
>   .br
>   .nr xx \\n(.n
>   .nr EQ +1
>   .di XX
>   ..
>   .de EN
>   .br
>   .di
>   .nr =^ \\n(.l-\\n(.i
>   .ie \w'\\*(10'<(\\n(.l-\\n(.i-(2*\\n(xx)-2m) \{\
>   .ne \\n(dnu
>   .\}
>   .el \{\
>   .ne \\n(dnu+.5v
>   .sp .5v
>   .\}
>   .ta \\n(.lu/2uC \\n(.luR
>   \t\\*(10\t(\\n(EQ)
>   .sp .5v
>   .ns
>   ..
> 
> which gives you automatic equation numbering
> (and also makes the spacing nicer).

Thank you!  Now I have to go study these so that I understand what
they're doing.  :-)  While I use Groff, and enjoy it, I don't
really understand what it's doing.  So this will be a nice bit of
mental exercise.

--Dale

--
"Duct tape is like the Force.  It has a light side, a dark side,
and it holds the universe together."   --Carl Zwanzig



Re: [Groff] Question on groff and TeXmacs

2014-04-27 Thread Dale Snell
On Sun, 27 Apr 2014 19:45:59 +
"Snatchko,Bryan Richard"  wrote:

> ?What is the difference or how do you relate? Does TeXmacs use groff
> or have its own typeset or does it use TeX, or are you and TeXmacs
> two of the same things? Maybe I will need to send this question to
> TeXmacs.

TeXmacs is unrelated to either GNU Troff or GNU Emacs.  The editor
portion was inspired by Emacs, but it uses Scheme as its extension
language.  It uses TeX fonts for rendering, which accounts for the
"TeX" part of the name.  Your best bet is probably to read the
following man pages:

(Wikipedia) 
(Home page) 

Once you've done that, ask your questions in the TeXmacs mailing
list.

Good luck, and have fun!

--Dale

--
Q.  Why did the Klingon color his hair blond?
A.  Because it was a good day to dye.



Re: [Groff] `groff_char.7' works only for `man', but not for `groff'

2014-05-26 Thread Dale Snell
On Mon, 26 May 2014 16:43:30 +0200
"Bernd Warken"  wrote:

> 
> 
> > Von: "Werner LEMBERG" 
> >
> > Please be more specific.  Using current git on my GNU/Linux box, the
> > call
> > 
> >   groff -Tutf8 -t -man groff_char.n | less
> > 
> > displays just fine.
> 
> You are right.  I just forgot to include `-t'.  So something must be
> done in `grog'.
> 
> Thanks
> 
> Bernd Warken
> 

Bernd,

You might look at the source for the groff_char.7 man page.
According to groff_man(7)

   If a preprocessor like tbl or eqn is needed, it has become
   common to make the first line of the man page look like this:

  '\" word


However, the source file for groff_char.7 (.../man/groff_char.man)
has:
  .\" t

as its first line.  Note that it's got a leading period instead of
an apostrophe.  It's the only file in the source "man" directory
that does.  The other files that use this construct have an
apostrophe.

I found this a couple of weeks ago while trying to find out why
groff_char(7) didn't print properly.  I think it's the source
(pun not intended, but I'll keep it) of the trouble.

Anyway, I hope this helps,

--Dale

--
"If one would give me six lines written by the hand of the most
honest man, I would find something in them to have him hanged."
-- Cardinal Richelieu



Re: [Groff] Are your gropdf and pdfmom man pages installed?

2014-07-01 Thread Dale Snell
On Tue, 1 Jul 2014 19:20:57 -0500
Dave Kemper  wrote:

> I finally updated my system-wide groff installation from 1.21 to
> 1.22.2.  I notice that two man pages new in 1.22.2, those for gropdf
> and pdfmom, were not installed in the upgrade.
> 
> I don't know if this omission is due to a problem in groff itself, or
> in Gentoo Linux's groff package.  If you have a non-Gentoo Linux box
> on which you've installed groff 1.22.2 with your distro's package
> manager, can you tell me whether "man gropdf" works?

I'm running Fedora 19, and I have man pages for both gropdf and
pdfmom.  The man command displays them both just fine.  My groff
version is 1.22.2.

Sounds to me like a packaging error in Gentoo Linux.

--Dale

--
"A proper saute pan should cause serious head injury if brought
down hard against someone's skull.  If you have any doubts about
which will dent -- the victim's head or your pan -- then throw
that pan right in the trash."
   -- Anthony Bourdain, _Kitchen Confidential_  


signature.asc
Description: PGP signature


Re: [Groff] Are your gropdf and pdfmom man pages installed?

2014-07-02 Thread Dale Snell
On Wed, 02 Jul 2014 11:01:29 +0100
Deri James  wrote:

> On Tue 01 Jul 2014 17:41:24 Dale Snell wrote:
> > On Tue, 1 Jul 2014 19:20:57 -0500
> > 
> > I'm running Fedora 19, and I have man pages for both gropdf and
> > pdfmom.  The man command displays them both just fine.  My groff
> > version is 1.22.2.
> > 
> > Sounds to me like a packaging error in Gentoo Linux.
> > 
> > --Dale
> 
> I know some distributions split groff into multiple packages,
> sometimes they separate out parts of groff which require perl into a
> separate package. Gropdf and pdfmom may be in another package.
> 
> Deri


Ooh, is my face red.  You're right about multiple packages per
program.  That idea had totally slipped my alleged mind.  What
makes it especially embarrassing is that Fedora does just that:
groff, groff-base, groff-doc, groff-perl, and groff-x11.  I always
install everything, and never think about it afterwards.

--Dale

--
Daniel: "This tastes like chicken."
Sam: "So what's the matter with it?"
Daniel: "It's macaroni and cheese."


signature.asc
Description: PGP signature


Re: [Groff] \o and \z do not work for -Tutf8

2014-08-04 Thread Dale Snell
On Mon, 4 Aug 2014 18:06:03 +0200
"Bernd Warken"  wrote:


> The overstrike with `\o' and `\z' preduce on `-Tpdf', etc., a plus
> sign within the digit 0 for both escapes.  But both escapes do not
> work on `-Tutf8' or `nroff': 
> 
> $ echo "A\o'0+'\z0+Z" | nroff
> A++Z
> 
> which is wrong.

Bernd,

If you redirect nroff's output to a file, I think you'll find that
it's doing what it's supposed to be doing.  I tried your example in a
terminal and got the same results you did.  Redirecting the output to
a file and looking at it with Emacs gave me the following string:
"A0^H+0^H+Z".  So nroff is overstriking, using backspaces to do so.
Unfortunately, the terminal only displays the most recent characters
in any one position.  If I'm not mistaken (and I may well be), it's
the man program that tells the terminal to overstrike.  I think.

(I have a decades-old memory of looking at formatted man pages with an
editor, and seeing runs of "x^Hx" for bolded, and "y^H_" for
underlined characters.)

--Dale

--
"Text processing has made it possible to right-justify any idea,
even one which cannot be justified on any other grounds."
-- J. Finnegan, USC.


signature.asc
Description: PGP signature


Re: [Groff] Automake migration proposal

2014-08-10 Thread Dale Snell
On Sun, 10 Aug 2014 00:23:06 +0200
Bertrand Garrigues  wrote:

> Hi,
> 
> I have made some progress on the Automake migration. The targets that
> were not functionnal yet (namely make install, uninstall, check, dist,
> distcheck) are now completed.
> 
> I've pushed a new branch (called 'automake') on groff's git
> repository. To test it:
> 
> git clone git://git.savannah.gnu.org/groff.git
> git checkout automake
> ./bootstrap
> mkdir build
> cd build
> ../configure
> make -j
> 
> For the moment I've tested it only on my main Linux distro (Arch
> Linux), more tests are needed.

Bertrand,

I built this branch on my Fedora 19 system, and it seems to work
fine.  There was one warning during the make phase:

src/libs/libgroff/version.cpp:3:24: warning: ‘Version_string’ initialized and 
declared ‘extern’ [enabled by default]
 extern "C" const char *Version_string = "1.22.2";
^

Frankly, if that's the only warning, I'm more than happy.  Most
projects I've built have swarms of warnings.

Thanks for all your efforts.

--Dale

--
Eye halve a spelling chequer   I ran this poem thru it
It came with my pea seaI'm sure your pleased to no
It plainly marques four my revue   Its letter perfect in it's weigh
Miss steaks eye kin knot sea.  My checker told me sew.
-- based on a poem by Mark Eckman


signature.asc
Description: PGP signature


Re: [Groff] Automake migration proposal

2014-08-11 Thread Dale Snell
On Mon, 11 Aug 2014 14:02:11 +0530
Vaibhaw Pandey  wrote:

> Was attempting a OS X (13.3.0 Darwin) install. Didn't complete.
> 
> 0. bootstrap: successful
> 1. configure warned me of a bunch of programs missing: `pnmcut',
> `pnmcrop', `pnmtopng', `psselect', `pnmtops' and `gs'.
> Of these I installed gs as make would fail without it. configure
> succeeded otherwise.
> 2. Both make and make -j fail with multiple errors:
> a.
> /bin/sh: xpmtoppm: command not found
> /bin/sh: pnmdepth: command not found
> /bin/sh: pnmtops: command not found
> make[1]: *** [gnu.eps] Error 127
> make: *** [all] Error 2

You appear to be missing the netpbm package.  This was discussed
on the list a while back.  Netpbm is needed for the initial build
of Groff.  It's not needed for the distributed tarballs.  You are
also missing gs (GhostScript) and psselect (which allows one to
select individual pages from a PostScript document), and the
Nimbus Sans L fonts.  Install the missing bits, and I suspect your
build will go much better.

> b.
> sed -f ../tmac/strip.sed ../contrib/mom/`basename
> contrib/mom/om.tmac`-u > contrib/mom/om.tmac;
> sed: RE error: illegal byte sequence
> make[1]: *** [contrib/mom/om.tmac] Error 1
> make: *** [all] Error 2

I'm not sure what to make of this one, I'm afraid.  Perhaps it's
related to the version of sed?  Does OS-X use GNU sed?  That's
what I've got here, and I didn't get this error.  I'm just
guessing, though.

Hope this helps.

--Dale

--
"In the beginning the Universe was created.  This has made a lot of
people very angry and been widely regarded as a bad move."
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"


signature.asc
Description: PGP signature


Re: [Groff] [Heirloom] Generating doc/ files

2014-08-27 Thread Dale Snell
On Wed, 27 Aug 2014 18:04:27 -0400
Doug McIlroy  wrote:

> Groff is open source. A conscientious author will strive
> to make source--the whole source including documentation--as
> easily portable as possible. Documentation created in the back
> room and distributed only in PDF is the antithesis of open.

I quite agree.  

> I hope "Linux Libertine" is a joke that I don't happen to
> understand.

Linux Libertine is the name of a free/open typeface.  Whether the name
was a deliberate joke or not I do not know.  Possibly someone forgot to
look up "libertine" in the dictionary?

--Dale

--
"The attitude of 'Oh, you want it should work?  That costs extra!'
is the biggest security hole in computer software today."
-- Anon., paraphrased (anybody know the real source?)


signature.asc
Description: PGP signature


Re: [Groff] PDF_IMAGE and MOM

2014-11-03 Thread Dale Snell
On Mon, 03 Nov 2014 16:36:04 +
Ralph Corderoy  wrote:

> BTW, your mombog.mom had a blank line at the start and the comments
> were lines starting `\#' rather than `.\#'.  One or the other might
> have an affect on your attempt at A3 in mom, I don't know.

"\#" is a _groff_ comment, not mom's.  Mom shouldn't care.  If she
does, she needs to be chastised, but I think she's safe.  The only
time I use anything different is when I want an "in-line" comment.
E.g.,

  .MY_MACRO ARG ARG \" this is a silly example

As for the blank line at the top of the file, I don't think mom cares.
I just tried adding a blank line to one of my mom files, and there was
no change.  Of course, I didn't have any PS or PDF images in it, so it
wasn't really a good test.

--Dale

-- 
Daniel: "This tastes like chicken."
Sam: "So what's the matter with it?"
Daniel: "It's macaroni and cheese."


signature.asc
Description: PGP signature


Re: [Groff] PDF_IMAGE and MOM

2014-11-03 Thread Dale Snell
On Mon, 03 Nov 2014 21:23:32 +
Keith Marshall  wrote:

> On 03/11/14 20:16, Dale Snell wrote:
> > On Mon, 03 Nov 2014 16:36:04 +
> > Ralph Corderoy wrote:
> >> BTW, your mombog.mom had a blank line at the start and the comments
> >> were lines starting `\#' rather than `.\#'.  One or the other might
> >> have an affect on your attempt at A3 in mom, I don't know.
> > 
> > "\#" is a _groff_ comment,
> 
> Yes, but it's explicitly a GNU troff extension to standard troff
> grammar; it may not produce the desired effect, were you to process
> your input through any other troff implementation.

True.  I know it's a GNU extension, but I wasn't considering the
use of \# in a non-GNU [nt]roff.  I suspect it would result in an
error message.  I certainly hope so, anyway.  My main observation
really was that ".\#" and "\#" are identical; there's no need to
prefer one over the other.


> The standard, and thus intrinsically portable, closest equivalent is
> `\"'; however, it is not entirely equivalent, since `\#' swallows the
> following newline, (at the end of the comment), whereas `\"' does not.
> (For a whole line comment, the portable equivalent to `\#' is `.\"').
> 
> > not mom's.  Mom shouldn't care.  If she
> > does, she needs to be chastised, but I think she's safe.  The only
> > time I use anything different is when I want an "in-line" comment.
> > E.g.,
> > 
> >   .MY_MACRO ARG ARG \" this is a silly example
> 
> Here, you almost certainly don't want the comment to swallow the
> newline, so `\#' would surely be unsuitable.  If you always use `\"'
> for comments, and always append them to lines which begin with a
> (maybe empty) request, you don't have to worry about the distinction.

Oh, definitely.  I don't think I've ever used \# in the middle of
a line.  I don't do that sort of thing very often anyway;
normally such comments go in the previous line.


> > As for the blank line at the top of the file, I don't think mom
> > cares. I just tried adding a blank line to one of my mom files, and
> > there was no change.  Of course, I didn't have any PS or PDF images
> > in it, so it wasn't really a good test.
> 
> In general, blank lines in troff input *are* significant; they induce
> a break, and introduce vertical white space in the output.  At the
> start of a document, where space mode is inactive, you may not
> observe the effect, but relying on such quirks generally is
> inadvisable.

Ah, I wasn't aware of that.  Thank you for the heads up.  Almost
all of my *roffing is with Groff and mom, and there I almost
always set .blm to PP.  So if I have a blank line, it's to start a
new paragraph.  I do have the occasional foray into man, and I
generally don't set .blm then.  For some reason, I've never stuck
blank lines in what raw troff I do have.  Perhaps because all of
the examples I've seen never do it either.  To be honest, I don't
do much with raw troff code, or macro sets other than mom and
maybe man, so I don't usually consider non-Groff situations.

BTW, out of my 'satiable curiosity, is mom being used by other
*roffs, or is it strictly Groff?

--Dale

-- 
"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
-- J. Finnegan, USC.


signature.asc
Description: PGP signature


Re: [Groff] PDF_IMAGE and MOM

2014-11-03 Thread Dale Snell
On Tue, 4 Nov 2014 01:32:09 +0100
Ingo Schwarze  wrote:

> Hi Dale,
> 
> Dale Snell wrote on Mon, Nov 03, 2014 at 02:21:09PM -0800:
> > On Mon, 03 Nov 2014 21:23:32 + Keith Marshall wrote:
> >> On 03/11/14 20:16, Dale Snell wrote:
> >>> On Mon, 03 Nov 2014 16:36:04 + Ralph Corderoy wrote:
> 
> >>>> BTW, your mombog.mom had a blank line at the start and the
> >>>> comments were lines starting `\#' rather than `.\#'.  One or the
> >>>> other might have an affect on your attempt at A3 in mom, I don't
> >>>> know.
> 
> >>> "\#" is a _groff_ comment,
> 
> >> Yes, but it's explicitly a GNU troff extension to standard troff
> >> grammar; it may not produce the desired effect, were you to process
> >> your input through any other troff implementation.
> 
> > True.  I know it's a GNU extension, but I wasn't considering the
> > use of \# in a non-GNU [nt]roff.  I suspect it would result in an
> > error message.  I certainly hope so, anyway.
> 
> Hope again:
> 
>$ cat testfile
>   first line \# comment
>   .br
>   second line
>
>$ /usr/local/bin/groff -Tascii testfile
>   first line .br second line

Okay, this I would expect.

>$ /usr/local/heirloom-doctools/bin/nroff testfile
>   first line .br second line
>   # also documented in the Heirloom Nroff/Troff User Manual
>   # Heirloom added quite some GNU compat in the past, in general

Ah, okay.  I didn't know that Heirloom had added some of the Groff
extensions.  Good to know.

>$ /usr/local/plan9/bin/nroff testfile
>   first line # comment
>   second line

Oops.  So, if I understand this right, plan9 nroff saw the \# and
escaped the #.  But # has no meaning beyond its literal self, so "#
comment" was inserted in the first line.  If I'd thought about it
earlier, I would have realized that something along those lines would
happen.  Ah well, live and learn, I guess.  :-)

> It's hard to add something as fundamental as comment syntax
> in an afterthought without breaking older tools.

True indeed.  It's good that Groff retains the original comment
syntax.  If it had simply _replaced_ the old with the new, that would
have gotten ugly.

> It *is* nice that such compat testing has become so easy with
> the ready made ports we have around (plan9 is already in the
> OpenBSD ports tree, and the upcoming Heirloom and GNU troff
> releases will be committed as soon as they are officially
> released next week or so, i already have them tested and 
> installed locally :).

The 'roff community seems to be pretty friendly, and happy to help
each other.  That's good to see.  Not all the open-source communities
work so well together, alas.

--Dale

-- 
Imagine if every Thursday your shoes exploded if you tied them the usual
way.  This happens to us all the time with computers, and nobody thinks of
complaining.
-- Jeff Raskin


signature.asc
Description: PGP signature


Re: [Groff] condition: OR of two string comparisons

2014-11-07 Thread Dale Snell
On Fri, 07 Nov 2014 16:16:38 +
Ralph Corderoy  wrote:

> BTW, do any info experts know how to have info(1) format just that
> node? -n doesn't work to visit that node, it thinks it doesn't exist
> even though it's printing that as the node name.  I guess it's looking
> somewhere else for -n.
> 
> $ info -n 'Operators in Conditionals' groff
> info: Cannot find node `Operators in Conditionals'.
> $

I think you've found a bug.  I tried a couple of info files, and
-n couldn't find the requested nodes.  However, there is a
work-around.  Instead of

$ info -n 'Operators in Conditionals' groff

try the 'g' command in info:

$ info groff
g Operators in Conditionals

That works just fine here.

--Dale

-- 
Things are more like they used to be than they are now.


signature.asc
Description: PGP signature


Re: [Groff] [Heirloom] Double word space after :

2014-11-14 Thread Dale Snell
On Fri, 14 Nov 2014 19:31:48 +0100
Tadziu Hoffmann  wrote:

> 
> > > So the default groff behavior of adding additional space
> > > between sentences also does not follow today's typical US
> > > typography.  You would have to specify ".ss 12 0" to achieve
> > > US convention.
> 
> > It seems ease of reading or better comprehension (which are
> > the reasons I prefer extra space after sentences, etc.) have
> > nothing to do with "the rules."
> > Sigh.
> 
> The situation is even worse.  I've recently read a novel where
> (particularly noticeable in tightened-up lines) the space
> after a sentence-period was *reduced* compared to the normal
> word-spacing on the same line.  It appears the attitude is that
> all the empty space above the period is already room enough.
> Sheesh.

I've seen that same thing.  Worse, it was on a line where there
was a space after a comma that was _wider_ than a normal
inter-sentence space.  Say _what_?!  Or my other favorite, from a
different publishing house: A closing double quote that _starts_ a
line.

I read on somebody's blog that no _professional_ typographer would
use such low-capability software as *roff or TeX.  Well, if this
is what their thousand-dollar-per-seat, "quality," "professional"
software puts out, I'll stick with Groff.  I used to think that
the professional typographers knew more than I do about
typography.  I still do.  Many of the folks here are lightyears
beyond me.  But I am wondering if the publishing houses are hiring
professionals anymore.

.RANT OFF

Sorry for the noise, but that's something that's been bothering me
lately.  To make up for it, here's something I have in my personal
Groff macros:

.char \[:] \^:\|\: \&

for an old-fasioned colon.  Just 'cause I'm an old curmudgeon.
Humbug! to the new-fangled colons.  Humbug! I say!  :-)

--Dale

-- 
"Don't only practice your Art, but force your way into its
Secrets, for it and Knowledge can raise Men to the Divine."
-- Ludwig van Beethoven


signature.asc
Description: PGP signature


Re: [Groff] Blast from the past

2015-02-10 Thread Dale Snell
On Tue, 10 Feb 2015 21:14:26 +0100, in message
20150210201426.fjx1phoo%sdao...@yandex.com, Steffen Nurpmeso wrote:

> Heinz-Jürgen Oertel  wrote:
>  |Am Montag, 9. Februar 2015, 16:19:51 schrieb Peter Schaffter:
>  |> Groffers --
>  |> 
>  |> I don't see any mention of this in the list archives, and it's too
>  |> wonderful to miss.  If you want a glimpse of days gone by, have a
>  |> look at
>  |> 
>  |>   http://www.dtic.mil/dtic/tr/fulltext/u2/751318.pdf
>  |
>  |I like this statement:
>  |"ROFF is a computer program which produces esthetically pleasing \
>  |manuscripts from punched card source texts." 
> 
> ..and i hoped that it wasn't used for producing the document in
> question, seldom have i seen such huge gaps in between words, it's
> almost unreadable (in fact i gave up after a few pages)!
> 
> --steffen

Same here.  Alas, "This report is itself an example of a ROFF
generated manuscript."  Adding insult to injury, it appears to
have been printed on a (*shudder*) chain printer.  Note the
varying baseline heights.

--Dale

-- 
Excess on occasion is exhilarating.  It prevents moderation from
acquiring the deadening effect of a habit.-- W. Somerset Maugham


pgpBJCexifMAY.pgp
Description: OpenPGP digital signature


Re: [Groff] Blast from the past

2015-02-11 Thread Dale Snell
On Tue, 10 Feb 2015 20:53:42 +, in message
f9035a933a372f4d85559b6b253dc408f86e8...@usslmmbx003.net.plm.eds.com,
Jones, Larry wrote:

> Dale Snell  writes:
> > 
> > Same here.  Alas, "This report is itself an example of a ROFF
> > generated manuscript."  Adding insult to injury, it appears to
> > have been printed on a (*shudder*) chain printer.  Note the
> > varying baseline heights.
> 
> "ROFF is a program which generates microfilm and 7-track binary
> magnetic tape for off line processing on an IBM Magnetic Tape /
> Selectric Typewriter..."
> 
> So, it was almost certainly printed on an automated typewriter. The
> Selectric used a type ball that tilted and rotated to select the
> character to print, so it could also create a varying baseline if the
> tilt mechanism was a bit slow or sticky.
> 
> -Larry Jones

It's been decades since I've used a Selectric.  They were nice.  I
never noticed any unevenness in the baselines, but then I was just
a kid in (and just out of) high school when I used them.  Probably
wouldn't have seen it, or even known to look for it.  OTOH, my
experience with chain printers showed them to be uniformly sloppy
with vertical character positioning.  I'm sure you're right that the
ROFF document was produced on a Selectric.  A chain printer would have
looked much worse.  :-)

I never saw a Selectric connected to a mag tape unit.  However,
somewhere I do have the mortal remains of a Selectric modified
to be a printer.  It hooked up via a serial port.

--Dale

-- 
Ivanova:  Always finding the good in any situation, eh Captain?
Sheridan:  Absolutely.  If I didn't, I might end up like you.


pgpS8F37KVai3.pgp
Description: OpenPGP digital signature


Re: [Groff] read-only number register

2015-03-02 Thread Dale Snell
On Mon, 2 Mar 2015 19:32:18 -0500, in message
20150303003218.GD29172@vpn.5665sherbrooke.house, SGT. Garcia wrote:

> hello,
> i guess i'm looking for a glossary. for example, what's a request?
> how is it different from a macro?
> and why would one want to read the number register. i came across
> 'register' reading about font families. i can make the connection
> between what you're suggesting and what i have read here:
> 
> 
> "The value at start-up is ‘T’. The current font family is available
> in the read-only number register ‘.fam’ (this is a string-valued
> register); it is associated with the current environment."

I don't know of a glossary, _per se_.  The closest to one that
I've seen is the Concept Index (Appendix K) in the Groff User's
Manual.  That said, you might want to read sections 5.5 and 5.6 of
said manual.  Those two sections cover requests and registers,
respectively.  You'll also want to read up on escapes.

Hope this helps.

--Dale

-- 
A sad spectacle.  If they be inhabited, what a scope for misery and folly.
If they be not inhabited, what a waste of space.
-- Thomas Carlyle, looking at the stars


pgphMQCJK2pPd.pgp
Description: OpenPGP digital signature


Re: [Groff] adding non-native font directories [Was: fontconfig]

2015-03-03 Thread Dale Snell
On Tue, 3 Mar 2015 10:43:18 -0500, in message
20150303154318.GA3116@vpn.5665sherbrooke.house, SGT. Garcia wrote:

> thanks for clarifying. my question however is aiming at something
> different. i think i should have asked: is it possible to use any font
> other than the ones that come with groff.

The answer to your question is "yes it is, but..."  Groff uses
PostScript Type 1 or Type 42 fonts (.pfa or .t42).  So other font
types have to be converted into something Groff can digest.  Peter
Schaffter (creator of the mom macro package, which I _highly_
recommend) has a shell script which can convert several font
types.  Surf to



to find it.  If memory serves, Tadziu Hoffman also has a method,
different from Peter's.  You'll have to search the mailing list
archives for to find it.  (Found it.  Date: 2013-11-12,
Message-ID: <20131112183251.gd15...@usm.uni-muenchen.de>.)

--Dale

-- 
"Rules of combat older than contact with other races.  Did not
mention aliens.  Rules' change... caught up in committee.  Not come
through yet."
-- Drazi Purple Leader; Babylon 5, "The Geometry of Shadows"


pgpQ_9yA5T9j5.pgp
Description: OpenPGP digital signature


Re: [Groff] adding non-native font directories [Was: fontconfig]

2015-03-04 Thread Dale Snell
On Tue, 3 Mar 2015 20:25:09 -0500, in message
20150304012509.GB654@vpn.5665sherbrooke.house, SGT. Garcia wrote:

> On Mar 03  10:28 -0800, Dale Snell wrote:
> >
> > If memory serves, Tadziu Hoffman also has a method,
> > different from Peter's.  You'll have to search the mailing list
> > archives for to find it.  (Found it.  Date: 2013-11-12,
> > Message-ID: <20131112183251.gd15...@usm.uni-muenchen.de>.)
> > 
> > --Dale
> 
> you mean this?
> http://www.usm.uni-muenchen.de/~hoffmann/roff/mkgrft
> 

Yup, that's the one.  I hope it helps.

--Dale

-- 
Q: How was the Roman Empire cut in two?
A: By a pair of Caesars. 


pgp3Xy6Cwob4B.pgp
Description: OpenPGP digital signature


Re: [Groff] macros in tbl

2015-03-04 Thread Dale Snell
On Wed, 4 Mar 2015 18:41:12 -0500, in message
20150304234112.GC654@vpn.5665sherbrooke.house, SGT. Garcia wrote:

> short of wrapping text in a text blocks i can't use any of the macros
> in man.tmoc; in particular .UR/.UE and .MT/ME. is this intended
> behaviour?

I'm afraid I don't understand what you're asking.  What isn't
working with the -man macros, and what does it have to do with the
tbl pre-processor?

Tell us the effect you're trying to achieve and how you're trying
to do it.  A snippet of code would help, too.  That should give us
enough to be able to help you.

FWIW, if you're not familiar with it, the troff.org web site
 has lots of information that can be a
real help.

--Dale

-- 
The Dilettante's Version of the Three Laws of Thermodynamics:
One:  You Can't Win.
Two:  You Can't Even Break Even.
Three:  You Cannot Get Out of the Game.


pgpgr_XVVs4LN.pgp
Description: OpenPGP digital signature


Re: Two trivial questions

2021-10-26 Thread Dale Snell
On Tue, Oct 26, 2021 at 2:38 PM Peter Schaffter  wrote:

> Is there a correct pronunciation of groff?  I've been
> checking out YouTube videos on groff.  The uploaders
> all say "groff" (one syllable, like "gruff").  I say
> "g-roff" (to match t-roff and n-roff).

Count me as a happy member of the “gee-roff” camp.

> Second question, maybe not so trivial.  Is it
> acceptable to use a comma for decimal fractions that
> are arguments to requests and macros (say .ps 12,5
> instead of .ps 12.5) if a user's locale supports it?

That’s a very interesting question, but alas, I don’t
know the answer.  Is groff written to pay attention to
localization at all?  I don’t know.

--Dale

-- 
“...and the fully armed nuclear warheads, are, of
course, merely a courtesy detail.”



Re: In eqn(1), shouldn't a brace be in roman?

2021-11-15 Thread Dale Snell
On Mon, Nov 15, 2021 at 3:50 PM G. Branden Robinson
 wrote:
>
> Hi folks,
>
> Given this input:
>
> $ cat EXPERIMENTS/simple-equation.ms
> .LP
> .DS
> .EQ
> S = "{" x | x \[mo] Z, x > pi "}"
> .EN
> .DE
>
> The braces show up in italics in the output (using groff 1.22.4, "groff
> -e -ms").  Isn't that wrong?

I would say no, that isn't wrong.  According to the EQN user's
guide* §14, Quoted Text:

“   Any input entirely within quotes ("...") is not subject to any
of the font changes and spacing adjustments normally done by the
equation setter.  This provides a way to do your own spacing and
adjusting if needed:

italic "sin(x)" + sin (x)
is
sin(x) + sin(x)  <== Roman text
  ^ Italic text

Quotes are also used to get braces and other EQN keywords printed:

"{ size alpha }"
is
{ size alpha }  <== all set in Italics
and
roman "{ size alpha }"
is
{ size alpha }  <== all set in Roman”

* Typesetting Mathematics -- User’s Guide (Second Edition)
B. W. Kernighan and L. L. Cherry, Aug. 15, 1978
(stand-alone file)

So to get roman braces in your example above, you would need:

 .LP
 .DS
 .EQ
 S = roman "{" x | x \[mo] Z, x > pi roman "}"
 .EN
 .DE


--Dale

-- 
Gideon: “I thought you said you never hold a grudge.”
Galen: “I don’t.  I have no surviving enemies.  At all.”
-- Crusade, “Racing the Night”



Re: UNDERSCORE formatting question for "mom"

2022-12-26 Thread Dale Snell
Peter will probably have a more elegant (and likely more correct)
solution, but this may work for you:

Replace the “\&.” with “\h'-\w' 'u'.”.  This worked for me in the one
experiment that I tried.

--Dale

-- 
There is no cloud.  It’s just someone else’s computer.



Re: Using arbitrary fonts

2023-01-30 Thread Dale Snell
Hi Blake,

You can convert the .otf or .ttf fonts, using the methods that Branden and
Kurt have already mentioned.  The .woff and .woff2 fonts can be safely ignored.
They are for web browser use.  They're specially compressed (for transfer over
the 'net) and have some XML bits (for licensing, I think).

Hope this helps (at least a little).

--Dale

On Mon, Jan 30, 2023 at 8:51 AM Blake McBride  wrote:
>
> Hi Branden,
>
> Thanks a lot for the help!!!  However, I am having trouble interpreting
> your docs.
>
> Please forgive me.  Although I am a software engineer and have been using
> nroff/troff/groff for nearly 40 years, I never really got into the details
> behind fonts and their various formats.  I basically know very little about
> them.  The basic fonts that come with nroff/troff/groff have generally met
> my needs.
>
> 1. I am using PDF (not PS).
>
> 2.  As I mentioned, I have .otf, .ttf, .woff, and .woff2 files.  So my
> question is, can I use any of those, or do I need to convert them to
> another format?
>
> 2.a.  If I need to convert them, which do I start with, and what am I
> converting them to?
>
> 2.b.  How do I convert them?
>
> 3.  What do I install, and where do I install them?  Is there a special
> procedure besides just copying them?
>
> 4. Do I need to do something special to give them a name within an mm
> context?
>
> After all of that, doing
>
> \f[YOURNEWFONT]Blake McBride\f[]
>
> seems easy enough.
>
> If I can understand this and get it working, I would be happy to produce
> formal documentation for inclusion with GROFF (if desired).
>
> Thanks!
>
> Blake McBride
>
>
>
>
> On Mon, Jan 30, 2023 at 10:20 AM G. Branden Robinson <
> g.branden.robin...@gmail.com> wrote:
>
> > Hi Blake,
> >
> > At 2023-01-30T09:28:50-0600, Blake McBride wrote:
> > > I have been using the default groff fonts for many happy years.
> > > However, I need to produce a document with a machine-generated
> > > signature.  There are plenty of adequate signature fonts out there.
> > > However, I do not know how to make groff use them.
> > >
> > > I downloaded a font.  It came with files with the .otf, .ttf, .woff,
> > > and .woff2 extensions.  What are the exact steps I need to use to use
> > > them in a groff/mm document?  (I only want one line to use the special
> > > font.  The rest of the document can use the regular groff fonts.)
> >
> > The first thing to do is to make the font visible to the output driver,
> > which will probably be "ps" or "pdf".
> >
> > Here are some instructions from the grops(1) page in groff Git.
> >
> >   TrueType and other font formats
> > TrueType fonts can be used with grops if converted first to Type 42
> > format, a PostScript wrapper equivalent to the PFA format described
> > in pfbtops(1).  Several methods exist to generate a Type 42 wrapper;
> > some of them involve the use of a PostScript interpreter such as
> > Ghostscript—see gs(1).
> >
> > One approach is to use FontForge, a font editor that can convert
> > most outline font formats.  Here’s an example of using the Roboto
> > Slab Serif font with groff.  Several variables are used so that you
> > can more easily adapt it into your own script.
> >
> > MAP=/usr/local/share/groff/1.23.0/font/devps/generate/text.map
> > TTF=/usr/share/fonts/truetype/roboto/slab/RobotoSlab-Regular.ttf
> > BASE=$(basename "$TTF")
> > INT=${BASE%.ttf}
> > PFA=$INT.pfa
> > AFM=$INT.afm
> > GFN=RSR
> > DIR=$HOME/.local/groff/font
> > mkdir -p "$DIR"/devps
> > fontforge -lang=ff -c "Open(\"$TTF\");\
> > Generate(\"$DIR/devps/$PFA\");"
> > afmtodit "$DIR/devps/$AFM" "$MAP" "$DIR/devps/$GFN"
> > printf "$BASE\t$PFA\n" >> "$DIR/devps/download"
> >
> > fontforge and afmtodit may generate warnings depending on the
> > attributes of the font.  The test procedure is simple.
> >
> > printf ".ft RSR\nHello, world!\n" | groff -F "$DIR" > hello.ps
> >
> > Once you’re satisfied that the font works, you may want to generate
> > any available related styles (for instance, Roboto Slab also has
> > “Bold”, “Light”, and “Thin” styles) and set up GROFF_FONT_PATH in
> > your environment to include the directory you keep the generated
> > fonts in so that you don’t have to use the -F option.
> >
> > Ensure that you do the test procedure shown, before worrying about macro
> > package integration.
> >
> > Once this works (please reply to the list if it doesn't), the mm usage
> > issue can be tackled.
> >
> > > I need to produce a document with a machine-generated signature.
> >
> > In mm this requires some context.  Are you using one of the memorandum
> > types ("MT") or one of the letter formats ("LT")?  If so I'll have do
> > some digging, because the signature line is automatically printed and
> > I'll need to work up a recommendation for how to override that cleanly
> > (or someone who's more o

groff_1.23.0-rc3 test and typo

2023-02-28 Thread Dale Snell
Hi Branden,

I've just built groff v1.23.0-rc3 on my old Fedora 33 box,
and there were no errors that I could see.  I did a ‘make
check’, and all seemed well.  Here’s the summary:


Testsuite summary for GNU roff 1.23.0.rc3

# TOTAL: 162
# PASS:  160
# SKIP:  0
# XFAIL: 2
# FAIL:  0
# XPASS: 0
# ERROR: 0


I did find a (very) minor typo whilst reading the groff(1) man
page, as specified in the file INSTALL.extra, in the Evaluation
section.  The file says to run the command

“./test-groff -man -Tascii src/roff/groff/groff.1 | less -R”

which I did.  All went well until I got to the Preprocessors
section.  There, I found a couple of blocks of tbl commands.
At first, I thought they were examples, and that the actual
tables would be displayed later.  Wrong.  It turns out that the
command given in the INSTALL.extra file was missing the -t
option.  Like I said, very minor.  Once I added the -t option,
everything worked just fine.

Oh, and I did try building some PDFs that I’d already built
with v1.22.4, and they built just fine.  (These were MOM
docs, fwiw.)

--Dale

-- 
Of all the things I have lost, I miss my mind the most.



Re: Help wanted: just run gxditview on your system and click

2023-07-27 Thread Dale Snell
On Thu, Jul 27, 2023 at 8:59 AM G. Branden Robinson
 wrote:

> Just run "gxditview", left-click in the big yellow canvas area, and try
> to select _any_ menu item.

Hi Branden,

I tried this on a Fedora f33 w/XFCE (yes, I know it's old; I'm lazy) and
groff 1.22.4.  I can start gxditroff with no trouble, but the menu is
completely unresponsive.

--dds
-- 
Rule of Warfare #1:  If Brute Force isn’t working, you aren’t
using enough of it.-- Isaac Arthur, SFIA