Re: [l2h] newbie, problem with \url + lyx

2004-03-23 Thread Ross Moore
Hello again Frank,

On 23/03/2004, at 9:23 PM, Frank Altpeter wrote:

Hello!

Ross Moore wrote on 2004-03-23 08:31:29 +1100:
Have you loaded  html.sty  ?
Nope. Since LyX also doesn't.

This is vital for proper use of hyperlinks with LaTeX2HTML,
since it
  a.  causes certain markup to be recognised in the LaTeX source
  b.  loads the translation modules for hyperlinking constructions
and features to be used with the document translation.
This includes defining  \url  and  \htmlurl  to do the
right thing, so that it is not necessary to load other packages.
*All* documents that make significant use of hyperlinking
should  \usepackage{html}  when being translated into HTML
using  LaTeX2HTML.
That is a general rule for which there are no real exceptions,
in normal LaTeX usage.
Well, and there's my question... i managed to manually change the
resulting .tex file and get a working result after latex2html, but i
don't want to do that manually everytime, so my question was more
Is it really that hard to add a few lines to your LaTeX jobs ?
You could write a short script that does it for you.
LyX related... why doesn't lyx do what you suggest?
LyX and LaTeX2HTML were developed independently,
perhaps with different aims in mind.
Since LaTeX2HTML has been around longer, your question
is best addressed to the LyX development team.
LyX does add the already mentioned \usepackage{url} and after
converting it with LaTeX there's the already mentioned
IfFileExists{} routine in it.
So i assume there's a mistake either in LyX or in latex.
Not at all.

The  url.sty  package is a graft of the URL concept into
TeX --- which was devised long before the internet was
even conceived.
On the other hand, the URL idea was well-known when
LaTeX2HTML was developed, so is fully incorporated into
its design (and perhaps similarly for LyX).
However, since many LaTeX documents were already
in existence (and continue to be written) without reference
to hyperlinking, then it is quite understandable that
a package needs to be loaded to allow hyperlinking markup
to be properly interpreted.
For LaTeX2HTML this is html.sty  --- which does all that
is done by  url.sty  plus a lot more.
LyX chooses to just use  url.sty .
(It could choose to use either  html.sty  or  hyperref.sty
as more sophisticated alternatives; each of these loads
 url.sty  as part of the extra features that are offered.)
If you use LyX to write your LaTeX documents, there is
no a priori reason why it should know that you intend
to also process your documents with LaTeX2HTML.
That is your choice, and you should be prepared to
adjust your manuscripts appropriately, or ...

Is there in fact a problem in the HTML that is generated ?
If not, then just ignore these warning messages.
If i builld it manually, the resulting HTML works, well. When trying
to get the same results with using the LyX internal export feature,
it doesn't.
 ... ask the LyX team to implement better compatibility
for subsequent processing with LaTeX2HTML.

\documentclass..

\usepackage{html}
%begin{latexonly}
\IfFileExists{url.sty}{\usepackage{url}}
  {\newcommand{\url}{\texttt}}
%end{latexonly}
Those special comments do not change the result when processing
with any TeX-based software, such as LaTeX or pdflatex or lyx,
but tell the Perl-based LaTeX2HTML to ignore the coding in-between.
How do i add them to work in the automated LyX processing?
If you are using the LyX interface to compose your LaTeX
manuscripts, then that is a question for the LyX team to answer.
With kind regards,
Hope this helps,

	Ross Moore


	Frank Altpeter



Ross Moore [EMAIL PROTECTED]
Mathematics Department office: E7A-419
Macquarie University   tel: +61 +2 9850 8955
Sydney, Australia  fax: +61 +2 9850 8114


Ross Moore [EMAIL PROTECTED]
Mathematics Department office: E7A-419
Macquarie University   tel: +61 +2 9850 8955
Sydney, Australia  fax: +61 +2 9850 8114

___
latex2html mailing list
[EMAIL PROTECTED]
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] newbie, problem with \url + lyx

2004-03-22 Thread Ross Moore
Hello Frank,

On 23/03/2004, at 12:42 AM, Frank Altpeter wrote:

