"Fossies" - the Fresh Open Source Software Archive

Member "latex2html-2021.2/styles/polski.perl" (1 Jul 2021, 5061 Bytes) of package /linux/www/latex2html-2021.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "polski.perl": 2021_vs_2021.2.

    1 # $Id: polski.perl,v 1.1 1999/07/12 13:12:32 RRM Exp $
    2 #
    3 # polski.perl for support of polski.sty, similar to polish babel
    4 # by Ross Moore <ross@mpce.mq.edu.au>
    5 
    6 
    7 package polski;
    8 
    9 sub main'polski_translation { @_[0] }
   10 
   11 sub get_polski_specials {
   12     local($char) = @_;
   13     if($char=~/[ae]/i) {&main'iso_map($char,'ogon')}
   14     elsif($char=~/[lL]/) {&main'iso_map($char,'strok')}
   15     elsif($char=~/x/) {&main'iso_map('z','dot')}
   16     elsif($char=~/X/) {&main'iso_map('Z','dot')}
   17     elsif($char=~/[cnosz]/i) {&main'iso_map($char,'acute')}
   18     else{$polski_specials{$char}}
   19 }
   20 
   21 %polski_specials = (
   22     '\''       => "``",
   23     "\`"       => ",,",
   24     ';SPMlt;'  => "&laquo;",
   25     ';SPMgt;'  => "&raquo;",
   26     '\\'       => "",
   27     '-'        => "-",
   28     '/'        => "",
   29     '='        => "-",
   30     '|'        => ""
   31 );
   32 
   33 
   34 package main;
   35 
   36 if (defined &addto_languages) { &addto_languages('polski') };
   37 
   38 sub polski_titles {
   39 #    $toc_title = "Spis rzeczy";
   40     $toc_title = "Spis tre\\'sci";
   41     $lof_title = "Spis rysunk\\'ow";
   42 #    $lot_title = "Spis tablic";
   43     $lot_title = "Spis tabel";
   44 #    $idx_title = "Indeks";
   45     $idx_title = "Skorowidz";
   46     $ref_title = "Bibliografia";
   47 #    $bib_title = "Literatura";
   48     $bib_title = "Spis Literatury";
   49     $abs_title = "Streszczenie";
   50     $app_title = "Dodatek";
   51     $pre_title = "Przedmowa";
   52 ##    $foot_title = "";
   53 ##    $thm_title = "";
   54     $fig_name = "Rysunek";
   55 #    $tab_name = "Tablica";
   56     $tab_name = "Tabela";
   57 ##    $prf_name = "";
   58     $page_name = "Strona";
   59   #  Sectioning-level titles
   60     $part_name = "Cz&eogon;&sacute;&cacute;";
   61     $chapter_name = "Rozdzia&lstrok;";
   62 #    $section_name = "";
   63 #    $subsection_name = "";
   64 #    $subsubsection_name = "";
   65 #    $paragraph_name = "";
   66   #  Misc. strings
   67 ##    $child_name = "";
   68 ##    $info_title = "";
   69     $also_name = "Por\\'ownaj tak&zdot;e";
   70     $see_name = "Por\\'ownaj";
   71   #  names in navigation panels
   72 ##    $next_name = "";
   73 ##    $up_name = "";
   74 ##    $prev_name = "";
   75 ##    $group_name = "";
   76   #  mail fields
   77     $encl_name = "Za&lstrok;&aogon;cznik";
   78     $headto_name = "Do";
   79 #    $cc_name = "Kopie:";
   80     $cc_name = "Do wiadomo\\'sci:";
   81 
   82     @Month = ('', 'stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca',
   83     'sierpnia', "wrze&sacute;nia", "pa&zacute;dziernika", 'listopada', 'grudnia');
   84 
   85 #    $GENERIC_WORDS = "";
   86 }
   87 
   88 
   89 sub polski_today {
   90     local($today) = &get_date();
   91     $today =~ s|(\d+)/0?(\d+)/|$2. $Month[$1] |;
   92     join('',$today, ' roku', $_[0]);
   93 }
   94 
   95 sub do_cmd_Slash { '/'.$_[0] }
   96 sub do_cmd_PLSlash {
   97     local($_) = @_;
   98     s/^\s*('|`|;SPMlt;|;SPMgt;|\\|-|\/|=|\||[aelxcnoszAELXCNOSZ])/
   99     &get_polski_specials($1)/eos;
  100     $_;
  101 }
  102 
  103 # translation to run on text appearing between \prefixing and \nonprefixing
  104 sub polski_prefix_translation {
  105     local($_) = @_;
  106     s/(^|\G|[^\\<]|[^\\](\\\\)+)\/\s*('|`|;SPMlt;|;SPMgt;|\\|-|\/|=|\||[aelxcnoszAELXCNOSZ])/
  107     $1.&polski'get_polski_specials($3)/geom;
  108     $_;
  109 }
  110 
  111 sub do_cmd_prefixing {
  112     local($_) = @_;
  113     my $end_polski;
  114     $latex_body .= "\n\\prefixing\n";
  115     s/^(.*?)(\\nonprefixing|$)/$end_polski=$2;
  116     &polski_prefix_translation($1).$end_polski/es;
  117     $_;
  118 }
  119 
  120 sub do_cmd_nonprefixing { $latex_body .= "\n\\nonprefixing\n"; $_[0]}
  121 
  122 
  123 # redefined math-commands, in case math.pl has been loaded
  124 
  125 sub do_math_cmd_ar {
  126     local($_) = @_; my $arg;
  127     my $arg = &get_next_token();
  128     if ($NO_SIMPLE_MATH) { " ar$arg".$_ }
  129     else {"(<T CLASS=\"FUNCTION\">ar$arg</T>$_"}
  130 }
  131 
  132 sub do_math_cmd_arc {
  133     local($_) = @_; my $arg;
  134     my $arg = &get_next_token();
  135     if ($NO_SIMPLE_MATH) { " arc$arg".$_ }
  136     else {"(<T CLASS=\"FUNCTION\">arc$arg</T>$_"}
  137 }
  138 
  139 sub do_math_cmd_tg {
  140     if ($NO_SIMPLE_MATH) { ' tg'.$_ }
  141     else {'<T CLASS="FUNCTION">tg</T>'.$_[0]}
  142 }
  143 sub do_math_cmd_ctg {
  144     if ($NO_SIMPLE_MATH) { ' ctg'.$_[0] }
  145     else {'<T CLASS="FUNCTION">ctg</T>'.$_[0]}
  146 }
  147 sub do_math_cmd_tgh {
  148     if ($NO_SIMPLE_MATH) { ' tgh'.$_[0] }
  149     else {'<T CLASS="FUNCTION">tgh</T>'.$_[0]}
  150 }
  151 sub do_math_cmd_ctgh {
  152     if ($NO_SIMPLE_MATH) { ' ctgh'.$_ }
  153     else {'<T CLASS="FUNCTION">ctgh</T>'.$_[0]}
  154 }
  155 
  156 sub do_math_cmd_tan { &do_math_cmd_tg(@_) }
  157 sub do_math_cmd_tanh{ &do_math_cmd_tgh(@_)}
  158 sub do_math_cmd_arcsin { &do_math_cmd_arc('<<0>>sin<<0>>').$_[0] }
  159 sub do_math_cmd_arccos { &do_math_cmd_arc('<<0>>cos<<0>>').$_[0] }
  160 sub do_math_cmd_arctan { &do_math_cmd_arc('<<0>>tg<<0>>' ).$_[0] }
  161 sub do_math_cmd_arcctan{ &do_math_cmd_arc('<<0>>ctg<<0>>').$_[0] }
  162 
  163 
  164 
  165 &process_commands_wrap_deferred( <<_RAW_ARG_CMDS_);
  166 #prefixing
  167 #nonprefixing
  168 _RAW_ARG_CMDS_
  169 
  170 
  171 # use'em
  172 &polski_titles;
  173 $default_language = 'polski';
  174 $TITLES_LANGUAGE = 'polski';
  175 $polski_encoding = 'iso-8859-2';
  176 
  177 # $Log: polski.perl,v $
  178 # Revision 1.1  1999/07/12 13:12:32  RRM
  179 #   implements  polski.sty  for Polish language support
  180 #
  181 #  --  similar to  polish.perl  (based on Babel)
  182 #  --  uses / instead of " for special accents...
  183 #  --    ...between \prefixing  and  \nonprefixing or till end of document
  184 #  --  also implements \Slash and \PLSlash
  185 #  --  implements the Polish style of trig-function names
  186 #
  187 #
  188 
  189 1;