diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-18 17:28:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-18 17:28:50 +0000 |
commit | 2df635cec7ad23cb94bf6870ebcdfc4b9132df3f (patch) | |
tree | a4ad5b4921aa97de1c71811d1f7962ddd8a61623 /Master/texmf-dist/tex/latex/germkorr | |
parent | 61d228804ad353fb8002d4f42e1b72727640ba8e (diff) |
new latex package germkorr (28jul09)
git-svn-id: svn://tug.org/texlive/trunk@14751 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/germkorr')
-rw-r--r-- | Master/texmf-dist/tex/latex/germkorr/germkorr.sty | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/germkorr/germkorr.sty b/Master/texmf-dist/tex/latex/germkorr/germkorr.sty new file mode 100644 index 00000000000..6edb6d9b71b --- /dev/null +++ b/Master/texmf-dist/tex/latex/germkorr/germkorr.sty @@ -0,0 +1,167 @@ +\typeout{Supplement style option \string`GERMKORR\string' 1.0 \string<26 Jul 2009\string>} + +%% This LaTeX style file modifies the commands for quotation marks which +%% are pre-defined in GERMAN.STY: GERMKORR.STY brings the lower single +%% quotes (\glq), and the lower double quotes (\glqq or "`) nearer to a +%% following letter C, G, O, Q, U, V, v, W, w, T, Y, \O, or \OE -- even +%% if that letter has an usual accent; see the doumentation GERMKORR.TEX. +%% KNOWN ERRORS: +%% * GERMKORR will even do its job in typewriter fonts, where that is +%% probably not wanted. Then, you have to switch GERMKORR off, e.g. as +%% \texttt{\nogermkorr"`Text"'}, or \texttt{"`{}Text"'}! +%% * GERMKORR can not handle accents which are related to more than one +%% letter. "`\t{CC}"', therefore, will not be handled! +%% * Concerning the TeX command \accent, GERMKORR in any case needs the +%% two following arguments separated by a space, e.g. "`\accent 22 C"'! + +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation; either version 2 of the License, or +%% (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program; if not, write to the Free Software +%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +%% GERMKORR (c) Timo Baumann 26.~Juli 2009 + + + +\def\next@kg{} +\def\txen@kg{} +\def\test@kg{} + +\def\allowhy@kg{{\nobreak \hskip 0pt plus 0pt}} + +\def\Otest@kg{O@} +\def\Utest@kg{U@} + +\def\acckorr@kg#1{% + \def\test@kg{#1}% + \ifx#1C\kern -0.07em\fi + \ifx#1G\kern -0.07em\fi + \ifx#1O\kern -0.07em\fi \ifx\test@kg\Otest@kg\kern -0.07em\fi + \ifx#1Q\kern -0.07em\fi + \ifx#1U\kern -0.09em\fi \ifx\test@kg\Utest@kg\kern -0.09em\fi + \ifx#1V\kern -0.13em\fi + \ifx#1v\kern -0.07em\fi + \ifx#1W\kern -0.11em\fi + \ifx#1w\kern -0.07em\fi + \ifx#1T\kern -0.11em\fi + \ifx#1Y\kern -0.13em\fi + \ifx#1\O\kern -0.05em\fi + \ifx#1\OE\kern -0.09em\fi + \allowhy@kg\txen@kg{#1}} + +\def\accentnum@kg#1 #2{% + \ifx#2C\kern -0.07em\fi + \ifx#2G\kern -0.07em\fi + \ifx#2O\kern -0.07em\fi + \ifx#2Q\kern -0.07em\fi + \ifx#2U\kern -0.09em\fi + \ifx#2V\kern -0.13em\fi + \ifx#2v\kern -0.07em\fi + \ifx#2W\kern -0.11em\fi + \ifx#2w\kern -0.07em\fi + \ifx#2T\kern -0.11em\fi + \ifx#2Y\kern -0.13em\fi + \ifx#2\O\kern -0.05em\fi + \ifx#2\OE\kern -0.09em\fi + \allowhy@kg\accent #1 #2} + +\def\getelse@kg{\allowhy@kg\txen@kg} + +\def\aktacckorr@kg#1{\ifx#1\dq@prtct \else + \message{[ GERMKORR: Get unexpected \string#1 ] }\fi + \acckorr@kg} + +\def\getarg@kg{\afterassignment\nextarg@kg\let\txen@kg= } + +\def\nextarg@kg{\bgroup + \ifx\txen@kg\accent + \expandafter\accentnum@kg\else + \expandafter\getelse@kg\fi} + +\def\gonext@kg{\let\txen@kg=\next@kg \let\next@kg=\acckorr@kg} +\def\goact@kg{\let\txen@kg=\next@kg \let\next@kg=\aktacckorr@kg} + +{\catcode`\"=13% +\gdef\gqhkorr@kg{% + \if@germkorr + \ifx\next@kg C\kern -0.07em\fi + \ifx\next@kg G\kern -0.07em\fi + \ifx\next@kg O\kern -0.07em\fi + \ifx\next@kg Q\kern -0.07em\fi + \ifx\next@kg U\kern -0.09em\fi + \ifx\next@kg V\kern -0.13em\fi + \ifx\next@kg v\kern -0.07em\fi + \ifx\next@kg W\kern -0.11em\fi + \ifx\next@kg w\kern -0.07em\fi + \ifx\next@kg T\kern -0.11em\fi + \ifx\next@kg Y\kern -0.13em\fi + \ifx\next@kg \O\kern -0.05em\fi + \ifx\next@kg \OE\kern -0.09em\fi + \ifx\next@kg "\gonext@kg\fi + \ifx\next@kg \newumlaut\gonext@kg\fi + \ifx\next@kg \active@dq\goact@kg \fi + \ifx\next@kg \bgroup \let\next@kg=\getarg@kg\fi + \ifx\next@kg \accent\let\next@kg=\accentnum@kg\fi + \ifx\next@kg \"\gonext@kg\fi + \ifx\next@kg \.\gonext@kg\fi + \ifx\next@kg \=\gonext@kg\fi + \ifx\next@kg \^\gonext@kg\fi + \ifx\next@kg \'\gonext@kg\fi + \ifx\next@kg \`\gonext@kg\fi + \ifx\next@kg \~\gonext@kg\fi + \ifx\next@kg \b\gonext@kg\fi \ifx\next@kg \pb\gonext@kg\fi + \ifx\next@kg \c\gonext@kg\fi \ifx\next@kg \pc\gonext@kg\fi + \ifx\next@kg \d\gonext@kg\fi \ifx\next@kg \pd\gonext@kg\fi + \ifx\next@kg \H\gonext@kg\fi + \ifx\next@kg \k\gonext@kg\fi + \ifx\next@kg \r\gonext@kg\fi + %\ifx\next@kg \t\gonext@kg\fi + \ifx\next@kg \u\gonext@kg\fi + \ifx\next@kg \v\gonext@kg\fi + \ifx\next@kg `\kern -0.1em\fi + \ifx\next@kg \glq\kern 0.03em\fi + \ifx\next@kg \@glq\kern 0.03em\fi + \fi + \allowhy@kg\next@kg}% +} + +\def\after@kg{\afterassignment\gqhkorr@kg\let\next@kg= } + +\newif\if@germkorr\@germkorrtrue + +\expandafter\ifx\csname mdqon\endcsname\relax + \typeout{ ** Error **: GERMAN not (yet) loaded. Do not re-define \string"\string` and \string\glq\string!}% +\else \typeout{GERMAN expected. Try to re-define \string"\string` and \string\glq\string!}% + \def@dqmacro{`}{\glqq}{\glqq}% %% Elder vers says {\glqq{}}{\glqq{}} %% +\expandafter\ifx\csname @glqq\endcsname\relax + \let\glqq@kg\glqq %% LaTeX2e %% + \DeclareRobustCommand{\glqqkgk}{\after@kg}% + \def\glqq{\glqq@kg\glqqkgk}% + \let\glq@kg\glq + \def\Tone@kg{T1}% + \DeclareRobustCommand{\glqkgk}{\if@germkorr\ifx\encodingdefault\Tone@kg\kern-0.075em\fi\fi\after@kg}% + \def\glq{\glq@kg\glqkgk}% + \DeclareRobustCommand{\germkorr}{\@germkorrtrue}% + \DeclareRobustCommand{\nogermkorr}{\@germkorrfalse}% +\else + \let\glqq@kg\@glqq %% LaTeX 2.09 %% + \def\@glqq{\glqq@kg\after@kg}% + \let\glq@kg\@glq + \def\@glq{\glq@kg\after@kg}% + \def\@yeskg{\@germkorrtrue}% + \def\germkorr{\protect\@yeskg}% + \def\@nokg{\@germkorrfalse}% + \def\nogermkorr{\protect\@nokg}% +\fi +\fi + +\endinput |