[l2h] I'd like a way to have four Greek words displayed in a .html file produced by LaTeX2HTML without too much space between adjacent Greek letters.

Pat Somerville l_pat_s at hotmail.com
Thu Feb 14 22:38:47 CET 2013

Hello, Lucio Chiappetti.  Sorry, some of my writing was apparently 
wrong.---It now appears to me that you may have directly edited the 
HyperText Markup Language (HTML or html) source code to input Cyrillic 
letters in a .html file.  Thanks for very kindly taking some time to offer 
me your suggestion on how to input a Greek word into a .html document using 
the program LaTeX2HTML executing on a .tex file.  After trying what you 
suggested, in the .html ouput file of LaTeX2HTML I saw something close to

html chrono s chronos

with the pronunciation "chronos" instead in Greek letters with that 
pronunciation.  The space between the second "o" the Greek equivalent 
varsigma of my "s" might have been slightly smaller than the full blank 
space shown above.  And I had commented out with a % at the beginning of 
each of such lines the lines \usepackage[mathletters]{ucs} and 
\usepackage[utf8x]{inputenc}  .

So still with those lines commented out I tried the following command in my 
.tex file:


at the position where I wanted the Greek word pronounced "chronos" or 
"kronos" to appear.  And, as usual, I performed the following series of 
program executions on my test, .tex file, this time with the file name of 

latex Throwaway24.tex
bibtex Throwaway24.aux
latex Throwaway24.tex
latex Throwaway24.tex
latex2html ......................... Throwaway24.tex
latex2html ......................... Throwaway24.tex

, in which the latex2html command was a lengthy command.  And this time 
gratefully I saw the Greek equivalent of the pronunciation "chronos" or 
"kronos" in the output file Throwaway24.html produced by LaTeX2HTML, 
gratefully just what I wanted!  So thanks very much, Lucio, for kindly 
taking the time to make your suggestion to me!  I had the same, desired 
output for the commands "latex2html ....-html_version3.2,math....... 
Throwaway24.tex" and  "latex2html ....-html_version4.0,math,unicode....... 
Throwaway24.tex".  So contrary to what I may have been thinking, the 
inclusion of the word "unicode" in the "latex2html....... .tex" command 
appeared to not be necessary; and furthermore either version 3.2 or 4.0 of 
HTML was apparently acceptable for the purpose of having a Greek word appear 
in the ouput, .html file.

To input two Greek words with a space between them I found two methods which 

Method 1:

, where the dots indicate Unicode hexadecimal codes for the first Greek 
word; and there is one space between the above two pairs of \begin{rawhtml} 
and \end{rawhtml} commands; that space separated the two Greek words.

Method 2:

In method 2 I had the space separating the sets of hexadecimal codes for 
each of the two Greek words within just one pair of \begin{rawhtml} and 
\end{rawhtml} commands.

Comparing just two of the three successful methods discussed in this 
"thread," I like this way of producing the Greek words in the .html file 
using LaTeX2HTML with the hexadecimal codes in the .tex file better than 
manually inputting the hexadecimal codes for the Greek letters directly into 
the source code for the HTML document itself using the text editor Kate.  In 
the former method I can input the Greek words once in the .tex file and have 
those Greek words appear in numerous executions of LaTeX2HTML on the .tex 
file as I make changes to other parts of the .tex file.

Thanks again to both of you, Nasser M. Abbasi and Lucio Chiappetti, for very 
kindly providing me with your ideas on how to solve this problem.  Each of 
you kindly provided ideas which ultimately led to successful results in 
inputting a Greek word into a .html file.  I appreciate people like both of 
you who are willing to help other people!  Thanks for your kindly provided 
knowledge and suggestions to me, Nasser M. Abbasi and Lucio Chiappetti!


From: "Lucio Chiappetti" <lucio at lambrate.inaf.it>
Sent: Thursday, February 14, 2013 4:39 AM
To: "Pat Somerville" <l_pat_s at hotmail.com>
Subject: Re: [l2h] I'd like a way to have four Greek words displayed in a 
.html file produced by LaTeX2HTML without too much space between adjacent 
Greek letters.

