groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff/contrib/mom groff_mom.man om.tmac momdoc/...


From: Peter Schaffter
Subject: [Groff-commit] groff/contrib/mom groff_mom.man om.tmac momdoc/...
Date: Sun, 22 Nov 2009 18:57:54 +0000

CVSROOT:        /sources/groff
Module name:    groff
Changes by:     Peter Schaffter <PTPi>  09/11/22 18:57:54

Modified files:
        contrib/mom    : groff_mom.man om.tmac 
        contrib/mom/momdoc: appendices.html docelement.html 
                            docprocessing.html toc.html 

Log message:
        om.tmac:
        
        o Added CLOSING_INDENT and SIGNATURE_SPACE to DOCTYPE LETTER macros.
        
        o DROPCAP handling changed; uses local vertical motions now instead
          of .mk/.rt.
        
        o Added macro SUPERSCRIPT_RAISE_AMOUNT
        
        o Added registers and strings to keep track of .RW and .EW and the
          amounts passed to them.
        
        docs:
        
        o updated

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/groff_mom.man?cvsroot=groff&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/om.tmac?cvsroot=groff&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/appendices.html?cvsroot=groff&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/docelement.html?cvsroot=groff&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/docprocessing.html?cvsroot=groff&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/mom/momdoc/toc.html?cvsroot=groff&r1=1.34&r2=1.35

Patches:
Index: groff_mom.man
===================================================================
RCS file: /sources/groff/groff/contrib/mom/groff_mom.man,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- groff_mom.man       23 Sep 2009 15:37:52 -0000      1.12
+++ groff_mom.man       22 Nov 2009 18:57:53 -0000      1.13
@@ -89,7 +89,7 @@
 .
 .B mom
 was written by
-.MT address@hidden
+.MT address@hidden
 Peter Schaffter
 .ME .
 Please send bug reports to the

Index: om.tmac
===================================================================
RCS file: /sources/groff/groff/contrib/mom/om.tmac,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- om.tmac     23 Sep 2009 15:37:52 -0000      1.56
+++ om.tmac     22 Nov 2009 18:57:53 -0000      1.57
@@ -4,7 +4,7 @@
 
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
   Free Software Foundation, Inc.
-     Written by Peter Schaffter (address@hidden)
+     Written by Peter Schaffter (address@hidden)
 
 This file is part of groff.
 
@@ -9194,6 +9194,7 @@
 .    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

Index: momdoc/appendices.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/appendices.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- momdoc/appendices.html      7 Jul 2009 03:00:14 -0000       1.16
+++ momdoc/appendices.html      22 Nov 2009 18:57:53 -0000      1.17
@@ -56,7 +56,7 @@
 
 <p>
 Valid questions, to be sure, and <strong>mom</strong> has
-answers.  (Okay &mdash; I have answers, but I speak for
+an answer.  (Okay &mdash; I have an answer, but I speak for
 <strong>mom</strong>.)
 </p>
 
@@ -80,40 +80,6 @@
 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 &mdash; and probably &quot;text-only&quot;.
-</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 @@
 
 <p>
 <em><strong>Small note:</strong> the term</em>
-<kbd>&lt;prefix&gt;</kbd> <em>in this section refers to the
+<kbd>&lt;path_to_groff&gt;</kbd> <em>in this section refers to the
 directory in which groff is installed, typically something
 like</em> <kbd>/usr/share/groff/&lt;version&gt;</kbd> <em>(for
 distro-specific, pre-compiled groff packages) or</em>
@@ -188,7 +154,7 @@
 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>(&lt;prefix&gt;/font/devps/):</nobr> there's one
+<nobr>(&lt;path_to_groff&gt;/font/devps/):</nobr> there's one
 &quot;family&quot; for Helvetica (HR, HI, HB, HBI) and another for
 Helvetica Narrow (HNR, HNI, HNB, HNBI).
 </p>
@@ -367,7 +333,7 @@
 Be careful, though, that any styles you add do not conflict
 with <strong><u>family</u></strong> names that already exist.
 &quot;C&quot;, 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 &quot;C&quot;, 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 @@
 <p>
 <strong>VERY IMPORTANT NOTE: mom</strong>'s font extensions are
 not &quot;user-space&quot; 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 @@
     <li>a font manager
         <br/>
 
-        (Debian packages: defoma, psfontmgr, dfontmgr)
+        (Debian packages: defoma, psfontmgr)
     </li>
     <li>perl
         <br/>
@@ -470,13 +436,13 @@
         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>&lt;prefix&gt;/font/devps/generate/textmap</kbd>
+    <li>Locate the file 
<kbd>&lt;path_to_groff&gt;/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>&lt;prefix&gt;</kbd>).</nobr>  On my system,
-        at the time of writing, <kbd>&lt;prefix&gt;</kbd> is
+        <nobr><kbd>&lt;path_to_groff&gt;</kbd>).</nobr>  On my system,
+        at the time of writing, <kbd>&lt;path_to_groff&gt;</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 @@
 <kbd>ln -s /usr/local/share/groff/1.19.2/font/devps/generate/textmap 
