# GERMAN.PERL by Nikos Drakos 25-11-93 # Computer Based Learning Unit, University of Leeds. # # Extension to LaTeX2HTML to translate LaTeX german special # commands to equivalent HTML commands. # Based on a patch to LaTeX2HTML supplied by Franz Vojik # . # # The original german.sty file was put together by H.Partl # (TU Wien) 4 Nov 1988 # # Change Log: # =========== # # 11-JAN-94 Nikos Drakos: Modified the german specials array to # deal with "` correctly # 25-JAN-94 Nikos Drakos: Replaced all the html special characters # with their ;tex2html_html_special_mark_ form package german; # Put german equivalents here for headings/dates/ etc when # latex2html start supporting them ... sub main'german_translation { local($_) = @_; local($next_char_rx) = &make_next_char_rx("[aAeEiIoOuU]"); s/$next_char_rx/&main'iso_map(($2||$3),"uml")/geo; $next_char_rx = &make_next_char_rx("[sSzZ]"); s/$next_char_rx/&main'iso_map("sz","lig")/geo; s/;tex2html_html_special_mark_quot;\s*([cflmnpt])/\1/go; s/;tex2html_html_special_mark_quot;\s*(;tex2html_html_special_mark_lt;|;tex2html_html_special_mark_gt;|'|`|\\|-|;tex2html_html_special_mark_quot;|~)/&get_german_specials($1)/geo; s/;tex2html_html_special_mark_quot;/''/go; $_; } sub make_next_char_rx { local($chars) = @_; local($OP,$CP) = &main'brackets; ";tex2html_html_special_mark_quot;\\s*(($chars)|$OP\\d+$CP\\s*($chars)\\s*$OP\\d+$CP)"; } sub get_german_specials { $german_specials{@_[0]} } %german_specials = ( ';tex2html_html_special_mark_lt;', ';tex2html_html_special_mark_lt;;tex2html_html_special_mark_lt;', ';tex2html_html_special_mark_gt;', '>>', '\'', "``", "\`", ",,", '\\', "", '-', "", ';tex2html_html_special_mark_quot;', "", '~', "", '=', "" ); package main; sub do_cmd_flqq { join('', ';tex2html_html_special_mark_lt;;tex2html_html_special_mark_lt;', @_[0]);}; sub do_cmd_frqq { join('', '>>', @_[0]);}; sub do_cmd_flq { join('', ';tex2html_html_special_mark_lt;', @_[0]);}; sub do_cmd_frq { join('', '>', @_[0]);}; sub do_cmd_glqq { join('', ",,", @_[0]);}; sub do_cmd_grqq { join('', "``", @_[0]);}; sub do_cmd_glq { join('', ",", @_[0]);}; sub do_cmd_grq { join('', "`", @_[0]);}; sub do_cmd_dq { join('', "''", @_[0]);}; sub do_cmd_germanTeX { # Just in case we pass things to LaTeX $default_language = 'german'; $latex_body .= "\\germanTeX\n"; @_[0]; } sub do_cmd_originalTeX { # Just in case we pass things to LaTeX $default_language = 'original'; $latex_body .= "\\originalTeX\n"; @_[0]; } $default_language = 'german'; 1; # Not really necessary...