Re: exporting to html
Ares wrote: Hello everyone, I'm trying to export my lyx file to html (on Win) but LyX gets stuck on it... is it a known bug? CU Diego I think so. Use LyX to export your file to yourfile.tex Then run from the command line, "htlatex yourfile.tex" This does a good job but you still have to proofread. A manual exists that describes tweaking options. Regards, Steogeb
Re: exporting to HTML in several pages
Hello, In Preferences->Output->Converter->Latex2html, replace the latex2html -split 0 ... by latex2html split 1 (or 2 or 3, it depends on the depth of your document) Your sincerely, Yann COLLETTE Adinda Praditya wrote: Dear list,... i'm writing a book using book class. How can i export it into several HTML pages? I got a long HTML file. Can i seperate it according to its chapter and TOC? Thanks DIda
Re: exporting to html with lyx
>>Date: Fri, 21 Jul 2000 15:49:08 -0600 >>From: Josh Rigler <[EMAIL PROTECTED]> >>CC: [EMAIL PROTECTED] >>Subject: Re: exporting to html with lyx >> >>"Lars Gullik Bjønnes" wrote: >>> >>> Josh Rigler <[EMAIL PROTECTED]> writes: [discussion about the translation of \url{foo} by latex2HTML] If you want a clean translations of URLS by latex2HTML, you should use the specific html.sty commands like \htmladdnormallink{foo}{bar} which allows to give a different name to the anchor and to the url. As the URL inset offers the two fields, it is easy to write a small perl script to filter the lyx file in view of the html translation. Perhaps the type HTML button (which does not make any difference in tha layout as far I checked) could be used to autmatically insert the required \usepackage{html} u=in the preamble and to replace the \url command by \htmladdnormalllink ? A last improvement would be to insert a second button to use \htmladdnormallinkfoot which puts the URL as a footnote referred to by the anchor, which is a good layout when there are few URLs in a page. It may seem boring to insert such latex2html specific syntax in LyX, so a postfiltering solution may be better, but something is needed anyway. -- Jean-Pierre
Re: exporting to html with lyx
"Lars Gullik Bjønnes" wrote: > > Josh Rigler <[EMAIL PROTECTED]> writes: > > | Not to question your expertise, or the quality of LyX (I love it) but I > | disagree. LaTeX2html (using LaTeX) parses the code perfectly. > > latex2html has a problem with using latex packages that it don't know > of (it should try to use kpathsea like latex does), and seems to not > understand the \IfFileExists command. > > | The > | problem is that LyX is inserting a line to redefine the tag "\url" so > | that it is just plain text, rather than a link that url.sty would rather > | default to. > > Try if the url.sty file cannot be found. > > | I will admit I am far from being a LaTeX expert, but I'm > | pretty sure I'm correct in my interpretation of the LaTeX commands as > | they are implemented here. Tell me if I'm wrong though, after reading > | my pseudo code interpretation... > | > | if (url.sty exists) then use the package url > | rename tag(\url) to tag(\textt) > > no. > > if url.sty exists then use the url package > _else_ rename \url to \textt > > | where I assume "\texttt" is some sort of verbatim-like tag, like > | in html. > Ahhh, it's all clear now. Thanks for the information and clarification. -EJR
Re: exporting to html with lyx
Josh Rigler <[EMAIL PROTECTED]> writes: | Not to question your expertise, or the quality of LyX (I love it) but I | disagree. LaTeX2html (using LaTeX) parses the code perfectly. latex2html has a problem with using latex packages that it don't know of (it should try to use kpathsea like latex does), and seems to not understand the \IfFileExists command. | The | problem is that LyX is inserting a line to redefine the tag "\url" so | that it is just plain text, rather than a link that url.sty would rather | default to. Try if the url.sty file cannot be found. | I will admit I am far from being a LaTeX expert, but I'm | pretty sure I'm correct in my interpretation of the LaTeX commands as | they are implemented here. Tell me if I'm wrong though, after reading | my pseudo code interpretation... | | if (url.sty exists) then use the package url | rename tag(\url) to tag(\textt) no. if url.sty exists then use the url package _else_ rename \url to \textt | where I assume "\texttt" is some sort of verbatim-like tag, like | in html. yes. We use this as a fallback options when url.sty cannot be found. Lgb
Re: exporting to html with lyx
"Lars Gullik Bjønnes" wrote: > > Note also that this whole problem is not due to a bug in LyX, but to a > bug in latex2html, so it really teh latex2html guys that you should > complain to. > > Lgb Not to question your expertise, or the quality of LyX (I love it) but I disagree. LaTeX2html (using LaTeX) parses the code perfectly. The problem is that LyX is inserting a line to redefine the tag "\url" so that it is just plain text, rather than a link that url.sty would rather default to. I will admit I am far from being a LaTeX expert, but I'm pretty sure I'm correct in my interpretation of the LaTeX commands as they are implemented here. Tell me if I'm wrong though, after reading my pseudo code interpretation... if (url.sty exists) then use the package url rename tag(\url) to tag(\texttt) where I assume "\texttt" is some sort of verbatim-like tag, like in html. -EJR
Re: exporting to html with lyx
Josh Rigler <[EMAIL PROTECTED]> writes: I want you to replace this: | > | \IfFileExists{url.sty}{\usepackage{url}} | > | {\newcommand{\url}{\texttt}} with this: | > \IfFileExists{url.sty}{% | > \usepackage{url}% | > }{% | > \newcommand{url}{\texttt}% | > } | > | > and see if that makes a difference for latex2html? | | Umm, I'm not sure if the original message got mangled. If I understand | what you're suggesting, I did try commenting out the line | | "{\newcommand{\url}{\texttt}}" no, not what I meant. | and latex2html did exactly what I wanted...which was to create the html | file(s), AND create links where I wanted them explicitly. Note also that this whole problem is not due to a bug in LyX, but to a bug in latex2html, so it really teh latex2html guys that you should complain to. Lgb
Re: exporting to html with lyx
"Lars Gullik Bjønnes" wrote: > > Josh Rigler <[EMAIL PROTECTED]> writes: > > | This has been asked many times, yet I have yet to read a reasonable > | answer. Why does LyX insist on redefining the \url tag to a plain text > | tag? This kind of defeats the purpose of exporting to html, NO? This > | is too obvious a flaw to be a bug, it must be intentional, but for the > | life of me, I can't understand why. > | > | The offending lines in the exported latex file are... > | > | > | \IfFileExists{url.sty}{\usepackage{url}} > | {\newcommand{\url}{\texttt}} > > Which is perfectly fine for latex, ... but for a tool that is not able > to parse latex (like latex2html) this is a problem... > > So how should we solve this? > If we _require_ url.sty to be present we can just use > \usepackage{url}, but if we don't require it...hmm > > can you try this: > > \IfFileExists{url.sty}{% > \usepackage{url}% > }{% > \newcommand{url}{\texttt}% > } > > and see if that makes a difference for latex2html? Umm, I'm not sure if the original message got mangled. If I understand what you're suggesting, I did try commenting out the line "{\newcommand{\url}{\texttt}}" and latex2html did exactly what I wanted...which was to create the html file(s), AND create links where I wanted them explicitly. Also, is tth capable of converting images? I imagine not, but I am uncertain. Anyway, thanks for the prompt reply, and I'll look forward to a future "fix". -EJR > | For now, I can modify these things by hand, but that is not really an > | acceptable alternative. Is there at least some config option in lyx > | that will prevent it from doing this? > > No, and to have that would be a "hackish" solution, but I think we > eventually will be able to create a fix for this problem. > > Lgb --
Re: exporting to html with lyx
Josh Rigler <[EMAIL PROTECTED]> writes: | This has been asked many times, yet I have yet to read a reasonable | answer. Why does LyX insist on redefining the \url tag to a plain text | tag? This kind of defeats the purpose of exporting to html, NO? This | is too obvious a flaw to be a bug, it must be intentional, but for the | life of me, I can't understand why. | | The offending lines in the exported latex file are... | | | \IfFileExists{url.sty}{\usepackage{url}} | {\newcommand{\url}{\texttt}} Which is perfectly fine for latex, ... but for a tool that is not able to parse latex (like latex2html) this is a problem... So how should we solve this? If we _require_ url.sty to be present we can just use \usepackage{url}, but if we don't require it...hmm can you try this: \IfFileExists{url.sty}{% \usepackage{url}% }{% \newcommand{url}{\texttt}% } and see if that makes a difference for latex2html? | For now, I can modify these things by hand, but that is not really an | acceptable alternative. Is there at least some config option in lyx | that will prevent it from doing this? No, and to have that would be a "hackish" solution, but I think we eventually will be able to create a fix for this problem. Lgb