texlive[71764] Master/texmf-dist: chemformula-ru (10jul24)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 10 22:43:33 CEST 2024


Revision: 71764
          https://tug.org/svn/texlive?view=revision&revision=71764
Author:   karl
Date:     2024-07-10 22:43:33 +0200 (Wed, 10 Jul 2024)
Log Message:
-----------
chemformula-ru (10jul24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf
    trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex
    trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty

Modified: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex	2024-07-10 20:43:24 UTC (rev 71763)
+++ trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex	2024-07-10 20:43:33 UTC (rev 71764)
@@ -3,7 +3,6 @@
 \geometry{total={180mm, 267mm}, centering}
 
 \usepackage[russian]{babel}
-\usepackage{chemformula}
 \usepackage[ch2Ch,cosh2ch]{chemformula-ru}
 \usepackage{array,multicol}
 
@@ -11,7 +10,7 @@
 
 \title{The \textsf{chemformula-ru} package}
 \author{Alexey Kuznetsov}
-\date{01.03.2024}
+\date{10.07.2024}
 \maketitle
 
 \begin{multicols}{2}
@@ -23,9 +22,8 @@
 \mbox{}\hfil\verb|$\ch x$|\ $\to\ \Ch x$.\\[.5ex]
 Loading packages together leads to the error\\[1ex]
 \mbox{}\hfil\verb|! LaTeX Error: Command \ch already defined.|\\[1ex]
-The \textsf{chemformula-ru} package ``neutralizes'' it by making the babel's command undefined.
-
-The package has two parameters to configure the printing of the hyperbolic cosine in Russian notation:\\[1ex]
+The \textsf{chemformula-ru} package loads the \textsf{chemformula} and ``neutralizes'' the error by making the babel's command undefined.
+Two it's parameters configure printing of the hyperbolic cosine in Russian notation:\\[1ex]
 \begin{tabular}{>\sf l @{ ---\quad } p{.75\linewidth}}
 cosh2ch & overrides the \verb|\cosh| command for printing:\linebreak
           \verb|$\cosh x$| $\to \cosh x$.  \\[1ex]
@@ -37,13 +35,12 @@
 \mbox{}\hfil\verb|\сh{|\textit{химическая фоормула}\verb|}|\\[.5ex]
 для верстки химических формул:\\[.5ex]
 \mbox{}\hfil\verb|\ch{H3PO4}| $\to$ \ch{H3PO4}.\\[.5ex]
-Русские настройки пакета \textsf{babel (russianb.ldf)} определяют одноименную команду для печати гиперболического косинуса:\\[-.5ex]
+Русские настройки пакета \textsf{babel (russianb.ldf)} определяют одноименную команду для печати гиперболического косинуса:\\[-.85\baselineskip]
 \mbox{}\hfil\verb|$\ch x$|\ $\to\ \Ch x$.\\[.5ex]
 Cовместная загрузка пакетов ведет к ошибке\\[1ex]
 \mbox{}\hfil\verb|! LaTeX Error: Command \ch already defined.|\\[1ex]
-Пакет \textsf{chemformula-ru} <<нейтрализует>> ее, делая команду пакета \textsf{babel} неопределенной.
-
-Пакет имеет два параметра, настраивающих печать гиперболического косинуса в русских нотациях:\\[1ex]
+Пакет \textsf{chemformula-ru} загружает \textsf{chemformula} и <<нейтрализует>> ошибку, делая команду пакета \textsf{babel} неопределенной.
+Два его параметра настраивают печать гиперболического косинуса в русских нотациях:\\[1ex]
 \begin{tabular}{>\sf l @{ --- } p{.8\linewidth}}
 cosh2ch & переопределяет для печати команду \verb|\cosh|:\linebreak
           \verb|$\cosh x$| $\to \cosh x$.  \\[1ex]
@@ -52,10 +49,11 @@
 \end{tabular}
 \end{multicols}
 
+\thispagestyle{empty}
+
 \noindent\hrulefill
 
 \begin{verbatim}
-
 %% Redefine \cosh to print ch.
 \DeclareOption{cosh2ch}{\def\cosh at ch{%
                         \DeclareRobustCommand\cosh{\mathop{\operator at font ch}\nolimits}}}
@@ -64,19 +62,22 @@
 \DeclareOption{ch2Ch}{\def\ch at Ch{%
                       \DeclareRobustCommand\Ch{\mathop{\operator at font ch}\nolimits}}}
 
+%% Pass all other options to the chemformula package.
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{chemformula}}
+
 \ProcessOptions\relax
 
+\RequirePackage{chemformula}
+
 \BeforeBeginEnvironment{document}{
-   \IfPackageLoadedTF{chemformula}{ 
-      \IfPackageLoadedWithOptionsTF{babel}{russian}{
-         \let\@Chem at Formula\ch \let\ch\undefined
-         \AtBeginDocument{ \let\ch\@Chem at Formula 
-            \@ifundefined{cosh at ch}{\relax}{\cosh at ch}
-            \@ifundefined{ch at Ch}{\relax}{\ch at Ch}
-         } 
-      } { \relax } 
-   } { \relax }
-}
+   \let\@Chem at Formula\ch \let\ch\undefined
+   \AtBeginDocument{ 
+      \let\ch\@Chem at Formula 
+      \@ifundefined{cosh at ch}{\relax}{\cosh at ch}
+      @ifundefined{ch at Ch}{\relax}{\ch at Ch}
+   } }
+
+\endinput
 \end{verbatim}
 
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty	2024-07-10 20:43:24 UTC (rev 71763)
+++ trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty	2024-07-10 20:43:33 UTC (rev 71764)
@@ -1,5 +1,5 @@
 %%  The chemformula-ru package eliminates an incompatibility 
-%%  between the chemformula package and Russian settings (russian.ldf) of the babel package.
+%%  between the chemformula package and Russian settings (russian.ldf) for the babel package.
 %%
 %%  Copyright (c) 2024 by Alexey Kuznetsov (mailtokuznetsov at gmail.com)
 %%
@@ -12,21 +12,21 @@
 %%  version 2008/05/04 or later.
 %%
 
-\ProvidesPackage{chemformula-ru}[2024-03-01 Using chemformula package with babel-russian]
+\ProvidesPackage{chemformula-ru}[2024-07-10 Using chemformula package with babel-russian]
 
 \DeclareOption{cosh2ch}{\def\cosh at ch{\DeclareRobustCommand\cosh{\mathop{\operator at font ch}\nolimits}}}
 \DeclareOption{ch2Ch}{\def\ch at Ch{\DeclareRobustCommand\Ch{\mathop{\operator at font ch}\nolimits}}}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{chemformula}}
 \ProcessOptions\relax
 
+\RequirePackage{chemformula}
+
 \BeforeBeginEnvironment{document}{
-	\IfPackageLoadedTF{chemformula}{ 
-		\IfPackageLoadedWithOptionsTF{babel}{russian}{
-			\let\@Chem at Formula\ch \let\ch\undefined
-			\AtBeginDocument{ \let\ch\@Chem at Formula 
-				\@ifundefined{cosh at ch}{\relax}{\cosh at ch}
-				\@ifundefined{ch at Ch}{\relax}{\ch at Ch}
-			} 
-		} { \relax } 
-	} { \relax }
-}
+   \let\@Chem at Formula\ch \let\ch\undefined
+   \AtBeginDocument{ 
+      \let\ch\@Chem at Formula 
+      \@ifundefined{cosh at ch}{\relax}{\cosh at ch}
+      \@ifundefined{ch at Ch}{\relax}{\ch at Ch}
+   } }
+
 \endinput



More information about the tex-live-commits mailing list.