% \iffalse meta-comment %% ROMANIAN.DTX 1.3R <29.10.1996> %% %<*!driver> % \begin{macrocode} %% %% This file is part of the Romanian TeX system. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Romanian TeX, version 1.3R <29.10.1996> %% %% (C) 1994-1996 Adrian Rezus [adriaan@{sci,cs}.kun.nl] %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\RomanianTeX{Romanian\TeX\/}% %% \def\RomanianTeXname{Romanian TeX}% %% \def\RomanianTeXid{1.3R}% %% \def\RomanianTeXversion{1996/10/29 v1.3R}% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Revision 1.3R [1996/]:[11/03]..[11/07][11/09]..[11/12]%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \end{macrocode} % ---------------- start of docstrip archive file -------------------- % % \fi % \CheckSum{2271} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \DoNotIndex{\',\(,\),\-,\.,\/,\{,\},\^,\`,\|,\ ,\@,\x,\Z} % \DoNotIndex{\@M,\@m,\m@ne,\z@,\z@skip,\@ne,\tw@,sixt@@n} % \DoNotIndex{\count@,\dimen@,\advance,\day,\month,year,\relax} % \DoNotIndex{\begin,\end,\bgroup,\egroup,\begingroup,\endgroup} % \DoNotIndex{\bf,\em,\it,\rm,\tt,\textbf,\textit,\texttt,\emph} % \DoNotIndex{\expandafter,\noexpand,\string,\the,\ifhmode,\ifmmode} % \DoNotIndex{\ifcase,\or,\else,\fi,\if,\ifdim,\ifnum,\ifx} % \DoNotIndex{\do,\afterassignment,\number,\escapechar,\space} % \DoNotIndex{\def,\edef,\let,\newcommand,\undefined,\active} % \DoNotIndex{\accent,\box,\dp,\ht,\wd,\char,\chardef,\discretionary} % \DoNotIndex{\catcode,\csname,\endcsname,\hbox,\hskip,\kern} % \DoNotIndex{\font,\fontdimen,\scriptscriptstyle,\textstyle} % \DoNotIndex{\lccode,\lowercase,\sfcode,\spacefactor,\penalty} % \DoNotIndex{\mathchar,\mathchardef,\mathaccent,\varepsilon,\m@th} % \DoNotIndex{\empty,\@empty,\leavevmode,\makeatletter,\mbox} % \DoNotIndex{\errhelp,\errmessage,\message,\wlog,\write,\immediate} % \DoNotIndex{\lower,\raise,\sfcode,\spacefactor,\setbox,\toks} % \DoNotIndex{\documentclass,\documentstyle,\LaTeX,\LaTeXe,\TeX} % \DoNotIndex{\ProvidesPackage,\usepackage,\CodelineIndex,\cs} % \DoNotIndex{\input,\endinput,\DocInput} % % \originalTeX % \title{Romanian \TeX{} 1.3R\thanks{% % This file is accompanied by % a \LaTeXe{} \emph{installation module} % (file \texttt{romanian.ins}), % the Romanian \emph{hyphenation patterns} % (file \texttt{rohyphen.tex}), % version 1.1 of October 29, 1996, and % the \emph{end-user documentation} % (file \texttt{romanian.doc}). % [A table of contents for the current release of \RomanianTeX{} % can be found in the file \texttt{manifest[.romanian].txt}.] % Like its predecessors (essentially: % \texttt{romanian.tex}, version 1.2 of December 21, 1994 and % \texttt{romanian.sty}, version 1.2R of June 7, 1995), % the present design of \RomanianTeX{} is based on the % German \TeX{} style implementation [see % \texttt{german.dtx}, version 2.5c of May 1st, 1996, % \copyright{}~1995--1996 Bernd Raichle and DANTE e.V., % \texttt{german.sty} % \copyright{}~1991--1996 Bernd Raichle and DANTE e.V., and % \texttt{german.tex} % \copyright{}~1987--1990 Hubert Partl]. % \RomanianTeX{} 1.3R is a \emph{multi-lingual} \TeX{} system. % In particular, if set in German \TeX{}-mode, \RomanianTeX{} % emulates entirely the German \TeX{} (current version), and, % unlike in previous versions, a bi-lingual -- German/Romanian -- % \RomanianTeX{} configuration does not require \texttt{german.sty} % any more. As expected, like the German \TeX{}, \RomanianTeX{} % is \emph{not} compatible with the \textsc{babel}\, system % [\copyright{}~1989--1995 Johannes~L. Braams], and -- on % specific installations using short file-name conventions -- % one should take similar precautions as regards possible % file-name conflicts.}} % \date{October 29, 1996} % \author{Adrian Rezu\c{s}\thanks{% % E-mail: \texttt{adriaan@cs.kun.nl}}} % \maketitle % % \StopEventually{} % % \begin{abstract} % This document describes the \RomanianTeX{} package, version % 1.3R. \RomanianTeX{} is a \emph{multi-lingual} environment % for type-setting Romanian texts with Plain \TeX, \LaTeX{}~2.09 % and/or \LaTeXe{}. Its implementation strategy is similar to % the design of the German \TeX{} [v2.5c |<1.05.1996>| and older]: % \RomanianTeX{} allows the input of the Romanian diacritics and % quotes by analogous double quote macros. As a multi-lingual % \TeX{} system, if set in `originalTeX', `germanTeX' or `frenchTeX' % mode, \RomanianTeX{} emulates the original (US/UK) English, % German or French \TeX{}, resp.\ (In particular, a bi-lingual % -- German/Romanian -- \TeX{} configuration does \emph{not} % require \texttt{german.sty} any more.) % \end{abstract} % \vfill\eject % % \tableofcontents % \vfill\eject % % \ifx\emergencystretch\undefined \else % \setlength{\emergencystretch}{2em} % \fi % \hbadness=2000 % % \section{Package identification} % % In order to function properly, the macro-code of \RomanianTeX{} % must be loaded only \emph{once} in a \TeX{} system. % % \subsection{The file banner} % % The file banner declares, at the very beginning, several % \emph{global} identifiers for the \RomanianTeX{} package. % The print-names % % |\RomanianTeX|, % TeX print-name % % |\RomanianTeXname|, % ASCII print-name % % |\RomanianTeXid|, % ASCII: || % % |\RomanianTeXversion| % ASCII: || + || % \par\noindent % are exported in every file using \texttt{romanian.sty} and can be % changed globally. % % \subsection{The internal self-identifier} % % Internally, any specific \RomanianTeX{} macro-construct is % identified by a |\csname|-prefix, a || % (current value: \texttt{ro@}). % % This `non-public' feature of the package is meant to avoid % |\csname| name-conflicts with other \TeX{} internals and/or % other packages. % % \subsection{The self-identifty test} % % The self-identity test is performed upon system initialization; % if \RomanianTeX{} is not yet loaded, the rest of the file is % going to be processed: % % \begin{macrocode} \expandafter\ifx\csname romanianTeX\endcsname\relax \else \romanianTeX \expandafter\endinput \fi % \end{macrocode} % % \subsection{Broadcast package identity} % % Upon loading, \RomanianTeX{} identifies itself. Since the package % may function as a `style option' for Plain \TeX{}, as well as for % different \LaTeX{}-versions, this is done by a |\message| command. % % \begin{macrocode} \message{\RomanianTeXname, \RomanianTeXversion.} % \end{macrocode} % % \subsection{\LaTeXe{} package identification} % % \LaTeXe{} declares \RomanianTeX{} as a `package'. Other % packages could possibly test the command |\ProvidesPackage| % only for \texttt{undefined}, so we must prevent the fact that % |\ProvidesPackage| might have the meaning |\relax| at this % point (by a local test, within a group construct). % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{romanian}[\RomanianTeXversion Package Romanian TeX] \fi % \end{macrocode} % % \section{Accessing \TeX{} internals} % % As expected, \RomanianTeX{} controls the \TeX{} internals by % changing the \textit{category code} of the |@|-symbol to % the `letter'-category. On completing the required modifications % in the underlying \TeX{} behavior, \RomanianTeX{} reverts to % the `public' \TeX{} control, by disallowing |@|-||'s. % % While in control of the \TeX{} internals, we must be also able % to load \RomanianTeX{} with a simple |\input| command (in Plain % \TeX{}, for instance). So the \textit{category code} of the % |@|-symbol must be saved \emph{before} performing the change % to the `letter'-category. % % \begin{macrocode} \chardef\atcode=\catcode`\@ % save_current_category_code_of |@| \catcode`\@=11 % % \makeatletter % \end{macrocode} % % \section{Compatibility macros} % % \subsection{Low-level macros} % % As \RomanianTeX{} macros must be possibly usable outside a % \LaTeX{}-environment, we must re-define some \LaTeX{}-macros. % % \subsubsection{The test for `undefined'} % % We shall need later the test-command |\@ifundefined| (not in % Plain \TeX{}). The discriminating action of this macro is encoded % by using explicit \emph{selectors} (actually \emph{projections} % \textbf{first} and \textbf{second}, see below). % % \begin{macrocode} \expandafter\ifx\csname @ifundefined\endcsname\relax \def\@ifundefined#1{% \expandafter\ifx\csname #1\endcsname\relax \expandafter\ro@DQfirst\else\expandafter\ro@DQsecond\fi} \fi % \end{macrocode} % % \subsubsection{The selectors} % % These selectors are made into \RomanianTeX{} specific macros, by % using the global || (i.e., the |\ro@|-prefix): % % \begin{macrocode} \def\ro@DQfirst#1#2{#1} \def\ro@DQsecond#1#2{#2} % \end{macrocode} % % \subsection{Compatibility macros for NFSS~2} % % In what follows, we assume that the NFSS~2 is present whenever % the command |\DeclareTextSymbol| is defined: % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextSymbol\endcsname\relax \else % \end{macrocode} % % Otherwise, we must learn to live with what we have got\ldots % % \subsubsection{NFSS~2 macro emulations} % % \RomanianTeX{} would yield poor results with older versions of % \LaTeXe{} and/or NFSS~2. The following piece of macro-code is % self-explanatory: if the command |\ProvideTextCommandDefault| % is not currently available, we are in the worst possible case % and will strongly recommend system-updating! % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvideTextCommandDefault\endcsname\relax \immediate\write17{} \immediate\write17{% !! This LaTeX2e-system requires updating.} \immediate\write17{!!} \immediate\write17{} \fi % \end{macrocode} % % The NFSS~2 allows a font parameter |\fontencoding|. % We also assume that the command |\providecommand| is available. % % We emulate next a few NFSS~2 macros for environments in need of them. % % |\UseTextSymbol{|\meta{encoding}|}{|\meta{symbol}|}| % is used for the encoding-dependent font-selection with NFSS~2: % % \begin{macrocode} \@ifundefined{UseTextSymbol}{% \def\UseTextSymbol#1#2{{\fontencoding{#1}\selectfont #2}} }{} % \end{macrocode} % |\UseTextAccent{|\meta{encoding}|}{|\meta{accent}|}{|\meta{base}|}| % choses an accent symbol from a font with a given encoding, % resp.\ with one diverging from its actual encoding. % % \begin{macrocode} \@ifundefined{UseTextAccent}{% \def\UseTextAccent#1#2#3{% {\let\@curr@enc\f@encoding \fontencoding{#1}\selectfont #2{\fontencoding\@curr@enc\selectfont #3}}}% }{} % \end{macrocode} % By |\ProvideTextCommand{|\meta{csname}|}{|\meta{encoding}|}[|^^A % \meta{number}|][|\meta{default}|]{|\meta{def}|}| % one defines a command applying only to a given encoding, % just in case it is not yet defined for this encoding. % % \begin{macrocode} \@ifundefined{ProvideTextCommand}{% \def\ProvideTextCommand#1#2{% misses \RobustTextCommand{#1}{ etc. } \expandafter\providecommand\csname #2\string#1\endcsname}% }{} % \end{macrocode} % |\ProvideTextCommandDefault{|\meta{command}|}{|\meta{def}|}| % yields a default definition for all those encodings for which no % explicit definition is available. % % \begin{macrocode} \@ifundefined{ProvideTextCommandDefault}{% \def\ProvideTextCommandDefault#1{% \ProvideTextCommand{#1}{U}}% }{} % \end{macrocode} % |\DeclareTextCompositeCommand{|\meta{command}|}{|^^A % \meta{encoding}|}{|\meta{char}|}{|\meta{def}|}| % enables an easy way of defining the diacritics-input. % % The following definition relies on \LaTeXe{}/NFSS~2-internals. % % \begin{macrocode} \@ifundefined{DeclareTextCompositeCommand}{% \def\DeclareTextCompositeCommand#1#2#3#4{% a `dummy' text composite \DeclareTextComposite{#1}{#2}{#3}{`\Z}% redefine the command \expandafter\def\csname\expandafter\string\csname #2\endcsname\string#1-\string#3\endcsname##1##2{#4}}% }{} % \end{macrocode} % % \subsubsection{Macros for text symbols} % % We establish the \texttt{OT1}-defaults for the accents and symbols % used later: % % |\"|, % accent: German, French, % % |\^|, % accent: Romanian, French, % % |\c|, % accent: Romanian, French, % % |\u|, % accent: Romanian, % % |\i|, % symbol: Romanian, German, French, % % |\ss|, % symbol: German. % % \begin{macrocode} \ProvideTextCommandDefault{\"}{\UseTextAccent{OT1}{\"}} % GF \ProvideTextCommandDefault{\^}{\UseTextAccent{OT1}{\^}} % RF \ProvideTextCommandDefault{\c}{\UseTextAccent{OT1}{\c}} % RF \ProvideTextCommandDefault{\u}{\UseTextAccent{OT1}{\u}} % R \ProvideTextCommandDefault{\i}{\UseTextSymbol{OT1}\i} % RGF \ProvideTextCommandDefault{\ss}{\UseTextSymbol{OT1}\ss} % G % \end{macrocode} % % We provide also symbolic names for symbols used in the macros % for double quotes. As ever, the defaults are taken from the % fonts with a~\texttt{OT1} encoding. % % The macro-encoding for % \romanianTeX "`\ldots"' \originalTeX and {\glq}\ldots{\grq}: % % \begin{macrocode} \@ifundefined{textquotedblleft}{% \ProvideTextCommandDefault{\textquotedblleft}{% \UseTextSymbol{OT1}\textquotedblleft}% \DeclareTextSymbol{\textquotedblleft}{OT1}{92}% or: ...{OT1}{``} % \end{macrocode} % % \begin{macrocode} \DeclareTextSymbol{\textquotedblleft}{T1}{16}% }{} \@ifundefined{textquotedblright}{% \ProvideTextCommandDefault{\textquotedblright}{% \UseTextSymbol{OT1}\textquotedblright}% \DeclareTextSymbol{\textquotedblright}{OT1}{`\"}% or: ...{OT1}{''} % \end{macrocode} % % \begin{macrocode} \DeclareTextSymbol{\textquotedblright}{T1}{17}% }{} \@ifundefined{textquoteleft}{% \ProvideTextCommandDefault{\textquoteleft}{% \UseTextSymbol{OT1}\textquoteleft}% \DeclareTextSymbol{\textquoteleft}{OT1}{`\`}% \DeclareTextSymbol{\textquoteleft}{T1}{`\`}% }{} \@ifundefined{textquoteright}{ \ProvideTextCommandDefault{\textquoteright}{% \UseTextSymbol{OT1}\textquoteright}% \DeclareTextSymbol{\textquoteright}{OT1}{`\'}% \DeclareTextSymbol{\textquoteright}{T1}{`\'}% }{} \@ifundefined{quotesinglbase}{% \DeclareTextSymbol{\quotesinglbase}{T1}{13}% }{} \@ifundefined{quotedblbase}{% \DeclareTextSymbol{\quotedblbase}{T1}{18}% }{} % \end{macrocode} % % The macro-encoding for the French quotes % \romanianTeX ">\ldots"< \originalTeX and {\frq}\ldots{\flq}: % % \begin{macrocode} \@ifundefined{guillemotleft}{% \DeclareTextSymbol{\guillemotleft}{T1}{19}% }{} \@ifundefined{guillemotright}{% \DeclareTextSymbol{\guillemotright}{T1}{20}% }{} \@ifundefined{guilsinglleft}{% \DeclareTextSymbol{\guilsinglleft}{T1}{14}% }{} \@ifundefined{guilsinglright}{% \DeclareTextSymbol{\guilsinglright}{T1}{15}% }{} % \end{macrocode} % % The most important double/single quote macros have been thereby defined. % % \begin{macrocode} \fi % \end{macrocode} % % \section{Low-level commands} % % \RomanianTeX{} uses low-level \TeX{} commands for the implementation % of the double quote mechanism, the specific Romanian diacritics, % the trema's, the German \emph{Uml\"aute}, etc. Some of them might % be useful for the end-user. % % We must be able to distinguish the double quotes usage of \RomanianTeX{} % from the way of coping with the double quotes in German \TeX{} % [cf.\ \texttt{german.dtx} resp.\ \texttt{german.sty}, version 2.5c, % |<1.05.1996>|]. % % \subsection{Protect fragile commands} % % \LaTeX{} uses the command |\protect|, in order to protect \emph{fragile} % commands. This has to be re-defined for Plain \TeX{} only. % % If undefined, |\protect| is defined as |\relax|. % % \begin{macrocode} \expandafter\let\expandafter\protect\csname protect\endcsname % \end{macrocode} % % \subsection{Local hyphenation} % % The command |\allowhyphens| informs \TeX{} about the fact that % a hyphenable word-part will follow (by a |\penalty|-) and % that a new one begins (by a |\hskip|-command, introducing a % \textit{glue}): % % \begin{macrocode} \def\allowhyphens{\penalty\@M \hskip\z@skip} % \end{macrocode} % \emph{Provisions for the German \TeX{}-mode}. % The |\ss|-symbol (used to input a \emph{scharfes es}) corresponds % to the symbol with position~|^^Y| in the~\texttt{OT1} encoding. % So, in order to be able to hyphenate words with |\ss|, it is enough % to make its |\lccode| non-null. For a~|\ss| taken from a different % font this must be done in a macro file re-defining the font and % the~|\ss| command. % % \begin{macrocode} \lccode`\^^Y=`\^^Y % \end{macrocode} % % There is no harm done if we leave this active in \RomanianTeX{}. % % \subsection{The Romanian/German double quotes} % % The Romanian/German double quotes are obtained by box-manipulation % from their English analogues. % % The macro |\set@low@box| lowers its argument (a symbol) at the % level of the usual comma: % % \begin{macrocode} \def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}% \setbox\z@\hbox{\dimen@\ht\z@ \advance\dimen@ -\ht\tw@ \lower\dimen@\box\z@}% \ht\z@\ht\tw@ \dp\z@\dp\tw@} % \end{macrocode} % % After a box-command, \TeX\ sets the |\spacefactor| to~1000: % we must save its value: % % \begin{macrocode} \def\save@sf@q#1{{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else \let\@SF\empty \fi \leavevmode #1\@SF}} % \end{macrocode} % % \subsection{Uml\"aute and trema's} % % The macro |\newumlaut| replaces the original \TeX{}-primitive by a % construct yielding a better match for the real (German) typography % (viz., \emph{Uml\"{a}ute mit etwas tieferen Umlautpunkten}). % [See \texttt{german.dtx} for details.] % % \begin{macrocode} \expandafter\ifx\csname roU@D\endcsname\relax \csname newdimen\endcsname\roU@D \fi \def\newumlaut#1{{\roU@D 1ex% {\setbox\z@\hbox{\char127}\dimen@-.45ex\advance\dimen@\ht\z@ \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}% \accent127\fontdimen5\font\roU@D #1}\allowhyphens} % \end{macrocode} % % For trema's, the original \TeX{} |\accent|-primitives are used. % [See \texttt{german.dtx}.] % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextSymbol\endcsname\relax \def\highumlaut#1{{\accent127 #1}\allowhyphens} \else \def\highumlaut#1{\"{#1}\allowhyphens} \fi % \end{macrocode} % % \subsection{Activating the double quote mechanism} % % The macros |\mDQon| and |\mDQoff| are used in order to activate % and/or de-activate the double quote mechanism. % % \begin{macrocode} \def\mDQon{\catcode`\"\active} \def\mDQoff{\catcode`\"12\relax} % \end{macrocode} % % The symbolic names for the input notation are as follows: % % \begin{macrocode} \begingroup \mDQoff \def\x{\endgroup \def\@nUML{\"}% normal mode \def\@mUML{\ddot}% math mode (\mathaccent"707F) \def\@nBRV{\u}% normal mode \def\@mBRV{\breve}% math mode \def\@nHAT{\^}% normal mode \def\@mHAT{\hat}% math mode \def\@nCDL{\c}% normal mode \def\@mCDL{\mathchar"7018 }% math mode \def\@SS{\mathchar"7019 }% math mode (revise) \def\DQ{"}}% or: \textquotedbl (?) \x % \end{macrocode} % % The double quotes are now added to |\dospecials| and |\@sanitize| % (this is intended for \TeX{} and/or \LaTeX{}-handling): % % \begin{macrocode} \begingroup \def\do{\noexpand\do\noexpand}% \edef\x{\endgroup \def\noexpand\dospecials{\dospecials\do\"}}% \x % \end{macrocode} % % But |\@sanitize| is defined only for \LaTeX\, so we ask about it: % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname @sanitize\endcsname\relax \else \begingroup \def\@makeother{\noexpand\@makeother\noexpand}% \edef\x{\endgroup \def\noexpand\@sanitize{\@sanitize\@makeother\"}}% \x \fi % \end{macrocode} % % \subsection{Compatibility with other versions} % % \emph{Provisions for the German \TeX{}-mode}. % The German \TeX{} commands |\3| and |\ck| are obsolete: the next piece % of macro-code is only maintained for downward-compatibility reasons. % % \begin{macrocode} \let\ro@original@three=\3 % \3 may be defined/undefined \def\ck{\penalty\@M\discretionary{k-}{}{c}k\allowhyphens} % \end{macrocode} % % \section{Romanian [German/French] double quotes} % % The typographically `legal' Romanian double quotes are those that % are also `legal' in German. We have also the implicit rule of % (typographical) taste that `quotes inside quotes' have to be % `French'\ldots\, The corresponding (German) single quotes are % \emph{not recommended} in Romanian typography. On the other hand, % the English double/single quotes are -- as in German, French, etc. % -- \emph{typographically illegal} in their \emph{left}-variant, % i.e., if used at the beginning of a word. % % The macro-constructs: % % |\glqq|, |\grqq|, % for German/Romanian double quotes % % |\flqq|, |\frqq|, % for French double quotes % % |\glq|, |\grq|, % for German/Romanian single quotes % % |\flq|, |\frq|, % for French single quotes % \par\noindent % must be defined for the NFSS~2, and so for \LaTeXe{}, as being % encoding-dependent. % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextSymbol\endcsname\relax % \end{macrocode} % % \subsection{\ldots~without NFSS~2} % % Approximations: macros for the Romanian/German double and single quotes % \romanianTeX "`\ldots"' \originalTeX and {\glq}\ldots{\grq}. % % \begin{macrocode} \def\@glqq{\save@sf@q{\set@low@box{''\/}\box\z@ \kern-.04em\allowhyphens}} \def\glqq{\protect\@glqq} \def\@grqq{\save@sf@q{\kern-.07em``\kern.07em}}% ('') \def\grqq{\protect\@grqq} \def\@glq{\save@sf@q{\set@low@box{'\/}\box\z@ \kern-.04em\allowhyphens}} \def\glq{\protect\@glq} \def\@grq{\save@sf@q{\kern-.0125em`\kern.07em}} \def\grq{\protect\@grq} % \end{macrocode} % % Approximations: macros for the French double/single quotes % \romanianTeX "<\ldots"> \originalTeX and {\flq}\ldots{\frq}. % % \begin{macrocode} \def\@flqq{\relax\ifmmode \ll \else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle \ll $}% \allowhyphens}\fi} \def\flqq{\protect\@flqq} \def\@frqq{\relax\ifmmode \gg \else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle \gg $}% \allowhyphens}\fi} \def\frqq{\protect\@frqq} \def\@flq{\relax\ifmmode <\else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle <$}\allowhyphens}\fi} \def\flq{\protect\@flq} \def\@frq{\relax\ifmmode >\else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle >$}\allowhyphens}\fi} \def\frq{\protect\@frq} % \end{macrocode} % [See \texttt{german.dtx} for details.] % % \begin{macrocode} \else % \end{macrocode} % % \subsection{\ldots~with NFSS~2} % % In the newer \LaTeXe{} releases, |\glqq| corresponds to |\quotedblbase|. % The definition is extended in a relatively simple way to the % \texttt{OT1}-encoded fonts. % % \begin{macrocode} \DeclareRobustCommand{\glqq}{% \ifmmode\hbox{\quotedblbase}\else\quotedblbase\fi} \ProvideTextCommandDefault{\quotedblbase}{% \UseTextSymbol{OT1}\quotedblbase} \ProvideTextCommand{\quotedblbase}{OT1}{% \save@sf@q{\set@low@box{\textquotedblright\/}\box\z@ \kern-.04em\allowhyphens}} % \end{macrocode} % % For |\grqq| there is no \LaTeXe{} counterpart: we use the older version. % [For the \texttt{T1}-encoding, see details in \texttt{german.dtx}.] % % \begin{macrocode} \ProvideTextCommand{\grqq}{T1}{\textquotedblleft} \ProvideTextCommand{\grqq}{OT1}{% \save@sf@q{\kern-.07em% \ifmmode\hbox{\textquotedblleft}\else\textquotedblleft\fi \kern.07em\relax}} \ProvideTextCommandDefault{\grqq}{\UseTextSymbol{OT1}\grqq} % \end{macrocode} % % Define correspondingly the German/Romanian single quotes % |\glq| and |\grq|\,\ldots % % \begin{macrocode} \DeclareRobustCommand{\glq}{% \ifmmode\hbox{\quotesinglbase}\else\quotesinglbase\fi} \ProvideTextCommandDefault{\quotesinglbase}{% \UseTextSymbol{OT1}\quotesinglbase} \ProvideTextCommand{\quotesinglbase}{OT1}{% \save@sf@q{\set@low@box{\textquoteright\/}\box\z@ \kern-.04em\allowhyphens}} % \end{macrocode} % % \begin{macrocode} \ProvideTextCommand{\grq}{T1}{\textquoteleft} \ProvideTextCommand{\grq}{OT1}{% \save@sf@q{\kern-.0125em% \ifmmode\hbox{\textquoteleft}\else\textquoteleft\fi \kern.07em\relax}} \ProvideTextCommandDefault{\grq}{\UseTextSymbol{OT1}\grq} % \end{macrocode} % % \ldots\,and the French quotes (`guillemots'), both double and single: % % \begin{macrocode} \DeclareRobustCommand{\flqq}{% \ifmmode\hbox{\guillemotleft}\else\guillemotleft\fi} \ProvideTextCommandDefault{\guillemotleft}{% \UseTextSymbol{OT1}\guillemotleft} \ProvideTextCommand{\guillemotleft}{OT1}{% \ifmmode \ll \else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle \ll $}% \allowhyphens}\fi} \DeclareRobustCommand{\frqq}{% \ifmmode\hbox{\guillemotright}\else\guillemotright\fi} \ProvideTextCommandDefault{\guillemotright}{% \UseTextSymbol{OT1}\guillemotright} \ProvideTextCommand{\guillemotright}{OT1}{% \ifmmode \gg \else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle \gg $}% \allowhyphens}\fi} % \end{macrocode} % % \begin{macrocode} \DeclareRobustCommand{\flq}{% \ifmmode\hbox{\guilsinglleft}\else\guilsinglleft\fi} \ProvideTextCommandDefault{\guilsinglleft}{% \UseTextSymbol{OT1}\guilsinglleft} \ProvideTextCommand{\guilsinglleft}{OT1}{% \ifmmode <\else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle <$}\allowhyphens}\fi} \DeclareRobustCommand{\frq}{% \ifmmode\hbox{\guilsinglright}\else\guilsinglright\fi} \ProvideTextCommandDefault{\guilsinglright}{% \UseTextSymbol{OT1}\guilsinglright} \ProvideTextCommand{\guilsinglright}{OT1}{% \ifmmode >\else \save@sf@q{\penalty\@M \raise .27ex\hbox{$\m@th\scriptscriptstyle >$}\allowhyphens}\fi} % \end{macrocode} % % The Romanian/German and the French double/single quote macros have % been thereby defined. % % \begin{macrocode} \fi % \end{macrocode} % % \section{Uml\"aute and trema's: macros} % % The treatement of the macros for trema's and the German % \emph{Uml\"aute} must take into account the presence or the % absence of the NFSS~2. % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextSymbol\endcsname\relax % \end{macrocode} % % \subsection{\ldots~without NFSS~2} % % The internal switch-commands |\umlauthigh| and |\umlautlow| are % defined first for situations without NFSS~2. % % \begin{macrocode} \def\umlauthigh{\def\"##1{{\accent127 ##1}}} \def\umlautlow{\def\"{\protect\newumlaut}} % \end{macrocode} % % \begin{macrocode} \else % \end{macrocode} % % \subsection{\ldots~with NFSS~2} % % For situations where the NFSS~2 is available, this is more involved: % % \begin{macrocode} \def\umlauthigh{\def\ro@OTumlaut##1{{\accent 127 ##1}}} \def\umlautlow{\def\ro@OTumlaut{\protect\newumlaut}} \umlauthigh % \end{macrocode} % % For fonts with a~\texttt{OT1} and a~\texttt{T1} encoding, one can % use standard definitions. [\textbf{Note}. Some of the following are % \emph{not} in \texttt{german.sty}.] % % \begin{macrocode} \DeclareTextAccent{\"}{T1}{4} \DeclareTextAccent{\"}{OT1}{127} \DeclareTextCompositeCommand{\"}{OT1}{a}{\ro@OTumlaut{a}}% - \DeclareTextCompositeCommand{\"}{OT1}{A}{\ro@OTumlaut{A}}% - \DeclareTextCompositeCommand{\"}{OT1}{e}{\ro@OTumlaut{e}}% - \DeclareTextCompositeCommand{\"}{OT1}{E}{\ro@OTumlaut{E}}% - \DeclareTextCompositeCommand{\"}{OT1}{\i}{\ro@OTumlaut{\i}}% - \DeclareTextCompositeCommand{\"}{OT1}{I}{\ro@OTumlaut{I}}% - \DeclareTextCompositeCommand{\"}{OT1}{o}{\ro@OTumlaut{o}}% + \DeclareTextCompositeCommand{\"}{OT1}{O}{\ro@OTumlaut{O}}% + \DeclareTextCompositeCommand{\"}{OT1}{u}{\ro@OTumlaut{u}}% + \DeclareTextCompositeCommand{\"}{OT1}{U}{\ro@OTumlaut{U}}% + \DeclareTextComposite{\"}{T1}{a}{228}% + \DeclareTextComposite{\"}{T1}{A}{196}% - \DeclareTextComposite{\"}{T1}{e}{235}% - \DeclareTextComposite{\"}{T1}{E}{203}% - \DeclareTextComposite{\"}{T1}{\i}{239}% - \DeclareTextComposite{\"}{T1}{I}{207}% - \DeclareTextComposite{\"}{T1}{o}{246}% - \DeclareTextComposite{\"}{T1}{O}{214}% - \DeclareTextComposite{\"}{T1}{u}{252}% - \DeclareTextComposite{\"}{T1}{U}{220}% - % \end{macrocode} % % \begin{macrocode} \fi % \end{macrocode} % % \section{The Romanian diacritics: macros} % % The Romanian \emph{breve-, hat-}, and \emph{cedilla}-macros are % treated differently if the NFSS~2 is present or not. % % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextSymbol\endcsname\relax % \end{macrocode} % % \subsection{\ldots~without NFSS~2} % % The macros are defined first for situations without the NFSS~2. % % \begin{macrocode} \def\@nBRV{\def\u##1{{\accent21 ##1}}} \def\@nHAT{\def\^##1{{\accent94 ##1}}} \def\@nCDL{% cf. \c{#1} in Plain TeX \def\c##1{{\setbox\z@\hbox{##1}\ifdim\ht\z@=1ex{\accent24 ##1}% \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}}} % \end{macrocode} % % \begin{macrocode} \else % \end{macrocode} % % \subsection{\ldots~with NFSS~2} % % For situations with the NFSS~2 is available, one has: % % \begin{macrocode} \def\@rBRV{\def\ro@OTbrv##1{{\accent 21 ##1}}} \def\@rHAT{\def\ro@OThat##1{{\accent 94 ##1}}} \def\@rCDL{% cf. \c{#1} in Plain TeX \def\ro@OTcdl##1{{\setbox\z@\hbox{##1}\ifdim\ht\z@=1ex{\accent24 ##1}% \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}}} \@rBRV \@rHAT \@rCDL % \end{macrocode} % % For fonts with a~\texttt{OT1} and a~\texttt{T1} encoding, % one can use standard definitions. % % \begin{macrocode} \DeclareTextAccent{\u}{T1}{8} \DeclareTextAccent{\^}{T1}{2} \DeclareTextAccent{\c}{T1}{11} \DeclareTextAccent{\u}{OT1}{21} \DeclareTextAccent{\^}{OT1}{94} \DeclareTextAccent{\c}{OT1}{24} \DeclareTextCompositeCommand{\u}{OT1}{a}{\ro@OTbrv{a}}% \DeclareTextCompositeCommand{\u}{OT1}{A}{\ro@OTbrv{A}}% \DeclareTextCompositeCommand{\^}{OT1}{a}{\ro@OThat{a}}% \DeclareTextCompositeCommand{\^}{OT1}{A}{\ro@OThat{A}}% \DeclareTextCompositeCommand{\^}{OT1}{\i}{\ro@OThat{\i}}% \DeclareTextCompositeCommand{\^}{OT1}{I}{\ro@OThat{I}}% \DeclareTextCompositeCommand{\c}{OT1}{s}{\ro@OTcdl{s}}% \DeclareTextCompositeCommand{\c}{OT1}{S}{\ro@OTcdl{S}}% \DeclareTextCompositeCommand{\c}{OT1}{t}{\ro@OTcdl{t}}% \DeclareTextCompositeCommand{\c}{OT1}{T}{\ro@OTcdl{T}}% \DeclareTextComposite{\u}{T1}{a}{160} \DeclareTextComposite{\u}{T1}{A}{128} \DeclareTextComposite{\^}{T1}{a}{226} \DeclareTextComposite{\^}{T1}{A}{194} \DeclareTextComposite{\^}{T1}{\i}{238} \DeclareTextComposite{\^}{T1}{I}{206} \DeclareTextComposite{\c}{T1}{s}{179} \DeclareTextComposite{\c}{T1}{S}{147} \DeclareTextComposite{\c}{T1}{t}{181} \DeclareTextComposite{\c}{T1}{T}{149} % \end{macrocode} % % \begin{macrocode} \fi % \end{macrocode} % % \section{The double quote input notation} % % The input notation |"| for diacritics, special % hyphens, etc., used in \RomanianTeX{} is implemented by the double % quote \textit{active character}. The active DQ-character reads % its argument, deciding about the next action to be performed. % % \subsection{Warnings and errors reports} % % Upon scanning an undefined |"|-sequence, % \RomanianTeX{} generates warnings and error reports. % % \begin{macrocode} \def\DQwarninglevel#1{\chardef\ro@DQwarninglevel=#1\relax} \DQwarninglevel{1} % \end{macrocode} % % \begin{macrocode} \expandafter\ifx\csname on@line\endcsname\relax \ifx\inputlineno\undefined \let\on@line\@empty \else \ifnum\inputlineno<\z@ \let\on@line\@empty \else \def\on@line{ on input line \the\inputlineno} \fi\fi\fi % \end{macrocode} % % The macros for warnings and error reports are self-explanatory: % % \begin{macrocode} \def\ro@DQ@error#1{% \errhelp{Use `` for a simple double quote character.}% \errmessage{romanian: The command \DQ\string#1 is undefined}} \def\ro@DQ@warning#1{% \immediate\write\sixt@@n{romanian: % \DQ\string#1 is possibly wrong\on@line.}} % \end{macrocode} % % \subsection{The defining mechanism for double quote macros} % % \begin{macrocode} \def\ro@DQ@macro#1#2{% \expandafter#1\csname @ro@@\string #2DQ\endcsname} % \end{macrocode} % % \begin{macrocode} \def\def@DQmacro#1#2#3{% \ro@DQredefcheck{#1}% \ro@DQ@macro\def{#1}{{#2}{#3}}} % \end{macrocode} % % \begin{macrocode} \def\let@DQmacro#1#2{\begingroup \ro@DQredefcheck{#1}% \edef\x{\endgroup \let \ro@DQ@macro\noexpand{#1}\ro@DQ@macro\noexpand{#2}}% \x} % \end{macrocode} % % \begin{macrocode} \def\ro@DQredefcheck#1{} % \end{macrocode} % % \subsection{Macros for the active double quote} % % The macro |\@active@DQ| is linked to the active double quote symbol: % % \begin{macrocode} \def\@active@DQ#1{% \ro@DQ@macro\ifx{#1}\relax \ifnum\ro@DQwarninglevel>\z@ \ro@DQ@error{#1}\fi \expandafter\ro@@normal@DQ \else \expandafter\ro@@active@DQ \fi {#1}} % \end{macrocode} % % Cope with the hexadecimal \TeX{} input-notation (a do-nothing case): % % \begin{macrocode} \def\ro@@active@DQ#1{% \ro@DQ@macro\ifx{#1}\noexpand \expandafter\ro@normal@DQ \else \expandafter\ro@@@active@DQ \fi {#1}} % \end{macrocode} % % The command |\ro@@normal@DQ| generates two single quotes % (used in error handling), while |\ro@normal@DQ| is used for % hexadecimal \TeX{}-input. % % \begin{macrocode} \def\ro@@normal@DQ#1{``#1} \def\ro@normal@DQ#1{\DQ #1} % \end{macrocode} % % \subsection{The protection mechanism} % % The protection mechanism is identical with that of German \TeX{} % and is explained in \texttt{german.dtx}. % % \begin{macrocode} \begingroup \catcode`\(=1\lccode`\(=`\{\catcode`\{=12 \catcode`\)=2\lccode`\)=`\}\catcode`\}=12 \catcode`\ =11\relax% <= do not delete this and the \lowercase(\endgroup% <=== following percent characters! % \end{macrocode} % % \begin{macrocode} \def\ro@@@active@DQ#1(% \expandafter\ro@@@@active@DQ\expandafter{\string#1})% % \end{macrocode} % % \begin{macrocode} \def\ro@@@@active@DQ(% \ifx\protect\relax\else\ifx\protect\empty\else% \expandafter\expandafter\expandafter\protect% \fi\fi% \active@DQ \DQ@prtct )% % \end{macrocode} % % \begin{macrocode} \def\DQ@prtct#1#(\@DQ@prtct)% \def\@DQ@prtct#1(\string\DQ@prtct{\string#1})% % \end{macrocode} % % \begin{macrocode} \def\DQ@prtct #1{#2}(\string\DQ@prtct{\string#2})% % \end{macrocode} % % \begin{macrocode} \def\active@DQ #1{#2}(\ro@active@@DQ(#2))% % \end{macrocode} % % \begin{macrocode} )% % \end{macrocode} % % \begin{macrocode} \def\active@DQ#1#{\@active@DQ}% % \end{macrocode} % % \begin{macrocode} \def\ro@active@@DQ#1{% \csname ro@DQ\ifmmode second\else first\fi \expandafter\expandafter\expandafter\expandafter \ro@DQ@macro\endcsname{#1}} % \end{macrocode} % % \subsection{Differential double quote control} % % \RomanianTeX{} \emph{specifics}: we introduce a new identifier % |DQ@mode|; it will be used as a Boolean [a 2-position flag] in % order to discriminate between the German and the Romanian \TeX{} % double quote control. % % \begin{macrocode} \newcount\DQ@mode \DQ@mode=0 % allocate a counter and initialize it % \end{macrocode} % % \begin{macrocode} \def\setRomanianDQ{\DQ@mode=0} \def\setGermanDQ{\DQ@mode=1} % \end{macrocode} % % There are obvious discriminators: % % \begin{macrocode} \def\@R#1#2{\ifnum\DQ@mode=0 #1\else #2\fi} \def\@G#1#2{\ifnum\DQ@mode=1 #1\else #2\fi} % \end{macrocode} % % In fact, only one -- |\@R| say -- is actually needed later. % % \subsection{The double quote commands} % % Most of the |"|-input commands are similar and have the same effect % in \RomanianTeX{}~\RomanianTeXid~and in the \emph{current version} of % German \TeX{} [cf.\ \texttt{german.dtx}, v2.5c |<1.05.1996>|]. % % \subsubsection{The hexadecimal notation} % % We handle first the standard \TeX{} hexadecimal double quote input % notation: % % \begin{macrocode} \ro@DQ@macro\let{0}=\noexpand \let@DQmacro{1}{0}\let@DQmacro{2}{0}\let@DQmacro{3}{0} \let@DQmacro{4}{0}\let@DQmacro{5}{0}\let@DQmacro{6}{0} \let@DQmacro{7}{0}\let@DQmacro{8}{0}\let@DQmacro{9}{0} \let@DQmacro{A}{0}\let@DQmacro{B}{0}\let@DQmacro{C}{0} \let@DQmacro{D}{0}\let@DQmacro{E}{0}\let@DQmacro{F}{0} % \end{macrocode} % % \subsubsection{Inputting the double quotes} % % The macro-encoding for the input of the Romanian/German and % French double quotes \romanianTeX ("`\ldots"' and "<\ldots">) % \originalTeX is as expected: % % \begin{macrocode} \def@DQmacro{`}{\glqq{}}{\glqq{}} % Romanian/German L-DQ \def@DQmacro{'}{\grqq{}}{\grqq{}} % Romanian/German R-DQ \def@DQmacro{<}{\flqq{}}{\flqq{}} % French L-`guillemots' \def@DQmacro{>}{\frqq{}}{\frqq{}} % French R-`guillemots' % \end{macrocode} % % \subsubsection{The normal double quote input} % % In older versions of German and Romanian \TeX{} we could generate % a normal double quote symbol with |"{}|. This feature is maintained % on downward-compatibility reasons: % % \begin{macrocode} \def@DQmacro{}{\DQ{}}{\DQ{}} % \end{macrocode} % % \subsubsection{Hyphenation auxiliaries} % % The special |"|-prefixed symbolic sequences % \verb:"-:, \verb:"|:, \verb:"":, \verb:"~:, and \verb:"=: % stand for hyphenation auxiliary commands, allowing us to cope % (automatically) with local hyphenation exceptions. % % \begin{macrocode} \def@DQmacro{-}{\penalty\@M\-\allowhyphens}% {\penalty\@M\-\allowhyphens} \def@DQmacro{|}{\penalty\@M\discretionary{-}{}{\kern.03em}% \allowhyphens}{} \def@DQmacro{"}{\hskip\z@skip}{\hskip\z@skip} % \end{macrocode} % \begin{macrocode} \def@DQmacro{~}{\leavevmode\hbox{-}}{-} \def@DQmacro{=}{\penalty\@M-\hskip\z@skip}% {\penalty\@M-\hskip\z@skip} % \end{macrocode} % % \subsubsection{Diacritics: Romanian vowels} % % The specific input-output mapping of the Romanian/German diacritics % on vowels must be as follows. (We document here the case-analysis % \RomanianTeX{} \emph{versus} German \TeX{}. % The \emph{actual conditional macro-encoding} is summarized in the % list appearing at the end of this section.) % % For |"a| and |"A| we have, differentially: Romanian \romanianTeX % "a, "A \emph{versus} German \germanTeX "a, "A; for instance, % Romanian \romanianTeX \emph{cas"a} [house], \emph{rom"An} % [Romanian] and German \germanTeX \emph{sp"at, SP"AT} [late]. % \originalTeX (The Romanian upper-case \u{A} and \^{A} are rare % in print and are \emph{not} macro-encoded in \RomanianTeX{}.) % % Analogously, for |"i| and |"I|, one has Romanian \romanianTeX % "i, "I (e.g., "in, "In [in]) \emph{versus} German/French trema's % \germanTeX "i, "I. \originalTeX % % On economy reasons, the remaining \emph{Uml\"aute} % \romanianTeX ("o, "O and "u, "U) \originalTeX and trema's % \romanianTeX ("e, "E, \originalTeX with |\highumlaut|) can be % imported as such from the German \TeX{}, although there is no % need for them in \RomanianTeX{} (except from borrowings, they % do not occur in Romanian). % % \subsubsection{Diacritics: Romanian consonants 1} % % Unlike German, Romanian has diacritics on consonants, too: % Romanian \romanianTeX "s, "S and "t, "T, resp. \originalTeX % In these cases, German \TeX{} uses the |"|-input for genuine % purposes. % % So |"s| and |"S| are used to get \emph{scharfes es} input-encoding. % Contrast, e.g., the Romanian \romanianTeX \emph{"stiri, "Stiri} % [news] and the German \germanTeX \emph{Stra"se, STRA"SE} [street]. % \originalTeX % % Moreover, |"z| and |"Z| have no effect in \RomanianTeX{}, % while, in German \TeX{}, they are also supposed to generate % \emph{scharfes es}, in the form \germanTeX "z and "Z, resp. % (contrast, for instance, \romanianTeX \emph{"zar, "Zar} [dice] % and \germanTeX \emph{Stra"ze, STRA"ZE} [street]). \originalTeX % % In \RomanianTeX{}, the original German \TeX{} encodings of % |"s|, |"S|, |"z| and |"Z| are neutralized conditionally. % % On the other hand, in German \TeX{}, the |"t|- and |"T|-input % is used to yield an `automatic' German hyphenation exception. % % \subsubsection{German hyphenation exceptions} % % The German hyphenation exceptions [cf.\ \texttt{german.dtx}] are % handled by a specific mechanism. The next piece of macro-code is % used only for the German \TeX{} |DQ@mode|: % % \begin{macrocode} \def\ro@DQgdsc#1#2{\penalty\@M \ifnum\ro@DQwarninglevel>\@ne \ro@DQ@warning{#1}\fi \discretionary{#2-}{}{#1}\allowhyphens} % \end{macrocode} % % The conditional variant must also include a test for Romanian; % if a \RomanianTeX{} |DQ@mode| is found, the second argument % (meant to allow German discretionary hyphens) must be discarded, % and so must be the possible warnings: % % \begin{macrocode} \def\ro@DQdisc#1#2{% Romanian-DQ: \ifnum\DQ@mode=0 #1\relax\else% German-DQ: \penalty\@M \ifnum\ro@DQwarninglevel>\@ne \ro@DQ@warning{#1}\fi \discretionary{#2-}{}{#1}\allowhyphens \fi} % \end{macrocode} % % The \RomanianTeX{} handles the German hyphenation exceptions % conditionally, with |\ro@DQdisc|. % % We have, for instance, the genuine German hyphenation exception % [k-k], [K-K], from input |"ck|, |"CK|, but nothing to do in the % case of Romanian (and in German math-mode). % % Further, except for |"t| and |"T| (see below), the remaining cases % (|"l|, |"L|, |"m|, |"M|, |"n|, |"N|, |"p|, |"P|,|"r|, |"R| and |"F|) % are similar, and the original German \TeX{} macro-code can be also % used in \RomanianTeX{} (with the discriminating |\ro@DQdisc|-macro). % % Finally, the special lower-case German \texttt{ff}-ligatures require % a specific mechanism, |\def@DQmacro{f}{\ro@DQdiscff}{f}|, where: % % \begin{macrocode} \def\ro@DQdiscff{\penalty\@M \ifnum\ro@DQwarninglevel>\@ne \ro@DQ@warning f\fi \afterassignment\ro@DQinsertff \let\ro@DQnextff= } \def\ro@DQinsertff{% \if f\ro@DQnextff \expandafter\ro@DQfirst\else\expandafter\ro@DQsecond\fi {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\ro@DQnext}} % \end{macrocode} % % \begin{macrocode} \let\ro@DQnextff=f % \end{macrocode} % [See \texttt{german.dtx} for explanations.] % As there is no \emph{ff} in Romanian (except from borrowings), % this piece of macro-code is useless in \RomanianTeX{} and we % may either decide to neutralize it conditionally or leave it % as it is, with no harm done. % % \emph{Note}. The \TeX{} math-mode ignores the exceptional German hyphens. % % \subsubsection{Diacritics: Romanian consonants 2} % % However, |"t| and |"T| are supposed to yield \romanianTeX "t and "T % \originalTeX resp.\ under a \RomanianTeX{} DQ-r\'egime. In this % case, in place of the original German \TeX{} macro-code, we have a % differential treatement: % Romanian \romanianTeX "t, "T, as, e.g., in \emph{"tara, "Tara} % [the country] \originalTeX \emph{versus} the genuine German % hyphenation exception [tt-t], [TT-T]. % % This can be encoded by using \emph{both} the |\@R|-discriminator % \emph{and} the \emph{original} German \TeX{} |\grmn@DQdisc| (called % here |\ro@DQgdsc|). % % \subsection{The actual DQ-translation} % % We can now display the \emph{actual} |"|-translation map: % % \subsubsection{Vowels} % % \begin{macrocode} \def\@nDQ@a{\@R{\@nBRV a}{\@nUML a}} % "a: \u{a} | \"{a} \def\@mDQ@a{\@R{\@mBRV a}{\@mUML a}} % "a: \u{a} | \"{a} \def\@nDQ@A{\@R{\@nHAT a}{\@nUML A}} % "A: \^{a} | \"{A} \def\@mDQ@A{\@R{\@mHAT a}{\@mUML A}} % "A: \^{a} | \"{A} % \end{macrocode} % \begin{macrocode} \def@DQmacro{a}{\@nDQ@a}{\@mDQ@a} % "a: \u{a} | \"{a} \def@DQmacro{A}{\@nDQ@A}{\@mDQ@A} % "A: \^{a} | \"{A} % \end{macrocode} % % \begin{macrocode} \def@DQmacro{e}{\highumlaut e}{\@mUML e} % "e: \"{e} | \"{e} \def@DQmacro{E}{\highumlaut E}{\@mUML E} % "e: \"{E} | \"{E} % \end{macrocode} % % \begin{macrocode} \def\@nDQ@i{\@R{\@nHAT{\i}}{\highumlaut{\i}}} % "i: \^{\i} | \"{\i} \def\@mDQ@i{\@R{\@mHAT\imath}{\@mUML\imath}} % "i: \^{\i} | \"{\i} \def\@nDQ@I{\@R{\@nHAT I}{\highumlaut I}} % "I: \^{I} | \"{I} \def\@mDQ@I{\@R{\@mHAT I}{\@mUML I}} % "I: \^{I} | \"{I} % \end{macrocode} % \begin{macrocode} \def@DQmacro{i}{\@nDQ@i}{\@mDQ@i} % "i: \^{\i} | \"{\i} \def@DQmacro{I}{\@nDQ@I}{\@mQQ@I} % "I: \^{I} | \"{I} % \end{macrocode} % % \begin{macrocode} \def@DQmacro{o}{\@nUML o}{\@mUML o} % "o: \"{o} | \"{o} \def@DQmacro{O}{\@nUML O}{\@mUML O} % "O: \"{O} | \"{O} % \end{macrocode} % % \begin{macrocode} \def@DQmacro{u}{\@nUML u}{\@mUML u} % "u: \"{u} | \"{u} \def@DQmacro{U}{\@nUML U}{\@mUML U} % "U: \"{U} | \"{U} % \end{macrocode} % % \subsubsection{Consonants} % % \begin{macrocode} \def@DQmacro{c}{\ro@DQdisc ck}{c} % "ck: ck | [k-k] \def@DQmacro{C}{\ro@DQdisc CK}{C} % "CK: ck | [K-K] % \end{macrocode} % % \begin{macrocode} \def@DQmacro{f}{\ro@DQdiscff}{f} % "ff: [ff-f]| [ff-f] \def@DQmacro{F}{\ro@DQdisc F{FF}}{F} % "FF: FF | [FF-F] % \end{macrocode} % % \begin{macrocode} \def@DQmacro{l}{\ro@DQdisc l{ll}}{l} % "ll: ll | [ll-l] \def@DQmacro{L}{\ro@DQdisc L{LL}}{L} % "LL: LL | [LL-L] \def@DQmacro{m}{\ro@DQdisc m{mm}}{m} % similar \def@DQmacro{M}{\ro@DQdisc M{MM}}{M} % similar \def@DQmacro{n}{\ro@DQdisc n{nn}}{n} % similar \def@DQmacro{N}{\ro@DQdisc N{NN}}{N} % similar \def@DQmacro{p}{\ro@DQdisc p{pp}}{p} % similar \def@DQmacro{P}{\ro@DQdisc P{PP}}{P} % similar \def@DQmacro{r}{\ro@DQdisc r{rr}}{r} % similar \def@DQmacro{R}{\ro@DQdisc R{RR}}{R} % similar % \end{macrocode} % % \begin{macrocode} \def\@nDQ@s{\@R{\@nCDL s}{\ss{}}} % "s: \c{s} | \ss \def\@mDQ@s{\@R{\@mCDL s}{\@SS{}}} % "s: \c{s} | \ss \def\@nDQ@S{\@R{\@nCDL S}{SS}} % "S: \c{S} | SS \def\@mDQ@S{\@R{\@mCDL S}{SS}} % "S: \c{S} | SS % \end{macrocode} % \begin{macrocode} \def@DQmacro{s}{\@nDQ@s}{\@mDQ@s} % "s: \c{s} | \ss \def@DQmacro{S}{\@nDQ@S}{\@mDQ@S} % "S: \c{S} | SS % \end{macrocode} % % \begin{macrocode} \def\@nDQ@t{\@R{\@nCDL t}{\ro@DQgdsc t{tt}}} % "t: \c{t} | [tt-t] \def\@mDQ@t{\@R{\@mCDL t}{t}} % "t: \c{t} | t \def\@nDQ@T{\@R{\@nCDL T}{\ro@DQgdsc T{TT}}} % "T: \c{T} | [TT-T] \def\@mDQ@T{\@R{\@mCDL T}{T}} % "T: \c{T} | T % \end{macrocode} % \begin{macrocode} \def@DQmacro{t}{\@nDQ@t}{\@mDQ@t} % "t: \c{t} | [tt-t] \def@DQmacro{T}{\@nDQ@T}{\@mDQ@T} % "T: \c{T} | [TT-T] % \end{macrocode} % % \begin{macrocode} \def\@nDQ@z{\@R{z}{\ss{}}} % "z: z | \ss \def\@mDQ@z{\@R{z}{\@SS{}}} % "z: z | \ss \def\@nDQ@Z{\@R{Z}{SZ}} % "Z: Z | SZ \def\@mDQ@Z{\@R{Z}{SZ}} % "Z: Z | SZ % \end{macrocode} % \begin{macrocode} \def@DQmacro{z}{\@nDQ@z}{\@mDQ@z} % "z: z | \ss \def@DQmacro{Z}{\@nDQ@Z}{\@mDQ@Z} % "Z: Z | SZ % \end{macrocode} % % \subsection{Re-defining the DQ-commands} % % \begin{macrocode} \def\ro@DQredefcheck#1{% \immediate\write\m@ne{romanian: % \ro@DQ@macro\ifx{#1}\relax \else re\fi defining DQ-command for `\string#1'\on@line.}}% % \end{macrocode} % [See \texttt{german.dtx}.] % % \section{Support for other languages} % % This section copes with material which is by now standard in % the \LaTeX{}-world. The interested reader will fruitfully consult % \texttt{german.dtx} or any other similar macro-package (as, e.g., % the \textsc{babel}-system), if (s)he is not already aware of the % way the language-dependent features (date, caption display, etc.) % should work in \LaTeX{}. % % \subsection{Dates} % % \subsubsection{The English date} % % \begin{macrocode} \def\month@english{\ifcase\month \or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi} \def\dateUSenglish{\def\today{\month@english \space\number\day, \number\year}} \def\dateenglish{\def\today{\number\day \ifcase\day \or st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or% 1..10 th\or th\or th\or th\or th\or th\or th\or th\or th\or th\or% 11..20 st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or% 21..30 st\fi ~\month@english \space\number\year}} % \end{macrocode} % % \subsubsection{The Romanian date} % % \begin{macrocode} \def\month@romanian{\ifcase\month \or ianuarie\or februarie\or martie\or aprilie\or mai\or iunie\or iulie\or august\or septembrie\or octombrie\or noiembrie\or decembrie\fi} \def\dateromanian{\def\today{\number\day~\month@romanian \space\number\year}} % \end{macrocode} % % \subsubsection{The German and Austrian dates} % % \begin{macrocode} \def\month@german{\ifcase\month \or Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or Juli\or August\or September\or Oktober\or November\or Dezember\fi} \def\dategerman{\def\today{\number\day.~\month@german \space\number\year}} \def\dateaustrian{\def\today{\number\day.~\ifnum 1=\month J\"anner\else \month@german\fi \space\number\year}} % \end{macrocode} % % \subsubsection{The French date} % % \begin{macrocode} \def\datefrench{\def\today{\number\day \ifnum1=\day \/$^{\rm er}$\fi \space\ifcase\month \or janvier\or f\'evrier\or mars\or avril\or mai\or juin\or juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre\fi \space\number\year}} % \end{macrocode} % % \subsection{Captions} % % \subsubsection{English captions} % % \begin{macrocode} \def\captionsenglish{% \def\prefacename{Preface}% \def\refname{References}% \def\abstractname{Abstract}% \def\bibname{Bibliography}% \def\chaptername{Chapter}% \def\appendixname{Appendix}% \def\contentsname{Contents}% \def\listfigurename{List of Figures}% \def\listtablename{List of Tables}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Table}% \def\partname{Part}% \def\enclname{encl}% \def\ccname{cc}% \def\headtoname{To}% \def\pagename{Page}% \def\seename{see}% \def\alsoname{see also}} \let\captionsUSenglish=\captionsenglish % \end{macrocode} % % \subsubsection{Romanian captions} % % \begin{macrocode} \def\captionsromanian{% % Variants: \def\prefacename{Prefa\c{t}\u{a}}% % \def\refname{Bibliografie}% % Trimiteri bibliografice \def\abstractname{Rezumat}% % Sumar \def\bibname{Bibliografie}% % \def\chaptername{Capitolul}% % [essay.sty]: {} \def\appendixname{Anex\u{a}}% % Apendix \def\contentsname{Cuprins}% % Tabla de materii \def\listfigurename{Lista de figuri}% % Indice de figuri \def\listtablename{Lista de tabele}% % Tabele \def\indexname{Indice}% % \def\figurename{Figura}% % \def\tablename{Tabelul}% % \def\partname{Partea}% % \def\enclname{anexe}% % con\c{t}ine anexe \def\ccname{Copie pentru}% % \def\headtoname{C\u{a}tre}% % \def\pagename{pagina}% % pag., p. \def\seename{vezi}% % a se vedea, v. \def\alsoname{vezi de asemenea}}% % vezi \c{s}i % \end{macrocode} % % Note that, for \texttt{essay.sty} (a \RomanianTeX{} style option % based on Lamport's \texttt{book.sty}), the |\chaptername| must be % \emph{nil}. % % The variant-label \emph{Trimiteri bibliografice} for the % |\refname|-field looks obsolete, but most people from the % humanities would use it preferentially, in place of the % bare \emph{Bibliografie}, translated \emph{ad hoc}, yet % incorrectly, from English/French. % % Finally, the noun \emph{Lista} in the |\listfigurename| and % |\listtablename| fields may also appear without a definite % article (i.e., as \emph{List\u{a}}) in current Romanian prints. % % \subsubsection{German captions} % % \begin{macrocode} \def\captionsgerman{% % Variants: \def\prefacename{Vorwort}% % \def\refname{Literatur}% % Bibliographie \def\abstractname{Zusammenfassung}% % \def\bibname{Literaturverzeichnis}% % Bibliographie \def\chaptername{Kapitel}% % \def\appendixname{Anhang}% % \def\contentsname{Inhaltsverzeichnis}% % Inhalt \def\listfigurename{Abbildungsverzeichnis}% % \def\listtablename{Tabellenverzeichnis}% % \def\indexname{Index}% % \def\figurename{Abbildung}% % \def\tablename{Tabelle}% % Tafel \def\partname{Teil}% % \def\enclname{Anlage(n)}% % Beilage(n) \def\ccname{Verteiler}% % Kopien an \def\headtoname{An}% % \def\pagename{Seite}% % S. \def\seename{siehe}% % s. \def\alsoname{siehe auch}} % \let\captionsaustrian=\captionsgerman % \end{macrocode} % % \subsubsection{French captions} % % \begin{macrocode} \def\captionsfrench{% \def\prefacename{Pr\'eface}% \def\refname{R\'ef\'erences}% \def\abstractname{R\'esum\'e}% \def\bibname{Bibliographie}% \def\chaptername{Chapitre}% \def\appendixname{Annexe}% \def\contentsname{Table des mati\`eres}% \def\listfigurename{Liste des figures}% \def\listtablename{Liste des tableaux}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Tableau}% \def\partname{Partie}% \def\enclname{P.~J.}% \def\ccname{Copie \`a}% \def\headtoname{A}% \def\pagename{Page}% \def\seename{voir}% \def\alsoname{voir aussi}}% % \end{macrocode} % % \subsection{Other language-dependent parameters} % % \subsubsection{English} % % \begin{macrocode} \def\extrasUSenglish{} \let\noextrasUSenglish=\extrasUSenglish \let\extrasenglish=\extrasUSenglish \let\noextrasenglish=\extrasenglish % \end{macrocode} % % \subsubsection{Romanian} % % \begin{macrocode} \def\extrasromanian{\frenchspacing \uchyph\@ne \lefthyphenmin\tw@ \righthyphenmin\tw@} \def\noextrasromanian{% \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi \uchyph\the\uchyph\relax \lefthyphenmin\the\lefthyphenmin \righthyphenmin\the\righthyphenmin} % \end{macrocode} % % \subsubsection{German} % % \begin{macrocode} \def\extrasgerman{\frenchspacing \uchyph\@ne \lefthyphenmin\tw@ \righthyphenmin\tw@} \def\noextrasgerman{% \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi \uchyph\the\uchyph\relax \lefthyphenmin\the\lefthyphenmin \righthyphenmin\the\righthyphenmin} \let\extrasaustrian=\extrasgerman \let\noextrasaustrian=\noextrasgerman % \end{macrocode} % % \subsubsection{French} % % \begin{macrocode} \def\extrasfrench{\frenchspacing} \def\noextrasfrench{% \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi} % \end{macrocode} % % \subsection{Language identifiers: default values} % % \begin{macrocode} \@ifundefined{l@USenglish}{% \@ifundefined{l@english}{\chardef\l@USenglish=255 }% {\chardef\l@USenglish=\l@english}% \wlog{romanian: \string\language\space number for US English % undefined, default \number\l@USenglish\space used.}% }{} % \end{macrocode} % % \begin{macrocode} \@ifundefined{l@english}{% \chardef\l@english=\l@USenglish \wlog{romanian: \string\language\space number for UK English % undefined, default \number\l@english\space used.}% }{} % \end{macrocode} % % \begin{macrocode} \@ifundefined{l@romanian}{% \chardef\l@romanian=255 % \message{romanian: \string\language\space number for Romanian % undefined, default \number\l@romanian\space used.}% }{} % \end{macrocode} % % \begin{macrocode} \@ifundefined{l@german}{% \@ifundefined{l@austrian}{% \chardef\l@german=255 % \wlog{romanian: \string\language\space number for German % undefined, default \number\l@german\space used.}% }{% \chardef\l@german=\l@austrian \wlog{romanian: \string\language\space number for German % undefined, default \number\l@german\space used.}% }% }{} % \end{macrocode} % % \begin{macrocode} \@ifundefined{l@austrian}{% \chardef\l@austrian=\l@german \wlog{romanian: \string\language\space number for Austrian % undefined, default \number\l@austrian\space used.}% }{} % \end{macrocode} % % \begin{macrocode} \@ifundefined{l@french}{% \chardef\l@french=255 \wlog{romanian: \string\language\space number for French % undefined, default \number\l@french\space used.}% }{} % \end{macrocode} % % \subsection{Language selection macros} % % \begin{macrocode} \def\ro@originalTeX{} % \end{macrocode} % % \begin{macrocode} \def\languagename{} % \end{macrocode} % % \begin{macrocode} \expandafter\def\csname selectlanguage \endcsname#1{\relax \expandafter\ifx\csname l@#1\endcsname\relax \errhelp{Your command will be ignored, type to proceed}% \errmessage{You haven't defined the language #1 yet}% \else \ro@originalTeX \edef\languagename{#1}% \edef\ro@originalTeX{\csname noextras#1\endcsname \def\noexpand\ro@originalTeX{}}% \csname date#1\endcsname \csname captions#1\endcsname \csname extras#1\endcsname\relax \csname bibs#1\endcsname % for `bibgerm': must disappear! \language \csname l@#1\endcsname\relax \fi} % \end{macrocode} % % \begin{macrocode} \begingroup\catcode`\ =11\relax% <= do not delete this and the \toks0={\endgroup% <=== following percent characters! \def\selectlanguage#1{\protect\selectlanguage {% \ifnum\escapechar=\expandafter`\string#1\empty% \else\string#1\empty\fi}}}% \the\toks0\relax% % \end{macrocode} % % \begin{macrocode} \def\p@selectlanguage{\selectlanguage} % \end{macrocode} % % \begin{macrocode} \def\iflanguage#1#2#3{% \expandafter\ifx\csname l@#1\endcsname\relax #3% \else \ifnum\csname l@#1\endcsname=\language #2% \else #3\fi\fi} % \end{macrocode} % % \subsection{Compatibility with \protect\TeX~2} % % \begin{macrocode} \expandafter\ifx\csname language\endcsname\relax \csname newcount\endcsname\language \language=0 \fi \expandafter\ifx\csname lefthyphenmin\endcsname\relax \csname newcount\endcsname\lefthyphenmin \lefthyphenmin=2 \fi \expandafter\ifx\csname righthyphenmin\endcsname\relax \csname newcount\endcsname\righthyphenmin \righthyphenmin=3 \fi % \end{macrocode} % % \begin{macrocode} \expandafter\ifx\csname setlanguage\endcsname\relax \def\setlanguage{\relax \ifhmode \else \errhelp{Use \selectlanguage to switch languages.}% \errmessage{\setlanguage allowed only in horizontal mode}% \fi \begingroup\afterassignment\endgroup\count@=} \fi % \end{macrocode} % % \subsection{Activating/de-activating the language setting} % % \begin{macrocode} \begingroup \mDQon \def\x{\endgroup \def\originalTeX{\mDQoff \let"\DQ \umlauthigh \let\3\ro@original@three \selectlanguage{USenglish}}% \def\romanianTeX{\mDQon \let"\@active@DQ \umlautlow \setRomanianDQ % \DQ@mode=0 \let\ro@original@three\3\let\3\ss \selectlanguage{romanian}}% \def\germanTeX{\mDQon \let"\@active@DQ \umlautlow \setGermanDQ % \DQ@mode=1 \let\ro@original@three\3\let\3\ss \selectlanguage{german}}% \def\frenchTeX{\mDQoff \let"\DQ \umlauthigh \let\3\ro@original@three \selectlanguage{french}}}% \x % \end{macrocode} % % The modification job is done. We return to the `public' \TeX{} world % (by setting |@| to category code `other', from the initially saved % |\atcode|): % % \begin{macrocode} \catcode`\@=\atcode % restore_previous_category_code_of |@| % \end{macrocode} % and initialize \RomanianTeX{}: % % \begin{macrocode} \romanianTeX % \end{macrocode} % %\iffalse % %\fi % % \section{A driver for the macro-code documentation} % % The following piece of code should generate the documentation % of the \RomanianTeX{} macro-code (in \texttt{.dvi}-form), from % \texttt{romanian.dtx}, if passed through \emph{Romanian} \LaTeXe{}. % % \begin{macrocode} %<+driver>\ifx\documentclass\undefined % test: LaTeX2e or LaTeX 2.09? %<+driver>\typeout{^^JUse a Romanian LateX2e installation!} %<+driver>\typeout{^^JAborting (fake LaTeX 2.09 article):^^J} %<+driver> \documentstyle[]{article} %<+driver>\else % do the job with (Romanian) LaTeX2e, if possible: %<+driver> \documentclass[a4paper]{ltxdoc} %<+driver> \usepackage{romanian} %<+driver>\fi %<+driver>\begin{document} %<+driver>\ifx\documentclass\undefined \relax % farniente... %<+driver>\else % do the job, as required: %<+driver>\DocInput{romanian.dtx} %<+driver>\fi % reach an end, anyway: %<+driver>\end{document} % \end{macrocode} % % \Finale \endinput %% End of file ROMANIAN.DTX