% \iffalse meta-comment
%
% Copyright 1989-2009 Johannes L. Braams and any individual authors
% listed elsewhere in this file.  All rights reserved.
% 
% This file is part of the Babel system.
% --------------------------------------
% 
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
% 
% This work has the LPPL maintenance status "maintained".
% 
% The Current Maintainer of this work is Johannes Braams.
% 
% The list of all files belonging to the Babel system is
% given in the file `manifest.bbl. See also `legal.bbl' for additional
% information.
% 
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
% \CheckSum{344}
%
% \iffalse
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%<*dtx>
\ProvidesFile{kurmanji.dtx}
%</dtx>
%<code>\ProvidesLanguage{kurmanji}
%\fi
%\ProvidesFile{kurmanji.dtx}
        [2009/06/25 v1.1 Kurmanji support from the babel system]
%\iffalse
%% Babel package for LaTeX version 2e
%% Copyright (C) 1989 -- 2009
%%           by Johannes Braams, TeXniek
%
%% Please report errors to: J.L. Braams
%%                          babel at braams.xs4all.nl
%
%    This file is part of the babel system, it provides the source code for
%    the Kurmanji language definition file.
%<*filedriver>
\documentclass{ltxdoc}
\newcommand*{\TeXhax}{\TeX hax}
\newcommand*{\babel}{\textsf{babel}}
\newcommand*{\langvar}{$\langle \mathit lang \rangle$}
\newcommand*{\note}[1]{}
\newcommand*{\Lopt}[1]{\textsf{#1}}
\newcommand*{\file}[1]{\texttt{#1}}
\begin{document}
 \DocInput{kurmanji.dtx}
\end{document}
%</filedriver>
%\fi
% \GetFileInfo{kurmanji.dtx}
%
% \changes{kurmanji-1.1}{2009/02/13}{Removed old changes from
%    language.skeleton}
% \changes{kurmanji-1.1}{2009/02/13}{Corrected some typographical errors 
%    in the documentation}
% \changes{kurmanji-1.1}{2009/02/13}{Added documentation about the date}
% \changes{kurmanji-1.1}{2009/02/13}{Rewrote the code for Kurmanji date} 
% \changes{kurmanji-1.1}{2009/02/13}{Set both hyphenmins to two}
% \changes{kurmanji-1.1}{2009/02/13}{Use frenchspacing}
% \changes{kurmanji-1.1}{2009/05/11}{Make month > 12 an error}
% \changes{kurmanji-1.1}{2009/05/11}{Documentation of hyphenmins}
% \changes{kurmanji-1.1}{2009/05/11}{Added three numerical date formats}
% \changes{kurmanji-1.1}{2009/06/25}{Page, Chapter, and Apppendix inflected}
% \changes{kurmanji-1.1}{2009/06/25}{Added Makro \cs{ontoday}}
%
%  \section{The Kurmanji language}
%
%    The Kurmanji language belongs to the Kurdish languages.
%    Of the Kurdish languages, Kurmanji  has the largest
%    number of speakers and is written with the turkish based latin alphabet
%    by Mir Celadet Bedirxan. Kurmanji is spoken in Turkey, Syria and by 
%    the majority of the Kurdish diaspora in Europe.
%
%    The file \file{\filename}\footnote{The file described in this
%    section has version number \fileversion\ and was last revised on
%    \filedate.}  defines all the language definition macros for the
%    Kurmanji language. Versions 1.0 and 1.1  of this file were 
%    contributed by
%    J\"org Knappen and Medeni Shemd\^e. The code for the active |^|
%    was lifted from esperanto.dtx.
%
% \begin{table}[htb]
%    \centering
%     \begin{tabular}{lp{8cm}}
%      |^c| & gives \c c with hyphenation in the rest of the word
%             allowed, this works for c, C, s, S\\
%      |^e| & gives \^e, with hyphenation in the rest of the word
%                   allowed,  this works for e, E, i, I, u, U\\
%      \verb=^|= & inserts a |\discretionary{-}{}{}|\\
%      |"`| & gives lower left double german style quotes, like~,,\\
%      |"'| & gives upper right double igerman style quotes, like~``\\
%      \end{tabular}
%      \caption{The functions of the active character for Kurmanji.}
%    \label{tab:kur-act}
% \end{table}
%
% \subsection{The date in Kurmanji}
%
% Currently, there is no agreed set of month names for the gregorian calendar
% in Kurmanji. We provide two lists of month names, |\datekurmanji| selects
% month names based on traditional sources, |\datekurmanjialternate| gives
% another selection. In addition, we provide macros |\januaryname| to 
% |\decembername| allowing the user to redefine each single month name 
% according to their preferences. 
%
% The predefinded month names can be found in table~\ref{tab:kur-mon}.
%
% \begin{table}[htb]
%   \begin{tabular}{lll}
%   English  & Kurmanji (traditional)      & Kurmanji (alternate) \\ \hline
%   January  & \c{C}ileya Pa\c{s}{\^\i}n   & R\^ebendan\\
%   February & Sibat                       & Re\c{s}emih\\
%   March    & Adar                        & Adar\\
%   April    & N{\^\i}san                  & Cotan\\
%   May      & Gulan                       & Gulan\\
%   June     & Hez{\^\i}ran                & P\^u\c{s}per\\
%   July     & T{\^\i}rmeh                 & T{\^\i}rmeh\\
%   August   & Tebax                       & Gelav\^ej\\
%   September& \^Ilon                      & Gelarezan\\
%   Oktober  & \c{C}iriya P\^e\c{s}{\^\i}n & Kew\c{c}\^er\\
%   November & \c{C}iriya Pa\c{s}{\^\i}n   & Sermawez\\
%   December & \c{C}ileya P\^e\c{s}{\^\i}n & Berfandar
%   \end{tabular}
%   \caption{Month names in Kurmanji.}
%   \label{tab:kur-mon}
% \end{table}
%
% \changes{kurmanji-1.1}{2009/06/25}{Added Makro \cs{ontoday}}
% The macro \cs{ontoday} gives the date in the inflected form. This form is
% used in the head of a letter and looks like 25'\^e Hez{\^\i}ran\^e 2009.
%
% \changes{kurmanji-1.1}{2009/05/11}{Added three numerical date formats}
% In addition to the date formats with month names we provide three 
% numerical date formats: \cs{datesymd} provides the date in the swedish style
% YYYY-MM-DD, \cs{datesdmy} provides the date in the style D/M YYYY (also
% popular in sweden), and \cs{dategdmy} provides the date in the style
% D. M. YYYY (popular in germany and many other countries).
% These commands should be issued after \cs{begin{document}}.
% \StopEventually{}
%
%    The macro |\LdfInit| takes care of preventing that this file is
%    loaded more than once, checking the category code of the
%    \texttt{@} sign, etc.
%    \begin{macrocode}
%<*code>
\LdfInit{kurmanji}{captionskurmanji}
%    \end{macrocode}
%
%    When this file is read as an option, i.e. by the |\usepackage|
%    command, \texttt{kurmanji} could be an `unknown' language in
%    which case we have to make it known.  So we check for the
%    existence of |\l@kurmanji| to see whether we have to do
%    something here.
%
%    \begin{macrocode}
\ifx\undefined\l@kurmanji
  \@nopatterns{Kurmanji}
  \adddialect\l@kurmanji0\fi
%    \end{macrocode}
%    The next step consists of defining commands to switch to (and
%    from) the Kurmanji language.
%
%    Now we declare the |<attrib>| language attribute.
%    \begin{macrocode}
\bbl@declare@ttribute{kurmanji}{<attrib>}{%
%    \end{macrocode}
%    This code adds the expansion of |\extras<attrib>kurmanji| to
%    |\extraskurmanji|.
%    \begin{macrocode}
  \expandafter\addto\expandafter\extraskurmanji
  \expandafter{\extras<attrib>kurmanji}%
  \let\captionskurmanji\captions<attrib>kurmanji
  }
%    \end{macrocode}
%
% \changes{kurmanji-1.1}{2009/02/13}{Set both hyphenmins to two}
% \changes{kurmanji-1.1}{2009/05/11}{Documentation of hyphenmins}
% The kurmanji hyphenation patterns can be used with |\lefthyphenmin|
%    and |\righthyphenmin| set to~2.
%  \begin{macro}{\kurmanjihyphenmins}
%    This macro is used to store the correct values of the hyphenation
%    parameters |\lefthyphenmin| and |\righthyphenmin|.
%    \begin{macrocode}
\providehyphenmins{kurmanji}{\tw@\tw@}
%    \end{macrocode}
%  \end{macro}
%
% \changes{kurmanji-1.1}{2009/06/25}{Page, Chapter, and Apppendix inflected}
% \begin{macro}{\captionskurmanji}
%    The macro |\captionskurmanji| defines all strings used in the
%    four standard documentclasses provided with \LaTeX.
%    \begin{macrocode}
\def\captionskurmanji{%
 \def\prefacename{Pe\c{s}gotin}%               %  Gotina Pe\c{s}\^i
 \def\refname{Pirtuken bijart{\^\i}}%
 \def\abstractname{Kurteb{\^\i}r}%             % En\c{c}am
 \def\bibname{\c{C}avkan{\^\i}ya Pirtukan}%
 \def\chaptername{Ser\^e}%
 \def\appendixname{Teb{\^\i}n{\^\i}ya}%
 \def\contentsname{Nav\^erok}%                 % Navedank  
 \def\listfigurename{Hejmara Dimena}%
 \def\listtablename{Hejmara Kevalen}%
 \def\indexname{Endeks}%
 \def\figurename{Dimen\^e}%                    % Weney\^e
 \def\tablename{Kevala}% 
 \def\partname{B\^e\c{s}a}%
 \def\enclname{Dumahik}%                       % Duvik
 \def\ccname{Belavker}% 
 \def\headtoname{Ji bo}%                       % Ji ... re
 \def\pagename{R\^upel\^e}%
 \def\seename{bin\^era}%                       % bala xwe bida
 \def\alsoname{le v\^eya ji bin\^era}%
 \def\proofname{Del{\^\i}l}%
 \def\glossaryname{\c{C}avkan{\^\i}ya l\^ekol{\^\i}n\^e}%
}
%    \end{macrocode}
% \end{macro}
%
%
% \changes{kurmanji-1.1}{2009/02/13}{Rewrote the code for Kurmanji date} 
% \begin{macro}{\datekurmanji}
% \begin{macro}{\datekurmanjialternate}
%    The macro |\datekurmanji| redefines the command |\today| to
%    produce Kurmanji dates. We choose the traditional names for the months.
%    The macro |\datekurmanjialternate|
%    defines an alternate set of month names. It is
%    also very common to use numbers for the month.
% \changes{kurmanji-1.1}{2009/06/25}{Added Makro \cs{ontoday}}
%
% \changes{kurmanji-1.1}{2009/05/11}{Make month > 12 an error}
% We define the general date format in terms of macros |\januaryname| to
% |\decembername| which can be redefined by the user.
%    \begin{macrocode}
\def\datekurmanji{%
  \def\today{\number\day.~\ifcase\month\or
  \januaryname\or \februaryname\or \marchname\or \aprilname\or
  \mayname\or \junename\or \julyname\or \augustname\or
  \septembername\or \octobername\or \novembername\or 
  \decembername\or \@ctrerr\fi~\number\year}%
  \def\ontoday{\number\day'\^e~\ifcase\month\or
  \januaryname\or \februaryname\or \marchname\or \aprilname\or
  \mayname\or \junename\or \julyname\or \augustname\or
  \septembername\or \octobername\or \novembername\or
  \decembername\or \@ctrerr\fi\^e~\number\year}%
  \def\januaryname{\c{C}ileya Pa\c{s}{\^\i}n}%
  \def\februaryname{Sibat}%
  \def\marchname{Adar}%
  \def\aprilname{N\^{\i}san}%
  \def\mayname{Gulan}%
  \def\junename{Hez{\^\i}ran}%
  \def\julyname{T{\^\i}rmeh}%
  \def\augustname{Tebax}%
  \def\septembername{\^Ilon}%
  \def\octobername{\c{C}iriya P\^e\c{s}{\^\i}n}%
  \def\novembername{\c{C}iriya Pa\c{s}{\^\i}n}%
  \def\decembername{\c{C}ileya P\^e\c{s}{\^\i}n}%
}
\def\datekurmanjialternate{%
  \datekurmanji
  \def\januaryname{R\^ebendan}%
  \def\februaryname{Re\c{s}emih}%
  \def\aprilname{Cotan}%           % Avr\^el
  \def\junename{P\^u\c{s}per}%
  \def\augustname{Gelav\^ej}%
  \def\septembername{Gelarezan}%   % Rezber
  \def\octobername{Kew\c{c}\^er}%
  \def\novembername{Sermawez}%
  \def\decembername{Berfandar}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \changes{kurmanji-1.1}{2009/05/11}{Added three numerical date formats}
%  \begin{macro}{\datesymd}
% \changes{swedish-2.3a}{2000/01/20}{Command added}
%    The macro |\datesymd| redefines the command |\today| to
%    produce dates in the format YYYY-MM-DD, common in Sweden.
%    \begin{macrocode}
\def\datesymd{%
  \def\today{\number\year-\two@digits\month-\two@digits\day}%
  }
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\datesdmy}
%    The macro |\datesdmy| redefines the command |\today| to
%    produce Swedish dates in the format DD/MM YYYY, also common in
%    Sweden.
%    \begin{macrocode}
\def\datesdmy{%
  \def\today{\number\day/\number\month\space\number\year}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\dategdmy}
%    The macros |\dategdmy| redefines the command |\today| to produce
%    german style dates in the format D. M. YYYY.
%    \begin{macrocode}
\def\dategdmy{%
  \def\today{\number\day.\space\number\month.\space\number\year}%
  }
%    \end{macrocode}  
%  \end{macro}
%
% \begin{macro}{\extraskurmanji}
% \begin{macro}{\noextraskurmanji}
%    The macro |\extraskurmanji| will perform all the extra
%    definitions needed for the Kurmanji language. The macro
%    |\noextraskurmanji| is used to cancel the actions of
%    |\extraskurmanji|.  
%
%    For Kurmanji the  |^| character is made active. This is done
%    once, later on its definition may vary.
%
%    \begin{macrocode}
\initiate@active@char{^}
%    \end{macrocode}
%    Because the character |^| is used in math mode with quite a
%    different purpose we need to add an extra level of evaluation to
%    the definition of the active |^|. It checks whether math mode is
%    active; if so the shorthand mechanism is bypassed by a direct
%    call of |\normal@char^|.
%    \begin{macrocode}
\addto\extraskurmanji{\languageshorthands{kurmanji}}
\addto\extraskurmanji{\bbl@activate{^}}
\addto\noextraskurmanji{\bbl@deactivate{^}}
%    \end{macrocode}
%
%    In order to prevent problems with the active |^| we add a
%    shorthand on system level which expands to a `normal |^|.
%    \begin{macrocode}
\declare@shorthand{system}{^}{\csname normal@char\string^\endcsname}
%    \end{macrocode}
%    And here are the uses of the active |^|:
%    \begin{macrocode}
\declare@shorthand{kurmanji}{^c}{\c{c}\allowhyphens}
\declare@shorthand{kurmanji}{^C}{\c{C}\allowhyphens}
\declare@shorthand{kurmanji}{^e}{\^e\allowhyphens}
\declare@shorthand{kurmanji}{^E}{\^E\allowhyphens}
\declare@shorthand{kurmanji}{^i}{{\^\i}\allowhyphens}
\declare@shorthand{kurmanji}{^I}{\^I\allowhyphens}
\declare@shorthand{kurmanji}{^s}{\c{s}\allowhyphens}
\declare@shorthand{kurmanji}{^S}{\c{S}\allowhyphens}
\declare@shorthand{kurmanji}{^u}{\^u\allowhyphens}
\declare@shorthand{kurmanji}{^U}{\^U\allowhyphens}
\declare@shorthand{kurmanji}{^`}{\glqq}
\declare@shorthand{kurmanji}{^'}{\grqq}
\declare@shorthand{kurmanji}{^|}{\discretionary{-}{}{}\allowhyphens}
%    \end{macrocode}
%
% \changes{kurmanji-1.1}{2009/02/13}{Use frenchspacing}
% For typesetting Kurmanji text, frenchspacing is preferred.
%    \begin{macrocode}
\addto\extraskurmanji{\bbl@frenchspacing}
\addto\noextraskurmanji{\bbl@nonfrenchspacing}
%    \end{macrocode}

% \end{macro}
% \end{macro}
%
%    The macro |\ldf@finish| takes care of looking for a
%    configuration file, setting the main language to be switched on
%    at |\begin{document}| and resetting the category code of
%    \texttt{@} to its original value.
%    \begin{macrocode}
\ldf@finish{kurmanji}
%</code>
%    \end{macrocode}
%
% \Finale
%\endinput
%% \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         \~}
%%
