Re: HTML export

2006-08-28 Thread TechTonics

Pupeno wrote:

Hello,
Is there some way to generate a better HTML file out of a LyX file. Currently 
the export generates very old HTML, I need XHTML. Furthermore I'd like 
LyX-code sections to be , not , etc.
Is that possible ? I did some searches and I couldn't find anything. I've 
check the options of latex2html and the best I did was break the capability 
to export HTML for a while.

Thank you.


The tex4ht package uses htlatex or xhlatex to produce html output.
A proper environment seems to produce good results, see attached.

http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn3.html

XHTML and Unicode
The ‘xhlatex’ command is a variant of the ‘htlatex’ command requesting 
XHTML output. It consists just of a call to ‘htlatex’ with the entry 
‘xhtml’ in the first list of options and ‘-cvalidate’ in the third list. 
For instance, ‘xhlatex filename’ or ‘htlatex filename "xhtml"’.


To request a Unicode representation of symbols, the first list of options 
should include the ‘uni-html4’ entry, and the second list should include 
the ‘-cunihtf’ entry preceded by space. For instance, ‘xhlatex filename 
"xhtml,uni-html4" " -cunihtf"’.


Unicode representations of symbols in UTF-8 encoding may be requested 
with the entry ‘-utf8’ added to the second list. For instance, ‘xhlatex 
filename "xhtml,uni-html4" " -cunihtf -utf8"’.


XHTML with MathML

Regards,
Stephen



Re: HTML export

2006-08-28 Thread Juergen Fenn
Pupeno <[EMAIL PROTECTED]> writes:

> Is there some way to generate a better HTML file out of a LyX file. Currently 
> the export generates very old HTML, I need XHTML. 

I don't know what LyX exactly does nowadays because I still run
v1.3.7, but you can convert to XHTML by exporting to LaTeX and running
tex4ht 

  http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html   

on the LaTeX like this (adapt as you like):

  htlatex myfile.tex "xhtml,0,fn-in,NoFonts,fonts"

> Furthermore I'd like LyX-code sections to be , not
> , etc.  Is that possible ? 

? Please check your markup in LyX/LaTeX before converting.

Jürgen.



Re: HTML export

2006-08-29 Thread Pupeno
On Monday 28 August 2006 17:50, Juergen Fenn wrote:
> Pupeno <[EMAIL PROTECTED]> writes:
> > Is there some way to generate a better HTML file out of a LyX file.
> > Currently the export generates very old HTML, I need XHTML.
>
> I don't know what LyX exactly does nowadays because I still run
> v1.3.7, but you can convert to XHTML by exporting to LaTeX and running
> tex4ht
>
>   http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html
>
> on the LaTeX like this (adapt as you like):
>
>   htlatex myfile.tex "xhtml,0,fn-in,NoFonts,fonts"

Ok, I am trying to use it, but it seems to require a lot of knowledge of LaTeX 
processing that I do not have. Do you know if there's an option to avoid 
using CSS (to put the colors of the fonts IN the text itself) ?

> > Furthermore I'd like LyX-code sections to be , not
> > , etc.  Is that possible ?
>
> ? Please check your markup in LyX/LaTeX before converting.

What can I do about the markup in LyX ? Should I use something different than 
LyX-Code ?
-- 
Pupeno <[EMAIL PROTECTED]> (http://pupeno.com)


pgpdPAf368VM8.pgp
Description: PGP signature


Re: HTML export

2006-08-29 Thread Juergen Fenn
Pupeno <[EMAIL PROTECTED]> writes:

>>   http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html

> Ok, I am trying to use it, but it seems to require a lot of knowledge of 
> LaTeX 
> processing that I do not have. 

LyX exports LaTeX code that should compile all right. Only if tex4ht
does not process this code correctly, you have to have a look into the
LaTeX file. Conversion is always a tricky business. Converting LaTeX
doubly so.

> Do you know if there's an option to avoid using CSS (to put the
> colors of the fonts IN the text itself) ?

I don't know of such an option (which does not mean that there is
none). But if you don't want a separate CSS file you can insert the
CSS code into the head of your HTML file.

>> > Furthermore I'd like LyX-code sections to be , not
>> > , etc.  Is that possible ?
>>
>> ? Please check your markup in LyX/LaTeX before converting.
>
> What can I do about the markup in LyX ? Should I use something different than 
> LyX-Code ?

The only way not to get definition lists when converting to HTML is
not to input description lists in LyX. Given that the markup is
converted correctly.

For problems specific to tex4ht you should ask in comp.text.tex
because Eitan Gurari appears to follow the newsgroup.

Regards,
Jürgen.



Re: HTML export

2006-08-29 Thread Miki Dovrat
Hi,

Do the features view/export HTML work in lyx 1.4.2?

They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
htlatex is installed and works via command line.

In html view, I get an error saying lyx can't find the file 
c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html

In html export, I see that a dvi is generated in the directory but no html.

If I take an exported latex file and use htlatex in a command line window 
everything works.

So, does anyone know what is wrong? Using a command line is fine by me, 
however a little tedious.

Thanks 





Re: HTML export

2006-08-29 Thread TechTonics

Miki Dovrat wrote:

Hi,

Do the features view/export HTML work in lyx 1.4.2?

They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
htlatex is installed and works via command line.


In html view, I get an error saying lyx can't find the file 
c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html


In html export, I see that a dvi is generated in the directory but no html.

If I take an exported latex file and use htlatex in a command line window 
everything works.


So, does anyone know what is wrong? Using a command line is fine by me, 
however a little tedious.


Thanks 



No, it doesn't work. It helps if you change your LyX temp and work 
directories found under Tools -> Preferences to a path without spaces

