Re: [l2h] different versions of the tex-file
On Sun, Nov 23, 2003 at 04:47:53PM +1100, Ross Moore wrote: Your code below simply says to include/exclude the environments. It doesn't say how to translate their contents; that's why you get the images. You still need a \newenvironment definition, even if it doesn't do much; e.g. \begin{htmlonly} \newenvironment{versionpub}{}{} \newenvironment{versionpriv}{}{} \end{htmlonly} thanks: with that added, everything worked. Hmm; it seems that LaTeX doesn't need a separate definition for the yes, that's my excuse for not realizing that LaTeX2HTML does :-). environment. It wasn't implemented that way for LaTeX2HTML. I think that it is better to retain delimiters for such environments, to that extra HTML markup can be added, if desired. fair enough. -- Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3 http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery You're standing on the shoulders of giants and SHITTING on them. -- Mr. Bad ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html
Re: [l2h] different versions of the tex-file
On Fri, Nov 21, 2003 at 08:39:07PM +0100, [EMAIL PROTECTED] wrote: I have the problem, that I want to write a large document ( 300 pages) with pdflatex for different groups of users, say teachers, students, rest of the world With the package comment no problem in pdflatex \begin{teacher} \end{teacher} \begin{student} \end{student} But I need html-output too !! The problem now is that latex2html doesn't work together with the package comment. When parsing the source, l2h produces for this environments an image file, that has nothing to do with the original source. Has anybody had this problem too ? Can't believe that I'am the first one :-) How can this problem be solved or workarounded ? this sounded familiar, and i found that i've been using an ugly workaround for this problem. it's a filter to pre-process a LaTeX file (i.e. it's to be applied to a .tex before latex2html): attached. for a proper solution: latex2html can process \begin{htmlonly} and \begin{latexonly} sections correctly, so i guess it could easily be extended to handle comments in general. -- Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3 http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery If I knew then what I know now, I would have said 'I don't recall'. #! /usr/bin/perl -w use strict; my $tex=join ,; my %opt; $opt{$2}=$1 eq in while $tex =~ /\\(in|ex)cludecomment{\s*([^{}\s]+)\s*}/g; $tex =~ s/\\begin{\s*\Q$_\E\s*}(.*?)\\end{\s*\Q$_\E\s*}/$opt{$_} ? $1 : /egs foreach keys %opt; print $tex; ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html
Re: [l2h] different versions of the tex-file
Hello Phil, On Sat, 22 Nov 2003, Phil Lanch wrote: On Fri, Nov 21, 2003 at 08:39:07PM +0100, [EMAIL PROTECTED] wrote: I have the problem, that I want to write a large document ( 300 pages) with pdflatex for different groups of users, say teachers, students, rest of the world With the package comment no problem in pdflatex \begin{teacher} \end{teacher} \begin{student} \end{student} But I need html-output too !! The problem now is that latex2html doesn't work together with the package comment. When parsing the source, l2h produces for this It is supposed to support the comment.sty environment, with its \includecomment and \excludecomment commands. If it isn't working for you, would you please provide a minimal example which shows the failure. environments an image file, that has nothing to do with the original source. Remember that LaTeX2HTML does *not* read files ending .sty or .cls, so perhaps the problem is simply that you haven't told LaTeX2HTML in the preamble of your document that these are special environments needing conditional treatment. Has anybody had this problem too ? Can't believe that I'am the first one :-) How can this problem be solved or workarounded ? Support for comment.sty has been part of LaTeX2HTML since 1995 ... this sounded familiar, and i found that i've been using an ugly workaround for this problem. it's a filter to pre-process a LaTeX file (i.e. it's to be applied to a .tex before latex2html): attached. for a proper solution: latex2html can process \begin{htmlonly} and \begin{latexonly} sections correctly, so i guess it could easily be extended to handle comments in general. ... these are implemented in html.sty precisely via the commands from comment.sty . However, the non-local nature of the processing in LaTeX2HTML means that separate methods are needed in Perl to implement them properly. Thus you may need to be a bit more careful with how the preamble is setup. As above, send a minimal example of your coding that is causing difficulties. Hope this helps, Ross Moore -- Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3 http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery If I knew then what I know now, I would have said 'I don't recall'. ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html
Re: [l2h] different versions of the tex-file
On Sun, Nov 23, 2003 at 10:08:58AM +1100, Ross Moore wrote: On Sat, 22 Nov 2003, Phil Lanch wrote: On Fri, Nov 21, 2003 at 08:39:07PM +0100, [EMAIL PROTECTED] wrote: The problem now is that latex2html doesn't work together with the package comment. When parsing the source, l2h produces for this It is supposed to support the comment.sty environment, with its \includecomment and \excludecomment commands. If it isn't working for you, would you please provide a minimal example which shows the failure. environments an image file, that has nothing to do with the original source. Hope this helps, yes: for a start, it encouraged me to try altering my LaTeX in case that would help. it seems to cause problems if i place commands such as \excludecomment{versiona} or \begin{versiona} in the middle (or end) of a line, so i've now put each at the start of a new line. now the only thing that doesn't work the way i'd like is that each (included) comment environment is turned into an image: they're perfectly good images, but images weren't necessary, simple HTML could have done the job. is this what you expect latex2html to do? is it difficult to stop it doing it? a minimal example: = start = \documentclass[a4paper]{article} \usepackage{html} \includecomment{versionpriv} \excludecomment{versionpub} %\includecomment{versionpub} %\excludecomment{versionpriv} \begin{document} \begin{versionpriv}Secret info \end{versionpriv} \begin{versionpub}[Omitted from online version] \end{versionpub} \end{document} == end == to the original poster: if you're seeing different problems, please go ahead and post your own example. -- Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3 http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery scattered islands of independent-minded reporting are lost in oceans of the stenographic reliance on official sources -- Norman Solomon ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html
Re: [l2h] different versions of the tex-file
Hi Phil, On Sun, 23 Nov 2003, Phil Lanch wrote: yes: for a start, it encouraged me to try altering my LaTeX in case that would help. it seems to cause problems if i place commands such as \excludecomment{versiona} or \begin{versiona} in the middle (or end) of a line, so i've now put each at the start of a new line. now the only Yes, for include/exclude environments to work properly, you need to use new lines for the \begin{...} and \end{...} markup. thing that doesn't work the way i'd like is that each (included) comment environment is turned into an image: they're perfectly good images, but images weren't necessary, simple HTML could have done the job. is this what you expect latex2html to do? is it difficult to stop it doing it? Your code below simply says to include/exclude the environments. It doesn't say how to translate their contents; that's why you get the images. You still need a \newenvironment definition, even if it doesn't do much; e.g. \begin{htmlonly} \newenvironment{versionpub}{\begin{flushleft}}{\end{flushleft}} \newenvironment{versionpriv}{\begin{flushleft}}{\end{flushleft}} \end{htmlonly} or \begin{htmlonly} \newenvironment{versionpub}{}{} \newenvironment{versionpriv}{}{} \end{htmlonly} The \begin{htmlonly}...\end{htmlonly} restricts this definition to processing by LaTeX2HTML, in case there is already a sensible definition for LaTeX. a minimal example: = start = \documentclass[a4paper]{article} \usepackage{html} \includecomment{versionpriv} \excludecomment{versionpub} %\includecomment{versionpub} %\excludecomment{versionpriv} \begin{document} \begin{versionpriv}Secret info \end{versionpriv} \begin{versionpub}[Omitted from online version] \end{versionpub} \end{document} == end == to the original poster: if you're seeing different problems, please go ahead and post your own example. Hmm; it seems that LaTeX doesn't need a separate definition for the environment. It wasn't implemented that way for LaTeX2HTML. I think that it is better to retain delimiters for such environments, to that extra HTML markup can be added, if desired. Hope this helps, Ross -- Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3 http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery scattered islands of independent-minded reporting are lost in oceans of the stenographic reliance on official sources -- Norman Solomon ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html ___ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html