> On Wed, 13 Feb 2013, Pat Somerville wrote:
>> Thanks, Lucio Chiappetti, for your idea of inputting hexadecimal 
>> (probably Unicode) codes for Greek letters, something you wrote that you 
>> did for at least some Cyrillic or Russian letters.
>> here are the hexadecimal codes for those Greek letters:
> Correct ! tested in my alpine 2.00 with Eduardo Chappa's patches using 
> ISO14755 input mode of the urxvt the mailer is running in, I get this 
> sequence (if *your* mailer is UTF-8 capable you should see it
> χρονος
>> I paid no attention to the encoding of that .html file.  I think the 
>> usual case may be the 8-bit Uniform Transformation Format (UTF-8) 
>> encoding for files I often open in the text editor Kate in my openSUSE,
> I use THE (The Hessling Editor) which at the moment is not UTF-8 capable, 
> but entering &xhhh; hex codes in HTML text does not require UTF-8 
> capability in the browser. This should be totally unrelated from what the 
> browser does. Most browsers should recognise BOTH UTF-8 encodings and hex 
> codes for most scripts. My firefox nicely shows greek, cyrillic, arab and 
> even chinese and japanese (which urxvt may not show) ... the only script I 
> find it to fail was Linear .
> B :-)
>> But from the way you have written, Lucio, I suppose that you might 
>> instead have somehow entered the hexadecimal codes for your Cyrillic 
>> letters in a .tex, LaTeX file and executed a "latex2html..... .tex" 
>> command on it to obtain the display of those Cyrillic characters in the 
>> .html output file of LaTeX2HTML.  Is this idea correct?  If that guess is 
>> correct, could you please include the relevant LaTeX commands which 
>> produced such a result for you?
> NO. The cyrillic stuff was done writing the hex-unicode stuff in an HTML 
> file by hand. That HTML page was mainly for fun and had no underlying 
> latex document.
> I've used latex2html seldom, for writing manuals. And in such case I had 
> no need of foreign fonts. I am pretty sure there are latex commands or 
> environments to process text conditionally (i.e. "output this only if 
> latex" or "output this only if html") ... I do not recall if there is also 
> an "if then else" command ("if latex output this if html output that"), I 
> cannot figure it out from my examples, and have no time to look it up in 
> the manual.
> I found clauses \begin{latexonly} ... \end{latexonly}  and also clauses
> like \begin{rawhtml} ... \end{rawhtml} (apparently I used the latter to do 
> some table formatting and colouring in the HTML output only.
> Maybe the conditional one is \latexhtml{this}{that} ?
> Should be it ... consider this
> % abbreviations for s/w package names
> % maybe make different for latex and html, the \sf font is not recognised 
> % in HTML
>  \newcommand{\Mysql}{ \latexhtml{{\sf mysql}}
>  {\begin{rawhtml}<font face=sans-serif>mysql</font>\end{rawhtml}} }
>  \newcommand{\Tomcat}{ \latexhtml{{\sf tomcat}}
>  {\begin{rawhtml}<font face=sans-serif>tomcat</font>\end{rawhtml}} }
> then I write "the columns of a \Mysql database table, inclusive of ..."
> and get the word "mysql" in a sans-serif font both on latex-pdf and html
> Or this
> \latexhtml{{\textcolor{myc2}{\it An interface to astronomical databases}}}
> {\begin{rawhtml}<font color=#0000FF><i>An interface to astronomical 
> databases</i></font>\end{rawhtml}}
> (a heading appears in a colour of choice in either pdf or html)
> So I guess something like this might fulfill your needs (not tested)
> \latexhtml{$\chi\rho o\nu o\varsigma$}
>           {{\begin{rawhtml}
>           &#x03C7;&#x03C1;&#x03BF;&#x03BD;&#x03BF;&#x03C2;
>           \end{rawhtml}}
> -- 
> ------------------------------------------------------------------------
> Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
> ------------------------------------------------------------------------
> Italian Research STILL at risk.  La Ricerca italiana TUTTORA a rischio !
> see http://sax.iasf-milano.inaf.it/~lucio/WWW/Opinions/nobrain3.html cfr

More information about the latex2html mailing list