such as C:\Lyx142\worklyx or C:\LyX142\templyx. Then the conversion
progresses longer. Maybe it will be fixed in LyX143.

Regards,
Stephen




Re: HTML export

2006-08-29 Thread TechTonics

Miki Dovrat wrote:

Hi,

Do the features view/export HTML work in lyx 1.4.2?

They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
htlatex is installed and works via command line.


In html view, I get an error saying lyx can't find the file 
c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html


In html export, I see that a dvi is generated in the directory but no html.

If I take an exported latex file and use htlatex in a command line window 
everything works.


So, does anyone know what is wrong? Using a command line is fine by me, 
however a little tedious.


Thanks 





The basic structure of the html file is created, the problem
is that the file is named foo.htm rather than foo.html which
is the filename Lyx looks for. If you navigate to that tmp
folder and rename foo.htm to foo.html and run View->Html
again, then it will display because it finds the right filename.

The wrong filename is not the major problem. This process does
not work like running htlatex foo(.tex) from the command line
which does incorporate image files generated (.pngs default).

I don't think the generated image filenames are correct. I
think this is similar to bug #2299 
http://bugzilla.lyx.org/show_bug.cgi?id=2299


Georg wrote: I also know the cause: dvipdfm needs .bb files for  all 
graphics. LyX simply does not know that and does not copy these files

to  the temporary directory where latex and dvipdfm are run.

Changing the filename output from .htm to .html is minor.
I don't know if the fix Georg made for bug #2299 will fix
this problem although they seem related. Even on a file with
no equations like splash.lyx, the conversion to filename htm
which should be splash.html loses its formatting that is maintained
if you run htlatex from the command line, meaning if you navigate
to the tmp_buf* folder and type htlatex splash.tex, then use
View->Html from LyX, it looks pretty good, but not from how Lyx
invokes htlatex from the View command normally = bad splash.html

Regards,
Stephen



Re: HTML export

2006-08-29 Thread Miki Dovrat
Thanks for the answers

Miki


"TechTonics" <[EMAIL PROTECTED]> wrote in 
message news:[EMAIL PROTECTED]
> Miki Dovrat wrote:
>> Hi,
>>
>> Do the features view/export HTML work in lyx 1.4.2?
>>
>> They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
>> htlatex is installed and works via command line.
>>
>> In html view, I get an error saying lyx can't find the file 
>> c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html
>>
>> In html export, I see that a dvi is generated in the directory but no 
>> html.
>>
>> If I take an exported latex file and use htlatex in a command line window 
>> everything works.
>>
>> So, does anyone know what is wrong? Using a command line is fine by me, 
>> however a little tedious.
>>
>> Thanks
>
> The basic structure of the html file is created, the problem
> is that the file is named foo.htm rather than foo.html which
> is the filename Lyx looks for. If you navigate to that tmp
> folder and rename foo.htm to foo.html and run View->Html
> again, then it will display because it finds the right filename.
>
> The wrong filename is not the major problem. This process does
> not work like running htlatex foo(.tex) from the command line
> which does incorporate image files generated (.pngs default).
>
> I don't think the generated image filenames are correct. I
> think this is similar to bug #2299 
> http://bugzilla.lyx.org/show_bug.cgi?id=2299
>
> Georg wrote: I also know the cause: dvipdfm needs .bb files for  all 
> graphics. LyX simply does not know that and does not copy these files
> to  the temporary directory where latex and dvipdfm are run.
>
> Changing the filename output from .htm to .html is minor.
> I don't know if the fix Georg made for bug #2299 will fix
> this problem although they seem related. Even on a file with
> no equations like splash.lyx, the conversion to filename htm
> which should be splash.html loses its formatting that is maintained
> if you run htlatex from the command line, meaning if you navigate
> to the tmp_buf* folder and type htlatex splash.tex, then use
> View->Html from LyX, it looks pretty good, but not from how Lyx
> invokes htlatex from the View command normally = bad splash.html
>
> Regards,
> Stephen
>
> 





Re: HTML export

2006-08-30 Thread Jean-Pierre Chretien

>>Date: Tue, 29 Aug 2006 11:53:06 -0700
>>From: TechTonics <[EMAIL PROTECTED]>
>>To: Miki Dovrat <[EMAIL PROTECTED]>
>>CC: lyx-users@lists.lyx.org
>>Subject: Re: HTML export
>>
>>Miki Dovrat wrote:
>>> Hi,
>>> 
>>> Do the features view/export HTML work in lyx 1.4.2?
>>> 
>>> They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
>>> htlatex is installed and works via command line.
>>> 
>>> In html view, I get an error saying lyx can't find the file 
>>> c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html

Same message on lyx-1.4.2 Solaris, but the file seems to be moved in
the directory of the document, where I find also all the ancillary files
created by htlatex, e.g for file /tmp/fr_exemple_lyxifie.lyx
-> ls /tmp/fr_exemple_lyxifie*
/tmp/fr_exemple_lyxifie.4ct
/tmp/fr_exemple_lyxifie.4tc 
...

In addition, if fr_example_lyxifie.html does exist already, there is no 
overwrite warning,
as export is called by View and not Export.

I guessed the originaldir extra flag in Preferences->Converter->Latex(plain) to 
HTML could
had something to do with this behavior: it is added for htlatex to deal 
correctly
with eps files (fr_exemple_lyxifie has none). If I suppress it, 
the html file is opened by the viewer, but is still created in document dir
(without overwrite warning either). 

IMHO, View->HTML should view in temp file to leave all these ancillary files 
out of the way,
which is the case when I leave the extra flags field empty by removing needaux.

I understand from lyxrc.example that in this case export will fail if there are 
graphic files:
is this still the case ? It seems to work all right on a simple example here.

