From: olems@ulrik.uio.no (Ole Michael Selberg)
Subject: Re: Tex/Latex po Polsku
Followup-To: soc.culture.polish
Organization: Oslo University
Date: Thu, 21 Jan 1993 08:25:20 GMT

In article <1993Jan18.055159.8365@gmuvax2.gmu.edu>,
azaleski@gmuvax2.gmu.edu (Andrzej Zaleski) wrote:
> 
> Pytanie: Czy ktos lepiej poinformowany moglby podzielic sie ze mna (i
> pewnie jeszcze innymi) informacja o tym jak zmusic Tex/Latex do
> drukowania polskich liter?
> Z gory dziekuje,
> AZaleski

Ponizej podaje makro, ktorych sam uzywam, zeby dostac a i e  z ogonkiem
oraz << i >>, kiedy posluguje sie fontami typu CM. Biore po prostu ogonek
z Times i i umieszczam go pod dana litera. Zeby to dobrze funkcjonowalo,
\a i \e musza sprawdzac, czy aktualny font jest Roman, czy Italic, czy
Bold:
%%%cut here-----------------------------------------------
%%%
%%% Definitions of the Times fonts:
%%%
\def\TimesR {ps-times-r    }
\def\TimesI {ps-times-i    }
\def\TimesS {ps-times-s    }
\def\TimesB {ps-times-b   }
%%%
%
% Ogonek definitions:
% 
  \def\a{\leavevmode\ifnum\fam=\itfam\ait\else%
       \ifnum\fam=\bffam\abf\else\arm\fi\fi}%
   \def\ait{{\ti\rlap{\kern0.35em\char206}}a}%
   \def\abf{{\tb\rlap{\kern0.3em\char206}}a}%
   \def\arm{{\tr\rlap{\kern0.22em\char206}}a}%
  \def\e{\leavevmode\ifnum\fam=\itfam\eit\else%
       \ifnum\fam=\bffam\ebf\else\erm\fi\fi}%
   \def\eit{{\ti\rlap{\kern0.25em\lower0.1ex\hbox{\char206}}}e}%
   \def\ebf{{\tb\rlap{\kern0.14em\lower0.07ex\hbox{\char206}}}e}%
   \def\erm{{\tr\rlap{\kern0.14em\char206}}e}%
  \def\A{\leavevmode\ifnum\fam=\itfam\Ait\else%
       \ifnum\fam=\bffam\Abf\else\Arm\fi\fi}%
   \def\Ait{{\ti\rlap{\kern0.4em\lower0.07ex\hbox{\char206}}}A}%
   \def\Abf{{\tb\rlap{\kern0.35em\lower0.05ex\hbox{\char206}}}A}%
   \def\Arm{{\tr\rlap{\kern0.37em\lower0.02ex\hbox{\char206}}}A}%
  \def\E{\leavevmode\ifnum\fam=\itfam\Eit\else%
       \ifnum\fam=\bffam\Ebf\else\Erm\fi\fi}% 
   \def\Eit{{\ti\rlap{\kern0.32em\lower0.07ex\hbox{\char206}}}E}%
   \def\Ebf{{\tb\rlap{\kern0.27em\lower0.05ex\hbox{\char206}}}E}%
   \def\Erm{{\tr\rlap{\kern0.25em\lower0.02ex\hbox{\char206}}}E}%
%
% Guillemet definitions:
%
  \def\ab{\leavevmode\ifnum\fam=\itfam\abit\else%
       \ifnum\fam=\bffam\abbf\else\ifnum\fam=\slfam\absl\else%
               \abrm\fi\fi\fi}%
           \def\abit{{\ti\char171}\kern-0.1em}%  
           \def\absl{{\ts\lower0.05em\hbox{\char171}}}%
           \def\abbf{{\tb\char171}}%
           \def\abrm{{\tr\lower0.05em\hbox{\char171}}}%
  \def\as{\leavevmode\ifnum\fam=\itfam\asit\else%
       \ifnum\fam=\bffam\asbf\else\ifnum\fam=\slfam\assl\else%     
               \asrm\fi\fi\fi}%
           \def\asit{{\ti\char187}}%
           \def\assl{{\ts\lower0.05em\hbox{\char187}}}%  
           \def\asbf{{\tb\char187}}%
           \def\asrm{{\tr\lower0.05em\hbox{\char187}}}%
  \def\hab{\leavevmode\ifnum\fam=\itfam\habit\else%
       \ifnum\fam=\bffam\habbf\else\ifnum\fam=\slfam\habsl\else%
              \habrm\fi\fi\fi}%
           \def\habit{{\ti\char172}}%  
           \def\habsl{{\ts\char172}}%
           \def\habbf{{\tb\char172}}%
           \def\habrm{{\tr\char172}}%
   \def\has{\leavevmode\ifnum\fam=\itfam\hasit\else%
       \ifnum\fam=\bffam\hasbf\else\ifnum\fam=\slfam\hassl\else
              \hasrm\fi\fi\fi}
           \def\hasit{{\ti\char173}}%
           \def\hassl{{\ts\char173}}%  
           \def\hasbf{{\tb\char173}}%
           \def\hasrm{{\tr\char173}}%
%%%cut here--------------------------------------------------------	
Pisanie dluzszych polskich tekstow przy pomocy standardowych polecen
jest bardzo meczace. Poniewaz wszystkie <<polskie>> litery z wyjatkiem
Z przyjmuja tylko jeden znak diakrytyczny, mozna znacznie zadanie,
czyniac np. + aktywnym znakiem, ktory w zaleznosci od tego, co po nim
nastpuje, daje:
    +a :  a z ogonkiem
	+e :  e z ogonkiem
	+c :  c z kreska
itd.

W wypadku Z mozna ustanowic, ze
    +z daje z z kreska
	+x daje z z kropka
	
Ponizsze makro zawieraja potrzebne definicje ( w "mathmode"
+ funkcjonuje normalnie; przy pomocy polecenia \plusnormal
mozna + deaktywowac):
%%%cut here-------------------------------------------------------
  %%%
  %%%  Macros for Polish letters
  %%%
%  Write: +<letter> to get <letter> with diacritic mark
%  NB: `z z kropka' is written: +x
%
\def\plusactive\catcode`+=\active}
\def\plusnormal{\catcode`+=12}
\let\plus=+
\plusactive
\def\polish{%
  \def+##1{\ifmmode\plus##1
   \else\if##1a\a{}%
    \else\if##1e\e{}%
     \else\if##1o\'o%
      \else\if##1c\'c%
       \else\if##1l\l{}%
        \else\if##1n\'n%
         \else\if##1s\'s%
          \else\if##1x\.z%
           \else\if##1z\'z%
            \else\if##1A\A{}%
             \else\if##1E\E{}%
              \else\if##1O\'O%
               \else\if##1C\'C%
                \else\if##1L\L{}%
                 \else\if##1N\'N%
                  \else\if##1S\'S%
                   \else\if##1X\.Z%
                    \else\if##1Z\'Z%
                       \else\string+##1%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
 \plusactive}


Ole Michael Selberg
Institutt for oesteuropeiske og orientalske studier
Universitetet i Oslo
Postboks 1030 Blindern
N-0315 Oslo 3

Ole Michael Selberg
Institutt for oesteuropeiske og orientalske studier
Universitetet i Oslo
Postboks 1030 Blindern
N-0315 Oslo 3
Newsgroups: soc.culture.polish