Skip to content

Commit

Permalink
set LOCAL_ICONS if no ICONSERVER
Browse files Browse the repository at this point in the history
if we don't have a url to find icons on the web,
copy them into the directory for this document.

makes icons work with without requiring any special configuration.

Closes issue #21.
  • Loading branch information
Dan Gildea committed Jan 25, 2017
1 parent 20a3da3 commit b62d39f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 31 deletions.
9 changes: 0 additions & 9 deletions docs/support.tex
Expand Up @@ -607,15 +607,6 @@ \subsection{Installing \protect\latextohtml}%
or by setting \fn{\$LOCAL\_ICONS} to ``\texttt{1}'' in \fn{latex2html.config}
or within an initialization file, as described \htmlref{above}{initfile}.

\index{Livermore, California }%
\begin{quotation}\noindent
\textbf{Warnings: }%
If you cannot do that, bear in mind that these icons will have
to travel from Livermore, California!!!
Also note that several more icons were added in \textsc{v96.1}
that were not present in earlier versions of \latextohtml.
\end{quotation}

\index{installation!create manual}%
\index{documentation!test of installation}%
\item
Expand Down
4 changes: 2 additions & 2 deletions docs/userman.tex
Expand Up @@ -586,6 +586,7 @@ \subsubsection{Options controlling Extensions and Special Features}
directory along with the \texttt{HTML} files and generated images.
This allows the whole document to be fully self-contained, within this directory;
otherwise the icons must be retrieved from a (perhaps remote) server.
It is also the default behavior if \fn{\$ICONSERVER} is not set.

\index{icons!alternative set}\index{icons!customised images}%
The icons are normally copied from a subdirectory of the \fn{\$LATEX2HTMLDIR},
Expand Down Expand Up @@ -1254,8 +1255,7 @@ \subsubsection{Other Configuration Variables, without switches}
When the \htmlref{\Cs{local\_icons}}{cs_localicons} switch is used,
so that a copy of the icons is placed with the \texttt{HTML} files and other
generated images, the value of \fn{\$ICONSERVER} is not needed within
the \texttt{HTML} files themselves. However it \emph{is} needed to find
the original icons to be copied to the local directory.
the \texttt{HTML} files themselves.

\item [\fn{\$NAV\_BORDER}\texttt{ = }\Meta{num}\texttt{;}]
The value given here results in a border, measured in points, around each icon.\html{\\}
Expand Down
24 changes: 7 additions & 17 deletions l2hconf.pin
Expand Up @@ -78,29 +78,24 @@ $HTML_VALIDATOR = '@HTML_VALIDATOR@';
$HTML_VALIDATE = 0;


########## ICONSERVER --- !! IMPORTANT !! ############################
########## ICONSERVER ############################
#
# LaTeX2HTML uses many small graphics as icons within the navigation
# panels, and for other purposes.
# You *must* specify where these graphics are to be found, for use within
# your documents.
# You can specify a single location where these graphics are to be found,
# to avoid creating a separate copy as part of each document.
#
# IMPORTANT: This location must not only be accessible to you, but also
# to the people who are to read your HTML documents.
#
# One option is to always use the -local_icons switch (see below)
# to have a copy of the icons together with your HTML document.
# If $ICONSERVER is not set, latex2html will create
# a copy of the icons together with your HTML document.
# (This is safe, but wasteful if you have a large number of documents.)
#
# A better option is to set $ICONSERVER to point to a location that
# is known to always (at least in principle) be available publicly.
#
# The default value for $ICONSERVER given below is within the local
# $LATEX2HTMLDIR. If this is *not* to be publicly available then you
# **should change the value of $ICONSERVER to a site that is**.
#
# You probably have to talk to your Webmaster to provide access to the
# icon directory. Some hints:
# Some hints:
# a) It's ok to set $ICONSERVER just to "/path/to/icons.$IMAGE_TYPE" (without
# the internet address) if /path/to is valid for your file system, *and*
# if www_root/path/to points to the same directory. Normally the www area
Expand All @@ -115,12 +110,7 @@ $HTML_VALIDATE = 0;
# In this case, customize &img_tag to use a central directory, say,
# "../icons".
#
#if @texlive@
use L2hos;
$ICONSERVER = L2hos->path2URL("$LATEX2HTMLDIR/icons");
#else
$ICONSERVER = '@ICONSERVER@'||'@ICONPATH@';
#fi
$ICONSERVER = '@ICONSERVER@';
$ALTERNATIVE_ICONS = 0;


Expand Down
5 changes: 2 additions & 3 deletions latex2html.1
Expand Up @@ -411,6 +411,7 @@ files and generated images. This
allows the whole document to be fully self-contained, within this
directory; otherwise the icons must be retrieved from a (perhaps
remote) server.
It is also the default behavior if $ICONSERVER is not set.
The icons are normally copied from a subdirectory of the

.B $LATEX2HTMLDIR,
Expand Down Expand Up @@ -1058,9 +1059,7 @@ placed with the
files and other generated images, the value of
$ICONSERVER is not needed within the
.B HTML
files themselves. However it
is needed to find the original icons to be copied to the local
directory.
files themselves.
.TP
.B $NAV_BORDER = <num>;
The value given here results in a border, measured in points, around
Expand Down
3 changes: 3 additions & 0 deletions latex2html.pin
Expand Up @@ -459,6 +459,9 @@ if ($opt{test_mode}) {
$RGBCOLORFILE = "@srcdir@${dd}styles${dd}rgb.txt";
$CRAYOLAFILE = "@srcdir@${dd}styles${dd}crayola.txt";
}
if (!$ICONSERVER) { # if we don't have a url to find icons on the web,
$LOCAL_ICONS = 1; # copy them into the directory for this document
}
if($DEBUG) {
# make the OS-dependent functions more chatty, too
$L2hos::Verbose = 1;
Expand Down

0 comments on commit b62d39f

Please sign in to comment.