So the question is: are these flags still needed ? Is there someting wrong with 
them anyway ?

-- 
Jean-Pierre







Re: HTML export

2006-08-30 Thread TechTonics

Jean-Pierre Chretien wrote:

Date: Tue, 29 Aug 2006 11:53:06 -0700
From: TechTonics <[EMAIL PROTECTED]>
To: Miki Dovrat <[EMAIL PROTECTED]>
CC: lyx-users@lists.lyx.org
Subject: Re: HTML export

Miki Dovrat wrote:

Hi,

Do the features view/export HTML work in lyx 1.4.2?

They don't work on my lyx 1.4.2 Windows XP with MikTex 2.5 even though 
htlatex is installed and works via command line.


In html view, I get an error saying lyx can't find the file 
c:\tmp\lyxtmpdir..\lyx_tmpbuf0\myfile.html


Same message on lyx-1.4.2 Solaris, but the file seems to be moved in
the directory of the document, where I find also all the ancillary files
created by htlatex, e.g for file /tmp/fr_exemple_lyxifie.lyx
-> ls /tmp/fr_exemple_lyxifie*
/tmp/fr_exemple_lyxifie.4ct
/tmp/fr_exemple_lyxifie.4tc 
...


In addition, if fr_example_lyxifie.html does exist already, there is no 
overwrite warning,
as export is called by View and not Export.

I guessed the originaldir extra flag in Preferences->Converter->Latex(plain) to 
HTML could
had something to do with this behavior: it is added for htlatex to deal 
correctly
with eps files (fr_exemple_lyxifie has none). If I suppress it, 
the html file is opened by the viewer, but is still created in document dir
(without overwrite warning either). 


IMHO, View->HTML should view in temp file to leave all these ancillary files 
out of the way,
which is the case when I leave the extra flags field empty by removing needaux.

I understand from lyxrc.example that in this case export will fail if there are 
graphic files:
is this still the case ? It seems to work all right on a simple example here.

So the question is: are these flags still needed ? Is there someting wrong with 
them anyway ?



On native Windows, View -> Html, creates myfile.htm and LyX gives
an error message because it it looking for myfile.html.
Formatting is lost. No images are included. (htlatex does run)
This is if your lyx temp dir is in a directory without spaces.

Cygwin doesn't run htlatex. If you run htlatex manually, it
produces myfile.htm which has to be renamed to myfile.html.
Formatting is lost but it will include/display one of many .png images.

IOW, View->Html, is close to completely broken on the Windows platform.

mot juste,
Stephen



Re: HTML export

2006-08-30 Thread Jean-Pierre Chretien

>>Date: Wed, 30 Aug 2006 06:32:50 -0700
>>From: TechTonics <[EMAIL PROTECTED]>
>>To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>CC: lyx-users@lists.lyx.org
>>Subject: Re: HTML export
>>
>>Jean-Pierre Chretien wrote:
[...]
>>
>>On native Windows, View -> Html, creates myfile.htm and LyX gives
>>an error message because it it looking for myfile.html.
>>Formatting is lost. No images are included. (htlatex does run)
>>This is if your lyx temp dir is in a directory without spaces.
>>
>>Cygwin doesn't run htlatex. If you run htlatex manually, it
>>produces myfile.htm which has to be renamed to myfile.html.

?? I get myfile.html here.
I guess that htlatex called from LyX fails because it works with full pathnames,
so zzmyfile.ps is now zzC:myfile.ps. maybe there are other flaws.

>>Formatting is lost but it will include/display one of many .png images.
>>
>>IOW, View->Html, is close to completely broken on the Windows platform.

If what I say is true (basically, the lg file cannot run), it's a htlatex
problem rather than a lyx problem. 
I use htlatex coming with proTeXt, may be it has improved since the packaging 
(nov. 2005) ?

-- 
Jean-Pierre



Re: HTML export

2006-08-30 Thread TechTonics

Jean-Pierre Chretien wrote:

Date: Wed, 30 Aug 2006 06:32:50 -0700
From: TechTonics <[EMAIL PROTECTED]>
To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
CC: lyx-users@lists.lyx.org
Subject: Re: HTML export

Jean-Pierre Chretien wrote:

[...]

On native Windows, View -> Html, creates myfile.htm and LyX gives
an error message because it it looking for myfile.html.
Formatting is lost. No images are included. (htlatex does run)
This is if your lyx temp dir is in a directory without spaces.

Cygwin doesn't run htlatex. If you run htlatex manually, it
produces myfile.htm which has to be renamed to myfile.html.


?? I get myfile.html here.
I guess that htlatex called from LyX fails because it works with full pathnames,
so zzmyfile.ps is now zzC:myfile.ps. maybe there are other flaws.


Formatting is lost but it will include/display one of many .png images.

IOW, View->Html, is close to completely broken on the Windows platform.


If what I say is true (basically, the lg file cannot run), it's a htlatex
problem rather than a lyx problem. 
I use htlatex coming with proTeXt, may be it has improved since the packaging (nov. 2005) ?




Well, under Miktex2.4 or Miktex2.5(just released) htlatex
works correctly from the command line. I think the htlatex
package was updated in 2006. The files are larger and also
correctly named myfile.html when done from the command line.
This is the same experience that Miki Dovrat reported. The
footnote for splash.lyx is created in another html file is the
only problem I notice from file creation from the command line.

Using View->Html with LyX, the output file is misnamed, htm,
the .lg file is much smaller and the .htm is also small in
comparison and unformatted.

Usually, running a tool from the command line and seeing
if it works properly is how to tell if it is the the tool
or LyX. For instance one tests Aspell with Aspell -c badwords.txt
and if it works from the command line but not from LyX, it is
LyX, or Lyx's configuration where the problem resides. Nor does
Cygwin produce the right output from LyX and Cygwin is fully
as capable as Linux in other areas, as far as I know.

