diff options
author | Carsten Leonhardt <leo@debian.org> | 2019-07-01 01:22:18 +0200 |
---|---|---|
committer | Carsten Leonhardt <leo@debian.org> | 2019-07-01 01:22:18 +0200 |
commit | a55867712a50c5dcda3c4c6613ab4482a839a813 (patch) | |
tree | 05edc4899d37fb3ec41bad9f216c6f7e459b9b07 | |
parent | 35013b5e40116911df374048ad30caf41d5ed8e7 (diff) | |
parent | 4ed50e2b6ac0ad4c98a260e259e2aa263f449dd0 (diff) |
Update upstream source from tag 'upstream/2019.2-debian1'
Update to upstream version '2019.2-debian1'
with Debian dir ec2ae4ef45b29a58321acd7b2f69c7418a626d11
-rw-r--r-- | Changes | 15 | ||||
-rw-r--r-- | INSTALL | 37 | ||||
-rw-r--r-- | README.md | 9 | ||||
-rwxr-xr-x | config/config.pl | 4 | ||||
-rw-r--r-- | docs/Makefile | 17 | ||||
-rw-r--r-- | docs/credits.tex | 12 | ||||
-rw-r--r-- | docs/features.tex | 47 | ||||
-rw-r--r-- | docs/hypextra.tex | 39 | ||||
-rw-r--r-- | docs/l2hfiles.dat | 4 | ||||
-rw-r--r-- | docs/manhtml.tex | 15 | ||||
-rw-r--r-- | docs/manual.tex | 24 | ||||
-rw-r--r-- | docs/overview.tex | 13 | ||||
-rw-r--r-- | docs/problems.tex | 14 | ||||
-rw-r--r-- | docs/support.tex | 66 | ||||
-rw-r--r-- | docs/userman.tex | 14 | ||||
-rwxr-xr-x | latex2html.pin | 48 | ||||
-rw-r--r-- | styles/amsmath.perl | 14 | ||||
-rw-r--r-- | tests/math_unicode.tex | 26 | ||||
-rw-r--r-- | texexpand.1 | 2 | ||||
-rw-r--r-- | versions/math.pl | 8 | ||||
-rw-r--r-- | versions/unicode.pl | 21 | ||||
-rw-r--r-- | versions/utf8.pl | 25 |
22 files changed, 182 insertions, 292 deletions
@@ -112,6 +112,21 @@ # A more detailed log history can be found within the particular files, near # the top. # +#--------- v2019.2 +# +# - format author block consistently +# https://bugs.debian.org/223565 +# - simplify build of manual +# https://bugs.debian.org/639708 +# - convert -- to – and --- to — +# If you want "--", use "-{}-", even inside \texttt{} +# Behavior of \textt{--} in latex depends on font encoding. +# https://bugs.debian.org/75416 +# - fix unicode in -html_version 5.0,math +# - fix -notop_navigation (had no effect) +# +#--------- v2019 +# # - remove obsolete "table" option # https://bugs.debian.org/276037 # - fix "make test" @@ -1,22 +1,13 @@ -LaTeX2HTML 99.2 Installation Manual +LaTeX2HTML Installation Manual =================================== -The installation procedure has changed substantially from version 98.3 on. -It now resembles more closely the GNU installation scheme, while providing -alternatives for Win32 and OS/2 users. - Step by step cookbook ===================== -Perl version 5.8 and below uses old style multiline regex matching. -Perl version 5.10 and above uses new style multiline regex matching. -Perl version 5.18 is buggy and prevents LaTeX2HTML from working correctly. -Perl version 5.22 seems to be OK. - A. UNIX ------- -(Win 95, 98, NT and OS/2 users see below) +(Windows users see below) 0. Unpacking @@ -120,7 +111,7 @@ See below "Further General Aspects" for information on useful site-wide configuration. -B. DOS, Win32, OS/2 +B. DOS, Win32 ------------------- 0. Unpacking @@ -129,20 +120,6 @@ Unpack the tar file into a temporary area. This has changed: Do not unpack the tar file to the final desired location (e.g. /usr/local/latex2html). Read the INSTALL file. Oops, you are already here... -On OS/2, rename CONFIG.BAT to CONFIG.CMD and modfify the PERL environment -setting (in CONFIG.CMD) in the following way: - -set PERL=perl_ - -This is needed because this "version" of the Perl executable has some -additional features that are required by LaTeX2HTML. -If you want to make use of the Makefiles on OS/2 (this works if you have -the GNU utilities installed), then you should include a line - -SHELL=.../sh.exe - -with ... being the path to the bourne shell executable. Thanks to -Uli Wortmann for this hint. 1. Configuring @@ -151,8 +128,7 @@ should not have to change much apart from the path where LaTeX2HTML should be installed on your system. The executables are found automatically if located in the directories specified in your PATH environment. If your perl interpreter is not named "perl" or if you have more than one perl installed, -you should edit CONFIG.BAT (or CONFIG.CMD on OS/2, in the following CONFIG.* -is used for brevity) and specify the exact path to your (desired) perl +you should edit CONFIG.BAT and specify the exact path to your (desired) perl interpreter. If you have just installed some of the required external utilities and have not yet added the paths to the PATH environment, you may specify @@ -182,7 +158,7 @@ automatically, using the settings found in the previous step. 3. Testing -The CONFIG.* script created a TEST.BAT (TEST.CMD on OS/2) file that +The CONFIG.* script created a TEST.BAT file that compiles a small test document located in the "tests" subdirectory. You may specify additional LaTeX2HTML options (up to arguments) on the TEST.* command line. @@ -195,8 +171,7 @@ stored to your PATH environment. 4. Installing -Install LaTeX2HTML in its final location by running INSTALL.BAT -(INSTALL.CMD on OS/2). +Install LaTeX2HTML in its final location by running INSTALL.BAT. 5. Cleaning up @@ -55,17 +55,14 @@ The LaTeX2HTML program includes its own manual page. The manual page can be viewed by saying "perldoc latex2html" or "latex2html -help". -See the documentation at - http://mirrors.ctan.org/support/latex2html/manual.pdf -for more information and examples. +See the manual in the docs directory for more information and +examples. Other useful links can be found at: www.latex2html.org and at the mailing-list site: http://tug.org/mailman/listinfo/latex2html -In particular see the pages: - support.html , Snode1.html , Snode2.html , Snode3.html -for instructions on how to install the program +See the file INSTALL for instructions on how to install the program and make your own local copy of the manual in HTML. Requirements diff --git a/config/config.pl b/config/config.pl index a5d70c5..d362c96 100755 --- a/config/config.pl +++ b/config/config.pl @@ -441,8 +441,8 @@ use L2hos; use vars qw(%prefs %cfg %newcfg); # This is the central place to modify the release name and date!!! -my $RELEASE = '2019'; -my $VERSION = 'Released January 1, 2019'; +my $RELEASE = '2019.2'; +my $VERSION = 'Released June 5, 2019'; # -------------------------------------------------------------------------- # Open log diff --git a/docs/Makefile b/docs/Makefile index 2665ad9..2d5710c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,14 +17,14 @@ # These are the usual calls to application programs # DVIPS = dvips -DVIPDF = dvipdf +DVIPDF = dvipdfm # set TEXINPUTS to use the html.sty included in this package LATEX = TEXINPUTS=../texinputs:: latex MAKEINDEX = makeindex BIBTEX = bibtex # L2H = latex2html -no_math -html_version 3.2,math -scalable_fonts -L2H = latex2html -no_math -html_version 4.0,math +L2H = latex2html -no_use_pdftex -image_type png -no_use_dvipng -no_math -html_version 4.0,math # @@ -135,8 +135,8 @@ LSEC7 = $(COMMON) -prefix C -dir $(TOP) -info 0 \ # dvi- and PostScript versions # -manual.pdf: manual.dvi - $(DVIPDF) manual.dvi $@ +manual.pdf: manual.ps + ps2pdf manual.ps manual.ps: manual.dvi $(DVIPS) manual.dvi -o $@ @@ -175,15 +175,6 @@ $(TOP).html: $(TOP).aux fresh: $(L2H) $(LTOP); - $(L2H) $(LSEC3); $(L2H) $(LSEC4); - $(L2H) $(LSEC5); - $(L2H) $(LSEC2); - $(L2H) $(LSEC6); - $(L2H) $(LSEC1); - $(L2H) $(LSEC3); $(L2H) $(LSEC4); - $(L2H) $(LTOP); - touch $(TOP)/[HEMPSO]$(INT) $(TOP)/$(INT); - touch [HEMPSO].stamp $(TOP).stamp; html: $(MAKE) $(TOP).stamp; diff --git a/docs/credits.tex b/docs/credits.tex index 0bf1c07..71f3080 100644 --- a/docs/credits.tex +++ b/docs/credits.tex @@ -452,11 +452,15 @@ bigger than ever. Thanks to \Perbandt{} for testing every second alpha/beta release of 99.2 on OS/2 and ensuring that things work ok there. - -\subsection*{Proposals for Future Development:\label{future}}% - +\subsection*{2018} +\begin{itemize} + \item SVG image generation + \item Support for \texttt{pdflatex} + \item Support for HTML 5 +\end{itemize} +\subsection*{Proposals for Future Development:\label{future}}% \subsubsection*{Extended Capabilities in Web browsers} The following areas are the subject of active development @@ -470,7 +474,7 @@ using the \texttt{-html\_version 4.0} command-line switch. \item [style-sheets: ] \htmladdnormallink{proposals}% {http://www.w3.org/pub/WWW/TR/WD-style-970324.html} for a flexible mechanism to allow cascading (CSS) and DSSSL, -within \htmladdnormallinkfoot{\HTMLiv}{http://www.w3.org/pub/Markup/}. +within \HTMLiv. % \index{extended markup!XML}% \index{XML!extended markup}% diff --git a/docs/features.tex b/docs/features.tex index 0dddf5d..84a124d 100644 --- a/docs/features.tex +++ b/docs/features.tex @@ -1,13 +1,4 @@ -\begin{htmlonly} -\documentclass[dvips,a4paper]{article} -\usepackage{html,htmllist,makeidx,longtable} -\input manhtml.tex -% -\input{features.ptr} % Input counters and section -\end{htmlonly} -\startdocument -% -%\section{Special Features\label{sec:fea}\index{features}}% +\section{Special Features} \label{sec:fea}% \index{environments}\index{special features} \index{special considerations}\html{\\}\noindent @@ -85,7 +76,7 @@ e.g. \env{eqnarray} and \env{equation} with equation numbering. This extension (formerly known as \texttt{HTML} version 2.1) provides extensions for \htmlref{internationalisation}{internat}. Most importantly, the default character set is no longer ISO--8859--1 -but \htmladdnormallink{ISO--10646} (Unicode). +but {ISO--10646} (Unicode). This is a 16-bit character set and can thus display a much larger set of characters. There are also provisions for bidirectional languages (e.g. in Arabic the text is written from right to left, @@ -541,14 +532,14 @@ requires version 4.03 or later. % \begin{latexonly} \begin{equation} - \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqn1.ps}}} + \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqn1}}} \lower.5\ht 1\box1 \end{equation} \begin{eqnarray} \nonumber - \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqarrA1.ps}}} + \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqarrA1}}} \lower.5\ht1 \box1&&\\ - \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqarrB1.ps}}} + \setbox1=\hbox{\scalebox{.6}{\includegraphics{psfiles/eqarrB1}}} \lower.5\ht1 \box1&& \end{eqnarray} \end{latexonly} @@ -927,13 +918,12 @@ this gives a pseudo-3D effect in some browsers. \begin{figure} \htmlimage{thumbnail=0.5} \htmlborder{5} - \centering \includegraphics[width=5in]{psfiles/figure.ps} + \centering \includegraphics[width=5in]{psfiles/figure} \latex{\addtocounter{footnote}{-1}} \caption{A sample figure showing part of a page generated by \latextohtml{} containing a customised navigation panel - (from the \htmladdnormallink - {CSEP project\latex{\protect\footnotemark}} - {http://csep1.phy.ornl.gov/csep.html}).}\label{fig:example} + (from the + CSEP project).}\label{fig:example} \end{figure} \end{verbatim} %begin{latexonly} @@ -947,13 +937,12 @@ this gives a pseudo-3D effect in some browsers. \begin{figure}[hbt] \htmlimage{thumbnail=0.5} \htmlborder{5} - \centering \includegraphics[width=5in]{psfiles/figure.ps} + \centering \includegraphics[width=5in]{psfiles/figure} \latex{\addtocounter{footnote}{-1}}% \caption{A sample figure showing part of a page generated by \protect\latextohtml{} containing a customised navigation panel - (from the \htmladdnormallink - {CSEP project\protect\latex{\protect\footnotemark}}% - {http://csep1.phy.ornl.gov/csep.html}).}\label{fig:example} + (from the + CSEP project).}\label{fig:example} \end{figure} @@ -1047,14 +1036,14 @@ varies with the graphics format used, and the complexity of the actual image.}. % \begin{latexonly} \begin{equation} - \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqn15.ps}}} + \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqn15}}} \lower.5\ht1\box1 \end{equation}% \begin{eqnarray} \nonumber - \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqarrA15.ps}}} + \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqarrA15}}} \lower.5\ht1 \box1&&\\ - \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqarrB15.ps}}} + \setbox1=\hbox{\scalebox{.4}{\includegraphics{psfiles/eqarrB15}}} \lower.5\ht1 \box1&& \end{eqnarray} \end{latexonly} @@ -1109,14 +1098,14 @@ scaled to be comparable with normal 10\,pt type\latex{, as here}. % \begin{latexonly} \begin{equation} - \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqn2.ps}}} + \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqn2}}} \lower.5\ht1 \box1 \end{equation} \begin{eqnarray} \nonumber - \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqarrA2.ps}}} + \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqarrA2}}} \lower.5\ht1 \box1&&\\ - \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqarrB2.ps}}} + \setbox1=\hbox{\scalebox{.3}{\includegraphics{psfiles/eqarrB2}}} \lower.5\ht1 \box1&& \end{eqnarray} \end{latexonly} @@ -1211,7 +1200,7 @@ the screen-shot was taken. % \begin{table}[ht] \begin{center} - \scalebox{.7}{\includegraphics{psfiles/table.ps}} + \scalebox{.7}{\includegraphics{psfiles/table}} \caption{Alternate view of the table from \protect\cite{lamp:latex}} \label{tab:alt} \end{center} diff --git a/docs/hypextra.tex b/docs/hypextra.tex index fe71160..670b3fa 100644 --- a/docs/hypextra.tex +++ b/docs/hypextra.tex @@ -1,13 +1,4 @@ -\begin{htmlonly} -\documentclass[dvips,a4paper]{article} -\usepackage{html,htmllist,makeidx} -\input{manhtml.tex} -% -\input{hypextra.ptr} % Input counters and section -\end{htmlonly} -\startdocument -% -%\section{Hypertext Extensions to \LaTeX\label{sec:hyp}\index{special}}% +\section{Hypertext Extensions to \LaTeX} \label{sec:hyp}\index{special} \index{hypertext!extensions}\index{extensions!hypertext} @@ -406,8 +397,7 @@ The \Lc{htmladdnormallink} command expects some text as the first argument and a URL as the second argument. When processed by \LaTeX{} (i.e. in the \texttt{.dvi} or \texttt{.ps} output files), the URL will have no effect. But when processed by the translator, -\htmladdnormallink{the URL will be used to provide an active hypertext link} -{http://www.ncsa.uiuc.edu/demoweb/url-primer.html} +the URL will be used to provide an active hypertext link (to another file, picture, sound-file, movie, etc.) e.g. \begin{quote} %begin{latexonly} @@ -505,7 +495,7 @@ concerning how the environment delimiters should be used in the \index{electronic forms}\label{eform}\html{\\}\noindent A~particularly good use of the \env{rawhtml} environment is in the creation of interactive -\htmladdnormallink{electronic forms}{http://south.ncsa.uiuc.edu/forms.html} +electronic forms from within a \LaTeX{} document. When producing the paper (\texttt{.dvi}) version of a document the \env{rawhtml} environment is ignored. @@ -574,7 +564,7 @@ So, what do think (comments please): <BR> \begin{latexonly} \begin{figure}[h] \begin{center} - \fbox{\scalebox{.7}{\includegraphics{psfiles/eform.ps}}} + \fbox{\scalebox{.7}{\includegraphics{psfiles/eform}}} \end{center} \caption{An electronic form. In the online version the form would be active.} @@ -715,7 +705,7 @@ was constructed using this feature; its \LaTeX{} source follows. \begin{latexonly} \begin{figure}[ht] \begin{center} - \fbox{\scalebox{.7}{\includegraphics{psfiles/HTMLtab.ps}}} + \fbox{\scalebox{.7}{\includegraphics{psfiles/HTMLtab}}} \caption{Example use of macros for raw \texttt{HTML} code.} \label{ex:HTMLcode} \end{center} @@ -895,7 +885,7 @@ used \hyperref[page]{earlier in}{on page~}{ of}{eform} this manual: \begin{verbatim} \begin{figure} \begin{center} - \fbox{\includegraphics[width=4in]{psfiles/eform.ps}} + \fbox{\includegraphics[width=4in]{psfiles/eform}} \end{center} \caption{An electronic form. Of course in the online version of this document the form above would be active.} @@ -1316,13 +1306,6 @@ Note that it would be sensible to put the \texttt{@string} commands into a separate file, \fn{urls.bib} say, loaded with the main file via\html{\\} \verb|\bibliography{urls,...}|.% -\smallskip\index{citations!Harvard style}% -\index{bibliography!Harvard style}\label{harvard}\html{\\}% -\noindent -For those who use the Harvard style for references -\htmladdnormallinkfoot{there exists a special conversion add-on package}% -{http://www.arch.su.edu.au/\~{}peterw/latex/harvard/}. - \index{citations!natbib@\env{natbib} package}% \index{bibliography!natbib@\env{natbib} package}% \index{citations!Harvard style!handled@handled by \env{natbib}}% @@ -1595,8 +1578,7 @@ mechanism is available).}. \index{link validation!symbolic labels}\html{\\}% Next consider how it could be done with symbolic labels. First you have to import the labels used in this document -by copying the file \htmladdnormallink{\fn{labels.pl}} -{http://cbl.leeds.ac.uk/nikos/tex2html/doc/manual/labels.pl}, +by copying the file \fn{labels.pl}, saving it in \path{/tmp/labels.pl} say, then adding anywhere in your document: %begin{latexonly} @@ -1624,8 +1606,7 @@ looking at the \fn{labels.pl} file or by asking the author!} as follows: This will be translated into the appropriate hyper-link to this page. If there are any changes in this document and you would like to bring your document up-to date, you have to copy -\htmladdnormallink{\fn{labels.pl}}% -{http://cbl.leeds.ac.uk/nikos/tex2html/doc/manual/labels.pl} again +\fn{labels.pl} again and rerun the translator on your document. Of course if I move the directory containing the \texttt{HTML} files for this document somewhere else, then you would have to make a change in the argument of the @@ -1872,9 +1853,7 @@ which associates the coordinates of each active region in the map with a destination URL. Usually this map file is kept on the server machine, however \texttt{HTML} 3.2 also allows it -to reside on the \htmladdnormallink{client side}% -{http://ds.internic.net/internet-drafts/draft-seidman-clientsideimagemap-02.txt} -for faster response. +to reside on the client side for faster response. Both configurations are supported by \latextohtml{} through the \Lc{htmlimage} options `\texttt{map=}' and `\texttt{usemap=}' respectively. diff --git a/docs/l2hfiles.dat b/docs/l2hfiles.dat index 228f965..c9b9cf4 100644 --- a/docs/l2hfiles.dat +++ b/docs/l2hfiles.dat @@ -225,7 +225,7 @@ \item[\gn{bash}] a unix shell, does not directly support use of \latextohtml \item[\gn{bibtex}] bibliography data-base program, used with \LaTeX \item[\gn{book.perl}] implements section-numbering conventions, etc. for the \emph{book} document-class -\item[\gn{\textsl {CERN}}] originally named ``Conseil Europeen pour la Recherche Nucleaire'', now known as the \htmladdnormallinkfoot{``European Laboratory for Particle Physics''}{http://www.cern.ch/Welcome.html}, located near Geneva; also where the \htmladdnormallinkfoot{World-Wide Web}{http://www.w3.org/hypertext/WWW/TheProject.html} was originally conceived +\item[\gn{\textsl {CERN}}] originally named ``Conseil Europeen pour la Recherche Nucleaire'', now known as the \htmladdnormallinkfoot{``European Laboratory for Particle Physics''}{http://www.cern.ch}, located near Geneva; also where the \htmladdnormallinkfoot{World-Wide Web}{http://www.w3.org/hypertext/WWW/TheProject.html} was originally conceived \item[\gn{changebar.sty}] \LaTeXe\ package to mark changes in documentation; this super\-cedes an earlier package \item[\gn{Changes}] text file, recording the changes made to \latextohtml{} since it was first released in July 1993, until V96.1 and revisions during 1996 \item[\gn{changes.tex}] input file for the \latextohtml{} manual; normally loaded only with the \texttt{HTML} version @@ -339,7 +339,7 @@ \item[\gn{mybutton.gif}] file-name used in example code for an image as a button to a hyperlink \item[\gn{natbib.perl}] implements the commands in the \env{natbib} package, allowing flexible styles for citations \item[\gn{\textsl {NCSA}}] ``National Center for Supercomputing Applications'' located at University of Illinois at Urbana--Champaign -\item[\gn{\textsl {NCSA Mosaic}}] Web-browser, \htmladdnormallinkfoot{freely available}{http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/help-about.html} for most platforms +\item[\gn{\textsl {NCSA Mosaic}}] Web-browser, freely available for most platforms \item[\gn{\textsl {NDBM}}] alternative Database Management utility for Unix \item[\gn{netpbm}] suite of Unix \htmladdnormallinkfoot{graphics utilities}{ftp://ftp.x.org/contrib/utilities/}; alternative to \fn{pbmplus} \item[\gn{\textsl {Netscape Navigator}}] popular Web-browser, \htmladdnormallinkfoot{commercially available}{http://home.netscape.com} for most platforms and free to academic institutions diff --git a/docs/manhtml.tex b/docs/manhtml.tex index c782851..049b7dd 100644 --- a/docs/manhtml.tex +++ b/docs/manhtml.tex @@ -22,7 +22,6 @@ \url{http://www.latex2html.org/current/}} % \url{http://www-dsed.llnl.gov/files/programs/unix/latex2html/sources/}} % \def\sourceB{\htmlurl{ftp://ftp.mpn.com/pub/nikos/latex2html-98.1.tar.gz}} - \def\sourceB{\CTANtug{\CTANA}} \def\sourceC{\htmlurl{http://ftp.rzg.mpg.de/pub/software/latex2html/sources/}} % \def\CVSsite{\url{http://cdc-server.cdc.informatik.tu-darmstadt.de/\~{}latex2html/}} % \def\CVSrepos{\url{http://cdc-server.cdc.informatik.tu-darmstadt.de/\~{}latex2html/user/}} @@ -32,8 +31,6 @@ \def\CVSrepos{\htmlurl{https://www.github.com/latex2html/latex2html/}} % \def\CVSlatest{\htmlurl{http://saftsack.fs.uni-bayreuth.de/~latex2ht/l2h-latest.tar.gz}} \def\CVSlatest{\htmlurl{https://www.github.com/latex2html/latex2html/archive/master.zip}} - \newcommand{\CTANtug}[1]{\htmlurl{http://mirrors.ctan.org/#1}} - \def\CTANA{support/latex2html} \def\tugURL{\htmlurl{http://www.tug.org/}} \def\danteURL{\htmlurl{http://www.dante.de/}} % \def\ListURL{\htmlurl{http://www.xray.mpe.mpg.de/mailing-lists/latex2html/}} @@ -71,19 +68,11 @@ \newcommand{\texdev}[1]{\htmladdnormallink {\texdevURL/#1}{\texdevURL/#1}} -\newcommand{\ctan}{http://ctan.tug.org/ctan} -\newcommand{\ctanTUG}{\htmladdnormallinkfoot - {TUG's searchable CTAN site}{\ctan}} -\newcommand{\ctanURL}[1]{\htmladdnormallink - {CTAN:\texttt{.../#1}}{\ctan/#1}} -\newcommand{\ctanURLbr}[1]{\htmladdnormallink - {CTAN:\texttt{.../#1}}{\ctan/#1}} -\newcommand{\ctanTUGurl}[2]{\ctanURL{#2}} \newcommand{\indichtml}{l2h/indic/IndicHTML/} \end{htmlonly} -\newcommand{\TUGurl}{\htmladdnormallink{TUG}{\htmlurl{http://www.tug.org}}} +\newcommand{\TUGurl}{\url{http://www.tug.org}} \newcommand{\texdevURL}{http://www-texdev.ics.mq.edu.au/} \newcommand{\Unicode}{\htmladdnormallinkfoot @@ -279,7 +268,7 @@ \htmladdnormallink{\LaTeX{3}}{http://www.tex.ac.uk/CTAN/latex/latex3}} % \newcommand{\Engberg}{\index{Uffe Engberg}% -\htmladdnormallinkfoot{Uffe Engberg}{http://www.brics.dk/\~{}engberg}} +{Uffe Engberg}} \newcommand{\texdevINDIC}{\texdev\indic} %\endinput diff --git a/docs/manual.tex b/docs/manual.tex index 42a0c0c..eebae30 100644 --- a/docs/manual.tex +++ b/docs/manual.tex @@ -1,8 +1,8 @@ %\scrollmode %\documentclass[dvips,a4paper,twoside]{article} \documentclass[dvips,a4paper]{article} -\usepackage[dvips]{graphicx,color} -% \usepackage{times} +\usepackage{graphicx} +%\usepackage{xcolor} \usepackage{html,htmllist,makeidx,enumerate} %\usepackage{frames} @@ -79,7 +79,6 @@ % \begin{htmlonly} \def\makeglossary{} - \pagecolor[named]{White} \end{htmlonly} \input manhtml.tex @@ -172,7 +171,7 @@ % \begin{latexonly} -This document accompanies \latextohtml{} version 2019. +This document accompanies \latextohtml{} version 2019.2. \paragraph{History} @@ -269,20 +268,15 @@ describes how to obtain and install it, and how to use it effectively. \relax %% this is important, else the next segment doesn't get processed %%% START XTRACTFAQ (END is somewhere within that segment) -\segment{overview}{section}{Overview} -\latex{\vfil\goodbreak} +\input{overview.tex} %%% START XTRACTFAQ -\segment{support}{section}{Installation and Further Support} +\input{support.tex} %%% END XTRACTFAQ -\latex{\vfil\goodbreak} -\segment{features}{section}{Environments and Special Features} -\latex{\vfil\goodbreak} -\segment{hypextra}{section}{Hypertext Extensions to \LaTeX{}} -\latex{\vfil\goodbreak} -\segment{userman}{section}{Customising the Layout of HTML pages} -\latex{\vfil\goodbreak} +\input{features.tex} +\input{hypextra.tex} +\input{userman.tex} %%% START XTRACTFAQ -\segment{problems}{section}{Known Problems} +\input{problems.tex} %%% END XTRACTFAQ %\segment{changes}{section}{Changes from Previous Versions diff --git a/docs/overview.tex b/docs/overview.tex index f15a508..f7f9ec0 100644 --- a/docs/overview.tex +++ b/docs/overview.tex @@ -1,13 +1,4 @@ -\begin{htmlonly} -\documentclass[dvips,a4paper]{article} -\usepackage{html,htmllist,makeidx} -\input{manhtml.tex} -% -\input{overview.ptr} % Input counters and section -\end{htmlonly} -\startdocument -% -%\section{Overview\label{sec:ovw}\index{overview}} +\section{Overview} \label{sec:ovw}\index{overview} \noindent This manual describes the \latextohtml{} translator which is @@ -269,7 +260,7 @@ which may reside in remote locations; \index{accents}%% \item translates \LaTeX{} accent and special character -commands (e.g. \. {A} \O {\"o} \pounds \copyright \P) to +commands (e.g.\ \^{A} \O\ {\"o} \pounds\ \copyright\ \P) to the equivalent ISO--Latin--1 or Unicode character set, else an image can be created; diff --git a/docs/problems.tex b/docs/problems.tex index 1d4dd56..83ed6ef 100644 --- a/docs/problems.tex +++ b/docs/problems.tex @@ -1,14 +1,4 @@ -\begin{htmlonly} -\documentclass[dvips,a4paper]{article} -\usepackage{html,htmllist,makeidx} -\input{manhtml.tex} -% -\input{problems.ptr} % Input counters and section -\end{htmlonly} -\internal{}% -\startdocument -% -%\section{Known Problems\label{sec:prb}\index{problems|(}}% +\section{Known Problems} \label{sec:prb}\index{problems|(}% \tableofchildlinks*\htmlrule\index{bugs}\html{\\}% \noindent @@ -306,7 +296,7 @@ any character other than quotes; e.g. \Lc{verb+ABC+}. \item [Cannot get the ``tilde'' (\~{}) to show: \hfill] The trick here is to use \verb|\~{}|.\html{\\} Alternatively try using something like: -\url{\htmladdnormallink{mylink}{http://host/\%7Eme/path/file.html}}. +\verb|{\htmladdnormallink{mylink}{http://host/\%7Eme/path/file.html}}|. \textbf{Warning:} Some browsers may not be able to interpret the \verb|%7E| as a ``tilde'' character. diff --git a/docs/support.tex b/docs/support.tex index 10cb5a5..c64bc9c 100644 --- a/docs/support.tex +++ b/docs/support.tex @@ -1,17 +1,4 @@ -\begin{htmlonly} -\documentclass[dvips,a4paper]{article} -\usepackage{html,htmllist,makeidx} -\input{manhtml.tex} -% -\input{support.ptr} % Input counters and section -\end{htmlonly} -%\internal{}% -%\internal{M}% -%\internal{H}% -%\internal{F}% -\startdocument -% -%\section{Installation and Further Support\label{sec:sup}\index{install}}% +\section{Installation and Further Support} \label{sec:sup}\index{installation|(} \subsection{Requirements}% %\section{Requirements}% @@ -29,13 +16,6 @@ such as applying source level patches. Windows users will probably want to read the section about \htmlref{installation on Windows}{windowsinst}. -In case you find one of the URLs below broken, use the search -engine on the TUG home page \CTANtug{} in order to locate the tool. -Other Web-searching facilities such as Altavista or \appl{FTP search}% -\htmladdnormallinkfoot{\html{ }}{http://ftpsearch.ntnu.no/ftpsearch} -will also do the job. - -\medskip\noindent For the best use of \latextohtml{} you want to get the latest versions of all the utilities that it uses. (It will still work with earlier versions, but some special effects may not be possible. @@ -149,7 +129,7 @@ Some other hyperlinking features also require \LaTeXe\,. If you dislike the white background color of the generated inlined images then you should get either the \fn{netpbm} library (instead of the older \fn{pbmplus}) -or install the \htmladdnormallinkfoot{\fn{giftrans}}{\giftransURL} +or install the \fn{giftrans} %{ftp://ftp.uni-stuttgart.de/pub/comm/infosystems/www/tools/imaging/giftrans/giftrans-1.11.1.tar.gz} filter by Andreas Ley \Email{ley@rz.uni-karlsruhe.de}. \latextohtml{} now supports the shareware program \fn{giftool} @@ -201,8 +181,7 @@ below. Thanks to Jens Berger (\texttt{jberger@mail.zedat.fu-berlin.de}) for providing this list! \begin{itemize} \item install \fn{WinZip}; -\item install \TeX/\LaTeXe{} and \fn{dvips};\\ - E.g. the \fn{MikTeX} $1.20$ distribution from \MikTeXURL. +\item install \TeX/\LaTeXe{} and \fn{dvips}; \item install \fn{Perl};\\ E.g. \fn{ActivePerl} $509$ or higher from \ActiveStateURL. Windows $95$ users will also need \fn{DCOM}, it is listed on @@ -247,30 +226,8 @@ for providing this list! package managers for Linux, and the macports package manager for MacOS. \index{source code}% -\index{source code!from CTAN}% -\index{CTAN}% -Releases of \latextohtml\ may also be obtained through one of the -\htmladdnormallink{Comprehensive \TeX{} Archive Network (CTAN)}% -{\CTANtug{}} sites. -They are located at -\begin{htmllist}\htmlitemmark{GreenBall} -\item [US ] -United States: -\htmladdnormallink{\path{https://www.ctan.org/}}{https://www.ctan.org/}\,, -\item [DE ] -Germany: -\htmladdnormallink{\path{ftp://ftp.dante.de/}}% -{ftp://ftp.dante.de/}\,. -\end{htmllist} -In the directory \htmladdnormallink{\CTANA/}{\CTANtug{\CTANA}} -should be the latest version, as a compressed archive. - -\smallskip\noindent -There are also many mirrors. -To find the mirror nearest to you, use: -\htmladdnormallink{\path{http://mirror.ctan.org/}\CTANA}% -{http://mirror.ctan.org/\CTANA}. - +Releases of \latextohtml\ may also be obtained at +\htmladdnormallink{\path{https://www.github.com/latex2html/latex2html/releases}}{https://www.github.com/latex2html/latex2html/releases}\,, \bigskip \index{source code!developer's repository}\label{cvsrepos}% @@ -282,21 +239,17 @@ still under development and not yet sufficiently tested for release. A daily updated compressed archive of the developers' work may be downloaded from \CVSlatest\,. -\begin{quote} -\textbf{Warning: }Use the files from this site at your own risk. -\end{quote}% - \htmlrule\index{source code!compressed}% \medskip\noindent Having obtained a compressed \fn{tar} version, save it into a file -\fn{latex2html-98.1.tar.gz} say, +\fn{latex2html-2019.tar.gz} say, then extract its contents with %begin{latexonly} \begin{small} %end{latexonly} \begin{verbatim} -% gzip -d latex2html-98.1.tar.gz -% tar xvf latex2html-98.1.tar +% gzip -d latex2html-2019.tar.gz +% tar xvf latex2html-2019.tar \end{verbatim} %begin{latexonly} \end{small} @@ -753,7 +706,8 @@ with the contents:~~\texttt{ unsubscribe }\latex{.} \bigskip\noindent The mailing list also has a -\htmladdnormallinkfoot{searchable online archive}{\ListURL}. +% \htmladdnormallinkfoot{searchable online archive}{\ListURL}. +searchable online archive. It is recommended to start with this, to become familiar with the topics actually discussed, and to search for articles related to your own interests. diff --git a/docs/userman.tex b/docs/userman.tex index cf9f522..86ee9c5 100644 --- a/docs/userman.tex +++ b/docs/userman.tex @@ -1,16 +1,4 @@ - -\begin{htmlonly} -\documentclass{article} -\usepackage{html,htmllist,makeidx} -\usepackage{longtable} -\input{manhtml.tex} -% -\input{userman.ptr} % Input counters and section -\label{sec:man}\index{manual} -\end{htmlonly} -\startdocument -% -%\section{User Manual\label{sec:man}\index{manual}} +\section{User Manual} \label{sec:man} \index{customised layout} \index{getting started} diff --git a/latex2html.pin b/latex2html.pin index 1d067a4..64c029b 100755 --- a/latex2html.pin +++ b/latex2html.pin @@ -2118,8 +2118,6 @@ sub convert_iso_latin_chars { "\nCould not find translation function for $default_language.\n\n") } ); - if ($USE_UTF ||(!$NO_UTF &&(%unicode_table)&&length(%unicode_table)>2)) { - &convert_to_unicode($_)}; } $_ = join('', @case_processed, $_); undef(@case_processed); $_; @@ -4185,10 +4183,10 @@ sub extract_image_svg { # without -noshrink and -nocenter, pdftocairo scales image slightly # due to internally rounding page size to nearest integer number of pt - $svg_cmd ="$PDFTOCAIRO -svg -noshrink -nocenter -f $new_num -l $new_num images.pdf -"; + $svg_cmd ="$PDFTOCAIRO -svg -noshrink -nocenter -f $new_num -l $new_num ${PREFIX}images.pdf -"; print $svg_cmd, "\n" if ($VERBOSITY > 2); open(PDF2SVG, "$svg_cmd|") || die; - open(SVG, ">img$new_num.svg") || die; + open(SVG, ">${PREFIX}img$new_num.svg") || die; while (<PDF2SVG>) { # filter svg file if (/^<svg .* width="([\d.]+)pt" height="([\d.]+)pt" /) { if ($pt_per_ex{$name}) { @@ -4269,10 +4267,10 @@ sub extract_image_bitmap { # clean my $PPMTO=$IMAGE_TYPE=~m/gif/i? $PPMTOGIF : $PNMTOPNG; #L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee $p.ppm|$PNMCUT -top $millimeter |$PNMCROP -sides|tee $p-.ppm|$PPMTO{$IMAGE_TYPE} --quiet $transparent >img$new_num.$IMAGE_TYPE;"); if ($name =~ /figure|table/) { - L2hos->syswait("$PNGTOPNM $p.png|$PPMTO --quiet $transparent >img$new_num.$IMAGE_TYPE;"); + L2hos->syswait("$PNGTOPNM $p.png|$PPMTO --quiet $transparent >${PREFIX}img$new_num.$IMAGE_TYPE;"); } else { # L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee $p.ppm|$PNMCUT -top $millimeter |$PNMCROP -left -right|tee $p-.ppm|$PPMTO --quiet $transparent >img$new_num.$IMAGE_TYPE;"); - L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee $p.ppm|$PNMCROP -left -right|tee $p-.ppm|$PPMTO --quiet $transparent >img$new_num.$IMAGE_TYPE;"); + L2hos->syswait("$PNGTOPNM $p.png|$PNMCROP -sides|tee $p.ppm|$PNMCROP -left -right|tee $p-.ppm|$PPMTO --quiet $transparent >${PREFIX}img$new_num.$IMAGE_TYPE;"); } open PPM,"<$p.ppm"; read(PPM,$_,30);close PPM; @@ -7139,7 +7137,7 @@ sub make_latex{ \lthtmlCropMarkDepth=\dp\lthtmlPageBox \lthtmltypeout{^^J:#1:lthtmlCropMarkHeight:=\the\lthtmlCropMarkHeight}% \lthtmltypeout{^^J:#1:lthtmlCropMarkDepth:=\the\lthtmlCropMarkDepth:1ex:=\the \dimexpr 1ex}% - \begin{preview}\copy\lthtmlPageBox\end{preview}}}% + \begin{preview}\copy\lthtmlPageBox\end{preview}}% \long\def\lthtmlTightFBox#1#2{% \adjustnormalsize\setbox\lthtmlPageBox=\vbox\bgroup % \let\ifinner=\iffalse \let\)\liih@math % @@ -7395,6 +7393,8 @@ sub style_sheet { DIV.equation { text-align-last:justify; white-space: nowrap; } /* place eq nos */ SPAN.MATH { display:inline-block; } /* don't stretch spaces inside eqn */ +DIV.author_info { text-align:center; } /* latex centers author */ + .LEFT { text-align:left; } .CENTER { text-align:center; } .CENTER > * { margin:auto; } @@ -7676,7 +7676,7 @@ sub post_process { # $top_navigation = (defined(&top_navigation_panel) ? &top_navigation_panel : &navigation_panel) - unless $NO_NAVIGATION; + unless $NO_NAVIGATION || !$TOP_NAVIGATION; $bot_navigation = (defined(&bot_navigation_panel) ? &bot_navigation_panel : &navigation_panel) unless $NO_NAVIGATION; @@ -7736,7 +7736,7 @@ sub post_process { } sub adjust_encoding { - &convert_to_utf8($_) if ($USE_UTF); + &convert_to_utf8($_) if ($CHARSET eq 'utf-8' && !$NO_UTF); &lowercase_tags($_) if $LOWER_CASE_TAGS; } @@ -9207,9 +9207,10 @@ sub text_cleanup { # MRO: replaced $* with /m s/(\s*\n){3,}/\n\n/gom; # Replace consecutive blank lines with one s/<(\/?)P>\s*(\w)/<$1P>\n$2/gom; # clean up paragraph starts and ends + s/(<!)?---(>)?/(length($1) || length($2)) ? "$1---$2" : "—"/ge; + s/(<!)?--(>)?/(length($1) || length($2)) ? "$1--$2" : "–"/ge; s/$O\d+$C//go; # Get rid of bracket id's s/$OP\d+$CP//go; # Get rid of processed bracket id's - s/(<!)?--?(>)?/(length($1) || length($2)) ? "$1--$2" : "-"/ge; # Spacing commands s/\\( |$)/ /go; #JKR: There should be no more comments in the source now. @@ -9736,7 +9737,8 @@ sub revert_to_raw_tex { local($_) = @_; local($character_map) = ""; if ( $CHARSET && $HTML_VERSION ge "2.1" ) { - $character_map = $CHARSET; + $character_map = ((($CHARSET =~ /utf/)&&!$NO_UTF)? + 'iso_10646' : $CHARSET ); $character_map =~ tr/-/_/; } while (s/$O\s*\d+\s*$C/\{/o) { s/$&/\}/;} while (s/$O\s*\d+\s*$C/\{/o) { s/$&/\}/;} #repeat this. @@ -12647,14 +12649,14 @@ sub do_cmd_author { (s/$next_pair_pr_rx/$next = $2;''/seo) ||(s/$next_pair_rx/$next = $2;''/seo)); local($after) = $_; - if ($next =~ /\\and/) { - my @author_list = split(/\s*\\and\s*/, $next); + if ($next =~ /\\and/i) { # \And and \AND are defined by many packages + my @author_list = split(/\s*\\and\s*/i, $next); my $t_author, $t_affil, $t_address; foreach (@author_list) { $t_author = &translate_environments($_); $t_author =~ s/\s+/ /g; $t_author = &simplify(&translate_commands($t_author)); - ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author); + ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author, 3); push @authors, $t_author; push @affils, $t_affil; push @addresses, $t_address; @@ -12663,7 +12665,7 @@ sub do_cmd_author { $_ = &translate_environments($next); $next = &translate_commands($_); ($t_author) = &simplify($next); - ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author); + ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author, 3); push @authors, $t_author; push @affils, $t_affil if $t_affil; push @addresses, $t_address if $t_address; @@ -12813,24 +12815,24 @@ sub make_singleauthor_title { local($href) = &translate_commands($t_authorURL); $href = &make_named_href('author' , $href, "<STRONG>${t_author}</STRONG>"); - $t_title .= "\n<P$alignc>$href</P>"; + $t_title .= "\n$href"; } else { - $t_title .= "\n<P$alignc><STRONG>$t_author</STRONG></P>"; + $t_title .= "\n<STRONG>$t_author</STRONG>"; } } else { &write_warnings("\nThere is no author for this document."); } if ($t_institute&&!($t_institute=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $t_title .= "\n<P$alignc><SMALL>$t_institute</SMALL></P>";} + $t_title .= "\n<BR>$t_institute";} if ($t_affil&&!($t_affil=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $t_title .= "\n<P$alignc><I>$t_affil</I></P>";} - if ($t_date&&!($t_date=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $t_title .= "\n<P$alignc><STRONG>$t_date</STRONG></P>";} + $t_title .= "\n<BR>$t_affil";} if ($t_address&&!($t_address=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $t_title .= "\n<P$alignl><SMALL>$t_address</SMALL></P>"; + $t_title .= "\n<BR>$t_address"; } # else { $t_title .= "\n<P$alignl>"} if ($t_email&&!($t_email=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $t_title .= "\n<P$alignl><SMALL>$t_email</SMALL></P>"; + $t_title .= "\n<BR>$t_email"; } # else { $t_title .= "</P>" } + if ($t_date&&!($t_date=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { + $t_title .= "\n<P>$t_date</P>";} join("\n", $s_author_info, $t_title, $e_author_info); } diff --git a/styles/amsmath.perl b/styles/amsmath.perl index c4d7952..4031100 100644 --- a/styles/amsmath.perl +++ b/styles/amsmath.perl @@ -197,14 +197,14 @@ sub do_cmd_author { ||(s/$next_pair_rx/$next = $2;''/seo)); $after = $_; } - if ($next =~ /\\and/) { - my @author_list = split(/\s*\\and\s*/, $next); + if ($next =~ /\\and/i) { + my @author_list = split(/\s*\\and\s*/i, $next); my $t_author, $t_affil, $t_address; foreach (@author_list) { $t_author = &translate_environments($_); $t_author =~ s/\s+/ /g; $t_author = &simplify(&translate_commands($t_author)); - ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author); + ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author, 3); push @authors, $t_author; push @affils, $t_affil; push @addresses, $t_address; @@ -213,7 +213,7 @@ sub do_cmd_author { $_ = &translate_environments($next); $next = &translate_commands($_); ($t_author) = &simplify($next); - ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author); + ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author, 3); push @authors, $t_author; push @affils, $t_affil if $t_affil; push @addresses, $t_address if $t_address; @@ -391,11 +391,11 @@ sub make_singleauthor_title{ $the_title .= "<P class=\"CENTER\"><STRONG>$t_author</STRONG>\n"; } else { &write_warnings("There is no author for this document."); } if (($t_affil)&&!($t_affil=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $the_title .= "<BR><I>$t_affil</I>\n";} + $the_title .= "<BR>$t_affil\n";} if ($t_address&&!($t_address=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $the_title .= "<BR><SMALL>$t_address</SMALL>\n"} + $the_title .= "<BR>$t_address\n"} if ($t_email&&!($t_email=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) { - $the_title .= "<BR><SMALL>$t_email</SMALL></P>\n"; + $the_title .= "<BR>$t_email</P>\n"; } else { $the_title .= "</P>" } $the_title; } diff --git a/tests/math_unicode.tex b/tests/math_unicode.tex new file mode 100644 index 0000000..1084eb5 --- /dev/null +++ b/tests/math_unicode.tex @@ -0,0 +1,26 @@ +% test unicode symbols in formulas and in file names from section headings +% latex2html -long_titles 20 -html_version 5.0,math math_unicode.tex + +\documentclass{article} + +\begin{document} + + +\section{The symbol $\alpha$} + +This should be in the file \texttt{symbol\_alpha.html}.$\alpha$ + +test unicode beta: β + +\'e + +\section{The symbol $\beta$} + +This should be in the file \texttt{symbol\_beta.html}. $\beta = 1 + a \ldots$ + +\section{\textit{Another} section} + +This should be in the file \texttt{symbol\_beta.html}.$\beta$ + +\end{document} + diff --git a/texexpand.1 b/texexpand.1 index 458c3a1..5c58960 100644 --- a/texexpand.1 +++ b/texexpand.1 @@ -242,7 +242,7 @@ has to be on a separate line. 11. Everything behind a `%\*(R' that isn't preceded by a `\e\*(R' is regarded as a comment, i.e. it is printed but not interpreted. .PP -12. If any command listed in 10. is preceded by an occurence of `\everb\*(R' or +12. If any command listed in 10. is preceded by an occurrence of `\everb\*(R' or `\elatex\*(R' then it is \s-1NOT\s0 interpreted. This crashes on lines like this: blah blah \everb+foo foo+ \einput{bar} % bar won't be loaded! .PP diff --git a/versions/math.pl b/versions/math.pl index 00fd1b4..dc2942f 100644 --- a/versions/math.pl +++ b/versions/math.pl @@ -907,7 +907,7 @@ sub do_env_array { ### Delimiters -$math_delimiters_rx = "^\\s*(\\[|\\(|\\\\{|\\\\lfloor|\\\\lceil|\\\\langle|\\/|\\||\\)|\\]|\\\\}|\\\\rfloor|\\\\rceil|\\\\rangle|\\\\backslash|\\\\\\||\\\\uparrow|\\\\downarrow|\\\\updownarrow|\\\\Uparrow|\\\\Downarrow|\\\\Updownarrow|\\.)"; +$math_delimiters_rx = "^\\s*(\\[|\\(|\\\\\\{|\\\\lfloor|\\\\lceil|\\\\langle|\\/|\\||\\)|\\]|\\\\}|\\\\rfloor|\\\\rceil|\\\\rangle|\\\\backslash|\\\\\\||\\\\uparrow|\\\\downarrow|\\\\updownarrow|\\\\Uparrow|\\\\Downarrow|\\\\Updownarrow|\\.)"; %ord_brackets = ( 'le' , '{', 're', '}', 'lk', '[', 'rk', ']' ); @@ -1986,11 +1986,13 @@ sub parse_math_toks { } elsif (($mathentities{$cmd})||($latexsyms{$cmd})) { $ent = ($mathentities{$cmd} || $latexsyms{$cmd}); do { - local($cset) = "${CHARSET}_character_map{$ent}"; + my $character_map = ((($CHARSET =~ /utf/)&&!$NO_UTF)? + 'iso_10646' : $CHARSET ); + local($cset) = "${character_map}_character_map{$ent}"; $cset =~ s/\-/_/go; local($char); eval "\$char = \$$cset"; do { - $cset = "${CHARSET}_character_map{$cmd}"; + $cset = "${character_map}_character_map{$cmd}"; $cset =~ s/\-/_/go; eval "\$char = \$$cset"; $ent = $cmd if ($char); } unless ($char); diff --git a/versions/unicode.pl b/versions/unicode.pl index f1ad155..1b1bda7 100644 --- a/versions/unicode.pl +++ b/versions/unicode.pl @@ -835,4 +835,25 @@ $raw_arg_cmds{'oe'} = $raw_arg_cmds{'OE'} = -1 ; ); +# translate é to utf8 characters +sub convert_to_utf8 { + $_[0] =~ s/\&#(\d{2,});/&to_utf8($1)/egs; +} + +sub to_utf8 { + local($code) = @_; + return () unless ($code); + if ($code < 128 ) {return chr($code) }; + my ($str,$top,$level) = ('',128,64); + while (($code > 63)&&($level>4)) { + $top += $level; $level /= 2; + $str = chr(128+$code%64).$str; + $code = int($code/64); + } + if ($top+$code > 255) { + print STDERR "\n*** character $_[0] out of range for UTF-8 ***"; + ''; + } else { chr($top+$code).$str } +} + 1; diff --git a/versions/utf8.pl b/versions/utf8.pl index f84711c..41ee13a 100644 --- a/versions/utf8.pl +++ b/versions/utf8.pl @@ -19,6 +19,10 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# latex2html -html_version 5.0,utf8 +# can be used to produce utf-8 output even when input is, for example, +# latin1 in a file with \usepackage[latin1]{inputenc} + package main; $utf8_str = 'utf-8'; @@ -26,25 +30,4 @@ $charset = $utf8_str; $USE_UTF = 1; $NO_UTF = ''; -sub convert_to_utf8 { - $_[0] =~ s/([\200-\377])/print $1;&to_utf8(ord($1))/egs; - $_[0] =~ s/\&#(\d{2,});/print $&;&to_utf8($1)/egs; -} - -sub to_utf8 { - local($code) = @_; - return () unless ($code); - if ($code < 128 ) {return chr($code) }; - my ($str,$top,$level) = ('',128,64); - while (($code > 63)&&($level>4)) { - $top += $level; $level /= 2; - $str = chr(128+$code%64).$str; - $code = int($code/64); - } - if ($top+$code > 255) { - print STDERR "\n*** character $_[0] out of range for UTF-8 ***"; - ''; - } else { chr($top+$code).$str } -} - 1; |