[l2h] Custom environments

Prakash Countcham Prakash.Countcham at imag.fr
Mon Jun 14 22:20:55 CEST 2004


   I have already sent this mail one week ago, but I retry as I didn't 
find it in the archive. Sorry for duplicates.
   I try to use latex2html to convert a document with custom environments.
For example, here is a customized \input:


First, I tried to let tex handle this command with:

&process_commands_in_tex (<<_RAW_ARG_CMDS_);
relinput # {} # {}

But the file in question is said not to be found even if it exists (I 
don't know exactly why -- I guess it's because the generated files are in 
a different directory).

Then, I tried to adapt the subroutine do_cmd_input in the following way,
but I have got the same problem.

$relinput_rep = ".";

sub do_cmd_relinput {
     local($_) = @_;
     (s/\s*(.*)\s*\n/$rep =$1;''/s) unless (
     (s/\s*(.*)\s*\n/$file =$1;''/s) unless (
     local($after) = $_;
     $oldrep = $relinput_rep;
     $relinput_rep = "$relinput_rep$dd$rep";
     $file = &revert_to_raw_tex("\\input{$relinput_rep$dd$file}\n") if $file;
     if ($PREAMBLE) { &add_to_preamble('include',$file)}
     elsif (!($file=~/^\s*$/)) {
	$output = &process_undefined_environment('center'
		, ++$global{'max_id'},"\\vbox{$file}");
     $relinput_rep = $oldrep;

Any idea?

I've also got other questions: Can I add a custom directory with my own
perl subroutines? Where can I find a documentation on how to add personal
subroutines to latex2html (I tried to read the code, but a clear
documentation would be better)?

Thanks for your help,


More information about the latex2html mailing list