Regards,
Stephen


Re: HTML export

2006-08-30 Thread Enrico Forestieri
TechTonics <[EMAIL PROTECTED]> writes:

> Usually, running a tool from the command line and seeing
> if it works properly is how to tell if it is the the tool
> or LyX. For instance one tests Aspell with Aspell -c badwords.txt
> and if it works from the command line but not from LyX, it is
> LyX, or Lyx's configuration where the problem resides. Nor does
> Cygwin produce the right output from LyX and Cygwin is fully
> as capable as Linux in other areas, as far as I know.

This is because the htlatex you are using is a native application expecting
native style paths. Try adding the line
export LYX_WINPATHS=yes
to the file /etc/lyxprofile and you will see that View->Html works (doesn't
work) on Cygwin exactly as it does for a native LyX.

-- 
Enrico



Re: HTML export

2006-08-30 Thread TechTonics

Enrico Forestieri wrote:

TechTonics <[EMAIL PROTECTED]> writes:


Usually, running a tool from the command line and seeing
if it works properly is how to tell if it is the the tool
or LyX. For instance one tests Aspell with Aspell -c badwords.txt
and if it works from the command line but not from LyX, it is
LyX, or Lyx's configuration where the problem resides. Nor does
Cygwin produce the right output from LyX and Cygwin is fully
as capable as Linux in other areas, as far as I know.


This is because the htlatex you are using is a native application expecting
native style paths. Try adding the line
export LYX_WINPATHS=yes
to the file /etc/lyxprofile and you will see that View->Html works (doesn't
work) on Cygwin exactly as it does for a native LyX.



Hello Enrico,

I'm pleased to hear from you. Indeed, adding "export LYX_WINPATHS=yes"
produces nearly the same failure on CygLyX as native WinLyX.

The output file is truncated from myfile.html to myfile.htm which
generated an error message because the viewer is looking for myfile.html

CygLyx does not generate the .pngs for equations that htlatex generates
from the command line. It does get some Greek letters correct. But the
exponent (superscript?) is on the same level as the other letters. Also
what I referred to as 'unformatted' appears upon closer inspection to be
the end-of-line is not respected at it is when htlatex from the command
line is executed in Dos, which does produce myfile.html.

My machine was attacked by a trojan. I had to create another identity.
Cygwin doesn't work for the new identity. "Windows cannot access the
specified devive, path or file. You may not have the appropriate
permissions to access the item."

So I completey shared the Cygwin directory and subdirectories and
also C:\home. I ran a couple of commands which created .bashrc
.inputrc and .bash_profile for Tech, the new identity. It will
not work and I have to change users to my original identity (the
trojan finally gave up the ghost). But it is a hassle to have
to switch users to use Cygwin which does work on the original
identity. Your new Cygwin Lyx1.4.2 was very easy to update.
I couldn't find simple instruction to make "Tech" an admin.
I may not have installed Cygwin for all users, I don't remember.

I'm surprised Html view works for you for Cygwin because I
think (thought) it was LyX not the Cygwin or Win configuration.

As a side note. I spoke to Lalu who got his Phd. in computer
technology. He said the Texas Instruments 89 calculator had
a design 20 years ahead (symbolic) of the TI86 design.

Best regards,
Stephen


Re: HTML export

2006-08-30 Thread TechTonics

Jean-Pierre Chretien wrote:

Date: Wed, 30 Aug 2006 06:32:50 -0700
From: TechTonics <[EMAIL PROTECTED]>
To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
CC: lyx-users@lists.lyx.org
Subject: Re: HTML export

Jean-Pierre Chretien wrote:

[...]

On native Windows, View -> Html, creates myfile.htm and LyX gives
an error message because it it looking for myfile.html.
Formatting is lost. No images are included. (htlatex does run)
This is if your lyx temp dir is in a directory without spaces.

Cygwin doesn't run htlatex. If you run htlatex manually, it
produces myfile.htm which has to be renamed to myfile.html.


?? I get myfile.html here.
I guess that htlatex called from LyX fails because it works with full pathnames,
so zzmyfile.ps is now zzC:myfile.ps. maybe there are other flaws.


Formatting is lost but it will include/display one of many .png images.

IOW, View->Html, is close to completely broken on the Windows platform.


If what I say is true (basically, the lg file cannot run), it's a htlatex
problem rather than a lyx problem. 
I use htlatex coming with proTeXt, may be it has improved since the packaging (nov. 2005) ?




One thing I tried is removing: originaldir,needaux under
Additional flags for the htlatex converter.

That fixed the problem of the html file appearing unformatted/no EOL,
and I no longer got that error message about the filename not ending
with .html (because it was created as .htm).

But still none of the .pngs are created for inclusion (the equations)
into the html output file. htlatex from the command line produces
quite a few .pngs representing the equations for the output .html.

Regards,
Stephen


Re: HTML export

2006-08-31 Thread Enrico Forestieri
TechTonics <[EMAIL PROTECTED]> writes:

> I'm surprised Html view works for you for Cygwin because I
> think (thought) it was LyX not the Cygwin or Win configuration.

The problem is that LyX calls htlatex with a full path and does not
change the current dir to the dir containing the file to be converted.
Please find below two scripts "htlatex" and "htlatex.bat". The first
one is for Cygwin and you can put it in /usr/local/bin. The second
(less refined ;-)) one is for a native LyX and should be put somewhere
in the PATH ahead of the miktex bin dir (/latextools is a good
choice). You should now have no problems with View->Html ;-)

-- 
Enrico