Hello!

Sorry to disturb you with this again, but i found this in the l2h web
archive and have a question for this:
You wrote on Wed, 13 Sep 2000 09:58:44 +1100 (EST):

There is no name clash in LaTeX, because e.g.
\begin_inset LatexCommand \htmlurl[LyX]{http://www.lyx.org/}
\end_inset
is translated as:
\IfFileExists{url.sty}{\usepackage{url}}
  {\newcommand{\url}{\texttt}}
in the preamble (to cope with (La)TeX installation not knowing about
url.sty),
and:
LyX \url{http://www.lyx.org/}
in the LaTeX code.
Well, i'm just about having the same problem. I use LyX-1.3.4 and
latex2html-2002.2.1_2 here, and want to define URLs in a lyx file to
convert into html.
I find the above translated line in the tex file, but it seems that
latex2html doesn't know about \IfFileExists{} and so doesn't load
the url.sty and therefore the URLs are not generated.
Have you loaded  html.sty  ?
This is vital for proper use of hyperlinks with LaTeX2HTML,
since it
  a.  causes certain markup to be recognised in the LaTeX source
  b.  loads the translation modules for hyperlinking constructions
and features to be used with the document translation.
This includes defining  \url  and  \htmlurl  to do the
right thing, so that it is not necessary to load other packages.
*All* documents that make significant use of hyperlinking
should  \usepackage{html}  when being translated into HTML
using  LaTeX2HTML.
That is a general rule for which there are no real exceptions,
in normal LaTeX usage.

If i export the LyX file into LaTeX and try to convert the LaTeX
file into html, i get the following eror:
Unknown commands: IfFileExists
Yes. \IfFileExists  is a programming construction, which implies
that programming code (which LaTeX2HTML probably cannot deal with)
is about to be loaded.
LaTeX2HTML interprets markup; it does not execute arbitrary
(La)TeX programming code.

If i remove the if routine and put a plain \usepackage{url} into it,
the error sounds like this:
No implementation found for style `url'

though the url.sty is present (comes with latex2html in texinputs
subdir).
With  html.sty  there is no need for loading  url.sty  separately.
It has nothing to add that isn't already handled by LaTeX2HTML.
Do you have any idea where the problem might be?
Is there in fact a problem in the HTML that is generated ?
If not, then just ignore these warning messages.
If there are problems in the translation, or you really want to
suppress the warnings, then try starting your document as follows:
\documentclass..

\usepackage{html}
%begin{latexonly}
\IfFileExists{url.sty}{\usepackage{url}}
  {\newcommand{\url}{\texttt}}
%end{latexonly}
Those special comments do not change the result when processing
with any TeX-based software, such as LaTeX or pdflatex or lyx,
but tell the Perl-based LaTeX2HTML to ignore the coding in-between.


Hope this helps,

	Ross Moore


With kind regards,

	Frank Altpeter



Ross Moore [EMAIL PROTECTED]
Mathematics Department office: E7A-419
Macquarie University   tel: +61 +2 9850 8955
Sydney, Australia  fax: +61 +2 9850 8114

___
latex2html mailing list
[EMAIL PROTECTED]
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] newbie, problem with \url + lyx

2000-09-13 Thread Ross Moore

 When I try, I use lyx to convert it to .tex. Then I use latex2html, it
 makes my \url isn't convert to hyper-links. So although I add
 \url{http://www.blah.com} will not be a hyper-links. Do you have any
 solution to fix it ?

\url  works fine for me with LaTeX2HTML,

 1.  whether or not  \usepackage{url}  is requested
 2.  whether or not  \usepackage{html}  is requested

Similarly \htmlurl works as expected
(i.e. same as \url ) in the 4 cases.


Thus if \url or \htmlurl  fails for you with Lyx-generated source,
then either

 a. you have an out-of-date version of LaTeX2HTML
or
 b. your document has macros that upset the handling of \url
or
 c. Lyx adds macros that upset the handling of \url or has a different
syntax for \htmlurl which confuses LaTeX2HTML 

 
 Thanks for your time.

You're welcome.
Please send an example document that exhibits the bad behaviour,
or (better) send a URL where I can access the source, and perhaps
also see the result produced by LaTeX2HTML.


Hope this helps,

Ross Moore

 




Re: [l2h] newbie, problem with \url + lyx

2000-09-13 Thread Arie Zanahar

I've some documents in: http://www.savebylinux.com/latex/ There are 2 file
and 2 directory contain HTML result from each file.  I use lattest
latex2html and lyx program. I hope you can explore what's wrong with it.

Thanks in advances.


\url  works fine for me with LaTeX2HTML,

 1.  whether or not  \usepackage{url}  is requested
 2.  whether or not  \usepackage{html}  is requested

Similarly \htmlurl works as expected
(i.e. same as \url ) in the 4 cases.


Thus if \url or \htmlurl  fails for you with Lyx-generated source,
then either

 a. you have an out-of-date version of LaTeX2HTML
or
 b. your document has macros that upset the handling of \url
or
 c. Lyx adds macros that upset the handling of \url or has a different
syntax for \htmlurl which confuses LaTeX2HTML 

 
 Thanks for your time.

You're welcome.
Please send an example document that exhibits the bad behaviour,
or (better) send a URL where I can access the source, and perhaps
also see the result produced by LaTeX2HTML.


Hope this helps,

   Ross Moore

 




-- 
-AZ-
[EMAIL PROTECTED]




[l2h] newbie, problem with \url + lyx

2000-09-12 Thread Arie Zanahar

I'm installing latex2html-99.2beta8 in RedHat 6.2. After I export *.lyx to
*.tex, and convert it with latex2html, I always got errors like this.

No implementation found for style `url'

redefining command \url 

I checked in /usr/share/texmf/ls-R, url.sty is in
/usr/share/texmf/tex/latex/html and /usr/share/texmf/tex/latex/misc

Can someone tell me what's wrong with it ?

-- 
-AZ- [EMAIL PROTECTED]




Re: [l2h] newbie, problem with \url + lyx

2000-09-12 Thread Arie Zanahar

When I try, I use lyx to convert it to .tex. Then I use latex2html, it
makes my \url isn't convert to hyper-links. So although I add
\url{http://www.blah.com} will not be a hyper-links. Do you have any
solution to fix it ?

Thanks for your time.

It isn't an error message -- it's just a warning.
Only if there is something wrong with your output, related to URLs,
should there be any need to worry about this.

 
 redefining command \url 
 
 I checked in /usr/share/texmf/ls-R, url.sty is in
 /usr/share/texmf/tex/latex/html and /usr/share/texmf/tex/latex/misc
 
 Can someone tell me what's wrong with it ?

With LaTeX, all extensions are loaded using  \usepackage{ ..blah.. }
but with LaTeX2HTML, many LaTeX packages are implemented internally
using Perl coding;
e.g. generating hyperlinks is fundamental to HTML,
but it is just a fancy effect for LaTeX.


On the other hand, many LaTeX packages are quite irrelevant to
an HTML translation and need no implementation at all.

Thus the "no implementation" message just means that there is
no implementation for a particular  \usepackage{...} .

Whether that is of concern is something that you can determine
only by looking at your HTML output.


Hope this helps,

   Ross Moore

 
 -- 
 -AZ- [EMAIL PROTECTED]
 




-- 
-AZ-
[EMAIL PROTECTED]





Re: [l2h] newbie, problem with \url + lyx

2000-09-12 Thread Prof. Jerry Place

   I've had errors like this before.  My Linux solution is to make a
soft link as follows:

   ln -s /usr/share/texmf/tex/latex/html/url.sty   url.tex

   L2H includes *.tex files but for some reason won't include *.sty
files.  Let me know how this works for you.


Regards,

Jerry Place
Assoc. Prof. of Computer Science
Computer Science Telecommunications Program
U. of Missouri - Kansas City
5100 Rockhill Road
Kansas City, MO  64110
USA



On Wed, 13 Sep 2000, Arie Zanahar wrote:

 I'm installing latex2html-99.2beta8 in RedHat 6.2. After I export *.lyx to
 *.tex, and convert it with latex2html, I always got errors like this.
 
 No implementation found for style `url'
 
 redefining command \url 
 
 I checked in /usr/share/texmf/ls-R, url.sty is in
 /usr/share/texmf/tex/latex/html and /usr/share/texmf/tex/latex/misc
 
 Can someone tell me what's wrong with it ?
 
 -- 
 -AZ- [EMAIL PROTECTED]
 
 




Re: [l2h] newbie, problem with \url + lyx

2000-09-12 Thread Ross Moore

 
 Date: Wed, 13 Sep 2000 02:52:54 +0700 (JAVT)
 From: Arie Zanahar [EMAIL PROTECTED]
 To: Ross Moore [EMAIL PROTECTED]
 cc: [EMAIL PROTECTED]
 Subject: Re: [l2h] newbie, problem with \url + lyx
 
 When I try, I use lyx to convert it to .tex. Then I use latex2html, it
 makes my \url isn't convert to hyper-links. So although I add
 \url{http://www.blah.com} will not be a hyper-links. Do you have any
 solution to fix it ?
 
 Seems to be rather a Lyx question than a latex2html one, but...
 here is what I understood about this problem.
 
 Lyx produces its own encodeing for an url as:
 \htmlurl[anchor]{URL}

This is very bad, as \htmlurl  is defined also
in the html.sty package, required for LaTeX2HTML.
(as are many other commands with names starting \html).

Lyx should use the name \lyxurl or something else that is distinct to
its own name of Lyx.


 Typographically, it prints anchor as is and URL with the url.sty
 wrapping to avoid problems with long words.

Then to sort out the mess caused by the name clash, you will need
conditional code like the following in the document preamble:

%begin{latexonly}
\let\lyxurl\htmlurl  % save a pointer to lyx's \htmlurl
%end{latexonly}
\usepackage{html}% ensure that html.sty is loaded
\begin{htmlonly}
\renewcommand{\htmlurl}[2][]{%
 \htmladdnormallink{#1}{#2}}
\end{htmlonly}
%begin{latexonly}
\let\htmlurl\lyxurl  % recover the pointer to lyx's \htmlurl
%end{latexonly}
 
Now you should be able to use \htmlurl 
for all the hyperlinks, both with LyX and with LaTeX2HTML.

However...

  ... the optional argument is now *mandatory*.
LaTeX2HTML may not produce a link for  \htmlurl{URL}
without any anchor text. 


 So everything is there to produce a good hypertext, but the
 exported latex does not know \htmladdnormallink or its typographical
 version \htmladdnormallinkfoot...
 
 So two ways to deal with it:
  - write e translator for \htmlurl to produce A HREF="URL"anchor/A

The above code effectively does this, by converting Lyx's use
of \htmlurl into a form that LaTeX2HTML already knows how to handle.
Also it opens up the full power of  html.sty  for markup
intended mainly for the HTML version of a document.

  - process the lyx file to create the right code using html.sty

 I have here a workaround using the second approach, which puts
 a lot of ERT (i.e. plain (La)TeX commands) in the original LyX file. 

Certainly it is good to use markup defined from html.sty
so that there are not too many (perhaps incompatible) styles
being used to markup URLs in LaTeX documents.


An alternative approach is to define your own command; e.g. \myurl
using conditional definitions:

\usepackage{html}
\begin{htmlonly}
 % perhaps load HTML-specific definitions from a .tex file
 % \input myHTMLdefs.tex
 %
 % or define \myurl here
 \newcommand{\myurl}[2]{\htmladdnormallink{#1}{#2}}
 %
\end{htmlonly}
%begin{latexonly}
 % perhaps load Lyx-specific definitions from a .sty file
 % \usepackage{myLyXdefs}
 %
 % or define \myurl here
 \newcommand{\myurl}[2]{\lyxurl[#1]{#2}}
 %
%end{latexonly}

(assuming \lyxurl is a pointer to the real macro expansion).


 Hope this helps.

And this too.

Ross Moore

  
 -- 
 Jean-Pierre