[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff/tmac www.tmac
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff/tmac www.tmac |
Date: |
Fri, 02 Jan 2009 07:43:39 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 09/01/02 07:43:39
Modified files:
tmac : www.tmac
Log message:
Formatting.
Minor typos and simplifications.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/www.tmac?cvsroot=groff&r1=1.58&r2=1.59
Patches:
Index: www.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/www.tmac,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- www.tmac 30 Dec 2008 09:05:57 -0000 1.58
+++ www.tmac 2 Jan 2009 07:43:39 -0000 1.59
@@ -57,7 +57,8 @@
.ds www-> >\"
.
.nr www-html 0
-.if '\*[.T]'html' .nr www-html 1
+.if '\*[.T]'html' \
+. nr www-html 1
.
.\" set up www-image-template
.
@@ -65,7 +66,7 @@
. ds www-image-template
.
.if r ps4html \{\
-. \" remove the title command when we are generating images for html
+. \" remove the title command when we are generating images for HTML
. \" (stops a title accidentally appearing inside an image)
. di www-notitle
. tl ''''
@@ -120,9 +121,12 @@
.\" Space before paragraph. Use \n[PD] if it exists.
.\"
.nr www:pd 0.5v
+.
.de www:paraspace
-. ie r PD .sp \\n[PD]u
-. el .sp \\n[www:pd]u
+. ie r PD \
+. sp \\n[PD]u
+. el \
+. sp \\n[www:pd]u
..
.
.\" --------------------------------------------------------------------
@@ -133,6 +137,7 @@
.de www-error
. tm \\n[.F]:\\n[.c]: macro error: \\$*
..
+.
.als www:error www-error
.
.\" --------------------------------------------------------------------
@@ -147,7 +152,7 @@
. ab
. \}
. length \\$0:n x\\*[\\$2]
-. nr \\$1 (\\n[\\$0:n]-1)
+. nr \\$1 (\\n[\\$0:n] - 1)
. rr \\$0:n
..
.
@@ -167,16 +172,15 @@
. ds \\$0:s
. while 1 \{\
. ds \\$0:c "\\*[\\$0:r]\"
-. substring \\$0:c 0 0\"
+. substring \\$0:c 0 0
. ie '\\*[\\$0:c]' ' \
. as \\$0:s " space\"
. el \
. as \\$0:s " \\*[\\$0:c]\"
. www:lenstr \\$0:n \\$0:r
-. if (\\n[\\$0:n] <= 1) \{\
+. if (\\n[\\$0:n] <= 1) \
. break
-. \}
-. substring \\$0:r 1 -1\"
+. substring \\$0:r 1 -1
. \}
. if !'\\*[\\$0:s]'' \
. substring \\$0:s 1 -1
@@ -224,10 +228,8 @@
. ds \\$0:s
. nr \\$0:done 0
. while !\\n[\\$0:done] \{\
-. if (\\n[.$] <= 0) \{\
-. nr \\$0:done 1
+. if (\\n[.$] <= 0) \
. break
-. \}
. if '\\$1'space' \{\
. as \\$0:s " \"
. shift
@@ -309,10 +311,11 @@
.\" Emit an HTML tag. If text has been written in the paragraph
.\" then do not shut the paragraph down.
.\" If text was not written, remove the empty
-.\" paragraph tag and emit the desired html tag.
+.\" paragraph tag and emit the desired HTML tag.
.\"
.de HTML<?p>
-. if \\n[www-html] .nop \&\X^html<?p>:\\$*^
+. if \\n[www-html] \
+. nop \&\X^html<?p>:\\$*^
..
.
.\"
@@ -322,7 +325,8 @@
.\" paragraph tag and emit the desired math tag.
.\"
.de MATH<?p>
-. if \\n[www-html] .nop \&\X^math<?p>:\\$*^
+. if \\n[www-html] \
+. nop \&\X^math<?p>:\\$*^
..
.
.\" --------------------------------------------------------------------
@@ -368,6 +372,7 @@
. ds \\$0:tmp \\*[\\$1]\"
. substring \\$0:tmp 1
. ds \\$0:tmp TAG_\\*[\\$0:tmp]\"
+.
. ie !'\\*[\\*[\\$0:tmp]]'' \
. ds \\$1 \\*[\\*[\\$0:tmp]]\"
. el \
@@ -378,31 +383,37 @@
.
.\" --------------------------------------------------------------------
.\" URL url [description] [after]
+.\"
.\" If description is absent then the url becomes the anchor text.
.\"
.de URL
. if !'\\$1'' \{\
. ds \\$0:adr \\$1\"
. www:url_check_tag \\$0:adr
-. if !\\n[www-html] .www:url_breaks \\$0:adr
+. if !\\n[www-html] \
+. www:url_breaks \\$0:adr
. \}
. ie \\n[www-html] \{\
. ie '\\$3'' \
. ds \\$0:after \&\"
. el \
. ds \\$0:after \&\\$3\"
+.
. ie '\\$2'' \
. HTML-NS <a "href=""\\$1"">\\*[\\$0:adr]</a>"
. el \
. HTML-NS <a "href=""\\$1"">\\$2</a>"
+.
. nop \\*[\\$0:after]
. rm \\$0:after
. \}
. el \{\
-. if !r ps4html .ad l
+. if !r ps4html \
+. ad l
+.
. ie '\\$2'' \{\
. ie '\\$1'' \{\
-. ie !'\\$3'' \
+. if !'\\$3'' \
. nop \\$3
. \}
. el \{\
@@ -430,7 +441,9 @@
. \}
. \}
. \}
-. if !r ps4html .ad
+.
+. if !r ps4html \
+. ad
. \}
. rm \\$0:adr
..
@@ -502,10 +515,8 @@
.\" --------------------------------------------------------------------
.\" TAG name [text]
.\"
-.\" Generate an html name NAME.
-.\" Define string TAG_NAME to TEXT, if present,
-.\" otherwise to \n[PN].
-.\"
+.\" Generate an HTML name NAME.
+.\" Define string TAG_NAME to TEXT, if present, otherwise to \n[PN].
.\"
.de TAG
. HTML <a "name=""\\$1""></a>"
@@ -552,7 +563,7 @@
.\" --------------------------------------------------------------------
.\" PIMG [-R|-L|-C] filename [width] [height]
.\"
-.\" Include a png image. It works for -Tps and -Thtml.
+.\" Include a PNG image. It works for -Tps and -Thtml.
.\" The default value for WIDTH and HEIGHT is zero; the default
.\" alignment is centering (-C).
.\"
@@ -581,6 +592,7 @@
. ds www-htmlalign align="right"\"
. if '\\*[www-pic-align]'-L' \
. ds www-htmlalign align="left"\"
+.
. nr www-width 0
. nr www-height 0
. if !'\\$2'' \
@@ -637,7 +649,8 @@
.\" called when the -R picture is finished
.de www-finish-right-ll
. ll +(\\n[www-right-indent]u + \\n[www-image-gap]u)
-. \" now see whether we need to inline www-finish-left-ll
+.
+. \" now check whether we need to inline www-finish-left-ll
. if (\\n[www-left-ll-trap]u > 0) \
. if ((\\n[www-right-ll-trap]u + 1v) >= \\n[www-left-ll-trap]u) \{\
. mk www-left-po-trap
@@ -647,13 +660,15 @@
. wh \\n[www-left-ll-trap]u
. nr www-left-ll-trap 0
. \}
-. \" and see whether we need to inline www-finish-left-po
+.
+. \" and check whether we need to inline www-finish-left-po
. if (\\n[www-left-po-trap]u > 0) \
. if ((\\n[www-right-ll-trap]u + 1v) >= \\n[www-left-po-trap]u) \{\
. po -\\n[www-left-indent]u
. wh \\n[www-left-po-trap]u
. nr www-left-indent 0
. \}
+.
. wh \\n[www-right-ll-trap]u
. nr www-right-ll-trap 0
..
@@ -664,6 +679,7 @@
. ll +\\n[www-right-indent]u
. nr www-right-ll-trap 0
. \}
+.
. mk www-left-po-trap
. nr www-left-po-trap +1v
. wh \\n[www-left-po-trap]u www-finish-left-po
@@ -700,7 +716,7 @@
.\" --------------------------------------------------------------------
.\" MPIMG [-R|-L] [-G gap] filename [width [height]]
.\"
-.\" Include a png image and wrap text around it. It works for
+.\" Include a PNG image and wrap text around it. It works for
.\" -Tps and -Thtml. The default value for WIDTH is 1i; default value
.\" for HEIGHT is WIDTH; the default alignment is left (-L).
.\" -G is used to insert a gap between the text and the image.
@@ -826,6 +842,7 @@
. wh \\n[www-left-po-trap]u
. PSPIC -R \\*[www-unique-name].eps \\n[www-width]u \\n[www-height]u
. sp -\\n[ps-desht]u
+.
. nr www-right-indent \\n[ps-deswid]u
. \" we want to have some space between text and image,
. \" so the line length must be shorter
@@ -833,6 +850,7 @@
. mk www-right-ll-trap
. nr www-right-ll-trap +(\\n[ps-desht]u - 1v)
. wh \\n[www-right-ll-trap]u www-finish-right-ll
+.
. \" now restore possible left trap
. if (\\n[www-left-ll-trap] > 0) \
. wh \\n[www-left-ll-trap]u www-finish-left-ll
@@ -845,6 +863,7 @@
. wh \\n[www-right-ll-trap]u
. PSPIC -L \\*[www-unique-name].eps \\n[www-width]u \\n[www-height]u
. sp -\\n[ps-desht]u
+.
. nr www-left-indent \\n[ps-deswid]u
. \" increase offset by gap
. po +(\\n[www-left-indent]u + \\n[www-image-gap]u)
@@ -853,6 +872,7 @@
. mk www-left-ll-trap
. nr www-left-ll-trap +(\\n[ps-desht]u - 1v)
. wh \\n[www-left-ll-trap]u www-finish-left-ll
+.
. \" now restore possible right trap
. if (\\n[www-right-ll-trap] > 0) \
. wh \\n[www-right-ll-trap]u www-finish-right-ll
@@ -997,7 +1017,7 @@
. als LI \\*[www-level\\n[www-depth]]
..
.
-.\" www-emit-ltag - shuts down a previous open list tag
+.\" www-emit-ltag - shut down a previous open list tag
.\" before issuing a new tag \\$1.
.\" It then records tag \\$1 is open.
.
@@ -1155,6 +1175,7 @@
.\"
.\" Insert a list item.
.\"
+.
.\" ********
.\" www-li-ul - bulleted list item
.\"
@@ -1255,7 +1276,7 @@
.\" supplementary macros used by other macro sets
.\"
.\" here are some tags specially for -Tps or -Thtml when invoked by
-.\" pre-html to generate png images from postscript.
+.\" pre-html to generate PNG images from postscript.
.
.\" --------------------------------------------------------------------
.\" HTML-DO-IMAGE - tell troff to issue an image marker which can be
@@ -1269,7 +1290,7 @@
..
.
.\" --------------------------------------------------------------------
-.\" HTML-IMAGE-END - terminate an image for html
+.\" HTML-IMAGE-END - terminate an image for HTML
.\"
.de HTML-IMAGE-END
. if r ps4html \
@@ -1315,7 +1336,7 @@
..
.
.\" EQN-HTML-IMAGE and friends check to see whether the equation is
-.\" not in an image, in which case it allows html
+.\" not in an image, in which case it allows HTML
.\" (mathml) to be generated (if -Txhtml was specified).
.
.de EQN-HTML-IMAGE
@@ -1352,11 +1373,12 @@
. nop \O[5\\$2\\$1.png]\O[0]\O[3]
. \}
. \}
-. el .HTML-DO-IMAGE \\$*
+. el \
+. HTML-DO-IMAGE \\$*
..
.
.\" --------------------------------------------------------------------
-.\" EQN-HTML-IMAGE-END - terminate an image for html
+.\" EQN-HTML-IMAGE-END - terminate an image for HTML
.\"
.de EQN-HTML-IMAGE-END
. ie r xhtml \{\
@@ -1367,7 +1389,8 @@
. nop \O[4]\O[2]\O[1]
. \}
. \}
-. el .HTML-IMAGE-END
+. el \
+. HTML-IMAGE-END
..
.
.\" --------------------------------------------------------------------
@@ -1403,7 +1426,7 @@
.\" --------------------------------------------------------------------
.\" JOBNAME
.\"
-.\" Generate multiple output files containing the html.
+.\" Generate multiple output files containing the HTML.
.\" A file is split whenever a .SH or .NH 1 is encountered.
.\" The argument to JOBNAME is the file stem for future output files.
.\"
@@ -1414,7 +1437,7 @@
.\" --------------------------------------------------------------------
.\" HEAD
.\"
-.\" Add information to the <head> </head> section of the html
+.\" Add information to the <head> </head> section of the HTML
.\" document
.\"
.de HEAD
@@ -1548,7 +1571,8 @@
.\" driver
.
.de MATHML
-. if (\\n[.O] == 0) .MATH<?p> \\$*
+. if (\\n[.O] == 0) \
+. MATH<?p> \\$*
..
.
.\" --------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff/tmac www.tmac,
Werner LEMBERG <=