8< htlatex 8<
#!/bin/sh
# This is a wrapper script for LyX/Cygwin to let LyX use the native
# Windows' version of htlatex which is part of MikTeX.
#
# 2006-08-31 Enrico Forestieri
# ===

# The program to call (This should be in the PATH)
prog=htlatex.exe
dir=""
while [ $# -gt 0 ] ; do
case "$1" in
-*)   prog="$prog $1"
  ;;
*)dir=`dirname "$1"`
  file=`basename "$1"`
  prog="$prog \"$file\""
  ;;
esac
shift
done

[ -n "$dir" ] && cd "$dir"
eval "exec $prog"
8<8<8<8<


8< htlatex.bat 8<
@echo off
set drivename=%~d1
set pathname=%~p1
set basename=%~n1
%drivename%
cd %pathname%
htlatex.exe %*
8<8<8<8<



Re: HTML export

2006-08-31 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: Enrico Forestieri <[EMAIL PROTECTED]>
>>Subject: Re: HTML export
>>Date: Thu, 31 Aug 2006 12:07:00 + (UTC)
>>
>>TechTonics <[EMAIL PROTECTED]> writes:
>>
>>> I'm surprised Html view works for you for Cygwin because I
>>> think (thought) it was LyX not the Cygwin or Win configuration.
>>
>>The problem is that LyX calls htlatex with a full path and does not
>>change the current dir to the dir containing the file to be converted.

Is't for that need that originaldir flag is added in the preference template ?
This seems broken on Solaris, and possibly on Windows (check in this thread).

Thanks for the scripts anyway, but the question about extra flags remains.

-- 
Jean-Pierre




Re: HTML export

2006-08-31 Thread TechTonics

Enrico Forestieri wrote:

TechTonics <[EMAIL PROTECTED]> writes:


I'm surprised Html view works for you for Cygwin because I
think (thought) it was LyX not the Cygwin or Win configuration.


The problem is that LyX calls htlatex with a full path and does not
change the current dir to the dir containing the file to be converted.
Please find below two scripts "htlatex" and "htlatex.bat". The first
one is for Cygwin and you can put it in /usr/local/bin. The second
(less refined ;-)) one is for a native LyX and should be put somewhere
in the PATH ahead of the miktex bin dir (/latextools is a good
choice). You should now have no problems with View->Html ;-)



I did as you suggested. Both scripts work to some extent.
The big improvement is that the .png files which are needed
to display equations inside the html doc are now generated.
They are also correctly generated compared to the manual method.
But the output html file looks more "normal" than htlatex.

Those pngs are not integrated into the final html file output.
For splash.lyx->splash.html it means the small footnote at the
bottom of the splash page is a separate html file. IOW, there are
two html files created. In Windows, it is necessary to delete the
"originaldir" found in Additional Flags = originaldir,needaux

Cygwin seems to work the same, now makes the good pngs, but the
output html file is bereft of their images.

The soup is missing an ingredient,
Stephen


Re: HTML export

2006-08-31 Thread TechTonics

Jean-Pierre Chretien wrote:

To: lyx-users@lists.lyx.org
From: Enrico Forestieri <[EMAIL PROTECTED]>
Subject: Re: HTML export
Date: Thu, 31 Aug 2006 12:07:00 + (UTC)

TechTonics <[EMAIL PROTECTED]> writes:


I'm surprised Html view works for you for Cygwin because I
think (thought) it was LyX not the Cygwin or Win configuration.

The problem is that LyX calls htlatex with a full path and does not
change the current dir to the dir containing the file to be converted.


Is't for that need that originaldir flag is added in the preference template ?
This seems broken on Solaris, and possibly on Windows (check in this thread).

Thanks for the scripts anyway, but the question about extra flags remains.



This is now working better, the pngs are generated in the right 
directory, but not included in the output html file. I had to

remove originaldir from originaldir,needaux in additional flags.
Otherwise for Windows, the output file was myfile.htm
rather than the expected myfile.html
and LyX would say it couldn't find the file.
Removing originaldir, creates the looked for myfile.html. The file is 
created in either case, but with originaldir the filename is wrong.


Regards,
Stephen



Re: HTML export

2006-08-31 Thread Enrico Forestieri
Jean-Pierre Chretien <[EMAIL PROTECTED]> writes:

> Is't for that need that originaldir flag is added in the preference template ?
> This seems broken on Solaris, and possibly on Windows (check in this thread).

I checked the LyX sources and found that what I was trying to achieve
through the scripts is the same thing you obtain when you *omit* the
originaldir flag. So, simply delete the originaldir flag and send to
the bit bucket those scripts ;-)

-- 
Enrico



Re: HTML export

2006-08-31 Thread Jean-Pierre Chretien

>>Date: Thu, 31 Aug 2006 13:44:25 -0700
>>From: TechTonics <[EMAIL PROTECTED]>
>>To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>CC: lyx-users@lists.lyx.org
>>Subject: Re: HTML export
[...]
>>
>>This is now working better, the pngs are generated in the right 
>>directory, but not included in the output html file. I had to
>>remove originaldir from originaldir,needaux in additional flags.
>>Otherwise for Windows, the output file was myfile.htm
>>rather than the expected myfile.html
>>and LyX would say it couldn't find the file.
>>Removing originaldir, creates the looked for myfile.html. The file is 
>>created in either case, but with originaldir the filename is wrong.

Try to remove also needaux (I had to do it on Solaris to make View->HTML work).
Is it better ?

-- 
Jean-Pierre



Re: HTML export

2006-09-01 Thread Jean-Pierre Chretien