textmap</kbd>
         </pre>
     </li>
-    <li>Locate the file <kbd>&lt;prefix&gt;/font/devps/text.enc</kbd> and
+    <li>Locate the file <kbd>&lt;path_to_groff&gt;/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 @@
             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>&lt;prefix&gt;/font/devps</kbd>
+            already exists in groff's 
<kbd>&lt;path_to_groff&gt;/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 @@
         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 @@
     <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> &lt;prefix&gt;/font/devps</kbd></li>
-    <li>make sure gs knows about the font</li>
+    <li>put the groff font in<kbd> &lt;path_to_groff&gt;/font/devps</kbd>
+        and the .pfb in your gs font directory
+    </li>
 </ul>
 </p>
 
@@ -621,78 +582,65 @@
 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"
+
+echo -n "Family directory name: "
+read FAMILYDIR
 
-# Symlinks to textmap and text.enc
-TEXTMAP="$FONTDIR/textmap"
-TEXTENC="$FONTDIR/text.enc"
-
-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 &amp;
-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 @@
 </p>
 
 <p>
-<strong><i>&nbsp;&nbsp;&nbsp;&nbsp;&#112;&#115;&#99;&#104;&#97;&#102;&#102;&#116;&#101;&#114;&#64;&#109;&#97;&#103;&#109;&#97;&#46;&#99;&#97;</i></strong>
+<strong><i>&#112;&#115;&#99;&#104;&#97;&#102;&#102;&#116;&#101;&#114;&#64;&#110;&#99;&#102;&#46;&#99;&#97;
+</i></strong>
 </p>
 
 <p>
@@ -834,7 +783,7 @@
 </p>
 
 <p>
-&nbsp;&nbsp;&nbsp;&nbsp;<a 
href="http://gretchen.homelinux.org/mom/mom.html";><kbd>http://gretchen.homelinux.org/mom/mom.html</kbd></a>.
+&nbsp;&nbsp;&nbsp;&nbsp;<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/>

Index: momdoc/docelement.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/docelement.html,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- momdoc/docelement.html      15 Jun 2009 03:01:23 -0000      1.33
+++ momdoc/docelement.html      22 Nov 2009 18:57:54 -0000      1.34
@@ -6008,7 +6008,7 @@
 </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

Index: momdoc/docprocessing.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/docprocessing.html,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- momdoc/docprocessing.html   7 Mar 2009 14:33:30 -0000       1.34
+++ momdoc/docprocessing.html   22 Nov 2009 18:57:54 -0000      1.35
@@ -1718,7 +1718,7 @@
 <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>
 

Index: momdoc/toc.html
===================================================================
RCS file: /sources/groff/groff/contrib/mom/momdoc/toc.html,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- momdoc/toc.html     15 Jun 2009 03:01:24 -0000      1.34
+++ momdoc/toc.html     22 Nov 2009 18:57:54 -0000      1.35
@@ -4,7 +4,7 @@
 
 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
   Free Software Foundation, Inc.
-Written by Peter Schaffter (address@hidden).
+Written by Peter Schaffter (address@hidden).
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or




reply via email to

[Prev in Thread] Current Thread [Next in Thread]