"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/html/lang.hva" (16 Jan 2021, 3878 Bytes) of package /linux/www/hevea-2.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \usepackage{ifthen}
    2 \usepackage{keyval}
    3 \newcommand{\map@lang@code}[1]{%
    4   \ifthenelse{\equal{#1}{afrikaans}}{af}{%
    5   \ifthenelse{\equal{#1}{austrian}}{de-AT}{%
    6   \ifthenelse{\equal{#1}{brazil}}{pt-BR}{%
    7   \ifthenelse{\equal{#1}{british}}{en-GB}{%
    8   \ifthenelse{\equal{#1}{bulgarian}}{bg}{%
    9   \ifthenelse{\equal{#1}{catalan}}{ca}{%
   10   \ifthenelse{\equal{#1}{croatian}}{hr}{%
   11   \ifthenelse{\equal{#1}{czech}}{cs}{%
   12   \ifthenelse{\equal{#1}{danish}}{da}{%
   13   \ifthenelse{\equal{#1}{dutch}}{nl}{%
   14   \ifthenelse{\equal{#1}{english}}{en}{%
   15   \ifthenelse{\equal{#1}{esperanto}}{eo}{%
   16   \ifthenelse{\equal{#1}{finnish}}{fi}{%
   17   \ifthenelse{\equal{#1}{francais}}{fr}{%
   18   \ifthenelse{\equal{#1}{frenchb}}{fr}{%
   19   \ifthenelse{\equal{#1}{french}}{fr}{%
   20   \ifthenelse{\equal{#1}{galician}}{gl}{%
   21   \ifthenelse{\equal{#1}{german}}{de}{%
   22   \ifthenelse{\equal{#1}{greek}}{el}{%
   23   \ifthenelse{\equal{#1}{hungarian}}{hu}{%
   24   \ifthenelse{\equal{#1}{icelandic}}{is}{%
   25   \ifthenelse{\equal{#1}{irish}}{ga}{%
   26   \ifthenelse{\equal{#1}{italian}}{it}{%
   27   \ifthenelse{\equal{#1}{latin}}{la}{%
   28   \ifthenelse{\equal{#1}{magyar}}{hu}{%
   29   \ifthenelse{\equal{#1}{ngerman}}{de}{%
   30   \ifthenelse{\equal{#1}{norsk}}{no}{%
   31   \ifthenelse{\equal{#1}{nynorsk}}{nn}{%
   32   \ifthenelse{\equal{#1}{polish}}{pl}{%
   33   \ifthenelse{\equal{#1}{portuguese}}{pt}{%
   34   \ifthenelse{\equal{#1}{romanian}}{ro}{%
   35   \ifthenelse{\equal{#1}{russian}}{ru}{%
   36   \ifthenelse{\equal{#1}{slovak}}{sk}{%
   37   \ifthenelse{\equal{#1}{slovene}}{sl}{%
   38   \ifthenelse{\equal{#1}{slovenian}}{sl}{%
   39   \ifthenelse{\equal{#1}{spanish}}{sp}{%
   40   \ifthenelse{\equal{#1}{swedish}}{se}{%
   41   \ifthenelse{\equal{#1}{swissgerman}}{de-CH}{%
   42   \ifthenelse{\equal{#1}{turkish}}{tr}{%
   43   \ifthenelse{\equal{#1}{ukenglish}}{en-UK}{%
   44   \ifthenelse{\equal{#1}{usenglish}}{en-US}{%
   45   \ifthenelse{\equal{#1}{welsh}}{cy}{%
   46   {}%
   47   }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}%
   48 }
   49 \def\document@language@code{}
   50 \newcommand{\set@language@var}[1]{%
   51   \def\code{\map@lang@code{#1}}%
   52   \ifthenelse{\equal{\code}{}}%
   53              {}%
   54              {\def\document@language@code{\code}}%
   55 }
   56 \newboolean{valid@equ@separated@pair}
   57 \def\check@for@equ@delimiter#1=#2\@empty{%
   58   \def\value@arg{#2}%
   59   \ifx\value@arg\@empty
   60     \setboolean{valid@equ@separated@pair}{false}%
   61   \else
   62     \setboolean{valid@equ@separated@pair}{true}%
   63   \fi
   64 }
   65 \def\force@main@language#1=#2\@empty{%
   66   \ifthenelse{\equal{#1}{main}}%
   67              {\def\forced@main@lang{#2}}%
   68              {\hva@warn{\force@main@language: unknown key '#1' -- ignored}}%
   69 }
   70 \def\language@packages{}
   71 \newcommand{\quirky@setlang}[1]{%
   72   \@funcall{\check@for@equ@delimiter}{#1=\@empty}%
   73   \ifvalid@equ@separated@pair
   74     \@funcall{\force@main@language}{#1\@empty}%
   75   \else
   76     \def\language@packages{#1}%
   77   \fi
   78 }
   79 \let\old@usepackagehook\usepackagehook
   80 \renewcommand{\usepackagehook}[2]{%
   81   \ifthenelse{\equal{\map@lang@code{#2}}{}}%
   82              {\ifthenelse{\equal{#2}{babel}}%
   83                          {\@callprim{\@iter}{\string\quirky@setlang,{\char123 #1\char125}}%
   84                           \ifu\forced@main@lang
   85                             \relax
   86                           \else
   87                             \def\language@packages{\forced@main@lang}%
   88                           \fi}%
   89                          {}}%
   90              {\def\language@packages{#2}}%
   91   \old@usepackagehook{#1}{#2}%
   92 }
   93 \newcommand{\main@lang}{%
   94   \@callprim{\@iter}{\string\set@language@var,{\char123\usebox{\@document@opts}\char125}}%
   95   \@callprim{\@iter}{\string\set@language@var,{\char123\language@packages\char125}}%
   96   \ifthenelse{\equal{\document@language@code}{}}%
   97              {en}% default
   98              {\document@language@code}%
   99 }
  100 \AtBeginDocument{%
  101   \ifthenelse{\equal{\@htmlargs}{}}%
  102              {\renewcommand{\@htmlargs}{lang="\main@lang"}}%
  103              {\let\old@args=\@htmlargs
  104               \renewcommand{\@htmlargs}{lang="\main@lang" \old@args}}%
  105 }