diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/mom/groff_mom.man | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/appendices.html | 161 | ||||
-rw-r--r-- | contrib/mom/momdoc/docelement.html | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/docprocessing.html | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/toc.html | 2 | ||||
-rw-r--r-- | contrib/mom/om.tmac | 3 |
6 files changed, 61 insertions, 111 deletions
diff --git a/contrib/mom/groff_mom.man b/contrib/mom/groff_mom.man index c9ce3a53..65e7b033 100644 --- a/contrib/mom/groff_mom.man +++ b/contrib/mom/groff_mom.man @@ -89,7 +89,7 @@ mom comes with her own (very) complete documentation in HTML format. . .B mom was written by -.MT pschaffter@acanac.net +.MT pschaffter@ncf.ca Peter Schaffter .ME . Please send bug reports to the diff --git a/contrib/mom/momdoc/appendices.html b/contrib/mom/momdoc/appendices.html index 9652865b..c2af13b8 100644 --- a/contrib/mom/momdoc/appendices.html +++ b/contrib/mom/momdoc/appendices.html @@ -56,7 +56,7 @@ why not write a man page?" <p> Valid questions, to be sure, and <strong>mom</strong> has -answers. (Okay — I have answers, but I speak for +an answer. (Okay — I have an answer, but I speak for <strong>mom</strong>.) </p> @@ -80,40 +80,6 @@ I can think of no better way to achieve the kind of truly useful documentation I wanted than html. </p> -<p> -Another reason for html is that working with <strong>mom</strong> -necessarily involves creating files inside a text editor. I use -elvis, a truly fabulous vi clone that does a terrific job of rendering -basic (text only) html. I may have written <strong>mom</strong>, -but I still regularly call on her documentation. Elvis, with its -html capabilities, lets me write and format <strong>mom</strong> -documents AND peruse her documentation, clicking on links as -necessary, without ever leaving the comfy confines of my -text editor. -</p> - -<p> -Not everyone, of course, uses an editor with html capabilities. -For them, firing up a browser is obviously necessary for reading -<strong>mom</strong>'s documentation. Browsers being what they are, -and not everyone on the globe having the cash for muscle machines -to run Galeon, or Konqueror or Mozilla, their browser -needs to be fast and light — and probably "text-only". -</p> - -<p> -Some <strong>mom</strong> users may notice the absence of graphics, -frames, and (for the most part) tables in this documentation. The -reason is simple: text-only browsers. People who, for whatever -reason (choice or necessity), use lynx, or links or w3m to read -the documentation must be able to make sense of it. All of it. -Graphical examples of <strong>mom</strong> in action might have made -some parts of the documentation easier to write, but would have -excluded text-only browser users. And it goes without saying that -the documentation looks fine if you're reading it in a graphical -browser. -</p> - <hr/> <!-- ===================================================================== --> @@ -137,7 +103,7 @@ The site is located at <p> <em><strong>Small note:</strong> the term</em> -<kbd><prefix></kbd> <em>in this section refers to the +<kbd><path_to_groff></kbd> <em>in this section refers to the directory in which groff is installed, typically something like</em> <kbd>/usr/share/groff/<version></kbd> <em>(for distro-specific, pre-compiled groff packages) or</em> @@ -188,7 +154,7 @@ shapes (e.g. Light, which is a weight; Condensed, which is a shape), then to associate them with groff's predefined <strong>R, I, B</strong> and <strong>BI</strong> font styles. An example of this can be seen in the groff PostScript font library itself -<nobr>(<prefix>/font/devps/):</nobr> there's one +<nobr>(<path_to_groff>/font/devps/):</nobr> there's one "family" for Helvetica (HR, HI, HB, HBI) and another for Helvetica Narrow (HNR, HNI, HNB, HNBI). </p> @@ -367,7 +333,7 @@ in om.tmac. Be careful, though, that any styles you add do not conflict with <strong><u>family</u></strong> names that already exist. "C", for example, conflicts with the Courier family -(<strong>CR, CI, CB, CI</strong>). Were you to create a font +(<strong>CR, CI, CB, CBI</strong>). Were you to create a font style "C", thinking that <nobr><kbd>.FT C</kbd></nobr> would give you access to font style once you'd given a <kbd>.FAM(ILY)</kbd> directive, you'd get a nasty surprise: your @@ -377,7 +343,7 @@ type would come out in Courier Roman! <p> <strong>VERY IMPORTANT NOTE: mom</strong>'s font extensions are not "user-space" controllable via a macro. If you've -been using groff for a long time, and have already rolled your own +been using groff for a long time and have already rolled your own solution to adding PostScript families, fonts, weights, shapes, etc. to groff, you may find that <strong>mom</strong>'s font extensions conflict with your own scheme. Should that be the case, comment out @@ -427,7 +393,7 @@ distro operates. <li>a font manager <br/> - (Debian packages: defoma, psfontmgr, dfontmgr) + (Debian packages: defoma, psfontmgr) </li> <li>perl <br/> @@ -470,13 +436,13 @@ utility to convert TrueType fonts to Type1 fonts. E.g., if you find site-tmac in <kbd>/usr/share/groff</kbd>, create site-font in <kbd>/usr/share/groff</kbd>. </li> - <li>Locate the file <kbd><prefix>/font/devps/generate/textmap</kbd> + <li>Locate the file <kbd><path_to_groff>/font/devps/generate/textmap</kbd> and symlink it to <kbd>textmap</kbd> in the directory that contains your personal collection of PostScript fonts. (See the <a href="#SMALL_NOTE">Small Note</a>, above, for the meaning of - <nobr><kbd><prefix></kbd>).</nobr> On my system, - at the time of writing, <kbd><prefix></kbd> is + <nobr><kbd><path_to_groff></kbd>).</nobr> On my system, + at the time of writing, <kbd><path_to_groff></kbd> is <nobr><kbd>/usr/local/share/groff/1.19.2/</kbd>,</nobr> therefore, I symlink it in <kbd>~/Fonts/Type1</kbd> with @@ -484,7 +450,7 @@ utility to convert TrueType fonts to Type1 fonts. <kbd>ln -s /usr/local/share/groff/1.19.2/font/devps/generate/textmap textmap</kbd> </pre> </li> - <li>Locate the file <kbd><prefix>/font/devps/text.enc</kbd> and + <li>Locate the file <kbd><path_to_groff>/font/devps/text.enc</kbd> and symlink it to <kbd>text.enc</kbd> in your personal font directory. On my system, in <kbd>~/Fonts/Type1</kbd> @@ -542,7 +508,7 @@ ln -s /usr/local/share/groff/1.19.2/font/devps/text.enc text.enc A: Start by considering the <a href="definitions.html#TERMS_FAMILY">family</a> to which the font belongs. If you're adding to a family that - already exists in groff's <kbd><prefix>/font/devps</kbd> + already exists in groff's <kbd><path_to_groff>/font/devps</kbd> directory, that will be the first part of the font name. (See <a href="typesetting.html#FAMILY">here</a> for a list of families already installed, along with their groff @@ -596,12 +562,6 @@ ln -s /usr/local/share/groff/1.19.2/font/devps/text.enc text.enc holds your gs fonts, or change to that directory and make a symlink to the .pfb file in your personal directory. </li> - <li>Do whatever your system or distro requires in order to - register the new PostScript font (the .pfb file). On a - Debian system, as root, you can run dfontmgr for a - graphical interface that will take care of registering the - font. - </li> </ol> <p> @@ -612,8 +572,9 @@ isn't. Basically, it's just: <li>acquire the font</li> <li>generate an .afm file for the font</li> <li>create the groff font</li> - <li>put the groff font in<kbd> <prefix>/font/devps</kbd></li> - <li>make sure gs knows about the font</li> + <li>put the groff font in<kbd> <path_to_groff>/font/devps</kbd> + and the .pfb in your gs font directory + </li> </ul> </p> @@ -621,78 +582,65 @@ isn't. Basically, it's just: After you've done it a couple of times, it all makes sense, and is really quite easy. Not to mention that once you understand the process, you can write a bash script to automate the process. -Here's an example, which you can adapt to your own needs. The -script requires an argument (the .pfb filename), then prompts for -the GROFF_FONTNAME. +Here's a rudimentary example, which you can adapt to your own needs. +The script requires an argument (the .pfb filename), then prompts +for the GROFF_FONTNAME. </p> <pre> -#!/bin/bash +#!/bin/sh # -# A script for installing Type1 fonts. +# Converts .ttf files to .pfb and generates .afm +# Moves the .afm and .pfb to $HOME/Fonts/Type1 +# Generates a groff font from the .afm file and installs it in $HOME/Fonts/Groff +# Symlinks the font in <path to groff font/devps> +# Symlinks the .afm and .pfb in /usr/lib/ghostscript/font/ # -# Builds .afm files from .pfb files, generates a groff font from the -# .afm file, makes a symlink in /usr/lib/ghostscript/font/ to the -# .pfb file, and a symlink in site-font to the groff font -# - -# .pfb filename, stripped of .pfb extension -FONT=`basename $1 .pfb` - -# Directory holding my personal collection of type1 fonts -FONTDIR="$HOME/Fonts/Type1" -# Directory holding system ghostscript fonts -GS_FONTDIR="/usr/lib/ghostscript/fonts" - -# Location of site-font/devps +FONT=`basename $1 .ttf` +FONTDIR="$HOME/Fonts/TrueType" +T1_FONTDIR="$HOME/Fonts/Type1" +GS_FONTDIR="/usr/share/fonts/type1/gsfonts" GROFF_SITE_FONTDIR="/usr/local/share/groff/site-font/devps" - -# Personal groff fonts directory GROFF_FONTS="$HOME/Fonts/Groff" +TEXTMAP="$T1_FONTDIR/textmap" +TEXTENC="$T1_FONTDIR/text.enc" -# Symlinks to textmap and text.enc -TEXTMAP="$FONTDIR/textmap" -TEXTENC="$FONTDIR/text.enc" +echo -n "Family directory name: " +read FAMILYDIR -if [ ! `pwd` = "$FONTDIR" ] ; then - echo "Changing into $FONTDIR directory.." - cd $FONTDIR - sleep 1 -else - sleep 1 +if [ ! -d "$T1_FONTDIR/$FAMILYDIR" ] ; then + echo "Creating $FAMILYDIR in $T1_FONTDIR" + mkdir $T1_FONTDIR/$FAMILYDIR fi echo -n "Groff name for this font: " read FONTNAME -sleep 1 -echo "Getting .afm.." -getafm $FONT.pfb | gsnd - > $FONT.afm -sleep 1 +echo "Creating .pfb and .afm files from $FONT.ttf" +(ttf2pt1 \-b $FONT.ttf) + +echo "Moving .afm and .pfb file to $T1_FONTDIR/$FAMILYDIR.." +mv $FONT.afm $T1_FONTDIR/$FAMILYDIR +mv $FONT.pfb $T1_FONTDIR/$FAMILYDIR + +echo "Changing to $T1_FONTDIR/$FAMILYDIR.." +cd $T1_FONTDIR/$FAMILYDIR echo "Creating $FONTNAME.." -afmtodit -e $TEXTENC $FONTDIR/$FONT.afm $TEXTMAP $FONTNAME +afmtodit -e $TEXTENC $T1_FONTDIR/$FAMILYDIR/$FONT.afm $TEXTMAP $FONTNAME mv -i $FONTNAME $GROFF_FONTS +echo "Linking $FONTNAME in $GROFF_SITE_FONTDIR.." sudo ln -s $GROFF_FONTS/$FONTNAME $GROFF_SITE_FONTDIR/$FONTNAME -sleep 1 -echo "Linking $FONT in $GS_FONTDIR.." +echo "Linking $FONT.pfb and $FONT.afm in $GS_FONTDIR.." cd $GS_FONTDIR -sudo ln -s $FONTDIR/$FONT.afm $FONT.afm -sudo ln -s $FONTDIR/$FONT.pfb $FONT.pfb -sleep 1 - -# This next bit is Debian specific. If you're not running a -# Debian system, replace it with whatever your distro requires -# in order to register Type1 fonts. - -if [ !`pidof -x /usr/bin/dfontmgr` ] ; then - echo "I will now run dfontmgr so you can register the font." - exec sudo dfontmgr & -else - echo "You may now register the font with dfontmgr." -fi +sudo ln -s $T1_FONTDIR/$FAMILYDIR/$FONT.afm $FONT.afm +sudo ln -s $T1_FONTDIR/$FAMILYDIR/$FONT.pfb $FONT.pfb + +echo "Font installation complete" + +exit 0 </pre> <hr/> @@ -819,7 +767,8 @@ address: </p> <p> -<strong><i> pschaffter@magma.ca</i></strong> +<strong><i>pschaffter@ncf.ca +</i></strong> </p> <p> @@ -834,7 +783,7 @@ it at </p> <p> - <a href="http://gretchen.homelinux.org/mom/mom.html"><kbd>http://gretchen.homelinux.org/mom/mom.html</kbd></a>. + <a href="http://web.ncf.ca/fs222/mom/mom-01.html"><kbd>http://web.ncf.ca/fs222/mom/mom-01.html</kbd></a>. </p> <hr/> diff --git a/contrib/mom/momdoc/docelement.html b/contrib/mom/momdoc/docelement.html index 7bdfefcc..0e26e38b 100644 --- a/contrib/mom/momdoc/docelement.html +++ b/contrib/mom/momdoc/docelement.html @@ -6008,7 +6008,7 @@ hence even if you only want one blank page, you have to tell </p> <p> -The optional argument, <kbd>MULL</kbd>, allows you to output the +The optional argument, <kbd>NULL</kbd>, allows you to output the specified number of pages without <strong>mom</strong> incrementing the page number for each blank page. She will, however, continue to keep track of which pages are recto/verso if recto/verso diff --git a/contrib/mom/momdoc/docprocessing.html b/contrib/mom/momdoc/docprocessing.html index 92f44b97..a968046b 100644 --- a/contrib/mom/momdoc/docprocessing.html +++ b/contrib/mom/momdoc/docprocessing.html @@ -1718,7 +1718,7 @@ afterwards. <p> <strong>LETTER</strong> tells mom you're writing a letter. See the section -<a href="letters.html#INTRO">Writing Letters</a> +<a href="letters.html#LETTERS">Writing Letters</a> for instructions on using <strong>mom</strong> to format letters. </p> diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html index e78b6e7d..20db86d8 100644 --- a/contrib/mom/momdoc/toc.html +++ b/contrib/mom/momdoc/toc.html @@ -4,7 +4,7 @@ This file is part of groff, the GNU roff type-setting system. Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -Written by Peter Schaffter (pschaffter@sympatico.ca). +Written by Peter Schaffter (pschaffter@ncf.ca). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac index 055e404c..554386a8 100644 --- a/contrib/mom/om.tmac +++ b/contrib/mom/om.tmac @@ -4,7 +4,7 @@ Mom -- a typesetting/document-processing macro set for groff. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - Written by Peter Schaffter (pschaffter@sympatico) + Written by Peter Schaffter (pschaffter@ncf.ca) This file is part of groff. @@ -9194,6 +9194,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if '\\$1'CENTRE' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \} . if '\\$1'R' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \} . if '\\$1'RIGHT' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \} +. shift . ie '\\$1'CAPS' \{\ . nr #HDRFTR_VERSO_CAPS 1 . ds $USERDEF_HDRFTR_VERSO \\$2 |