summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/mm/ChangeLog7
-rw-r--r--contrib/mm/Makefile.sub4
-rw-r--r--contrib/mm/refer-mm.tmac106
3 files changed, 116 insertions, 1 deletions
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 1f4a8eec..dee1c1e0 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+Fri Jan 28 11:15:29 2011 Werner LEMBERG <wl@gnu.org>
+
+ Handle `refer-mm.tmac' file.
+
+ * refer-mm.tmac: New file.
+ * Makefile.sub (install_data, uninstall_sub): Handle it.
+
Fri Jan 28 10:56:29 2011 Werner LEMBERG <wl@gnu.org>
Add `refer' support.
diff --git a/contrib/mm/Makefile.sub b/contrib/mm/Makefile.sub
index bde215bc..d0eac3c5 100644
--- a/contrib/mm/Makefile.sub
+++ b/contrib/mm/Makefile.sub
@@ -1,4 +1,4 @@
-# Copyright 1991, 1992, 1993, 1999, 2000, 2001, 2006, 2007, 2009
+# Copyright 1991-1993, 1999-2001, 2006, 2007, 2009, 2011
#
# This file is part of groff.
#
@@ -44,6 +44,7 @@ install_data: install_m
test -f $(DESTDIR)$(tmacdir)/mm/$$f \
|| touch $(DESTDIR)$(tmacdir)/mm/$$f; \
done
+ $(INSTALL_DATA) $(srcdir)/refer-mm.tmac $(DESTDIR)$(tmacdir)/refer-mm.tmac
install_m:
-test -d $(DESTDIR)$(tmacdir) \
@@ -82,5 +83,6 @@ uninstall_sub:
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
+ -rm -f $(DESTDIR)$(tmacdir)/refer-mm.tmac
-rmdir $(DESTDIR)$(tmacdir)/mm
-rm -f $(DESTDIR)$(bindir)/mmroff
diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
new file mode 100644
index 00000000..55dac432
--- /dev/null
+++ b/contrib/mm/refer-mm.tmac
@@ -0,0 +1,106 @@
+.\" -*- mode: nroff; coding: iso-latin-1; -*-
+.\"
+.\" refer-mm.tmac
+.\"
+.\" Refer support for mm macros.
+.\"
+.\" Copyright (C) 2011 Free Software Foundation, Inc.
+.\" Written by Werner Lemberg (wl@gnu.org)
+.\"
+.\" This file is part of groff.
+.\"
+.\" groff is free software; you can redistribute it and/or modify it under
+.\" the terms of the GNU General Public License as published by the Free
+.\" Software Foundation, either version 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
+.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+.\" for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+.\"
+.\" Please send comments to groff@gnu.org.
+.
+.
+.als ref*error @warning
+.
+.de ref*text-label-start
+. FS "\\$1"
+..
+.de ref*text-label-end
+. FE
+..
+.
+.de ref*biblio-item-start
+. ref@start-print "\\$1"
+..
+.de ref*biblio-item-start-nolabel
+. ref@start-print \&
+..
+.de ref*biblio-item-end
+. ref@stop-print
+..
+.
+.ds ref*refnum-start \" empty
+.ds ref*refnum-end .\"
+.
+.ds [. \v'-.4m'\s-3[\"
+.ds .] ]\s0\v'.4m'\"
+.
+.ds ref*spec!0 Q A T S V N P I C D O
+.ds ref*spec!1 Q A T J S V N P I C D O
+.ds ref*spec!2 Q A T S V P I C D O
+.ds ref*spec!3 Q A T B E S V P I C D O
+.ds ref*spec!4 Q A T R G P I C D O
+.
+.ds ref*spec!A ", " "
+.ds ref*spec!B """ " " "in \fI" "" "\fP"
+.ds ref*spec!D """ " " "(" ")"
+.ds ref*spec!E ", " " "ed. "
+.ds ref*spec!G """ " " "(" ")"
+.ds ref*spec!J ", " " "\fI" "" "\fP"
+.ds ref*spec!N """ "(" "" ")"
+.ds ref*spec!O ". " "
+.ds ref*spec!P ", " " "p.\~"
+.ds ref*spec!PP ", " " "pp.\~"
+.ds ref*spec!T ", " " "\(lq" "" "\(rq"
+.ds ref*spec!T:0 ", " " "\fI" "" "\fP"
+.ds ref*spec!T:2 ", " " "\fI" "" "\fP"
+.ds ref*spec!V """ " " "\fB" "\fR"
+.ds ref*spec!dflt ", " "
+.
+.\" For the bibliography section, we emulate the .RS/.RF mechanism of mm by
+.\" collecting references (enclosed with .]- and .][) in macro `ref*mac'.
+.\" This macro gets expanded while calling the .RP macro.
+.
+.de ref*][-first-pass
+. ec
+. am ref*mac
+. ds [F "\\*([F\"
+. ][ "\\$1" "\\$2"
+\\..
+..
+.
+.de ref*biblio-start-hook
+. als ref*][-second-pass ][
+. als ][ ref*][-first-pass
+. de ref*item-start-hook
+. eo
+. am ref*mac ][
+\\..
+..
+.
+.de ref*biblio-end-hook
+. als ][ ref*][-second-pass
+. rm ref*item-start-hook
+. als ref*print ref*end-print
+. RP
+. als ref*print ref*normal-print
+..
+.
+.mso refer.tmac
+.
+.\" EOF