summaryrefslogtreecommitdiff
path: root/print/html2latex
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1996-04-12 22:30:50 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1996-04-12 22:30:50 +0000
commit60b6bf6d2e699d33177144fa56580f8a96f7a570 (patch)
tree1185d4a6060056462fc1cfa7fc60aa5158b83d06 /print/html2latex
parentUpgrade to next snapshot (diff)
html2latex, a simple converter to make HTML files printable.
(I've made sure and got an explicit permission from the author for redistribution.)
Notes
Notes: svn path=/head/; revision=2994
Diffstat (limited to 'print/html2latex')
-rw-r--r--print/html2latex/Makefile18
-rw-r--r--print/html2latex/distinfo1
-rw-r--r--print/html2latex/files/patch-aa72
-rw-r--r--print/html2latex/files/patch-ab47
-rw-r--r--print/html2latex/files/patch-ac133
-rw-r--r--print/html2latex/pkg-comment1
-rw-r--r--print/html2latex/pkg-descr8
-rw-r--r--print/html2latex/pkg-plist2
8 files changed, 282 insertions, 0 deletions
diff --git a/print/html2latex/Makefile b/print/html2latex/Makefile
new file mode 100644
index 000000000000..739528bdb54b
--- /dev/null
+++ b/print/html2latex/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: html2latex
+# Version required: 0.9c
+# Date created: 29-March-1996
+# Whom: joerg
+#
+# $Id$
+#
+
+DISTNAME= html2latex-0.9c
+PKGNAME= html2latex-0.9
+CATEGORIES+= printing
+# i can't seem to find the original dist site
+MASTER_SITES= ftp://ftp.germany.eu.net/pub/infosystems/www/ncsa/Web/Mosaic/Contrib/
+DISTFILES= html2latex-0.9c.tar.Z
+
+MAINTAINER= joerg@FreeBSD.org
+
+.include <bsd.port.mk>
diff --git a/print/html2latex/distinfo b/print/html2latex/distinfo
new file mode 100644
index 000000000000..3ea8ff20dca7
--- /dev/null
+++ b/print/html2latex/distinfo
@@ -0,0 +1 @@
+MD5 (html2latex-0.9c.tar.Z) = 3c35b192d7e9815d4d33935440eebc46
diff --git a/print/html2latex/files/patch-aa b/print/html2latex/files/patch-aa
new file mode 100644
index 000000000000..560dc8afd1e6
--- /dev/null
+++ b/print/html2latex/files/patch-aa
@@ -0,0 +1,72 @@
+diff -u ../html2latex-0.9c.old/HTMLparse.c ./HTMLparse.c
+--- ../html2latex-0.9c.old/HTMLparse.c Fri Mar 19 04:52:24 1993
++++ ./HTMLparse.c Fri Mar 29 16:36:35 1996
+@@ -67,7 +67,8 @@
+ "title", "h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "address",
+ "xmp", "ul", "li", "dl", "dt", "dd", "pre", "plaintext", "listing",
+ "isindex", "menu", "dir", "img", "ol", "em", "tt", "b", "i", "u",
+- "strong", "code", "samp", "kbd", "var", "dfn", "cite", "gnat"
++ "strong", "code", "samp", "kbd", "var", "dfn", "cite", "gnat",
++ "!"
+ };
+
+ /*
+@@ -454,7 +455,8 @@
+ {
+ if (*ptr == '<')
+ {
+- if (isalpha((int)(*(ptr + 1))))
++ if (isalpha((int)(*(ptr + 1))) ||
++ *(ptr + 1) == '!')
+ {
+ break;
+ }
+diff -u ../html2latex-0.9c.old/HTMLparse.h ./HTMLparse.h
+--- ../html2latex-0.9c.old/HTMLparse.h Fri Mar 19 04:43:34 1993
++++ ./HTMLparse.h Fri Mar 29 16:25:48 1996
+@@ -52,7 +52,7 @@
+ M_DESC_TITLE, M_DESC_TEXT, M_PREFORMAT, M_PLAIN_FILE, M_LISTING_TEXT,
+ M_INDEX, M_MENU, M_DIRECTORY, M_IMAGE, M_NUM_LIST, M_EM,
+ M_TT, M_B, M_I, M_U, M_STRONG, M_CODE, M_SAMP, M_KBD, M_VAR, M_DFN,
+- M_CITE, M_SENTINEL
++ M_CITE, M_SENTINEL, M_COMMENT
+ } mark_t;
+
+ /* amperstand escapes */
+diff -u ../html2latex-0.9c.old/Makefile ./Makefile
+--- ../html2latex-0.9c.old/Makefile Fri Mar 19 05:02:36 1993
++++ ./Makefile Fri Mar 29 16:40:56 1996
+@@ -12,9 +12,9 @@
+
+ # ----------------------------------------------------------------------------
+ # For SGI's:
+-CFLAGS = -g -cckr -DXMOSAIC
++CFLAGS = -g -cckr -DXMOSAIC -DNEED_GETOPT_H
+ # For testing:
+-# CFLAGS = -g -Wall -DXMOSAIC
++# CFLAGS = -g -Wall -DXMOSAIC -DNEED_GETOPT_H
+ # For HP's:
+ # CFLAGS = -g -DXMOSAIC -I/usr/include/Motif1.1 -I/usr/include/X11R4
+ # For everyone else:
+Only in .: diff
+diff -u ../html2latex-0.9c.old/html2latex.c ./html2latex.c
+--- ../html2latex-0.9c.old/html2latex.c Wed Jun 16 05:55:10 1993
++++ ./html2latex.c Fri Mar 29 16:41:17 1996
+@@ -9,7 +9,9 @@
+ #include "HTMLparse.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#if NEED_GETOPT_H
+ #include <getopt.h>
++#endif
+ #include <ctype.h>
+ #include <string.h>
+
+@@ -339,6 +341,7 @@
+ if (!mptr)
+ current = temp_s;
+ break;
++ case M_COMMENT:
+ default:
+ /* ignore things we know not wot of */
+ break;
diff --git a/print/html2latex/files/patch-ab b/print/html2latex/files/patch-ab
new file mode 100644
index 000000000000..f19b54f6c3ff
--- /dev/null
+++ b/print/html2latex/files/patch-ab
@@ -0,0 +1,47 @@
+--- Makefile.orig Fri Mar 29 17:18:06 1996
++++ Makefile Fri Mar 29 17:22:06 1996
+@@ -3,7 +3,7 @@
+
+ # ----------------------------------------------------------------------------
+ # For normal machines with normal compilers:
+-CC = cc
++# CC = cc
+ # For testing:
+ # CC = gcc
+ # For Sun's and other non-at-least-pseudo-ANSI-C platforms:
+@@ -12,7 +12,7 @@
+
+ # ----------------------------------------------------------------------------
+ # For SGI's:
+-CFLAGS = -g -cckr -DXMOSAIC -DNEED_GETOPT_H
++# CFLAGS = -g -cckr -DXMOSAIC -DNEED_GETOPT_H
+ # For testing:
+ # CFLAGS = -g -Wall -DXMOSAIC -DNEED_GETOPT_H
+ # For HP's:
+@@ -20,12 +20,13 @@
+ # For everyone else:
+ # CFLAGS = -g -DXMOSAIC
+ # ----------------------------------------------------------------------------
++CFLAGS+= -DXMOSAIC
+
+ # ----------------------------------------------------------------------------
+ # For SGI's:
+-RANLIB = /bin/true
++# RANLIB = /bin/true
+ # For everyone else:
+-# RANLIB = ranlib
++RANLIB = ranlib
+ # ----------------------------------------------------------------------------
+
+ # You shouldn't need to edit below here.
+@@ -55,3 +56,10 @@
+
+ clean:
+ -rm $(EXETARGET) $(OBJS) $(LIBTARGET) $(DOCTARGET)
++
++PREFIX?= /usr/local
++
++install: all
++ install -c -s $(EXETARGET) $(PREFIX)/bin
++ gzip -c < html2latex.1 > html2latex.1.gz
++ install -c html2latex.1.gz $(PREFIX)/man/man1
diff --git a/print/html2latex/files/patch-ac b/print/html2latex/files/patch-ac
new file mode 100644
index 000000000000..19b9c1da95dc
--- /dev/null
+++ b/print/html2latex/files/patch-ac
@@ -0,0 +1,133 @@
+--- /dev/null Fri Mar 29 13:23:05 1996
++++ html2latex.1 Fri Mar 29 17:16:25 1996
+@@ -0,0 +1,130 @@
++.\" Manually converted from Nathan's html2latex.html file that
++.\" was accompanying the distribution.
++.\" "
++.Dd March 29, 1996
++.Dt HTML2LATEX 1
++.Os
++.Sh NAME
++.Nm html2latex
++.Nd convert HTML markup to LaTeX markup
++.Sh SYNOPSIS
++.Nm html2latex
++.Op opt
++.Op Ar file ...
++.Sh DESCRIPTION
++For each file argument,
++.Nm html2latex
++converts the text as HTML markup to LaTeX markup. If no files are
++specified, a usage message is given. Input will be taken from
++standard input for files named
++.Fl .
++Output will to a similarly named file with a
++.Ql .tex
++extension (
++.Nm html2latex
++recognises
++.Ql .html
++extensions).
++.Pp
++Options modify the action of
++.Nm html2latex .
++.Pp
++The options are:
++.Bl -tag -offset indent -width "XXX"
++.It Fl n
++Number sections.
++.It Fl p
++Place page breaks after the title page (if present) and the
++table of contents (if present).
++.It Fl c
++Generate a table of contents.
++.It Fl s
++Create no files -- LaTeX is output to stdout.
++.It Fl t Ar Title
++Generate a title page, with the title
++.Ar Title.
++.It Fl a Ar Author
++Generate a title page, with the author
++.Ar Author .
++.It Fl h Ar Header
++Place the text
++.Ar Header
++after
++.Ql \ebegin{document} .
++.It Fl f Ar Footer
++Place the text
++.Ar Footer
++before
++.Ql \eend{document} .
++.It Fl o Ar Options
++Specify the options to
++.Ql \edocumentstyle .
++.El
++.Sh EXAMPLES
++An example of use is
++.Pp
++.Dl html2latex -n - < file.html | less
++.Pp
++This converts
++.Pa file.html
++to LaTeX and pages through the output. The sections (corresponding to
++heading tags in the HTML source) will be numbered.
++.Pp
++Another example is
++.Pp
++.Bd -literal -offset indent
++html2latex -t 'Introduction to HTML' -a gnat \e
++-p -c -o '[bookman]{article}' html-intro
++.Ed
++.Pp
++This takes input from the file
++.Pa html-intro ,
++writing to
++.Pa html-intro.tex ,
++and adds a title page (with title
++.Em Introduction to HTML
++and author
++.Em gnat )
++and table of contents with page-breaks after both. The sections of
++the document are not numbered. The LaTeX source includes the line
++.Ql \edocumentstyle[bookman]{article} .
++.Sh SEE ALSO
++.Xr latex 1 .
++.Sh BUGS
++Current the only HTML tags supported are:
++.Em TITLE, H1, H2, H3, H4, H5,
++.Em H6, UL, OL, DL, DT, DD, LI,
++.Em B, I, U, EM, STRONG, CODE, SAMP,
++.Em KBD, VAR, DFN, CITE, LISTING .
++The only recognised SGML escapes are
++.Ql &amp.amp ,
++.Ql &amp.lt ,
++.Ql &amp.gt .
++.Em ADDRESS
++tags are handled badly.
++.Pp
++The
++.Em COMPACT
++attribute to a
++.Em DL
++tag is not recognised.
++.Em MENU
++and
++.Em DIR
++styles are not handled well.
++.Em TITLE
++text are ignored.
++.Pp
++Currently
++.Em PRE
++tags are not handled at all.
++.Pp
++The entire file is read into memory. For long HTML documents on
++machines with little memory, this may cause problems.
++.Sh CREDITS
++Nathan Torkington adapted the HTML parser from NCSA's Xmosaic package
++(file://ncsa.uiuc.edu/Web/xmosaic) and wrote the conversion
++code. The HTML parser code is subject to the NCSA restrictions. The
++conversion code is subject to the VUW restrictions. Enquiries should
++be sent via e-mail to
++.Ql Nathan.Torkington@vuw.ac.nz .
diff --git a/print/html2latex/pkg-comment b/print/html2latex/pkg-comment
new file mode 100644
index 000000000000..f9c1aed3ce7f
--- /dev/null
+++ b/print/html2latex/pkg-comment
@@ -0,0 +1 @@
+convert HTML document into LaTeX
diff --git a/print/html2latex/pkg-descr b/print/html2latex/pkg-descr
new file mode 100644
index 000000000000..00df71001b12
--- /dev/null
+++ b/print/html2latex/pkg-descr
@@ -0,0 +1,8 @@
+This is an HTML to LaTeX translator.
+
+CREDITS
+Nathan Torkington adapted the HTML parser from NCSA's Xmosaic package
+(file://ncsa.uiuc.edu/Web/xmosaic) and wrote the conversion
+code. The HTML parser code is subject to the NCSA restrictions. The
+conversion code is subject to the VUW restrictions. Enquiries should
+be sent via e-mail to Nathan.Torkington@vuw.ac.nz.
diff --git a/print/html2latex/pkg-plist b/print/html2latex/pkg-plist
new file mode 100644
index 000000000000..05db9045927d
--- /dev/null
+++ b/print/html2latex/pkg-plist
@@ -0,0 +1,2 @@
+bin/html2latex
+man/man1/html2latex.1.gz