>>To: lyx-users@lists.lyx.org
>>From: Enrico Forestieri <[EMAIL PROTECTED]>
>>Subject: Re: HTML export
>>Date: Thu, 31 Aug 2006 23:24:09 + (UTC)
>>X-Loom-IP: 87.18.108.75 (Mozilla/5.0 (Windows; U; Windows NT 5.0; it; 
>>rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6)
>>
>>Jean-Pierre Chretien <[EMAIL PROTECTED]> writes:
>>
>>> Is't for that need that originaldir flag is added in the preference 
>>> template ?
>>> This seems broken on Solaris, and possibly on Windows (check in this 
>>> thread).
>>
>>I checked the LyX sources and found that what I was trying to achieve
>>through the scripts is the same thing you obtain when you *omit* the
>>originaldir flag. So, simply delete the originaldir flag and send to
>>the bit bucket those scripts ;-)

On Solaris (but is seems that issues ares related on Windows), I had to remove 
also
needaux, then View->HTML works as expected.

However, then Export->HTML is broken: I get myfile.html all right in the 
original dir,
but all the ancillary files (myfile.css, myfile1x.png, myfile2x.png, etc.) are 
not copied.

This is only true for HTML (whatever the export tool used, htlatex, latex2html, 
and I guess hevea).
Use of htlatex to View and Export to OpenOffice works because all the files are 
in the output file
(which is an archive in fact).

So I see two ways out:
 - either there is a way to specify the file extensions which should be copied 
for every kind of
 Export (I don't know which coding is required to do so, may be the flags can 
be used here);
 - either a request is made to Eitan Gurari for an addition output file 
containing an archive
 of the output files (extension zip or better htl ?). Same request for other 
HTML exporters, 
 unless this is already available (it's not un latex2html).
 
Are there entries in bugzilla about all this ? Should I file one ?

-- 
Jean-Pierre





Re: HTML export

2006-09-01 Thread TechTonics

Jean-Pierre Chretien wrote:

Date: Thu, 31 Aug 2006 13:44:25 -0700
From: TechTonics <[EMAIL PROTECTED]>
To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
CC: lyx-users@lists.lyx.org
Subject: Re: HTML export

[...]
This is now working better, the pngs are generated in the right 
directory, but not included in the output html file. I had to

remove originaldir from originaldir,needaux in additional flags.
Otherwise for Windows, the output file was myfile.htm
rather than the expected myfile.html
and LyX would say it couldn't find the file.
Removing originaldir, creates the looked for myfile.html. The file is 
created in either case, but with originaldir the filename is wrong.


Try to remove also needaux (I had to do it on Solaris to make View->HTML work).
Is it better ?



No, not on Windows, I had tried that, but thanks for the advice.
I haven't tried it on Cygwin yet which is closer to Solaris.
Also you probably use latex2html?

Regards,
Stephen


Re: HTML export

2006-09-01 Thread Jean-Pierre Chretien

>>Date: Fri, 1 Sep 2006 09:22:11 +0200 (MEST)
>>From: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>Subject: Re: HTML export
>>To: lyx-users@lists.lyx.org
[...]
>> 
>>Are there entries in bugzilla about all this ? Should I file one ?

I checked, this has been discussed long ago (bug 643)
http://bugzilla.lyx.org/show_bug.cgi?id=643
I wonder if the extra flag come from this discussion, as use of
originaldir make View behave like Export here (but it copies also
the htlatex temporary files, this is not appropriate).

-- 
Jean-Pierre



Re: HTML export

2006-09-01 Thread Enrico Forestieri
Jean-Pierre Chretien <[EMAIL PROTECTED]> writes:

> >>I checked the LyX sources and found that what I was trying to achieve
> >>through the scripts is the same thing you obtain when you *omit* the
> >>originaldir flag. So, simply delete the originaldir flag and send to
> >>the bit bucket those scripts 
> 
> On Solaris (but is seems that issues ares related on Windows), I had to remove
> also
> needaux, then View->HTML works as expected.

This is strange as needaux simply tells LyX to run latex before launching
the converter. ATM I don't have handy my solaris box to check it.

> However, then Export->HTML is broken: I get myfile.html all right in the
> original dir,
> but all the ancillary files (myfile.css, myfile1x.png, myfile2x.png, etc.) are
> not copied.

Yes, Export->HTML is severely broken. At least with htlatex, it doesn't work
even using the originaldir flag, as some filenames are constructed by prefixing
"zz" to them, and this is not going to work with absolute paths.
What a mess!

-- 
Enrico



Re: HTML export

2006-09-01 Thread Jean-Pierre Chretien

>>> On Solaris (but is seems that issues ares related on Windows), I had to 
>>> remove
>>> also
>>> needaux, then View->HTML works as expected.
>>
>>This is strange as needaux simply tells LyX to run latex before launching
>>the converter. ATM I don't have handy my solaris box to check it.

In addition, it is not needed: from what I see in the calling shell, the 
necessary runs
are made (and AFAIR, by htlatex, not by LyX - in fact, htlatex runs 4 times, 
regardless
of the status os the aux/bbl files, because it adds its own sty file to the 
original tex file).
This is different with latex2html: the wrapper I use for tex files makes the 
necessary
runs before calling l2h.

>>
>>> However, then Export->HTML is broken: I get myfile.html all right in the
>>> original dir,
>>> but all the ancillary files (myfile.css, myfile1x.png, myfile2x.png, etc.) 
>>> are
>>> not copied.
>>
>>Yes, Export->HTML is severely broken. At least with htlatex, it doesn't work
>>even using the originaldir flag, as some filenames are constructed by 
>>prefixing
>>"zz" to them, and this is not going to work with absolute paths.

What do you think ? Does this deserve en fresh bugzilla entry, or a 
reactivation of bug 643 ?

-- 
Jean-Pierre





Re: HTML export

2006-09-01 Thread Enrico Forestieri
Jean-Pierre Chretien <[EMAIL PROTECTED]> writes:

> >>Yes, Export->HTML is severely broken. At least with htlatex, it doesn't work
> >>even using the originaldir flag, as some filenames are constructed by
> >>prefixing
> >>"zz" to them, and this is not going to work with absolute paths.
> 
> What do you think ? Does this deserve en fresh bugzilla entry, or a
> reactivation of bug 643 ?

Honestly I am not sure that this is not a htlatex bug rather than
a LyX fault. Anyway bug 643 is still active.

-- 
Enrico



Re: HTML Export

2007-06-28 Thread Martin A. Hansen

you need some package installed,

i cant remember which on top of my head, but it is in the docs.


martin

On 6/29/07, Nick Kuzmik <[EMAIL PROTECTED]> wrote:


I just did a yum update and I can't seem to find the Export to HTML
option.
Did that get removed or am I just having a case of the stupids?

--
Nick Kuzmik
AIM   nkuzmik
845-406-5115



Re: HTML Export

2007-06-28 Thread John O'Gorman
On Fri, 2007-06-29 at 11:43 +1000, Martin A. Hansen wrote:
> you need some package installed,
> 
> i cant remember which on top of my head, but it is in the docs.
Latex2HTML

John O'Gorman
> 
> 
> martin
> 
> On 6/29/07, Nick Kuzmik <[EMAIL PROTECTED]> wrote:
> >
> > I just did a yum update and I can't seem to find the Export to HTML
> > option.
> > Did that get removed or am I just having a case of the stupids?
> >
> > --
> > Nick Kuzmik
> > AIM   nkuzmik
> > 845-406-5115
> >



Re: HTML Export

2007-07-01 Thread José Matos
On Friday 29 June 2007 03:44:20 John O'Gorman wrote:
> > i cant remember which on top of my head, but it is in the docs.
>
> Latex2HTML

  You can install that for Fedora (another option is hevea):
$ yum search latex2html hevea

hevea.i386   1.08-6.fc6 fedora
Matched from:
hevea
HEVEA is a quite complete and fast LATEX to HTML translator.
HEVEA renders symbols by using the so-called HTML "entites", which
modern browsers display correctly most of the time.
http://hevea.inria.fr/


latex2html.noarch2002.2.1-6 fedora
Matched from:
latex2html
LATEX2HTML is a convertor written in Perl that converts LATEX
documents to HTML. This way e.g. scientific papers - primarily typeset
for printing - can be put on the Web for online viewing.

LATEX2HTML does also a good job in rapid web site deployment. These
pages are generated from a single LATEX source.
http://www.latex2html.org/

> John O'Gorman

-- 
José Abílio


Re: HTML export

1999-01-17 Thread Jean-Marc Lasgouttes

> "Claudio" == Claudio Geraldo Schoen <[EMAIL PROTECTED]> writes:

Claudio> Then I upgraded lyx to v. 1.1.2 in my Red Hat 6.0/i686
Claudio> installation and the feature didn't work (lyx returned the
Claudio> message that the file was successfully created, but there was
Claudio> no file at all in my hard disk).

