texlive[58836] Master/texmf-dist: babel-serbian
commits+karl at tug.org
commits+karl at tug.org
Sun Apr 11 23:32:32 CEST 2021
Revision: 58836
http://tug.org/svn/texlive?view=revision&revision=58836
Author: karl
Date: 2021-04-11 23:32:32 +0200 (Sun, 11 Apr 2021)
Log Message:
-----------
babel-serbian
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/babel-serbian/README.md
trunk/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf
trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx
trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.ins
trunk/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf
Modified: trunk/Master/texmf-dist/doc/generic/babel-serbian/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-serbian/README.md 2021-04-11 21:32:08 UTC (rev 58835)
+++ trunk/Master/texmf-dist/doc/generic/babel-serbian/README.md 2021-04-11 21:32:32 UTC (rev 58836)
@@ -1,8 +1,8 @@
----------------------------------------------------------------
-Serbian Latin language module for Babel, v2.0a
+# Serbian Latin language module for Babel, v2.1
-Released under the LaTeX Project Public License v1.3c or later.
+Released under the LaTeX Project Public License v1.3 or later.
See http://www.latex-project.org/lppl.txt
The package provides support for use of Babel in documents written in Serbian Latin
@@ -11,7 +11,7 @@
The Current Maintainer is Uroš Stefanović.
-USAGE
+## USAGE
Serbian language definition file can be used both with legacy 8-bit engines
(such as latex.exe or pdflatex.exe) and Unicode compilers (xelatex.exe or
@@ -22,10 +22,15 @@
\usepackage[english,serbianc]{babel}
\languageattribute{serbianc}{ijekav}
or
+
\usepackage[english,serbianc.ijekav]{babel}
Also, the attributes 'datei' and 'quotes' are defined.
-DOCUMENTATION
+## CHANGES v2.1
+New enumeration alphabets are available.
+
+## DOCUMENTATION
+
See serbian.pdf for more information.
Modified: trunk/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx 2021-04-11 21:32:08 UTC (rev 58835)
+++ trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx 2021-04-11 21:32:32 UTC (rev 58836)
@@ -1,7 +1,8 @@
% \iffalse meta-comment
%
-% Copyright 2019 Uroš Stefanović and any individual authors
+% Copyright 2019--2021 Uroš Stefanović and any individual authors
% listed elsewhere in this file. All rights reserved.
+% Earlier Maintainers: Dejan Muhamedagić, Slobodan Janković, Javier Bezos López, Johannes L. Braams
%
% This file is intended to be used with the Babel system.
% ------------------------------------------------------
@@ -31,7 +32,7 @@
%<code>\ProvidesLanguage{serbian}
%\fi
%\ProvidesFile{serbian.dtx}
- [2019/12/15 2.0a Serbian Latin support for the Babel system]
+ [2021/04/10 2.1 Serbian Latin support for the Babel system]
%\iffalse
%% File `serbian.dtx'
%
@@ -99,6 +100,18 @@
% (used when after the date is the punctuation mark, such as comma).
% Alternatively, the commands |\todayRoman| and |\todayRoman*| prints the current date using Roman numerals for months.
%
+% The alphabetical enumerations in texts use the Latin alphabet and alphabetic order,
+% but the letters q, w, x and y are omitted by the rules of the Serbian language (22 letters are used).
+% However, if the user wants to use the English alphabet for the enumeration (26 letters), this option is also available.
+% We will also provide the enumeration with the Latin letters but in alphabetic order that matches the Cyrillic alphabet (30 letters).
+% This of course shouldn't be used when the text is written in the Latin script.
+% However, sometimes the text is written in the Latin script so it can be later
+% converted into Cyrillic script (for example using the |OT2| encoding); in such case this alphabet order will be useful.
+% One can manually switch the enumeration alphabet with the commands |\enumCyr|, |\enumLat| and |\enumEng|.
+% This commands can be used after the |\begin{document}| when the \Lopt{serbian} language is active.
+% In principle, enumerations are a matter for class and style designers but the same can be
+% said also about things, other than enumerations, such as names of sections and bibliography lists.
+%
% Apart from defining shorthands we need to make sure that the
% first paragraph of each section is indented. Furthermore the
% following new math operators are defined: |\sh|, |\ch|, |\tg|, |\ctg|,
@@ -285,7 +298,7 @@
% \end{macrocode}
%
% The Serbian hyphenation patterns can be used with |\lefthyphenmin| and
-% |\righthyphenmin| set to 2. (Actually, the “official” definition allows even one character for |lefthyphen|,
+% |\righthyphenmin| set to~2. (Actually, the “official” definition allows even one character for |lefthyphen|,
% but it is recommended to use value two for better results.)
%
% \begin{macrocode}
@@ -319,6 +332,72 @@
\addto\noextrasserbian{\bbl at nonserbianindent}
% \end{macrocode}
%
+% We redefine the macro |\Alph|, which now produces (uppercase) Latin letters without the letters q, w, x and y
+% when Serbian is switched on, but we will keep the English alphabet if the user wants to use it.
+% Also we will define Latin alphabet in order that matches Cyrillic alphabet.
+% The user can choose which alphabet to use through the commands |\enumCyr|, |\enumLat| and |\enumEng|
+% (or even to switch from one enumeration to another).
+%
+% \begin{macrocode}
+\newcount\srbl at lettering \srbl at lettering=\z@
+\addto\extrasserbian{\babel at save\@Alph \let\@Alph\srbl at Alph}
+\def\srbl at Alph#1{%
+\ifcase\srbl at lettering
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ J\or K\or L\or M\or N\or O\or P\or R\or S\or T\or U\or V\or
+ Z\else\@ctrerr\fi
+\or
+ \if at srb@uni at ode
+ \ifcase#1\or A\or B\or V\or G\or D\or Đ\or E\or Ž\or Z\or
+ I\or J\or K\or L\or Lj\or M\or N\or Nj\or O\or
+ P\or R\or S\or T\or Ć\or U\or F\or H\or C\or
+ Č\or Dž\or Š\else\@ctrerr\fi
+ \else
+ \ifcase#1\or A\or B\or V\or G\or D\or\DJ\or E\or\v Z\or Z\or
+ I\or J\or K\or L\or Lj\or M\or N\or Nj\or O\or
+ P\or R\or S\or T\or\'C\or U\or F\or H\or C\or
+ \v C\or D\v z\or\v S\else\@ctrerr\fi
+ \fi
+\or
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or
+ W\or X\or Y\or Z\else\@ctrerr\fi
+\fi}%
+% \end{macrocode}
+%
+% The same thing will be done with the macro |\alph|.
+%
+% \begin{macrocode}
+\addto\extrasserbian{\babel at save\@alph \let\@alph\srbl at alph}
+\def\srbl at alph#1{%
+\ifcase\srbl at lettering
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or r\or s\or t\or u\or v\or
+ z\else\@ctrerr\fi
+\or
+ \if at srb@uni at ode
+ \ifcase#1\or a\or b\or v\or g\or d\or đ\or e\or ž\or z\or
+ i\or j\or k\or l\or lj\or m\or n\or nj\or o\or
+ p\or r\or s\or t\or ć\or u\or f\or h\or c\or
+ č\or dž\or š\else\@ctrerr\fi
+ \else
+ \ifcase#1\or a\or b\or v\or g\or d\or\dj\or e\or\v z\or z\or
+ i\or j\or k\or l\or lj\or m\or n\or nj\or o\or
+ p\or r\or s\or t\or\'c\or u\or f\or h\or c\or
+ \v c\or d\v z\or\v s\else\@ctrerr\fi
+ \fi
+\or
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or
+ w\or x\or y\or z\else\@ctrerr\fi
+\fi}%
+\addto\extrasserbian{%
+ \babel at save\enumEng \def\enumEng{\srbl at lettering=\tw@}
+ \babel at save\enumLat \def\enumLat{\srbl at lettering=\z@}
+ \babel at save\enumCyr \def\enumCyr{\srbl at lettering=\@ne}
+}%
+% \end{macrocode}
+%
% An |ijekav| attribute changes default behavior and activates an
% alternative set of captions suitable for typesetting in ijekavian dialect.
% The |quotes| attribute changes the |"'| shorthand to produce '' as closing quote,
Modified: trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.ins 2021-04-11 21:32:08 UTC (rev 58835)
+++ trunk/Master/texmf-dist/source/generic/babel-serbian/serbian.ins 2021-04-11 21:32:32 UTC (rev 58836)
@@ -3,8 +3,9 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 2019 Uroš Stefanović and any individual authors
+%% Copyright 2019--2021 Uroš Stefanović and any individual authors
%% listed elsewhere in this file. All rights reserved.
+%% Earlier Maintainers: Dejan Muhamedagić, Slobodan Janković, Javier Bezos López, Johannes L. Braams
%%
%% This file is intended to be used with the Babel system.
%% ------------------------------------------------------
@@ -28,7 +29,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2019/12/15}
+\def\filedate{2021/04/10}
\def\batchfile{serbian.ins}
\input docstrip.tex
@@ -50,7 +51,7 @@
\declarepreamble\mainpreamble
This is a generated file.
-Copyright 2019 Uroš Stefanović and any individual authors
+Copyright 2019--2021 Uroš Stefanović and any individual authors
listed elsewhere in this file. All rights reserved.
This file is intended to be used with the Babel system.
@@ -76,7 +77,7 @@
\declarepreamble\fdpreamble
This is a generated file.
-Copyright 2019 Uroš Stefanović and any individual authors
+Copyright 2019--2021 Uroš Stefanović and any individual authors
listed elsewhere in this file. All rights reserved.
This file is intended to be used with the Babel system.
Modified: trunk/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf 2021-04-11 21:32:08 UTC (rev 58835)
+++ trunk/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf 2021-04-11 21:32:32 UTC (rev 58836)
@@ -7,7 +7,7 @@
%% serbian.dtx (with options: `code')
%% This is a generated file.
%%
-%% Copyright 2019 Uroš Stefanović and any individual authors
+%% Copyright 2019--2021 Uroš Stefanović and any individual authors
%% listed elsewhere in this file. All rights reserved.
%%
%% This file is intended to be used with the Babel system.
@@ -29,7 +29,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesLanguage{serbian}
- [2019/12/15 2.0a Serbian Latin support for the Babel system]
+ [2021/04/10 2.1 Serbian Latin support for the Babel system]
%% File `serbian.dtx'
\LdfInit{serbian}{captionsserbian}
\ifdefined\if at srb@uni at ode
@@ -141,6 +141,58 @@
\def\bbl at nonserbianindent{\let\@afterindentfalse\@aifORI\@afterindentfalse}
\addto\extrasserbian{\bbl at serbianindent}
\addto\noextrasserbian{\bbl at nonserbianindent}
+\newcount\srbl at lettering \srbl at lettering=\z@
+\addto\extrasserbian{\babel at save\@Alph \let\@Alph\srbl at Alph}
+\def\srbl at Alph#1{%
+\ifcase\srbl at lettering
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ J\or K\or L\or M\or N\or O\or P\or R\or S\or T\or U\or V\or
+ Z\else\@ctrerr\fi
+\or
+ \if at srb@uni at ode
+ \ifcase#1\or A\or B\or V\or G\or D\or Đ\or E\or Ž\or Z\or
+ I\or J\or K\or L\or Lj\or M\or N\or Nj\or O\or
+ P\or R\or S\or T\or Ć\or U\or F\or H\or C\or
+ Č\or Dž\or Š\else\@ctrerr\fi
+ \else
+ \ifcase#1\or A\or B\or V\or G\or D\or\DJ\or E\or\v Z\or Z\or
+ I\or J\or K\or L\or Lj\or M\or N\or Nj\or O\or
+ P\or R\or S\or T\or\'C\or U\or F\or H\or C\or
+ \v C\or D\v z\or\v S\else\@ctrerr\fi
+ \fi
+\or
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or
+ W\or X\or Y\or Z\else\@ctrerr\fi
+\fi}%
+\addto\extrasserbian{\babel at save\@alph \let\@alph\srbl at alph}
+\def\srbl at alph#1{%
+\ifcase\srbl at lettering
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or r\or s\or t\or u\or v\or
+ z\else\@ctrerr\fi
+\or
+ \if at srb@uni at ode
+ \ifcase#1\or a\or b\or v\or g\or d\or đ\or e\or ž\or z\or
+ i\or j\or k\or l\or lj\or m\or n\or nj\or o\or
+ p\or r\or s\or t\or ć\or u\or f\or h\or c\or
+ č\or dž\or š\else\@ctrerr\fi
+ \else
+ \ifcase#1\or a\or b\or v\or g\or d\or\dj\or e\or\v z\or z\or
+ i\or j\or k\or l\or lj\or m\or n\or nj\or o\or
+ p\or r\or s\or t\or\'c\or u\or f\or h\or c\or
+ \v c\or d\v z\or\v s\else\@ctrerr\fi
+ \fi
+\or
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or
+ w\or x\or y\or z\else\@ctrerr\fi
+\fi}%
+\addto\extrasserbian{%
+ \babel at save\enumEng \def\enumEng{\srbl at lettering=\tw@}
+ \babel at save\enumLat \def\enumLat{\srbl at lettering=\z@}
+ \babel at save\enumCyr \def\enumCyr{\srbl at lettering=\@ne}
+}%
\bbl at declare@ttribute{serbian}{ijekav}{%
\PackageInfo{babel}{Serbian attribute set to ijekav}%
\let\captionsserbian=\captionsserbian at ijekav }
More information about the tex-live-commits
mailing list.