From 0305002960075b3f60f4125ed15d4dae571f55c3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 11 Apr 2021 21:32:32 +0000 Subject: babel-serbian git-svn-id: svn://tug.org/texlive/trunk@58836 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/generic/babel-serbian/README.md | 13 +++- .../doc/generic/babel-serbian/serbian.pdf | Bin 247034 -> 255910 bytes .../source/generic/babel-serbian/serbian.dtx | 85 ++++++++++++++++++++- .../source/generic/babel-serbian/serbian.ins | 9 ++- .../tex/generic/babel-serbian/serbian.ldf | 56 +++++++++++++- 5 files changed, 150 insertions(+), 13 deletions(-) diff --git a/Master/texmf-dist/doc/generic/babel-serbian/README.md b/Master/texmf-dist/doc/generic/babel-serbian/README.md index c3b005e6719..7006c05ad02 100644 --- a/Master/texmf-dist/doc/generic/babel-serbian/README.md +++ b/Master/texmf-dist/doc/generic/babel-serbian/README.md @@ -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 @@ under legacy TeX engines, and under XeTeX and LuaTeX. 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 @@ Typesetting in ijekavian dialect: \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. diff --git a/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf b/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf index e79bce0e575..29d8d75b5e6 100644 Binary files a/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf and b/Master/texmf-dist/doc/generic/babel-serbian/serbian.pdf differ diff --git a/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx b/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx index dd46341dfc8..106ac9b7aa4 100644 --- a/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx +++ b/Master/texmf-dist/source/generic/babel-serbian/serbian.dtx @@ -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 @@ %\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@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@lettering \srbl@lettering=\z@ +\addto\extrasserbian{\babel@save\@Alph \let\@Alph\srbl@Alph} +\def\srbl@Alph#1{% +\ifcase\srbl@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@srb@uni@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@save\@alph \let\@alph\srbl@alph} +\def\srbl@alph#1{% +\ifcase\srbl@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@srb@uni@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@save\enumEng \def\enumEng{\srbl@lettering=\tw@} + \babel@save\enumLat \def\enumLat{\srbl@lettering=\z@} + \babel@save\enumCyr \def\enumCyr{\srbl@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, diff --git a/Master/texmf-dist/source/generic/babel-serbian/serbian.ins b/Master/texmf-dist/source/generic/babel-serbian/serbian.ins index c5610fcb3ab..aa495cf06af 100644 --- a/Master/texmf-dist/source/generic/babel-serbian/serbian.ins +++ b/Master/texmf-dist/source/generic/babel-serbian/serbian.ins @@ -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 @@ extension .ins) which are part of the distribution. \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. diff --git a/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf b/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf index 376f972f0d0..d92cdcfcc38 100644 --- a/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf +++ b/Master/texmf-dist/tex/generic/babel-serbian/serbian.ldf @@ -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@srb@uni@ode @@ -141,6 +141,58 @@ \def\bbl@nonserbianindent{\let\@afterindentfalse\@aifORI\@afterindentfalse} \addto\extrasserbian{\bbl@serbianindent} \addto\noextrasserbian{\bbl@nonserbianindent} +\newcount\srbl@lettering \srbl@lettering=\z@ +\addto\extrasserbian{\babel@save\@Alph \let\@Alph\srbl@Alph} +\def\srbl@Alph#1{% +\ifcase\srbl@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@srb@uni@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@save\@alph \let\@alph\srbl@alph} +\def\srbl@alph#1{% +\ifcase\srbl@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@srb@uni@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@save\enumEng \def\enumEng{\srbl@lettering=\tw@} + \babel@save\enumLat \def\enumLat{\srbl@lettering=\z@} + \babel@save\enumCyr \def\enumCyr{\srbl@lettering=\@ne} +}% \bbl@declare@ttribute{serbian}{ijekav}{% \PackageInfo{babel}{Serbian attribute set to ijekav}% \let\captionsserbian=\captionsserbian@ijekav } -- cgit v1.2.3