[...]
Claudio> Do someone has a clue of what I'm doing wrong?

Nothing. I did a mistake when defining the default command for tth.
Please use the following in your .lyx/lyxrc file:
\html_command "tth -t < '$$FName' > '$$OutName'"

Hope this helps,
JMarc



Re: HTML export from LyX

2011-05-16 Thread Richard Heck
On 05/16/2011 06:35 AM, Pascal Francq wrote:
> Hi,
> How can I, from the command line, export a given LyX document into a HTML 
> document in another directory (in LyX, the document is always exported in the 
> same directory).
>
There's no support presently in LyX for naming the export directory,
either for XHTML or for any other format. There is a bug about this already.

Richard



Re: HTML export from LyX

2011-05-16 Thread Guenter Milde
On 2011-05-16, Richard Heck wrote:
> On 05/16/2011 06:35 AM, Pascal Francq wrote:
>> How can I, from the command line, export a given LyX document into
>> a HTML document in another directory (in LyX, the document is always
>> exported in the same directory).

> There's no support presently in LyX for naming the export directory,
> either for XHTML or for any other format. There is a bug about this
> already.

For the time being, you can use the external elyxer (works even
without a LyX installation):

#> elyxer --help

  * Usage: elyxer.py [options] [filein] [fileout]
  * Convert LyX input file "filein" to HTML file "fileout".
  * If filein (or fileout) is not given use standard input (or output).
  * Main program of the eLyXer package (http://elyxer.nongnu.org/).

...


Günter



Re: HTML export from LyX

2011-05-17 Thread Pascal Francq
Thanks, it works. 

On lundi 16 mai 2011, Guenter Milde wrote:
> On 2011-05-16, Richard Heck wrote:
> > On 05/16/2011 06:35 AM, Pascal Francq wrote:
> >> How can I, from the command line, export a given LyX document into
> >> a HTML document in another directory (in LyX, the document is always
> >> exported in the same directory).
> > 
> > There's no support presently in LyX for naming the export directory,
> > either for XHTML or for any other format. There is a bug about this
> > already.
> 
> For the time being, you can use the external elyxer (works even
> without a LyX installation):
> 
> #> elyxer --help
> 
>   * Usage: elyxer.py [options] [filein] [fileout]
>   * Convert LyX input file "filein" to HTML file "fileout".
>   * If filein (or fileout) is not given use standard input (or output).
>   * Main program of the eLyXer package (http://elyxer.nongnu.org/).
> 
> ...
> 
> 
> Günter


-- 

Dr. Ir. Pascal Francq
BELGIUM


signature.asc
Description: This is a digitally signed message part.


Re: HTML export: some small problems...

2011-09-15 Thread Alex Fernandez
Hi Murat,

On Thu, Sep 15, 2011 at 5:21 PM, Murat Yildizoglu  wrote:
> I am trying the HTML export possibilities of LyX. I have the last
> version of Elyxer installed on my Mac (OSX 10.6 French) and I use Lyx
> 2.0.1.
>
> I am preparing a page where I would like to set the text colour and
> use an horizontal rule in some places.
>
> I used the Document Properties/Coulours tab to fix the implicit colour
> of text in my document, but when the file is exported to HTML by
> Elyxer, the texte is black (the same is also true for LyxHTML export).

Colors work but only when inserted in the page. I have never set
default colors...

> I have inserted an horizontal rule in the page, but I get in the HTML
> the Lyx code instead of the rule:
>
> "\begin_inset CommandInset lineLatexCommand ruleoffset "0.5ex"width
> "100col%"height "1pt"\end_inset "

To the best of my knowledge horizontal rules work, but apparently not always.

> Am I doing something stupid, or am I demanding too much from Elyxer?

Nothing that cannot be fixed easily :)  Could you provide me privately
with a small sample document which shows both issues?

> I Have used Latex2HTML under Linux some years ago and this kind of
> cosmetics was a piece of cake for it... I have never used it under OSX
> and I like the HTML generated by Elyxer otherwise.

Thanks!

> I know that I can correct these problems by hand or by CSS editing,
> but would like to know if I can handle them directly in Lyx, instead
> of having to da another step of conversion (especially because I am
> using Lyx to quickly setup a web page from existing material in Latex
> and Lyx. Yes, I am very late on this task, and trying to catch the gap
> :-)  ).

