[l2h] Custom environments

Prakash Countcham Prakash.Countcham at imag.fr
Mon Jun 7 17:52:13 CEST 2004


   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.

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 
environments to latex2html (I tried to read the code, but a clear 
documentation would be better)?



More information about the latex2html mailing list