From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/ginpenc/ChangeLog | 5 + macros/latex/contrib/ginpenc/Makefile | 75 +++ macros/latex/contrib/ginpenc/README | 35 ++ macros/latex/contrib/ginpenc/ginpenc.dtx | 816 ++++++++++++++++++++++++++ macros/latex/contrib/ginpenc/ginpenc.ins | 43 ++ macros/latex/contrib/ginpenc/ginpenc.pdf | Bin 0 -> 197770 bytes macros/latex/contrib/ginpenc/news-message.txt | 76 +++ macros/latex/contrib/ginpenc/testginpenc.tex | 37 ++ 8 files changed, 1087 insertions(+) create mode 100644 macros/latex/contrib/ginpenc/ChangeLog create mode 100644 macros/latex/contrib/ginpenc/Makefile create mode 100644 macros/latex/contrib/ginpenc/README create mode 100644 macros/latex/contrib/ginpenc/ginpenc.dtx create mode 100644 macros/latex/contrib/ginpenc/ginpenc.ins create mode 100644 macros/latex/contrib/ginpenc/ginpenc.pdf create mode 100644 macros/latex/contrib/ginpenc/news-message.txt create mode 100644 macros/latex/contrib/ginpenc/testginpenc.tex (limited to 'macros/latex/contrib/ginpenc') diff --git a/macros/latex/contrib/ginpenc/ChangeLog b/macros/latex/contrib/ginpenc/ChangeLog new file mode 100644 index 0000000000..45cd76c775 --- /dev/null +++ b/macros/latex/contrib/ginpenc/ChangeLog @@ -0,0 +1,5 @@ +2011/12/29 1.01 Harald Harders (harald.harders@gmx.de) + - Write version and date explicitely into sty and gie files + +2003/09/29 1.00 Harald Harders (harald.harders@gmx.de) + - First official version diff --git a/macros/latex/contrib/ginpenc/Makefile b/macros/latex/contrib/ginpenc/Makefile new file mode 100644 index 0000000000..339acb4bdd --- /dev/null +++ b/macros/latex/contrib/ginpenc/Makefile @@ -0,0 +1,75 @@ + +SRCDIR=ginpenc +INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/ginpenc +DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/ginpenc +VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'` + +.SUFFIXES: .sty .ins .dtx .pdf .ps + +.ins.sty: + pdflatex $< + +.dtx.pdf: + pdflatex $< + pdflatex $< + makeindex -s gind.ist $(*D)/$(*F) + makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo + pdflatex $< + + +all: ginpenc ginpenc.pdf ausgabe + + +ginpenc: ginpenc.sty + +ginpenc.sty: ginpenc.dtx ginpenc.ins + + + +clean: + @-rm -f ginpenc.{glo,gls,idx,ilg,ind,aux,log,toc} + @-rm -f testginpenc.{log,aux} + @-rm -f *~ *.aux *.idx *.log + +distclean: clean + @-rm -f ginpenc.{pdf,ps,sty} + @-rm -f testginpenc.{pdf,ps} + @-rm -f testginpenc.pdf + @-rm -f *.gie + + +tar: all clean + echo Lege ginpenc-$(VERSION).tar.gz an + -rm -f ginpenc-$(VERSION).tar.gz + tar czCf .. ginpenc-$(VERSION).tar.gz \ + $(SRCDIR)/Makefile \ + $(SRCDIR)/README \ + $(SRCDIR)/ChangeLog \ + $(SRCDIR)/ginpenc.dtx \ + $(SRCDIR)/ginpenc.pdf \ + $(SRCDIR)/ginpenc.ins \ + $(SRCDIR)/ginpenc.xml \ + $(SRCDIR)/news-message.txt \ + $(SRCDIR)/testginpenc.tex + +zip: all + mkdirhier tex/latex/ginpenc + mkdirhier doc/latex/ginpenc + mkdirhier source/latex/ginpenc + cp ginpenc.sty *.gie tex/latex/ginpenc/ + cp ginpenc.pdf testginpenc.tex news-message.txt README doc/latex/ginpenc/ + cp ginpenc.ins ginpenc.dtx Makefile source/latex/ginpenc/ + @rm -f ginpenc-$(VERSION).zip + zip -r ginpenc-$(VERSION) tex doc source + rm -rf tex doc source + +install: all + if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi + install -m644 ginpenc.sty *.gie $(INSTALLDIR) + texhash + +ausgabe: + @echo "Please copy ginpenc.sty to a directory" + @echo "in the LaTeX search path" + + diff --git a/macros/latex/contrib/ginpenc/README b/macros/latex/contrib/ginpenc/README new file mode 100644 index 0000000000..d90b721c24 --- /dev/null +++ b/macros/latex/contrib/ginpenc/README @@ -0,0 +1,35 @@ +ginpenc.sty +=========== + +If the package inputenc is used and German Umlauts are input directly, +they are converted to \"a etc. This breaks the sort algorithm of +makeindex, for instance. This package converts Umlauts and the Sharp s +to the short forms, defined by the babel package, e.g. "a, instead, if +the text is typeset in German. + + +Copyright 2003 Harald Harders + +This program can be redistributed and/or modified under the terms +of the LaTeX Project Public License Distributed from CTAN +archives in directory macros/latex/base/lppl.txt; either +version 1 of the License, or any later version. + + +automatic: - run make + - run make install + or + - run make + - copy ginpenc.sty to a place where LaTeX can find it + - run texhash or the corresponding command of your distribution + +by hand: - execute latex on ginpenc.ins + - execute latex on ginpenc.dtx (2x) + - copy ginpenc.sty and *.gie to a place LaTeX can find them + - run texhash or the corresponding command of your distribution + + +2011-12-29 +Harald Harders +harald.harders@gmx.de + diff --git a/macros/latex/contrib/ginpenc/ginpenc.dtx b/macros/latex/contrib/ginpenc/ginpenc.dtx new file mode 100644 index 0000000000..d37b362448 --- /dev/null +++ b/macros/latex/contrib/ginpenc/ginpenc.dtx @@ -0,0 +1,816 @@ +% \iffalse meta comment +% File: ginpenc.dtx Copyright (C) 2003, 2011 Harald Harders +% \fi +% +% \iffalse +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{longtable} +\IfFileExists{ginpenc.sty}{\usepackage{ginpenc} + \let\ginpencSTYfound\active}{\GenericWarning{ginpenc.dtx}{Package + file ginpenc.sty not found (Documentation will be messed up!^^J^^A + Generate ginpenc.sty by LaTeXing ginpenc.ins, process + ginpenc.dtx again)^^J}\stop} +\GetFileInfo{ginpenc.sty} +\title{The \texttt{ginpenc} package} +\author{Harald Harders\\\texttt{harald.harders@gmx.de}} +\date{Version \fileversion, \filedate, printed \today} +\newlength{\tempdima}% +\makeatletter +\renewenvironment{table}[1][]{% + \@float{table}[#1]% + \centering% + \setlength{\tempdima}{\abovecaptionskip}% + \setlength{\abovecaptionskip}{\belowcaptionskip}% + \setlength{\belowcaptionskip}{\tempdima}% + }{% +\end@float +} +\makeatother +\EnableCrossrefs +\CodelineIndex +\DoNotIndex{\def,\edef,\let,\newcommand,\newenvironment,\newcounter} +\DoNotIndex{\setcounter,\space,\if,\else,\fi,\empty,\@empty,\ifx,\fi} +\DoNotIndex{\ifnum,\fi,\expandafter} +\CodelineNumbered +\RecordChanges +\CheckSum{573} +\begin{document} + \DocInput{ginpenc.dtx} +\end{document} +% +% \fi +% +% \changes{1.01}{2011/12/29}{Write version and date explicitely into +% sty file} +% \changes{1.00}{2003/09/29}{First official version} +% +% \maketitle +% \begin{abstract} +% \noindent +% If the package \texttt{inputenc} is used and German Umlauts are +% input directly, they are converted to \verb|\"a| etc. +% This breaks the sort algorithm of \texttt{makeindex}, for instance. +% This package converts Umlauts and the Sharp~s to the short forms, +% defined by the \texttt{babel} package, e.g. \verb|"a|, instead, if +% the text is typeset in German. +% \end{abstract} +% +% \tableofcontents +% +% \section*{Copyright} +% Copyright 2003, 2011 Harald Harders. +% +% This program can be redistributed and/or modified under the terms +% of the LaTeX Project Public License Distributed from CTAN +% archives in directory macros/latex/base/lppl.txt; either +% version 1 of the License, or any later version. +% +% \section{The user interface} +% +% To use this package place +% \begin{verbatim} +%\usepackage{ginpenc} +% \end{verbatim} +% in the preamble of your document. No options are necessary. +% +% If you also use the \texttt{babel} package, the German Umlauts and +% the Sharp~S are written to outputfiles, e.g.\ the \texttt{idx} +% files, as \verb|"A|, \verb|"O|, \verb|"U|, \verb|"a|, \verb|"o|, +% \verb|"u|, and \verb|"s| instead of \verb|\"A|, \verb|\"O|, +% \verb|\"U|, \verb|\"a|, \verb|\"o|, \verb|\"u|, and \verb|\ss| if +% one of the German dialects (\texttt{german}, \texttt{ngerman}, +% \texttt{austrian}, \texttt{naustrian}) is active. +% If another language is active, this package does not do anything. +% +% This should not change anything in the document itself. +% But output to auxiliary files as the index file with the extension +% \texttt{.idx} are written with these short-hand forms instead of the +% long forms. +% This helps \texttt{makeindex} to sort the entries correctly, if the +% command-line switch \texttt{-g} is given. +% +% \section{New commands} +% +% \DescribeMacro{\inputenc}% +% This package defines the command \cs{inputenc} which returns the +% active encoding. +% If no encoding is active, it does not return anything. +% +% \section*{Acknowledgements} +% +% Most code parts are by Heiko Oberdiek (\texttt{oberdiek@uni-freiburg.de}) +% (see \texttt{news-message.txt}). +% +% +% \StopEventually{\PrintChanges \PrintIndex} +% +% +% \section{The implementation} +% +% Heading of the package and all other files: +% \begin{macrocode} +%\ProvidesPackage{ginpenc} +%\ProvidesFile{ansinew.gie} +%\ProvidesFile{applemac.gie} +%\ProvidesFile{ascii.gie} +%\ProvidesFile{cp1250.gie} +%\ProvidesFile{cp1252.gie} +%\ProvidesFile{cp437.gie} +%\ProvidesFile{cp437de.gie} +%\ProvidesFile{cp850.gie} +%\ProvidesFile{cp852.gie} +%\ProvidesFile{cp865.gie} +%\ProvidesFile{decmulti.gie} +%\ProvidesFile{latin1.gie} +%\ProvidesFile{latin2.gie} +%\ProvidesFile{latin3.gie} +%\ProvidesFile{latin5.gie} +%\ProvidesFile{latin9.gie} +%\ProvidesFile{next.gie} +% [2011/12/29 v1.01 Replace \string\"a by "a with babel for German texts] +% \end{macrocode} +% \iffalse +%<*package> +% \fi +% \begin{macro}{\ifginpenc@babel} +% Stores if babel has been loaded. +% \begin{macrocode} +\newif\ifginpenc@babel +% \end{macrocode} +% \end{macro} +% Everything has to be done at \cs{begin\{document\}} in order to +% ensure that the packages \texttt{inputenc} and \texttt{babel} are +% loaded before the code is executed. +% \begin{macrocode} +\AtBeginDocument{% +% \end{macrocode} +% \begin{macro}{\inputenc} +% Default value for \cs{inputenc}: +% \begin{macrocode} + \let\inputenc\empty +% \end{macrocode} +% \end{macro} +% \begin{macro}{\inputencoding} +% Redefinition of \cs{inputencoding} to store the input encoding name. +% +% First, copy the original command. +% \begin{macrocode} + \newcommand*\gie@inputencoding{}% + \let\gie@inputencoding\inputencoding +% \end{macrocode} +% Redefine \cs{inputencoding} +% \begin{macrocode} + \def\inputencoding#1{% +% \end{macrocode} +% \begin{macro}{\inputenc} +% Define \cs{inputenc} to the current value. +% \begin{macrocode} + \def\inputenc{#1}% +% \end{macrocode} +% \end{macro} +% Call the original \cs{inputencoding} command. +% \begin{macrocode} + \gie@inputencoding{#1}% +% \end{macrocode} +% If \texttt{babel} is loaded, load the corresponding definition file +% that redefines the \verb|\"A| to \verb|"A| etc. +% \begin{macrocode} + \ifginpenc@babel + \IfFileExists{\inputenc.gie}{% + \input{\inputenc.gie}% + }{% + \PackageWarning{ginpenc}{Encoding file \inputenc.gie not + found}% + }% + \fi + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\inputenc} +% Since the package \texttt{inputenc} calls \cs{inputencoding} the +% first time before it is redefined the encoding has to be found out +% by a different way. +% \begin{macrocode} + \begingroup + \expandafter\ifx\csname @inpenc@undefined\endcsname\relax + \edef\x{\endgroup}% + \else + \def\@inpenc@undefined@#1{\def\noexpand\inputenc{#1}}% + \edef\x{\endgroup + \@inpenc@undefined + }% + \fi + \x +% \end{macrocode} +% \end{macro} +% If \texttt{babel} is loaded, load the corresponding definition file +% that redefines the \verb|\"A| to \verb|"A| etc. +% \begin{macrocode} + \@ifpackageloaded{babel}{% + \ginpenc@babeltrue + \ifx\inputenc\empty + \else + \IfFileExists{\inputenc.gie}{% + \input{\inputenc.gie}% +% \end{macrocode} +% Add the new commands to the extras section of all German languages. +% \begin{macrocode} + \addto\extrasgerman{\umlautgerman}% + \addto\extrasngerman{\umlautgerman}% + \addto\extrasaustrian{\umlautgerman}% + \addto\extrasnaustrian{\umlautgerman}% + \addto\noextrasgerman{\umlautnotgerman}% + \addto\noextrasngerman{\umlautnotgerman}% + \addto\noextrasaustrian{\umlautnotgerman}% + \addto\noextrasnaustrian{\umlautnotgerman}% +% \end{macrocode} +% Select active language to let take effect the \cs{extras} commands. +% \begin{macrocode} + \expandafter\selectlanguage\expandafter{\languagename}% + }{% + \PackageWarning{ginpenc}{Encoding file \inputenc.gie not + found}% + }% + \fi + }{}% + } +% \end{macrocode} +% \iffalse +% +% \fi +% +% \section{Encoding files} +% +% Only the file \texttt{ansinew.gie} is described since the other files +% work the same. +% +% \iffalse +%<*ansinew> +% \fi +% \subsection{ansinew.gie} +% The work is done in a group in order to avoid a change of the +% \texttt{shorthand} state. +% To reach a global definition of the commands they are defined with +% \cs{gdef}. +% \begin{macrocode} +\begingroup +% \end{macrocode} +% Switch on the German shorthands. +% \begin{macrocode} +\shorthandon{"}% +% \end{macrocode} +% \begin{macro}{\umlautgerman} +% Redefine the character codes in order to use the short versions of +% the Umlaut commands. +% \begin{macrocode} +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +% \end{macrocode} +% \end{macro} +% Switch off the German shorthands. +% \begin{macrocode} +\shorthandoff{"}% +% \end{macrocode} +% \begin{macro}{\umlautnotgerman} +% Redefine the character codes in order to use the long versions of +% the Umlaut commands outside German text. +% \begin{macrocode} +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*applemac> +% \fi +% \subsection{applemac.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{128}{"A}% + \DeclareInputText{133}{"O}% + \DeclareInputText{134}{"U}% + \DeclareInputText{138}{"a}% + \DeclareInputText{154}{"o}% + \DeclareInputText{159}{"u}% + \DeclareInputText{167}{"s}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{128}{\"A}% + \DeclareInputText{133}{\"O}% + \DeclareInputText{134}{\"U}% + \DeclareInputText{138}{\"a}% + \DeclareInputText{154}{\"o}% + \DeclareInputText{159}{\"u}% + \DeclareInputText{167}{\ss}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*ascii> +% \fi +% \subsection{ascii.gie} +% \begin{macrocode} +\begingroup +\gdef\umlautgerman{}% +\gdef\umlautnotgerman{}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp1250> +% \fi +% \subsection{cp1250.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\gshorthandoff{"}% +\def\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp1252> +% \fi +% \subsection{cp1252.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp437> +% \fi +% \subsection{cp437.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{142}{"A}% + \DeclareInputText{153}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{132}{"a}% + \DeclareInputText{148}{"o}% + \DeclareInputText{129}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{142}{\"A}% + \DeclareInputText{153}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{132}{\"a}% + \DeclareInputText{148}{\"o}% + \DeclareInputText{129}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp437de> +% \fi +% \subsection{cp437de.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{142}{"A}% + \DeclareInputText{153}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{225}{"s}% + \DeclareInputText{132}{"a}% + \DeclareInputText{148}{"o}% + \DeclareInputText{129}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{142}{\"A}% + \DeclareInputText{153}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{225}{\ss}% + \DeclareInputText{132}{\"a}% + \DeclareInputText{148}{\"o}% + \DeclareInputText{129}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp850> +% \fi +% \subsection{cp850.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{142}{"A}% + \DeclareInputText{153}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{225}{"s}% + \DeclareInputText{132}{"a}% + \DeclareInputText{148}{"o}% + \DeclareInputText{129}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{142}{\"A}% + \DeclareInputText{153}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{225}{\ss}% + \DeclareInputText{132}{\"a}% + \DeclareInputText{148}{\"o}% + \DeclareInputText{129}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp852> +% \fi +% \subsection{cp852.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{142}{"A}% + \DeclareInputText{153}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{225}{"s}% + \DeclareInputText{132}{"a}% + \DeclareInputText{148}{"o}% + \DeclareInputText{129}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{142}{\"A}% + \DeclareInputText{153}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{225}{\ss}% + \DeclareInputText{132}{\"a}% + \DeclareInputText{148}{\"o}% + \DeclareInputText{129}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*cp865> +% \fi +% \subsection{cp865.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{142}{"A}% + \DeclareInputText{153}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{225}{"s}% + \DeclareInputText{132}{"a}% + \DeclareInputText{148}{"o}% + \DeclareInputText{129}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{142}{\"A}% + \DeclareInputText{153}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{225}{\ss}% + \DeclareInputText{132}{\"a}% + \DeclareInputText{148}{\"o}% + \DeclareInputText{129}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*decmulti> +% \fi +% \subsection{decmulti.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*latin1> +% \fi +% \subsection{latin1.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*latin2> +% \fi +% \subsection{latin2.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*latin3> +% \fi +% \subsection{latin3.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*latin5> +% \fi +% \subsection{latin5.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*latin9> +% \fi +% \subsection{latin9.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{196}{"A}% + \DeclareInputText{214}{"O}% + \DeclareInputText{220}{"U}% + \DeclareInputText{223}{"s}% + \DeclareInputText{228}{"a}% + \DeclareInputText{246}{"o}% + \DeclareInputText{252}{"u}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{196}{\"A}% + \DeclareInputText{214}{\"O}% + \DeclareInputText{220}{\"U}% + \DeclareInputText{223}{\ss}% + \DeclareInputText{228}{\"a}% + \DeclareInputText{246}{\"o}% + \DeclareInputText{252}{\"u}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \iffalse +%<*next> +% \fi +% \subsection{next.gie} +% \begin{macrocode} +\begingroup +\shorthandon{"}% +\gdef\umlautgerman{% + \DeclareInputText{133}{"A}% + \DeclareInputText{150}{"O}% + \DeclareInputText{154}{"U}% + \DeclareInputText{217}{"a}% + \DeclareInputText{240}{"o}% + \DeclareInputText{246}{"u}% + \DeclareInputText{251}{"s}% +}% +\shorthandoff{"}% +\gdef\umlautnotgerman{% + \DeclareInputText{133}{\"A}% + \DeclareInputText{150}{\"O}% + \DeclareInputText{154}{\"U}% + \DeclareInputText{217}{\"a}% + \DeclareInputText{240}{\"o}% + \DeclareInputText{246}{\"u}% + \DeclareInputText{251}{\"s}% +}% +\endgroup +% \end{macrocode} +% \iffalse +% +% \fi +% +% +% \Finale +% diff --git a/macros/latex/contrib/ginpenc/ginpenc.ins b/macros/latex/contrib/ginpenc/ginpenc.ins new file mode 100644 index 0000000000..724fe9f957 --- /dev/null +++ b/macros/latex/contrib/ginpenc/ginpenc.ins @@ -0,0 +1,43 @@ +\input docstrip.tex +\preamble + + ginpenc package + + Copyright 2003, 2011 Harald Harders + + This program can be redistributed and/or modified under the terms + of the LaTeX Project Public License Distributed from CTAN + archives in directory macros/latex/base/lppl.txt; either + version 1 of the License, or any later version. + + harald.harders@gmx.de + +\endpreamble + +\askforoverwritefalse + +% Files +%%%%%%%%%%%%%%%%%%%%%% +\generate{% + \file{ginpenc.sty}{\from{ginpenc.dtx}{package}}% + \file{ansinew.gie}{\from{ginpenc.dtx}{gie,ansinew}}% + \file{applemac.gie}{\from{ginpenc.dtx}{gie,applemac}}% + \file{ascii.gie}{\from{ginpenc.dtx}{gie,ascii}}% + \file{cp1250.gie}{\from{ginpenc.dtx}{gie,cp1250}}% + \file{cp1252.gie}{\from{ginpenc.dtx}{gie,cp1252}}% + \file{cp437.gie}{\from{ginpenc.dtx}{gie,cp437}}% + \file{cp437de.gie}{\from{ginpenc.dtx}{gie,cp437de}}% + \file{cp850.gie}{\from{ginpenc.dtx}{gie,cp850}}% + \file{cp852.gie}{\from{ginpenc.dtx}{gie,cp852}}% + \file{cp865.gie}{\from{ginpenc.dtx}{gie,cp865}}% + \file{decmulti.gie}{\from{ginpenc.dtx}{gie,decmulti}}% + \file{latin1.gie}{\from{ginpenc.dtx}{gie,latin1}}% + \file{latin2.gie}{\from{ginpenc.dtx}{gie,latin2}}% + \file{latin3.gie}{\from{ginpenc.dtx}{gie,latin3}}% + \file{latin5.gie}{\from{ginpenc.dtx}{gie,latin5}}% + \file{latin9.gie}{\from{ginpenc.dtx}{gie,latin9}}% + \file{next.gie}{\from{ginpenc.dtx}{gie,next}}% +}% + +\Msg{* Ready} +\endbatchfile diff --git a/macros/latex/contrib/ginpenc/ginpenc.pdf b/macros/latex/contrib/ginpenc/ginpenc.pdf new file mode 100644 index 0000000000..89df99798c Binary files /dev/null and b/macros/latex/contrib/ginpenc/ginpenc.pdf differ diff --git a/macros/latex/contrib/ginpenc/news-message.txt b/macros/latex/contrib/ginpenc/news-message.txt new file mode 100644 index 0000000000..9d1cfc1f0f --- /dev/null +++ b/macros/latex/contrib/ginpenc/news-message.txt @@ -0,0 +1,76 @@ +Path: news.tu-bs.de!news-han1.dfn.de!news-stu1.dfn.de!news.belwue.de!news.uni-freiburg.de!not-for-mail +From: Heiko Oberdiek +Newsgroups: de.comp.text.tex +Subject: Re: Inputencoding herausfinden +Date: Fri, 08 Aug 2003 02:34:27 +0200 +Organization: Rechenzentrum der Universitaet Freiburg, Germany +Lines: 60 +Message-ID: +References: +NNTP-Posting-Host: merkur.informatik.uni-freiburg.de +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +X-Newsreader: Forte Agent 1.91/32.564 +Xref: news.tu-bs.de de.comp.text.tex:138386 + +Harald Harders wrote: + +> gibt es eine Möglichkeit, nach der Verwendung von +> \usepackage[...]{inputenc} +> von LaTeX aus herauszufinden, welches Encoding geladen wurde? + +Ja: + +documentclass{article} +\usepackage[latin1]{inputenc} + +%%% \inputenc %%% BEGIN %%% +%%% * Package inputenc has to be loaded first. +%%% * \inputenc: , if no input encoding is set +%%% otherwise it contains the name of the current input encoding. + +% default value for \inputenc +\let\inputenc\empty +% redefinition of \inputencoding to store the input encoding name +\let\OrgInputencoding\inputencoding +\def\inputencoding#1{% + \def\inputenc{#1}% + \OrgInputencoding{#1}% +} +% get current input encoding +\begingroup + \makeatletter + \expandafter\ifx\csname @inpenc@undefined\endcsname\relax + \edef\x{\endgroup}% + \else + \def\@inpenc@undefined@#1{\def\noexpand\inputenc{#1}}% + \edef\x{\endgroup + \@inpenc@undefined + }% + \fi +\x +%%% \inputenc %%% END %%% + +\begin{document} + +\typeout{* Input encoding: `\inputenc'} + +\inputencoding{cp850} +\typeout{* Input encoding: `\inputenc'} + +\end{document} + +> Ich habe mal in inputenc.sty reingeschaut, aber mir ist nicht +> aufgefallen, dass irgendwo ein Makro oder so auf die Kodierung +> gesetzt würde. + +Faellt doch sofort ins Auge, die Option (\DeclareOption*) fuehrt +\inputencoding{\CurrentOption} aus, das Argument wird +dreimal verwendet, gleich bei der ersten Verwendung wird das +Argument von \inputencoding in \@inpenc@undefined gespeichert. +Obiger Code speichert den Wert lediglich in \inputenc um (und +entfernt das erste Token "\@inpenc@undefined@". + +Viele Gruesse + Heiko diff --git a/macros/latex/contrib/ginpenc/testginpenc.tex b/macros/latex/contrib/ginpenc/testginpenc.tex new file mode 100644 index 0000000000..980ea5c60a --- /dev/null +++ b/macros/latex/contrib/ginpenc/testginpenc.tex @@ -0,0 +1,37 @@ +\listfiles +\documentclass{article} + +\usepackage{ginpenc} +\usepackage[latin1]{inputenc} +\usepackage[english,ngerman]{babel} +\usepackage{makeidx} + +\makeindex + +\providecommand\inputenc{??} + +\begin{document} +Please have a look into the file \jobname.idx. +Here, the entry written in German should be typed with \verb|"u| while +the English version is typed with \verb|\"u|. + +\typeout{\languagename:} +\typeout{* Input encoding: `\inputenc'} + +\index{Rüber (ger)} + +\inputencoding{cp850} +\typeout{* Input encoding: `\inputenc'} +\inputencoding{latin1} + +\selectlanguage{english} +\typeout{\languagename:} +\typeout{* Input encoding: `\inputenc'} + +\index{Rüber (eng)} + +\inputencoding{cp850} +\typeout{* Input encoding: `\inputenc'} +\printindex + +\end{document} -- cgit v1.2.3