#!/bin/sh # # html2latex.sh - convert HTML to jLaTeX # $Id: html2latex.sh,v 1.5 1995/02/22 01:25:24 saka Exp $ # Copyright (C) 1994, by Tetsuo Sakaguchi, # University of Library and Information Science. (saka@ulis.ac.jp) # # Warning: this script is made for HTML produced with text2html.sh # jisto='jconv' cat "$@" \ | ${jisto} \ | sed -e ' /
/,/<\/PRE>/ !s/[{}$]/\\&/g //,/<\/PRE>/ !s/\\\([^{}$]\)/$\\backslash$\1/g ' \ | awk ' BEGIN { print "\\documentstyle[a4j]{jarticle}"; print "\\setlength{\\parindent}{0cm}"; print "\\setlength{\\parskip}{4pt plus 3pt minus 2pt}"; print "\\setcounter{page}{1001}"; } /|<\/HTML>/ { next; } //,/<\/HEAD>/ { next; } // { print "\\begin{document}"; next; } /<\/BODY>/ { print "\\end{document}"; next; } // { print "\\vspace{1cm}"; print "\\begin{center} {\Large\bf"; next; } /<\/H1>/ { print "} \\end{center}"; next; } // { print "\\begin{center}"; next; } /<\/ADDRESS>/ { print "\\end{center}"; next; } /
/ { print "\\\\"; next; } // { print "\\subsection*{"; next; } /<\/H2>/ { print "}"; next; } /
/ { next; } /