texlive[70350] Master: chemformula-ru (2mar24)

commits+karl at tug.org commits+karl at tug.org
Sat Mar 2 22:03:23 CET 2024


Revision: 70350
          https://tug.org/svn/texlive?view=revision&revision=70350
Author:   karl
Date:     2024-03-02 22:03:23 +0100 (Sat, 02 Mar 2024)
Log Message:
-----------
chemformula-ru (2mar24)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/chemformula-ru/
    trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.md
    trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.ru
    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/
    trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty
    trunk/Master/tlpkg/tlpsrc/chemformula-ru.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.md	2024-03-02 21:03:23 UTC (rev 70350)
@@ -0,0 +1,14 @@
+Using chemformula package with babel-russian.
+
+DESCRIPTION
+
+The chemformula package and babel-russian settings (russian.ldf) define the same macro \ch.
+The package chemformula-ru undefines babel's macro to prevent an error when 
+both packages are loaded together.
+Optionally it redefines the \cosh macro to print the hyperbolic cosine 
+in Russian notations and/or defines new macro \Ch for that.
+
+Licence: LPPL 1.3c or any later version.
+
+Alexey Kuznetsov   mailtokuznetsov at gmail.com
+


Property changes on: trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.ru
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.ru	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.ru	2024-03-02 21:03:23 UTC (rev 70350)
@@ -0,0 +1,7 @@
+Пакеты chemformula и babel-russian (russian.ldf) вводят одинковую команду \ch,
+вызывающую ошибку при их совместной загрузке.
+Пакет chemformula-ru устраняет ее, делая команду пакета babel неопределенной.
+Дополнительно он позволяет настроить команду \cosh для печати гиперболического косинуса
+в русских нотациях и/или ввести для этого новую команду \Ch.
+
+Алексей Кузнецов   mailtokuznetsov at gmail.com


Property changes on: trunk/Master/texmf-dist/doc/latex/chemformula-ru/README.ru
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf	2024-03-02 21:02:20 UTC (rev 70349)
+++ trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf	2024-03-02 21:03:23 UTC (rev 70350)

Property changes on: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex	2024-03-02 21:03:23 UTC (rev 70350)
@@ -0,0 +1,82 @@
+\documentclass[a4paper]{article}
+\usepackage[]{geometry}
+\geometry{total={180mm, 267mm}, centering}
+
+\usepackage[russian]{babel}
+\usepackage{chemformula}
+\usepackage[ch2Ch,cosh2ch]{chemformula-ru}
+\usepackage{array,multicol}
+
+\begin{document}
+
+\title{The \textsf{chemformula-ru} package}
+\author{Alexey Kuznetsov}
+\date{01.03.2024}
+\maketitle
+
+\begin{multicols}{2}
+The \textsf{chemformula} package defines the command\\[.5ex]
+\mbox{}\hfil\verb|\сh{|\textit{chemical formula}\verb|}|\\[.5ex]
+to type up chemical formulas:\\[.5ex]
+\mbox{}\hfil\verb|\ch{H3PO4}| $\to$ \ch{H3PO4}.\\[.5ex]
+Russian settings of the \textsf{babel} package \textsf{(russianb.ldf)} define the same command to print the hyperbolic cosine:\\[.5ex] 
+\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]
+\begin{tabular}{>\sf l @{ ---\quad } p{.75\linewidth}}
+cosh2ch & overrides the \verb|\cosh| command for printing:\linebreak
+          \verb|$\cosh x$| $\to \cosh x$.  \\[1ex]
+ch2Ch & defines a new \verb|\Ch| command for printing:\linebreak
+         \verb|$\Ch x$| $\to \Ch x$.
+\end{tabular}\\[1ex]
+
+Пакет \textsf{chemformula} вводит команду\\[.5ex]
+\mbox{}\hfil\verb|\сh{|\textit{химическая фоормула}\verb|}|\\[.5ex]
+для верстки химических формул:\\[.5ex]
+\mbox{}\hfil\verb|\ch{H3PO4}| $\to$ \ch{H3PO4}.\\[.5ex]
+Русские настройки пакета \textsf{babel (russianb.ldf)} определяют одноименную команду для печати гиперболического косинуса:\\[-.5ex]
+\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]
+\begin{tabular}{>\sf l @{ --- } p{.8\linewidth}}
+cosh2ch & переопределяет для печати команду \verb|\cosh|:\linebreak
+          \verb|$\cosh x$| $\to \cosh x$.  \\[1ex]
+ch2Ch & определяет для печати новую команду \verb|\Ch|:\linebreak
+         \verb|$\Ch x$| $\to \Ch x$.
+\end{tabular}
+\end{multicols}
+
+\noindent\hrulefill
+
+\begin{verbatim}
+
+%% Redefine \cosh to print ch.
+\DeclareOption{cosh2ch}{\def\cosh at ch{%
+                        \DeclareRobustCommand\cosh{\mathop{\operator at font ch}\nolimits}}}
+
+%% Define new command \Ch to print ch.
+\DeclareOption{ch2Ch}{\def\ch at Ch{%
+                      \DeclareRobustCommand\Ch{\mathop{\operator at font ch}\nolimits}}}
+
+\ProcessOptions\relax
+
+\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 }
+}
+\end{verbatim}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/chemformula-ru/chemformula-ru.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty	2024-03-02 21:03:23 UTC (rev 70350)
@@ -0,0 +1,32 @@
+%%  The chemformula-ru package eliminates an incompatibility 
+%%  between the chemformula package and Russian settings (russian.ldf) of the babel package.
+%%
+%%  Copyright (c) 2024 by Alexey Kuznetsov (mailtokuznetsov at gmail.com)
+%%
+%%  This file may be distributed and/or modified under the
+%%  conditions of the LaTeX Project Public License, either version 1.3c
+%%  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.3c or later is part of all distributions of LaTeX
+%%  version 2008/05/04 or later.
+%%
+
+\ProvidesPackage{chemformula-ru}[2024-03-01 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}}}
+\ProcessOptions\relax
+
+\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 }
+}
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/chemformula-ru/chemformula-ru.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-03-02 21:02:20 UTC (rev 70349)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-03-02 21:03:23 UTC (rev 70350)
@@ -179,7 +179,7 @@
     chappg chapterfolder charissil charter
     chbibref cheatsheet checkcites checkend checklistings chem-journal
     chemarrow chembst chemcompounds chemcono chemexec
-    chemfig chemformula chemgreek chemmacros
+    chemfig chemformula chemformula-ru chemgreek chemmacros
     chemnum chemobabel chemplants chemschemex chemsec chemstyle cherokee
     chess chess-problem-diagrams chessboard chessfss chet chextras
     chhaya chicago chicagoa chicago-annote chickenize

Added: trunk/Master/tlpkg/tlpsrc/chemformula-ru.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2024-03-02 21:02:20 UTC (rev 70349)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2024-03-02 21:03:23 UTC (rev 70350)
@@ -45,6 +45,7 @@
 depend chemcono
 depend chemexec
 depend chemformula
+depend chemformula-ru
 depend chemgreek
 depend chemmacros
 depend chemnum



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