Sure, that way everyone benefits.

Alex.


Re: HTML export: some small problems...

2011-09-15 Thread Richard Heck
On 09/15/2011 11:21 AM, Murat Yildizoglu wrote:
> Hi,
>
> I am trying the HTML export possibilities of LyX. I have the last
> version of Elyxer installed on my Mac (OSX 10.6 French) and I use Lyx
> 2.0.1.
>
> I am preparing a page where I would like to set the text colour and
> use an horizontal rule in some places.
>
> I used the Document Properties/Coulours tab to fix the implicit colour
> of text in my document, but when the file is exported to HTML by
> Elyxer, the texte is black (the same is also true for LyxHTML export).
>
Could you please file a bug about this? If you could attach a simple
test file, that would be even better. It shouldn't be difficult to get
this working. I just haven't done it yet.

Richard



Re: HTML export with tth (unknown command)

2001-06-12 Thread Herbert Voss

Mirko Zeibig wrote:
> 
> I try to convert a german letter with tth to html, but tth does know nothing
> about the lyx-specific "tags". I tried latex2html before with similar results.

what are lyx-specific tags?
the only one is the definition for \LyX and this is also
pure latex. Because lyx exports to tex and than run tth
or l2h on this export.

Herbert

-- 
http://www.educat.hu-berlin.de/~voss/lyx/





Re: HTML export with tth (unknown command)

2001-06-16 Thread Mirko Zeibig

On Wed, Jun 13, 2001 at 07:43:14AM +0200, Herbert Voss wrote:
> Mirko Zeibig wrote:
> > 
> > I try to convert a german letter with tth to html, but tth does know nothing
> > about the lyx-specific "tags". I tried latex2html before with similar results.
> 
> what are lyx-specific tags?
> the only one is the definition for \LyX and this is also
> pure latex. Because lyx exports to tex and than run tth
> or l2h on this export.

Well, as you may see in my first posting, tth does know nothing about
usepackage and it does not use the documentclass-files at all, so in the end
I only have the textbody of my letter in the resulting html-file.

All other "fields" like Datum, MeinZeichen etc. are not included. Maybe I am
just missing a environment variable for (La)TeX?

Best Regards
Mirko
-- 
[EMAIL PROTECTED]
http://sites.inka.de/picard/



Re: HTML export with tth (unknown command)

2001-06-16 Thread Herbert Voss

Mirko Zeibig wrote:
> 
> Well, as you may see in my first posting, tth does know nothing about
> usepackage and it does not use the documentclass-files at all, so in the end
> I only have the textbody of my letter in the resulting html-file.
> 
> All other "fields" like Datum, MeinZeichen etc. are not included. Maybe I am
> just missing a environment variable for (La)TeX?

i never heard, that tth or late2html translated a letter.class.
maybe, that there are some examples in the net.

Herbert

-- 
http://www.educat.hu-berlin.de/~voss/lyx/



Re: HTML export, hyperlink doesn't work in LYX 1.4.3

2006-10-10 Thread Pavel Sanda
> I have compiled LYX 1.4.3 on a redhat Linux machine from source, and have
> deleted my previous $home/.lyx directory so it should be like a fresh
> installation. The problem is I found that when having inserted some URLs by
> Insert->URL..., then View->HTML or export to HTML, the URL never got an
> underline, nor is it clickable.
> 
> And I found checking the box "Generate hyperlink" when inserting URL has no
> effect on the result. No matter I did it or not, the output Latex file
> doesn't change, it always produces a \url{my inserted url string}.
> 
> I found an ugly fix that first write \usepackage{html} in document preamble,
> and then insert a Latex code box(ERT), writing in it \htmlurl{my url}{desc.
> for the link} will produce a clickable hyperlink. However it's so ugly and
> it looks like that it should be the intended behavior Insert->URL... should
> produce.
> 
> Is this a common problem, so a bug in 1.4.3? Or is my setting wrong?

hi,

i dont know how is it with 1.4.3, but in 1.3.x it was a common problem.

does the following helped ?:
http://atrey.karlin.mff.cuni.cz/~sanda/lyx2html/

there are also another ways; try to check wiki and mail archives.

pavel