texlive[64665] Master/texmf-dist: chemobabel (9oct22)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 9 22:18:38 CEST 2022


Revision: 64665
          http://tug.org/svn/texlive?view=revision&revision=64665
Author:   karl
Date:     2022-10-09 22:18:38 +0200 (Sun, 09 Oct 2022)
Log Message:
-----------
chemobabel (9oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/chemobabel/README.md
    trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-en.pdf
    trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-en.tex
    trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-ja.pdf
    trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-ja.tex
    trunk/Master/texmf-dist/doc/latex/chemobabel/example-en.tex
    trunk/Master/texmf-dist/doc/latex/chemobabel/example-ja.tex
    trunk/Master/texmf-dist/doc/latex/chemobabel/images-for-doc.tar.gz
    trunk/Master/texmf-dist/source/latex/chemobabel/chemobabel.dtx
    trunk/Master/texmf-dist/tex/latex/chemobabel/chemobabel.sty

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemobabel/README.md	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/doc/latex/chemobabel/README.md	2022-10-09 20:18:38 UTC (rev 64665)
@@ -43,7 +43,7 @@
 
 ## Release Date
 
-2022-09-19
+2022-10-09
 
 --------------------
 Hironobu YAMASHITA (aka. "Acetaminophen" or "@aminophen")

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

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-en.tex	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-en.tex	2022-10-09 20:18:38 UTC (rev 64665)
@@ -46,18 +46,23 @@
 \usepackage{footnotebackref}
 \makeatletter
 \long\def\@makecaption#1#2{%
-\vskip\abovecaptionskip
-\sbox\@tempboxa{#1: #2}
-\global\@minipagefalse
-\hbox to\hsize{\hfil\box\@tempboxa\hfil}
-\vskip\belowcaptionskip}
+  \vskip\abovecaptionskip
+  \sbox\@tempboxa{#1: #2}%
+  \global\@minipagefalse
+  \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+  \vskip\belowcaptionskip}
 \makeatother
 \newcount\TestCount
-\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam%
-X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
-\kern-.30em{M}}
+\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam
+  X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
+  \kern-.30em{M}}
 \def\XyMTeX{\XyM\kern-.1em\TeX}
-\title{\textsf{chemobabel} \\[1ex]
+\def\Lpack#1{\textsf{#1}}
+\def\Lcode#1{\texttt{#1}}
+\def\Lmeta#1{\textit{#1}}
+\def\Lver#1{\Lpack{chemobabel} #1}
+\def\TikZ{Ti\textit{k}Z}
+\title{\Lpack{chemobabel} \\[1ex]
   \normalsize --- Chemical Structures from MDL Molfiles,
   ChemDraw Files or SMILES Notations --- \\
   }
@@ -67,7 +72,7 @@
 \pagenumbering{roman}
 \maketitle
 
-This document (\jobname.pdf) describes the usage of \textsf{chemobabel.sty},
+This document (\jobname.pdf) describes the usage of \Lpack{chemobabel.sty},
 a \LaTeX\ package for \textbf{generating chemical structural formulas}
 to be inserted in your documents.
 The formulas can be generated \textbf{from many kinds of chemical data
@@ -80,7 +85,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \quad
-  \chemobabel[width=90mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=90mm]{draw/Brevetoxin A.mol}
   \caption{Firefly luciferin \& Brevetoxin A (from MDL Molfiles)}
 \end{figure}
 
@@ -87,7 +92,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \hspace{1cm}
-  \chemobabel[width=35mm]{draw/Glucose.cdx}{}
+  \chemobabel*[width=35mm]{draw/Glucose.cdx}
   \caption{ATP (Adenosine triphosphate) \& Glucose (from ChemDraw files)}
 \end{figure}
 \begin{center}\small
@@ -98,15 +103,15 @@
 \begin{figure}[ht]
   \centering
   \smilesobabel[width=36mm]{CCO}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{CC(C(=O)O)N}{} \hspace{1cm}
-  \smilesobabel[width=30mm]{C1[C at H](C)C[C@@H](O)C1}{}
+  \smilesobabel*[width=40mm]{CC(C(=O)O)N} \hspace{1cm}
+  \smilesobabel*[width=30mm]{C1[C at H](C)C[C@@H](O)C1}
   \caption{Ethanol, Alanine \& (1\textit{S},3\textit{S})-3-Methylcyclopentanol (from SMILES notations)}
 \end{figure}
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=30mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}{}
+  \smilesobabel*[width=30mm]{CC(=O)Nc1ccc(cc1)O} \hspace{1cm}
+  \smilesobabel*[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}
   \caption{Acetaminophen (Paracetamol) \& $\alpha$-\textsc{d}-Glucose (from SMILES notations)}
 \end{figure}
 
@@ -140,8 +145,8 @@
 \begin{itemize}
   \item \href{http://www.ctan.org/pkg/xymtex}{\XyMTeX}:
     a set of packages for drawing chemical structural formulas
-\item \href{http://www.ctan.org/pkg/chemfig}{\textsf{chemfig}}:
-    a package which draws molecules using Ti\textit{k}Z
+\item \href{http://www.ctan.org/pkg/chemfig}{\Lpack{chemfig}}:
+    a package which draws molecules using \TikZ
 \end{itemize}
 These packages are reliable and almost all kinds of structural formulas
 can be drawn in a consistent way. However, a lot of practice will be
@@ -155,7 +160,7 @@
 (such as \verb|.cdx| or \verb|.mol|) and graphical formats
 (\verb|.pdf| or \verb|.eps|) manually.
 
-This new package, \textsf{chemobabel.sty}, will offer a new choice for
+This new package, \Lpack{chemobabel.sty}, will offer a new choice for
 chemists who need chemical structures inserted in their \LaTeX\ documents.
 In this method, we use \href{http://openbabel.org/}{Open Babel} for
 generating chemical structural formulas in SVG format,
@@ -204,7 +209,7 @@
 \href{https://inkscape.org/en/}{Inkscape}
 (or \href{http://librsvg.sourceforge.net/download/}{librsvg}) on your
 computer, and export PATH to the command-line binary of both programs,
-\verb+obabel+ and \verb+inkscape+ (or \verb+rsvg-convert+).
+\Lcode{obabel} and \Lcode{inkscape} (or \Lcode{rsvg-convert}).
 You can confirm by executing following commands:
 In UNIX operating system:
 \begin{verbatim}
@@ -228,8 +233,8 @@
 \begin{verbatim}
 \usepackage{chemobabel}
 \end{verbatim}
-to load \textsf{chemobabel} package.
-The package depends on \textsf{graphicx}.
+to load \Lpack{chemobabel} package.
+The package depends on \Lpack{graphicx}.
 
 \clearpage
 
@@ -244,12 +249,12 @@
 \href{http://www.chemspider.com/}{ChemSpider} (originally \verb|9041092.mol|).
 
 Use \verb|\chemobabel| command as follows. I put original files in a
-subdirectory \texttt{draw}, so added \texttt{draw/} before the actual filename.
+subdirectory \Lcode{draw}, so added \Lcode{draw/} before the actual filename.
 Of course you can put in the same directory with your \LaTeX\ file.
 
 \begin{verbatim}
 \chemobabel[width=90mm]{draw/ATP.cdx}{}
-\chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+\chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
 \end{verbatim}
 
 Then, typeset with \verb|-shell-escape| option.
@@ -264,24 +269,30 @@
 \begin{figure}[h]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \\ \vspace{1cm}
-  \chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
   \caption{Conversion from ATP.cdx and Brevetoxin A.mol}\label{fig:chem1}
 \end{figure}
 
 The syntax is:
 \begin{center}
-\verb|\chemobabel[|\textit{options}\verb|]{|\textit{filename}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\chemobabel[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\chemobabel*[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}|
 \end{center}
-As parameters, \textit{filename} should be placed in the first braces, and
-\textit{obabel options} (see Section \ref{depict} for some examples)
-can be added in the second braces.
-You can leave the second parameter empty.
+\verb|\chemobabel| takes one optional parameter and two mandatory parameters.
+\begin{itemize}
+ \item The optional parameter \Lmeta{options} in the box brackets
+   is passed to \verb|\includegraphics|.
+   If omitted, the default ``scale=1' is assumed.
+ \item The first mandatory parameter \Lmeta{filename} is the file name
+   which contains chemical structural formula.
+ \item The second mandatory parameter \Lmeta{obabel options}
+   is passed to \verb|obabel| command
+   (see Section \ref{depict} for some examples).
+\end{itemize}
+If you want to leave the second parameter empty,
+a shorthand form \verb|\chemobabel*| is also available
+(since \Lver{v0.9k [2022/10/09]}).
 
-You can give \textit{options} to be passed to \verb|\includegraphics|
-command as optional parameters in the box brackets.
-This option is not necessary, so can be omitted. In this case the default
-option ``scale=1" is passed to \verb|\includegraphics| command.
-
 \subsection{Conversion from SMILES Notations}
 
 You can also write SMILES notations directly in your \LaTeX\ file to be
@@ -292,7 +303,7 @@
 
 \begin{verbatim}
 \smilesobabel{CCO}{}
-\smilesobabel[width=35mm]{CC(=O)Nc1ccc(cc1)O}{}
+\smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
 \end{verbatim}
 
 Again typeset with \verb|-shell-escape| option:
@@ -304,16 +315,17 @@
 \begin{figure}[h]
   \centering
   \smilesobabel{CCO}{} \quad
-  \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{}
+  \smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
   \caption{Conversion from SMILES notation}\label{fig:smi1}
 \end{figure}
 
 The syntax is:
 \begin{center}
-\verb|\smilesobabel[|\textit{options}\verb|]{|\textit{SMILES notation}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\smilesobabel[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\smilesobabel*[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}|
 \end{center}
 The only difference from \verb|\chemobabel| is that
-\textit{SMILES notation} should be placed in the first braces.
+\Lmeta{SMILES notation} should be placed in the first braces.
 You can put any kinds of SMILES notations in parameters of
 \verb|\smilesobabel|, even when they contain some special characters
 such as a backslash (\verb|\|) and a percent symbol (\verb|%|).
@@ -320,25 +332,24 @@
 Similarly, parameters of \verb|\chemobabel| can also contain
 these special characters.
 \begin{verbatim}
-\smilesobabel[width=28mm]{Cl/C=C/Br}{}
-\smilesobabel[width=28mm]{Cl/C=C\Br}{}
+\smilesobabel*[width=28mm]{Cl/C=C/Br}
+\smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{verbatim}
 \begin{figure}[h]
   \centering
-  \smilesobabel[width=28mm]{Cl/C=C/Br}{} \quad
-  \smilesobabel[width=28mm]{Cl/C=C\Br}{}
+  \smilesobabel*[width=28mm]{Cl/C=C/Br} \quad
+  \smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{figure}
 
-\noindent \textbf{Notes for users of earlier versions} ($\le$ \textsf{chemobabel} v0.6 [2015/06/29])
+\noindent \textbf{Notes for users of earlier versions \Lver{v0.6 [2015/06/29]} or older}
 
-In earlier versions of \textsf{chemobabel}, it was necessary for users
+In earlier versions of \Lpack{chemobabel}, it was necessary for users
 to pay another attention when using these \LaTeX\ special characters.
 However, the workaround I had suggested before was far from desirable
 because ``casual \LaTeX\ users'' were forced to change category codes
 of these characters manually.
 
-To solve this problem, I prepared supporting macros inside the package
-itself ($\ge$ \textsf{chemobabel} v0.7 [2015/08/26]).
+To solve this problem, I improved the internal macros since \Lver{v0.7 [2015/08/26]}.
 Now you can put any kinds of SMILES notations directly without worrying
 about special characters (\verb|\|, \verb|%|, etc).
 Note that the undesirable workaround (like changing \verb|\catcode| inside
@@ -349,21 +360,21 @@
 
 \subsection{Package options}
 
-By default, \textsf{chemobabel} converts chemical structures into
+By default, \Lpack{chemobabel} converts chemical structures into
 PDF images using Inkscape. However, you can switch the image format
 and the conversion program if you like.
 
 When you are using drivers which do not support PDF figures (such as dvips),
-it will be helpful if \textsf{chemobabel} converts them into EPS images.
+it will be helpful if \Lpack{chemobabel} converts them into EPS images.
 For this purpose, you can use:
 \begin{verbatim}
 \usepackage[eps]{chemobabel}
 \end{verbatim}
 The option \verb|eps| switches the image format (that is, output format
-from Inkscape) into EPS ($\ge$ \textsf{chemobabel} v0.9d [2016/02/28]).
+from Inkscape) into EPS (since \Lver{v0.9d [2016/02/28]}).
 
 You can also change the image conversion program from ``Inkscape'' to
-``rsvg-convert'' ($\ge$ \textsf{chemobabel} v0.9e [2016/03/07]).
+``rsvg-convert'' (since \Lver{v0.9e [2016/03/07]}).
 The program rsvg-convert is faster than inkscape, so it will be useful.
 For this purpose, use \verb|librsvg| option:
 \begin{verbatim}
@@ -377,7 +388,7 @@
 Moreover, Open Babel v2.4.0 or later versions generate images with
 a rather large margin. To avoid this, the images are cropped
 using \verb|pdfcrop| for PDF or \verb|ps2eps| for EPS
-($\ge$ \textsf{chemobabel} v0.9i [2022/09/12]).
+(since \Lver{v0.9i [2022/09/12]}).
 If you want to disable this cropping, please add \verb|nocrop| option:
 \begin{verbatim}
 \usepackage[nocrop]{chemobabel}
@@ -408,7 +419,7 @@
 $ pdflatex test.tex
 \end{verbatim}
 can be used.
-With \verb|extract| option, all \textsf{chemobabel} does is extracting
+With \verb|extract| option, all \Lpack{chemobabel} does is extracting
 all \verb|\chemobabel| and \verb|\smilesobabel| commands from the
 original \LaTeX\ file.
 You will get ``ChemFigFile.tex'' in the same directory, a minimal
@@ -437,7 +448,7 @@
 \label{depict}
 
 As I have already mentioned, in both \verb|\chemobabel| and \verb|\smilesobabel|,
-you can give some \textit{obabel options} in the second braces.
+you can give some \Lmeta{obabel options} in the second braces.
 Here I will introduce some examples.
 \begin{itemize}
 \item
@@ -460,7 +471,7 @@
 \begin{verbatim}
 \chemobabel{ATP.cdx}{-xd}
 \end{verbatim}
-You can add \texttt{-xd} option to remove filenames from ChemDraw figures with Open Babel 2.x.
+You can add \Lcode{-xd} option to remove filenames from ChemDraw figures with Open Babel 2.x.
 \begin{verbatim}
 $ obabel -:"ATP.cdx" -O chemobabelimg[NUM].svg -xd
 \end{verbatim}
@@ -471,7 +482,7 @@
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
   \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{-xa} \hspace{1cm}
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{-xu}
-  \caption{Acetaminophen (Paracetamol): Nothing, \texttt{-xa}, \texttt{-xu}}
+  \caption{Acetaminophen (Paracetamol): Nothing, \Lcode{-xa}, \Lcode{-xu}}
   SMILES: \verb|CC(=O)Nc1ccc(cc1)O|
 \end{figure}
 
@@ -480,7 +491,7 @@
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xC} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xt}
-  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \texttt{-xC}, \texttt{-xt}}
+  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \Lcode{-xC}, \Lcode{-xt}}
   SMILES: \verb|C1[C at H](C)C[C@@H](O)C1|
 \end{figure}
 
@@ -489,7 +500,7 @@
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xa -xu} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xu -xC}
-  \caption{3-Ethylbenzoyl chloride: Nothing, \texttt{-xa -xu}, \texttt{-xu -xC}}
+  \caption{3-Ethylbenzoyl chloride: Nothing, \Lcode{-xa -xu}, \Lcode{-xu -xC}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -497,7 +508,7 @@
   \centering
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{--highlight "cC=O blue"} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xA --genalias}
-  \caption{3-Ethylbenzoyl chloride: \texttt{--highlight "cC=O blue"}, \texttt{-xA --genalias}}
+  \caption{3-Ethylbenzoyl chloride: \Lcode{--highlight "cC=O blue"}, \Lcode{-xA --genalias}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -505,7 +516,7 @@
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \hspace{1cm}
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{-xa}
-  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \texttt{-xa}}
+  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \Lcode{-xa}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -512,7 +523,7 @@
   \centering
   \chemobabel[width=70mm]{draw/ATP.cdx}{} \hspace{1cm}
   \chemobabel[width=70mm]{draw/ATP.cdx}{-xd}
-  \caption{ATP (from ChemDraw files): Nothing, \texttt{-xd}}
+  \caption{ATP (from ChemDraw files): Nothing, \Lcode{-xd}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -531,7 +542,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}{}
+  \smilesobabel*[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}
   \caption{($-$)-Morphine}
   SMILES: \verb|CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O|
 \end{figure}
@@ -538,7 +549,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}{}
+  \smilesobabel*[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}
   \caption{Brevetoxin A}
   SMILES (Sorry but too long): \verb|C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C|
 \end{figure}
@@ -566,10 +577,10 @@
   \centering
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \Lcode{--gen2d})}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \Lcode{--gen2d})}
 \end{center}
 \end{figure}
 
@@ -583,7 +594,7 @@
   \caption{Firefly luciferin: exact structure from ChemSpider ID 4588411}
   \includegraphics[scale=0.6]{figures/Win232-FireflyLuciferin.pdf}
   \caption{Firefly luciferin?: output from Open Babel for Win 2.3.2}
-  \smilesobabel[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}{}
+  \smilesobabel*[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}
   \caption{Firefly luciferin?: output from current Open Babel}
   SMILES: \verb|C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O|
 \end{figure}
@@ -597,12 +608,13 @@
 
 \section{Note for Compatibility}
 
-\subsection{Advantages of \textsf{chemobabel}}
+\subsection{Advantages of \Lpack{chemobabel}}
 
 The macros \verb|\smiles| (written by Noel O'Boyle \cite{NOB1}) and
-\verb|\obabel| (depends on \textsf{graphvizObabel.sty} by
+\verb|\obabel| (depends on \Lpack{graphvizObabel.sty} by
 Jakob Lykke Andersen's \cite{JLA}) can be used as follows:
 \begin{verbatim}
+%% ----- for \smiles command -----
 \newcounter{smilescounter}
 \setcounter{smilescounter}{1}
 \newcommand{\smiles}[1]{
@@ -610,9 +622,16 @@
   \includegraphics{smilesimg\arabic{smilescounter}.png}
   \addtocounter{smilescounter}{1}
 }
+ ...
+\smiles{CCO}
+%% -----
+\end{verbatim}
+\begin{verbatim}
+%% ----- for \obabel command -----
 \usepackage{graphvizObabel}
-\smiles{CCO}
+ ...
 \obabel[scale=0.6]{CCO}
+%% -----
 \end{verbatim}
 However, \verb|\smiles| command creates raster graphics (.png) and
 has no options to pass to \verb|\includegraphics|, and \verb|\obabel| command
@@ -632,13 +651,13 @@
 Therefore this method will be useful only when you need a simple method
 for inserting structural formulas with minimal modification.
 If you are not satisfied with the output, consider using {\XyMTeX} or
-\textsf{chemfig} packages instead.
+\Lpack{chemfig} packages instead.
 
 I also found following packages which can be used for similar purpose:
 \begin{itemize}
-  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\textsf{mol2chemfig}}:
+  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\Lpack{mol2chemfig}}:
     convert chemical structures from MDL molfile format
-    to \textsf{chemfig} source code
+    to \Lpack{chemfig} source code
 \end{itemize}
 
 \clearpage
@@ -674,26 +693,20 @@
 \LaTeX\ special characters.
 However, a backslash (\verb|\|) is a default escape character in \LaTeX,
 and a percent symbol (\verb|%|) also has a special meaning as a comment character.
-In \textsf{chemobabel} (higher than v0.7), all these characters are
+In \Lpack{chemobabel} (higher than v0.7), all these characters are
 handled properly by changing category codes temporarily (like \verb+\verb+). \\
 
 \clearpage
 
-To do (if possible):
-\begin{itemize}
-\item Check whether \texttt{obabel} and \texttt{inkscape} are successfully
-installed or not, before running programs.
-\end{itemize}
-
 \section{Version History}
 
 \begin{table}[h]
 \centering
 \begin{tabular}{ll}
-2014/12/01 v0.1  & Made public as \textsf{smilesobabel.sty} \\
+2014/12/01 v0.1  & Made public as \Lpack{smilesobabel.sty} \\
 2014/12/02 v0.2  & Add options which can be passed to obabel. \\
-2014/12/07 v0.3  & Change name of package: \textsf{chemobabel.sty} \\
-                 & Images are stored in \texttt{chemobabelimgdir}. \\
+2014/12/07 v0.3  & Change name of package: \Lpack{chemobabel.sty} \\
+                 & Images are stored in \Lcode{chemobabelimgdir}. \\
                  & Add \verb|\chemobabel| command. \\
 2014/12/09 v0.4  & Fix a bug: (Thanks: Yusuke Terada) \\
                  & Extra spaces at the end of lines are removed. \\
@@ -713,6 +726,10 @@
 2022/09/11 v0.9h & Support Inkscape version 1.0 command line syntax. \\
 2022/09/12 v0.9i & Crop images before inclusion, add \verb|nocrop| option. \\
 2022/09/19 v0.9j & Check shell-escape status to show better error message. \\
+                 & This is the first release on CTAN! \\
+2022/10/09 v0.9k & Add \verb|\chemobabel*| and \verb|\smilesobabel*|. \\
+                 & Warn if a user need to run another \LaTeX. \\
+                 & Improve \verb|[extract]| to take over user-given package options. \\
 \end{tabular}
 \end{table}
 
@@ -719,7 +736,7 @@
 \textbf{Important!}
 \begin{itemize}
 \item In Version 0.2, the number of parameters set in \verb|\smilesobabel| is changed!
-\item From Version 0.3, the package name is changed to \textsf{chemobabel.sty}.
+\item From Version 0.3, the package name is changed to \Lpack{chemobabel.sty}.
 \item From Version 0.7, the \verb|\catcode|-related workaround is rather harmful.
 \end{itemize}
 

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

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-ja.tex	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/doc/latex/chemobabel/chemobabel-ja.tex	2022-10-09 20:18:38 UTC (rev 64665)
@@ -46,18 +46,23 @@
 \usepackage{footnotebackref}
 \makeatletter
 \long\def\@makecaption#1#2{%
-\vskip\abovecaptionskip
-\sbox\@tempboxa{#1: #2}
-\global\@minipagefalse
-\hbox to\hsize{\hfil\box\@tempboxa\hfil}
-\vskip\belowcaptionskip}
+  \vskip\abovecaptionskip
+  \sbox\@tempboxa{#1: #2}%
+  \global\@minipagefalse
+  \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+  \vskip\belowcaptionskip}
 \makeatother
 \newcount\TestCount
-\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam%
-X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
-\kern-.30em{M}}
+\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam
+  X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
+  \kern-.30em{M}}
 \def\XyMTeX{\XyM\kern-.1em\TeX}
-\title{\textsf{chemobabel} \\[1ex]
+\def\Lpack#1{\textsf{#1}}
+\def\Lcode#1{\texttt{#1}}
+\def\Lmeta#1{\textit{#1}}
+\def\Lver#1{\Lpack{chemobabel} #1}
+\def\TikZ{Ti\textit{k}Z}
+\title{\Lpack{chemobabel} \\[1ex]
   \normalsize --- Chemical Structures from MDL Molfiles,
   ChemDraw Files or SMILES Notations --- \\
   化学構造式をMOLファイルやChemDrawファイル,SMILES表記法から自動生成
@@ -69,7 +74,7 @@
 \maketitle
 
 この文書では,\textbf{化学構造式を生成}して\LaTeX の文書中に挿入するための
-パッケージである\textsf{chemobabel.sty}と同梱リソースの使い方を説明します。
+パッケージである\Lpack{chemobabel.sty}と同梱リソースの使い方を説明します。
 構造式はOpen Babelの機能を利用することにより,MDL Molfile, ChemDrawファイル,
 さらにはSMILES表記法を含む\textbf{さまざまな化学データ形式から生成}できます。
 以下の構造式はこの方法によって出力されたものです。
@@ -79,7 +84,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \quad
-  \chemobabel[width=90mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=90mm]{draw/Brevetoxin A.mol}
   \caption{Firefly luciferin \& Brevetoxin A (from MDL Molfiles)}
 \end{figure}
 
@@ -86,7 +91,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \hspace{1cm}
-  \chemobabel[width=35mm]{draw/Glucose.cdx}{}
+  \chemobabel*[width=35mm]{draw/Glucose.cdx}
   \caption{ATP (Adenosine triphosphate) \& Glucose (from ChemDraw files)}
 \end{figure}
 \begin{center}\small
@@ -97,15 +102,15 @@
 \begin{figure}[ht]
   \centering
   \smilesobabel[width=36mm]{CCO}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{CC(C(=O)O)N}{} \hspace{1cm}
-  \smilesobabel[width=30mm]{C1[C at H](C)C[C@@H](O)C1}{}
+  \smilesobabel*[width=40mm]{CC(C(=O)O)N} \hspace{1cm}
+  \smilesobabel*[width=30mm]{C1[C at H](C)C[C@@H](O)C1}
   \caption{Ethanol, Alanine \& (1\textit{S},3\textit{S})-3-Methylcyclopentanol (from SMILES notations)}
 \end{figure}
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=30mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}{}
+  \smilesobabel*[width=30mm]{CC(=O)Nc1ccc(cc1)O} \hspace{1cm}
+  \smilesobabel*[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}
   \caption{Acetaminophen (Paracetamol) \& $\alpha$-\textsc{d}-Glucose (from SMILES notations)}
 \end{figure}
 
@@ -137,8 +142,8 @@
 \begin{itemize}
   \item \href{http://www.ctan.org/pkg/xymtex}{\XyMTeX}:
     化学構造式を描くためのパッケージ集
-  \item \href{http://www.ctan.org/pkg/chemfig}{\textsf{chemfig}}:
-    Ti\textit{k}Zを利用して構造式を描画するパッケージ
+  \item \href{http://www.ctan.org/pkg/chemfig}{\Lpack{chemfig}}:
+    \TikZ を利用して構造式を描画するパッケージ
 \end{itemize}
 これらのパッケージは確実で,あらゆる構造式を一貫性をもって描画することができます。
 しかし,十分にその機能を活用できるようになるには相当の熟練を要します。
@@ -150,7 +155,7 @@
 この場合,化学用のフォーマット(\verb|.cdx| や \verb|.mol| など)と
 画像フォーマット(\verb|.pdf| や \verb|.eps| など)の両方で保存する必要があります。
 
-新しいパッケージ \textsf{chemobabel.sty} は,\LaTeX 文書中に化学構造式を
+新しいパッケージ \Lpack{chemobabel.sty} は,\LaTeX 文書中に化学構造式を
 挿入する必要がある化学者に新たな選択肢を提供することでしょう。
 この方法では,\href{http://openbabel.org/}{Open Babel}によって
 SVG形式の構造式画像を生成し,
@@ -195,8 +200,8 @@
 初めにコンピュータに\href{http://openbabel.org/}{Open Babel}と
 \href{https://inkscape.org/ja/}{Inkscape}(または
 \href{http://librsvg.sourceforge.net/download/}{librsvg})をインストールし,
-コマンドライン実行ファイルである\verb+obabel+と\verb+inkscape+
-(または\verb+rsvg-convert+)にPATHを通します。
+コマンドライン実行ファイルである
+\Lcode{obabel}と\Lcode{inkscape}(または\Lcode{rsvg-convert})にPATHを通します。
 正しくPATHが通っているかどうかは以下のコマンドによって確認できます:
 UNIX系の場合:
 \begin{verbatim}
@@ -220,9 +225,9 @@
 \begin{verbatim}
 \usepackage{chemobabel}
 \end{verbatim}
-と宣言して\textsf{chemobabel}パッケージを読み込みます。
-これは\textsf{graphicx}パッケージに依存しますので,
-もし(u)p\LaTeX を使っていてDVIドライバに\texttt{dvipdfmx}を使用する場合は
+と宣言して\Lpack{chemobabel}パッケージを読み込みます。
+これは\Lpack{graphicx}パッケージに依存しますので,
+もし(u)p\LaTeX を使っていてDVIドライバに\Lcode{dvipdfmx}を使用する場合は
 ドライバオプション \verb+[dvipdfmx]+ をクラスオプション(グローバル)に
 付けるのを忘れないようにしてください。
 
@@ -239,13 +244,13 @@
 (もとのファイル名は \verb|9041092.mol| となっています)。
 
 \verb|\chemobabel| コマンドは本文中で以下のようにして使います。
-ここでは元のファイルを\texttt{draw}というサブディレクトリに置いたので,
-ファイル名の前に \texttt{draw/} を付けました。
+ここでは元のファイルを\Lcode{draw}というサブディレクトリに置いたので,
+ファイル名の前に \Lcode{draw/} を付けました。
 もちろん \LaTeX ソースと同一ディレクトリに置くこともできます。
 
 \begin{verbatim}
 \chemobabel[width=90mm]{draw/ATP.cdx}{}
-\chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+\chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
 \end{verbatim}
 
 \LaTeX ファイル名がtest.texだとすると,以下のように
@@ -265,22 +270,27 @@
 \begin{figure}[h]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \\ \vspace{1cm}
-  \chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
   \caption{Conversion from ATP.cdx and Brevetoxin A.mol}\label{fig:chem1}
 \end{figure}
 
 構文は以下のとおりです。
 \begin{center}
-\verb|\chemobabel[|\textit{options}\verb|]{|\textit{filename}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\chemobabel[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\chemobabel*[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}|
 \end{center}
-引数として,中括弧の1つめにファイル名を与え,2つめにobabelに送る
-オプション(例は第\ref{depict}節を参照)を指定してください。
-2つめの引数は空にすることもできます。
+\verb|\chemobabel| は1つのオプション引数と2つの必須引数をとります。
+\begin{itemize}
+ \item 角括弧内のオプション引数は \verb|\includegraphics| に渡されます。
+   省略された場合は \verb|scale=1| とみなされます。
+ \item 必須引数の1つめには化学構造式が描かれたファイル名を与えます。
+ \item 必須引数の2つめには \verb|obabel| に送るオプション
+   (例は第\ref{depict}節を参照)を指定します。
+\end{itemize}
+必須引数の2つめを空にしたい場合は,
+短縮形として \verb|\chemobabel*| を使用することもできます
+(\Lver{v0.9k [2022/10/09]}以降)。
 
-また,オプションとして角括弧に \verb|\includegraphics| に渡すオプションを
-指定することができます。
-このオプションは省略可能で,何も指定しない場合は scale=1 が適用されます。
-
 \subsection{SMILES表記法からの変換}
 
 \LaTeX ソースファイル中に直接SMILES表記を書き込んで,
@@ -291,7 +301,7 @@
 
 \begin{verbatim}
 \smilesobabel{CCO}{}
-\smilesobabel[width=35mm]{CC(=O)Nc1ccc(cc1)O}{}
+\smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
 \end{verbatim}
 
 やはり \verb|-shell-escape| オプションを付けてタイプセットします。
@@ -304,13 +314,14 @@
 \begin{figure}[h]
   \centering
   \smilesobabel{CCO}{} \quad
-  \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{}
+  \smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
   \caption{Conversion from SMILES notation}\label{fig:smi1}
 \end{figure}
 
 構文は以下のとおりです。
 \begin{center}
-\verb|\smilesobabel[|\textit{options}\verb|]{|\textit{SMILES notation}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\smilesobabel[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\smilesobabel*[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}|
 \end{center}
 \verb|\chemobabel| との唯一の違いは,中括弧の1つめにSMILES表記法の
 テキストを与えることだけです。
@@ -320,25 +331,25 @@
 なお,\verb|\chemobabel| の引数についても同様に,
 特別な文字を含むことができる設計になっています。
 \begin{verbatim}
-\smilesobabel[width=28mm]{Cl/C=C/Br}{}
-\smilesobabel[width=28mm]{Cl/C=C\Br}{}
+\smilesobabel*[width=28mm]{Cl/C=C/Br}
+\smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{verbatim}
 \begin{figure}[h]
   \centering
-  \smilesobabel[width=28mm]{Cl/C=C/Br}{} \quad
-  \smilesobabel[width=28mm]{Cl/C=C\Br}{}
+  \smilesobabel*[width=28mm]{Cl/C=C/Br} \quad
+  \smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{figure}
 
 
-\noindent \textbf{旧バージョンのユーザに対する注意} ($\le$ \textsf{chemobabel} v0.6 [2015/06/29])
+\noindent \textbf{\Lver{v0.6 [2015/06/29]}以前の旧バージョンのユーザに対する注意}
 
-古いバージョンの\textsf{chemobabel}では,
+古いバージョンの\Lpack{chemobabel}では,
 これらの\LaTeX で特別な意味を持つ文字に注意を払う必要がありました。
 従来私が紹介してきた回避策は“カジュアルな \LaTeX ユーザ”に
 カテゴリーコードを手動で変更させていたため,好ましいものではありませんでした。
 
-この問題を解決するため,パッケージ本体の側でこれらの文字をサポートする
-マクロを組み込みました(\textsf{chemobabel} v0.7 [2015/08/26] 以降)。
+この問題を解決するため,\Lver{v0.7 [2015/08/26]}以降では
+パッケージ本体の側でこれらの文字をサポートするように改良を施しました。
 これにより,\verb|\| や \verb|%| といった特別な文字を心配することなく,
 任意のSMILES表記を直接引数に渡すことができるようになっています。
 従来の回避策(\verb|\begingroup| ... \verb|\endgroup| 内で \verb|\catcode| を
@@ -348,7 +359,7 @@
 
 \subsection{パッケージオプション}
 
-\textsf{chemobabel} パッケージは,デフォルトでは化学構造式をInkscapeによって
+\Lpack{chemobabel} パッケージは,デフォルトでは化学構造式をInkscapeによって
 PDF形式の画像ファイルに変換して文書中に取り込みます。
 しかし,オプションで画像形式と変換プログラムを変更することができます。
 
@@ -358,10 +369,10 @@
 \usepackage[eps]{chemobabel}
 \end{verbatim}
 というように \verb|eps| オプションを指定すれば,内部でInkscapeから出力される
-画像形式をPDFではなくEPSに変更します(\textsf{chemobabel} v0.9d [2016/02/28] 以降)。
+画像形式をPDFではなくEPSに変更します(\Lver{v0.9d [2016/02/28]}以降)。
 
 また,画像変換プログラムを Inkscape から rsvg-convert に変更することもできます
-(\textsf{chemobabel} v0.9e [2016/03/07] 以降)。
+(\Lver{v0.9e [2016/03/07]}以降)。
 rsvg-convertはInkscapeより高速ですから,便利かもしれません。
 この場合は,以下のように \verb|librsvg| オプションを指定します。
 \begin{verbatim}
@@ -375,7 +386,7 @@
 
 さらに,Open Babel v2.4.0以降で生成される画像はデフォルトで余白が大きいため,
 \verb|pdfcrop|(PDFの場合)あるいは\verb|ps2eps|(EPSの場合)で
-クロップしています(\textsf{chemobabel} v0.9i [2022/09/12] 以降)。
+クロップしています(\Lver{v0.9i [2022/09/12]}以降)。
 これをやめたい場合は \verb|nocrop| オプションを指定してください。
 \begin{verbatim}
 \usepackage[nocrop]{chemobabel}
@@ -404,7 +415,7 @@
 $ platex test.tex
 \end{verbatim}
 というコマンドを使います。
-\verb|extract| オプションを付けると,\textsf{chemobabel}パッケージは
+\verb|extract| オプションを付けると,\Lpack{chemobabel}パッケージは
 単に元の\LaTeX ソースから \verb|\chemobabel| と \verb|\smilesobabel| コマンド
 だけを抽出するはたらきをします。
 その結果,同じディレクトリに「ChemFigFile.tex」というファイルが生成します。
@@ -414,9 +425,9 @@
 $ pdflatex -shell-escape ChemFigFile.tex
 \end{verbatim}
 欧文と同じ仕様に統一したため,抽出される「ChemFigFile.tex」では
-\textsf{graphicx}パッケージに \texttt{[dvipdfmx]} オプション
+\Lpack{graphicx}パッケージに \verb+[dvipdfmx]+ オプション
 を与えずに読み込んでいます。したがって,
-このタイプセットだけは\texttt{pdflatex}を用いてください。
+このタイプセットだけは\Lcode{pdflatex}を用いてください。
 すると,第\ref{basic}節と同様にPDF形式の図のファイルが生成しますので,
 あとは \verb|extract| オプションを除去して再度
 \begin{verbatim}
@@ -434,7 +445,7 @@
 \label{depict}
 
 既に述べたとおり,\verb|\chemobabel| と \verb|\smilesobabel| の両方について,
-2つめの中括弧に \textit{obabel options} を与えることができます。
+2つめの中括弧に \Lmeta{obabel options} を与えることができます。
 ここで,いくつかの有用な例を挙げておきます。
 \begin{itemize}
 \item
@@ -457,7 +468,7 @@
 \begin{verbatim}
 \chemobabel{ATP.cdx}{-xd}
 \end{verbatim}
-Open Babel 2.x系列でChemDrawの図からファイル名を取り除くには,\texttt{-xd} オプションを付けます:
+Open Babel 2.x系列でChemDrawの図からファイル名を取り除くには,\Lcode{-xd} オプションを付けます:
 \begin{verbatim}
 $ obabel -:"ATP.cdx" -O chemobabelimg[NUM].svg -xd
 \end{verbatim}
@@ -468,7 +479,7 @@
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
   \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{-xa} \hspace{1cm}
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{-xu}
-  \caption{Acetaminophen (Paracetamol): Nothing, \texttt{-xa}, \texttt{-xu}}
+  \caption{Acetaminophen (Paracetamol): Nothing, \Lcode{-xa}, \Lcode{-xu}}
   SMILES: \verb|CC(=O)Nc1ccc(cc1)O|
 \end{figure}
 
@@ -477,7 +488,7 @@
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xC} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xt}
-  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \texttt{-xC}, \texttt{-xt}}
+  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \Lcode{-xC}, \Lcode{-xt}}
   SMILES: \verb|C1[C at H](C)C[C@@H](O)C1|
 \end{figure}
 
@@ -486,7 +497,7 @@
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xa -xu} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xu -xC}
-  \caption{3-Ethylbenzoyl chloride: Nothing, \texttt{-xa -xu}, \texttt{-xu -xC}}
+  \caption{3-Ethylbenzoyl chloride: Nothing, \Lcode{-xa -xu}, \Lcode{-xu -xC}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -494,7 +505,7 @@
   \centering
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{--highlight "cC=O blue"} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xA --genalias}
-  \caption{3-Ethylbenzoyl chloride: \texttt{--highlight "cC=O blue"}, \texttt{-xA --genalias}}
+  \caption{3-Ethylbenzoyl chloride: \Lcode{--highlight "cC=O blue"}, \Lcode{-xA --genalias}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -502,7 +513,7 @@
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \hspace{1cm}
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{-xa}
-  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \texttt{-xa}}
+  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \Lcode{-xa}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -509,7 +520,7 @@
   \centering
   \chemobabel[width=70mm]{draw/ATP.cdx}{} \hspace{1cm}
   \chemobabel[width=70mm]{draw/ATP.cdx}{-xd}
-  \caption{ATP (from ChemDraw files): Nothing, \texttt{-xd}}
+  \caption{ATP (from ChemDraw files): Nothing, \Lcode{-xd}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -527,7 +538,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}{}
+  \smilesobabel*[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}
   \caption{($-$)-Morphine}
   SMILES: \verb|CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O|
 \end{figure}
@@ -534,7 +545,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}{}
+  \smilesobabel*[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}
   \caption{Brevetoxin A}
   SMILES (Sorry but too long): \verb|C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C|
 \end{figure}
@@ -562,10 +573,10 @@
   \centering
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \Lcode{--gen2d})}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \Lcode{--gen2d})}
 \end{center}
 \end{figure}
 
@@ -580,7 +591,7 @@
   \caption{Firefly luciferin: exact structure from ChemSpider ID 4588411}
   \includegraphics[scale=0.6]{figures/Win232-FireflyLuciferin.pdf}
   \caption{Firefly luciferin?: output from Open Babel for Win 2.3.2}
-  \smilesobabel[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}{}
+  \smilesobabel*[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}
   \caption{Firefly luciferin?: output from current Open Babel}
   SMILES: \verb|C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O|
 \end{figure}
@@ -594,12 +605,13 @@
 
 \section{互換性に関する注意}
 
-\subsection{\textsf{chemobabel}パッケージの有利な点}
+\subsection{\Lpack{chemobabel}パッケージの有利な点}
 
 Noel O'Boyleさんによる \verb|\smiles| \cite{NOB1} あるいは
-Jakob Lykke Andersenさんによる\textsf{graphvizObabel.sty}が
+Jakob Lykke Andersenさんによる\Lpack{graphvizObabel.sty}が
 提供する \verb+\obabel+ \cite{JLA} は以下のようにして使うことになっています:
 \begin{verbatim}
+%% ----- for \smiles command -----
 \newcounter{smilescounter}
 \setcounter{smilescounter}{1}
 \newcommand{\smiles}[1]{
@@ -607,9 +619,16 @@
   \includegraphics{smilesimg\arabic{smilescounter}.png}
   \addtocounter{smilescounter}{1}
 }
+ ...
+\smiles{CCO}
+%% -----
+\end{verbatim}
+\begin{verbatim}
+%% ----- for \obabel command -----
 \usepackage{graphvizObabel}
-\smiles{CCO}
+ ...
 \obabel[scale=0.6]{CCO}
+%% -----
 \end{verbatim}
 しかし,\verb|\smiles| はラスター画像 (.png) を生成して
 かつ \verb|\includegraphics| に渡すオプションを扱えず,\verb|\obabel| は
@@ -629,15 +648,15 @@
 好ましくない場合もあるかもしれません。
 したがって,この方法は構造式の出力を完全に制御したいという意図がなく,
 構造式を簡便に挿入したい場合にのみ役に立つでしょう。
-出力に満足できない場合は,\XyMTeX や\textsf{chemfig}のようなパッケージを
+出力に満足できない場合は,\XyMTeX や\Lpack{chemfig}のようなパッケージを
 代わりに使うことをご検討ください。
 
 同様の目的を達成するために使えそうなパッケージとして,
 以下のようなものもあります:
 \begin{itemize}
-  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\textsf{mol2chemfig}}:
+  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\Lpack{mol2chemfig}}:
     convert chemical structures from MDL molfile format
-    to \textsf{chemfig} source code
+    to \Lpack{chemfig} source code
 \end{itemize}
 
 \clearpage
@@ -673,26 +692,20 @@
 必要がありますが,バックスラッシュ \verb|\| はデフォルトの
 エスケープ文字であり,またパーセント記号 \verb|%| もコメント文字と
 しての特殊な意味を持っています。
-\textsf{chemobabel} v0.7以上では,カテゴリーコードを一時的に変更することで
+\Lpack{chemobabel} v0.7以上では,カテゴリーコードを一時的に変更することで
 これらすべての文字を適切に扱うようになっています(\verb+\verb+と同様の手法)。
 
 \clearpage
 
-To do (if possible):
-\begin{itemize}
-\item Check whether \texttt{obabel} and \texttt{inkscape} are successfully
-installed or not, before running programs.
-\end{itemize}
-
 \section{更新履歴}
 
 \begin{table}[h]
 \centering
 \begin{tabular}{ll}
-2014/12/01 v0.1  & Made public as \textsf{smilesobabel.sty} \\
+2014/12/01 v0.1  & Made public as \Lpack{smilesobabel.sty} \\
 2014/12/02 v0.2  & Add options which can be passed to obabel. \\
-2014/12/07 v0.3  & Change name of package: \textsf{chemobabel.sty} \\
-                 & Images are stored in \texttt{chemobabelimgdir}. \\
+2014/12/07 v0.3  & Change name of package: \Lpack{chemobabel.sty} \\
+                 & Images are stored in \Lcode{chemobabelimgdir}. \\
                  & Add \verb|\chemobabel| command. \\
 2014/12/09 v0.4  & Fix a bug: (Thanks: Yusuke Terada) \\
                  & Extra spaces at the end of lines are removed. \\
@@ -712,6 +725,10 @@
 2022/09/11 v0.9h & Support Inkscape version 1.0 command line syntax. \\
 2022/09/12 v0.9i & Crop images before inclusion, add \verb|nocrop| option. \\
 2022/09/19 v0.9j & Check shell-escape status to show better error message. \\
+                 & This is the first release on CTAN! \\
+2022/10/09 v0.9k & Add \verb|\chemobabel*| and \verb|\smilesobabel*|. \\
+                 & Warn if a user need to run another \LaTeX. \\
+                 & Improve \verb|[extract]| to take over user-given package options. \\
 \end{tabular}
 \end{table}
 
@@ -718,7 +735,7 @@
 \textbf{Important!}
 \begin{itemize}
 \item In Version 0.2, the number of parameters set in \verb|\smilesobabel| is changed!
-\item From Version 0.3, the package name is changed to \textsf{chemobabel.sty}.
+\item From Version 0.3, the package name is changed to \Lpack{chemobabel.sty}.
 \item From Version 0.7, the \verb|\catcode|-related workaround is rather harmful.
 \end{itemize}
 

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/example-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemobabel/example-en.tex	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/doc/latex/chemobabel/example-en.tex	2022-10-09 20:18:38 UTC (rev 64665)
@@ -15,10 +15,11 @@
 \maketitle
 
 The formulas below are generated using \textsf{chemobabel} package with the help of Open Babel and Inkscape.
+% Note: \smilesobabel* and \chemobabel* are provided since 2022-10-09.
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel{CCO}{}
+  \smilesobabel*{CCO}
   \caption{Ethanol}
 \end{figure}
 
@@ -30,8 +31,8 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[scale=0.7]{Cl/C=C/Br}{}
-  \smilesobabel[scale=0.7]{Cl/C=C\Br}{}
+  \smilesobabel*[scale=0.7]{Cl/C=C/Br}
+  \smilesobabel*[scale=0.7]{Cl/C=C\Br}
   \caption{(\textit{E})-1-bromo-2-chloroethene \& (\textit{Z})-1-bromo-2-chloroethene}
 \end{figure}
 
@@ -43,7 +44,7 @@
 
 \begin{figure}[ht]
   \centering
-  \chemobabel[scale=0.4]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[scale=0.4]{draw/Brevetoxin A.mol}
   \caption{Brevetoxin A}
 \end{figure}
 

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/example-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemobabel/example-ja.tex	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/doc/latex/chemobabel/example-ja.tex	2022-10-09 20:18:38 UTC (rev 64665)
@@ -16,10 +16,11 @@
 \begin{document}
 \maketitle
 以下の構造式は、\textsf{chemobabel} パッケージを用いて Open Babel と Inkscape を介した自動変換により生成しました。
+% Note: \smilesobabel* と \chemobabel* は 2022-10-09 で追加されました。
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel{CCO}{}
+  \smilesobabel*{CCO}
   \caption{エタノール}
 \end{figure}
 
@@ -31,8 +32,8 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[scale=0.7]{Cl/C=C/Br}{}
-  \smilesobabel[scale=0.7]{Cl/C=C\Br}{}
+  \smilesobabel*[scale=0.7]{Cl/C=C/Br}
+  \smilesobabel*[scale=0.7]{Cl/C=C\Br}
   \caption{(\textit{E})-1-ブロモ-2-クロロエテンと(\textit{Z})-1-ブロモ-2-クロロエテン}
 \end{figure}
 
@@ -44,7 +45,7 @@
 
 \begin{figure}[ht]
   \centering
-  \chemobabel[scale=0.4]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[scale=0.4]{draw/Brevetoxin A.mol}
   \caption{ブレベトキシンA}
 \end{figure}
 

Modified: trunk/Master/texmf-dist/doc/latex/chemobabel/images-for-doc.tar.gz
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/chemobabel/chemobabel.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/chemobabel/chemobabel.dtx	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/source/latex/chemobabel/chemobabel.dtx	2022-10-09 20:18:38 UTC (rev 64665)
@@ -28,20 +28,26 @@
 % --- (Japanese jsarticle style => English style)
 \makeatletter
 \long\def\@makecaption#1#2{%
-\vskip\abovecaptionskip
-\sbox\@tempboxa{#1: #2}
-\global\@minipagefalse
-\hbox to\hsize{\hfil\box\@tempboxa\hfil}
-\vskip\belowcaptionskip}
+  \vskip\abovecaptionskip
+  \sbox\@tempboxa{#1: #2}%
+  \global\@minipagefalse
+  \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+  \vskip\belowcaptionskip}
 \makeatother
 % --- XyMTeX logo definition
 \newcount\TestCount
-\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam%
-X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
-\kern-.30em{M}}
+\def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam
+  X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
+  \kern-.30em{M}}
 \def\XyMTeX{\XyM\kern-.1em\TeX}
+% --- misc
+\def\Lpack#1{\textsf{#1}}
+\def\Lcode#1{\texttt{#1}}
+\def\Lmeta#1{\textit{#1}}
+\def\Lver#1{\Lpack{chemobabel} #1}
+\def\TikZ{Ti\textit{k}Z}
 % ------
-\title{\textsf{chemobabel} \\[1ex]
+\title{\Lpack{chemobabel} \\[1ex]
   \normalsize --- Chemical Structures from MDL Molfiles,
   ChemDraw Files or SMILES Notations --- \\
 %<ja>  化学構造式をMOLファイルやChemDrawファイル,SMILES表記法から自動生成
@@ -53,7 +59,7 @@
 \maketitle
 
 %<*en>
-This document (\jobname.pdf) describes the usage of \textsf{chemobabel.sty},
+This document (\jobname.pdf) describes the usage of \Lpack{chemobabel.sty},
 a \LaTeX\ package for \textbf{generating chemical structural formulas}
 to be inserted in your documents.
 The formulas can be generated \textbf{from many kinds of chemical data
@@ -65,7 +71,7 @@
 %</en>
 %<*ja>
 この文書では,\textbf{化学構造式を生成}して\LaTeX の文書中に挿入するための
-パッケージである\textsf{chemobabel.sty}と同梱リソースの使い方を説明します。
+パッケージである\Lpack{chemobabel.sty}と同梱リソースの使い方を説明します。
 構造式はOpen Babelの機能を利用することにより,MDL Molfile, ChemDrawファイル,
 さらにはSMILES表記法を含む\textbf{さまざまな化学データ形式から生成}できます。
 以下の構造式はこの方法によって出力されたものです。
@@ -76,7 +82,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \quad
-  \chemobabel[width=90mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=90mm]{draw/Brevetoxin A.mol}
   \caption{Firefly luciferin \& Brevetoxin A (from MDL Molfiles)}
 \end{figure}
 
@@ -83,7 +89,7 @@
 \begin{figure}[ht]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \hspace{1cm}
-  \chemobabel[width=35mm]{draw/Glucose.cdx}{}
+  \chemobabel*[width=35mm]{draw/Glucose.cdx}
   \caption{ATP (Adenosine triphosphate) \& Glucose (from ChemDraw files)}
 \end{figure}
 \begin{center}\small
@@ -94,15 +100,15 @@
 \begin{figure}[ht]
   \centering
   \smilesobabel[width=36mm]{CCO}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{CC(C(=O)O)N}{} \hspace{1cm}
-  \smilesobabel[width=30mm]{C1[C at H](C)C[C@@H](O)C1}{}
+  \smilesobabel*[width=40mm]{CC(C(=O)O)N} \hspace{1cm}
+  \smilesobabel*[width=30mm]{C1[C at H](C)C[C@@H](O)C1}
   \caption{Ethanol, Alanine \& (1\textit{S},3\textit{S})-3-Methylcyclopentanol (from SMILES notations)}
 \end{figure}
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=30mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
-  \smilesobabel[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}{}
+  \smilesobabel*[width=30mm]{CC(=O)Nc1ccc(cc1)O} \hspace{1cm}
+  \smilesobabel*[width=40mm]{C([C@@H]1[C at H]([C@@H]([C at H]([C at H](O1)O)O)O)O)O}
   \caption{Acetaminophen (Paracetamol) \& $\alpha$-\textsc{d}-Glucose (from SMILES notations)}
 \end{figure}
 
@@ -158,8 +164,8 @@
 \begin{itemize}
   \item \href{http://www.ctan.org/pkg/xymtex}{\XyMTeX}:
     a set of packages for drawing chemical structural formulas
-\item \href{http://www.ctan.org/pkg/chemfig}{\textsf{chemfig}}:
-    a package which draws molecules using Ti\textit{k}Z
+\item \href{http://www.ctan.org/pkg/chemfig}{\Lpack{chemfig}}:
+    a package which draws molecules using \TikZ
 \end{itemize}
 These packages are reliable and almost all kinds of structural formulas
 can be drawn in a consistent way. However, a lot of practice will be
@@ -170,8 +176,8 @@
 \begin{itemize}
   \item \href{http://www.ctan.org/pkg/xymtex}{\XyMTeX}:
     化学構造式を描くためのパッケージ集
-  \item \href{http://www.ctan.org/pkg/chemfig}{\textsf{chemfig}}:
-    Ti\textit{k}Zを利用して構造式を描画するパッケージ
+  \item \href{http://www.ctan.org/pkg/chemfig}{\Lpack{chemfig}}:
+    \TikZ を利用して構造式を描画するパッケージ
 \end{itemize}
 これらのパッケージは確実で,あらゆる構造式を一貫性をもって描画することができます。
 しかし,十分にその機能を活用できるようになるには相当の熟練を要します。
@@ -196,7 +202,7 @@
 %</ja>
 
 %<*en>
-This new package, \textsf{chemobabel.sty}, will offer a new choice for
+This new package, \Lpack{chemobabel.sty}, will offer a new choice for
 chemists who need chemical structures inserted in their \LaTeX\ documents.
 In this method, we use \href{http://openbabel.org/}{Open Babel} for
 generating chemical structural formulas in SVG format,
@@ -204,7 +210,7 @@
 Both programs are open source and cross-platform, and being actively maintained.
 %</en>
 %<*ja>
-新しいパッケージ \textsf{chemobabel.sty} は,\LaTeX 文書中に化学構造式を
+新しいパッケージ \Lpack{chemobabel.sty} は,\LaTeX 文書中に化学構造式を
 挿入する必要がある化学者に新たな選択肢を提供することでしょう。
 この方法では,\href{http://openbabel.org/}{Open Babel}によって
 SVG形式の構造式画像を生成し,
@@ -300,7 +306,7 @@
 \href{https://inkscape.org/en/}{Inkscape}
 (or \href{http://librsvg.sourceforge.net/download/}{librsvg}) on your
 computer, and export PATH to the command-line binary of both programs,
-\verb+obabel+ and \verb+inkscape+ (or \verb+rsvg-convert+).
+\Lcode{obabel} and \Lcode{inkscape} (or \Lcode{rsvg-convert}).
 You can confirm by executing following commands:
 %</en>
 %<*ja>
@@ -307,8 +313,8 @@
 初めにコンピュータに\href{http://openbabel.org/}{Open Babel}と
 \href{https://inkscape.org/ja/}{Inkscape}(または
 \href{http://librsvg.sourceforge.net/download/}{librsvg})をインストールし,
-コマンドライン実行ファイルである\verb+obabel+と\verb+inkscape+
-(または\verb+rsvg-convert+)にPATHを通します。
+コマンドライン実行ファイルである
+\Lcode{obabel}と\Lcode{inkscape}(または\Lcode{rsvg-convert})にPATHを通します。
 正しくPATHが通っているかどうかは以下のコマンドによって確認できます:
 %</ja>
 %<en>In UNIX operating system:
@@ -346,8 +352,8 @@
 \begin{verbatim}
 \usepackage{chemobabel}
 \end{verbatim}
-to load \textsf{chemobabel} package.
-The package depends on \textsf{graphicx}.
+to load \Lpack{chemobabel} package.
+The package depends on \Lpack{graphicx}.
 %</en>
 %<*ja>
 プリアンブルに
@@ -354,9 +360,9 @@
 \begin{verbatim}
 \usepackage{chemobabel}
 \end{verbatim}
-と宣言して\textsf{chemobabel}パッケージを読み込みます。
-これは\textsf{graphicx}パッケージに依存しますので,
-もし(u)p\LaTeX を使っていてDVIドライバに\texttt{dvipdfmx}を使用する場合は
+と宣言して\Lpack{chemobabel}パッケージを読み込みます。
+これは\Lpack{graphicx}パッケージに依存しますので,
+もし(u)p\LaTeX を使っていてDVIドライバに\Lcode{dvipdfmx}を使用する場合は
 ドライバオプション \verb+[dvipdfmx]+ をクラスオプション(グローバル)に
 付けるのを忘れないようにしてください。
 %</ja>
@@ -385,7 +391,7 @@
 \href{http://www.chemspider.com/}{ChemSpider} (originally \verb|9041092.mol|).
 
 Use \verb|\chemobabel| command as follows. I put original files in a
-subdirectory \texttt{draw}, so added \texttt{draw/} before the actual filename.
+subdirectory \Lcode{draw}, so added \Lcode{draw/} before the actual filename.
 Of course you can put in the same directory with your \LaTeX\ file.
 %</en>
 %<*ja>
@@ -395,14 +401,14 @@
 (もとのファイル名は \verb|9041092.mol| となっています)。
 
 \verb|\chemobabel| コマンドは本文中で以下のようにして使います。
-ここでは元のファイルを\texttt{draw}というサブディレクトリに置いたので,
-ファイル名の前に \texttt{draw/} を付けました。
+ここでは元のファイルを\Lcode{draw}というサブディレクトリに置いたので,
+ファイル名の前に \Lcode{draw/} を付けました。
 もちろん \LaTeX ソースと同一ディレクトリに置くこともできます。
 %</ja>
 
 \begin{verbatim}
 \chemobabel[width=90mm]{draw/ATP.cdx}{}
-\chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+\chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
 \end{verbatim}
 
 %<*en>
@@ -434,7 +440,7 @@
 \begin{figure}[h]
   \centering
   \chemobabel[width=90mm]{draw/ATP.cdx}{} \\ \vspace{1cm}
-  \chemobabel[width=120mm]{draw/Brevetoxin A.mol}{}
+  \chemobabel*[width=120mm]{draw/Brevetoxin A.mol}
   \caption{Conversion from ATP.cdx and Brevetoxin A.mol}\label{fig:chem1}
 \end{figure}
 
@@ -441,27 +447,37 @@
 %<en>The syntax is:
 %<ja>構文は以下のとおりです。
 \begin{center}
-\verb|\chemobabel[|\textit{options}\verb|]{|\textit{filename}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\chemobabel[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\chemobabel*[|\Lmeta{options}\verb|]{|\Lmeta{filename}\verb|}|
 \end{center}
 %<*en>
-As parameters, \textit{filename} should be placed in the first braces, and
-\textit{obabel options} (see Section \ref{depict} for some examples)
-can be added in the second braces.
-You can leave the second parameter empty.
-
-You can give \textit{options} to be passed to \verb|\includegraphics|
-command as optional parameters in the box brackets.
-This option is not necessary, so can be omitted. In this case the default
-option ``scale=1" is passed to \verb|\includegraphics| command.
+\verb|\chemobabel| takes one optional parameter and two mandatory parameters.
+\begin{itemize}
+ \item The optional parameter \Lmeta{options} in the box brackets
+   is passed to \verb|\includegraphics|.
+   If omitted, the default ``scale=1' is assumed.
+ \item The first mandatory parameter \Lmeta{filename} is the file name
+   which contains chemical structural formula.
+ \item The second mandatory parameter \Lmeta{obabel options}
+   is passed to \verb|obabel| command
+   (see Section \ref{depict} for some examples).
+\end{itemize}
+If you want to leave the second parameter empty,
+a shorthand form \verb|\chemobabel*| is also available
+(since \Lver{v0.9k [2022/10/09]}).
 %</en>
 %<*ja>
-引数として,中括弧の1つめにファイル名を与え,2つめにobabelに送る
-オプション(例は第\ref{depict}節を参照)を指定してください。
-2つめの引数は空にすることもできます。
-
-また,オプションとして角括弧に \verb|\includegraphics| に渡すオプションを
-指定することができます。
-このオプションは省略可能で,何も指定しない場合は scale=1 が適用されます。
+\verb|\chemobabel| は1つのオプション引数と2つの必須引数をとります。
+\begin{itemize}
+ \item 角括弧内のオプション引数は \verb|\includegraphics| に渡されます。
+   省略された場合は \verb|scale=1| とみなされます。
+ \item 必須引数の1つめには化学構造式が描かれたファイル名を与えます。
+ \item 必須引数の2つめには \verb|obabel| に送るオプション
+   (例は第\ref{depict}節を参照)を指定します。
+\end{itemize}
+必須引数の2つめを空にしたい場合は,
+短縮形として \verb|\chemobabel*| を使用することもできます
+(\Lver{v0.9k [2022/10/09]}以降)。
 %</ja>
 
 %<*en>
@@ -488,7 +504,7 @@
 
 \begin{verbatim}
 \smilesobabel{CCO}{}
-\smilesobabel[width=35mm]{CC(=O)Nc1ccc(cc1)O}{}
+\smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
 \end{verbatim}
 
 %<*en>
@@ -511,7 +527,7 @@
 \begin{figure}[h]
   \centering
   \smilesobabel{CCO}{} \quad
-  \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{}
+  \smilesobabel*[width=25mm]{CC(=O)Nc1ccc(cc1)O}
   \caption{Conversion from SMILES notation}\label{fig:smi1}
 \end{figure}
 
@@ -518,11 +534,12 @@
 %<en>The syntax is:
 %<ja>構文は以下のとおりです。
 \begin{center}
-\verb|\smilesobabel[|\textit{options}\verb|]{|\textit{SMILES notation}\verb|}{|\textit{obabel options}\verb|}|
+\verb|\smilesobabel[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}{|\Lmeta{obabel options}\verb|}| \\
+\verb|\smilesobabel*[|\Lmeta{options}\verb|]{|\Lmeta{SMILES notation}\verb|}|
 \end{center}
 %<*en>
 The only difference from \verb|\chemobabel| is that
-\textit{SMILES notation} should be placed in the first braces.
+\Lmeta{SMILES notation} should be placed in the first braces.
 You can put any kinds of SMILES notations in parameters of
 \verb|\smilesobabel|, even when they contain some special characters
 such as a backslash (\verb|\|) and a percent symbol (\verb|%|).
@@ -539,26 +556,25 @@
 特別な文字を含むことができる設計になっています。
 %</ja>
 \begin{verbatim}
-\smilesobabel[width=28mm]{Cl/C=C/Br}{}
-\smilesobabel[width=28mm]{Cl/C=C\Br}{}
+\smilesobabel*[width=28mm]{Cl/C=C/Br}
+\smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{verbatim}
 \begin{figure}[h]
   \centering
-  \smilesobabel[width=28mm]{Cl/C=C/Br}{} \quad
-  \smilesobabel[width=28mm]{Cl/C=C\Br}{}
+  \smilesobabel*[width=28mm]{Cl/C=C/Br} \quad
+  \smilesobabel*[width=28mm]{Cl/C=C\Br}
 \end{figure}
 
 %<*en>
-\noindent \textbf{Notes for users of earlier versions} ($\le$ \textsf{chemobabel} v0.6 [2015/06/29])
+\noindent \textbf{Notes for users of earlier versions \Lver{v0.6 [2015/06/29]} or older}
 
-In earlier versions of \textsf{chemobabel}, it was necessary for users
+In earlier versions of \Lpack{chemobabel}, it was necessary for users
 to pay another attention when using these \LaTeX\ special characters.
 However, the workaround I had suggested before was far from desirable
 because ``casual \LaTeX\ users'' were forced to change category codes
 of these characters manually.
 
-To solve this problem, I prepared supporting macros inside the package
-itself ($\ge$ \textsf{chemobabel} v0.7 [2015/08/26]).
+To solve this problem, I improved the internal macros since \Lver{v0.7 [2015/08/26]}.
 Now you can put any kinds of SMILES notations directly without worrying
 about special characters (\verb|\|, \verb|%|, etc).
 Note that the undesirable workaround (like changing \verb|\catcode| inside
@@ -566,15 +582,15 @@
 %</en>
 
 %<*ja>
-\noindent \textbf{旧バージョンのユーザに対する注意} ($\le$ \textsf{chemobabel} v0.6 [2015/06/29])
+\noindent \textbf{\Lver{v0.6 [2015/06/29]}以前の旧バージョンのユーザに対する注意}
 
-古いバージョンの\textsf{chemobabel}では,
+古いバージョンの\Lpack{chemobabel}では,
 これらの\LaTeX で特別な意味を持つ文字に注意を払う必要がありました。
 従来私が紹介してきた回避策は“カジュアルな \LaTeX ユーザ”に
 カテゴリーコードを手動で変更させていたため,好ましいものではありませんでした。
 
-この問題を解決するため,パッケージ本体の側でこれらの文字をサポートする
-マクロを組み込みました(\textsf{chemobabel} v0.7 [2015/08/26] 以降)。
+この問題を解決するため,\Lver{v0.7 [2015/08/26]}以降では
+パッケージ本体の側でこれらの文字をサポートするように改良を施しました。
 これにより,\verb|\| や \verb|%| といった特別な文字を心配することなく,
 任意のSMILES表記を直接引数に渡すことができるようになっています。
 従来の回避策(\verb|\begingroup| ... \verb|\endgroup| 内で \verb|\catcode| を
@@ -591,16 +607,16 @@
 %</ja>
 
 %<*en>
-By default, \textsf{chemobabel} converts chemical structures into
+By default, \Lpack{chemobabel} converts chemical structures into
 PDF images using Inkscape. However, you can switch the image format
 and the conversion program if you like.
 
 When you are using drivers which do not support PDF figures (such as dvips),
-it will be helpful if \textsf{chemobabel} converts them into EPS images.
+it will be helpful if \Lpack{chemobabel} converts them into EPS images.
 For this purpose, you can use:
 %</en>
 %<*ja>
-\textsf{chemobabel} パッケージは,デフォルトでは化学構造式をInkscapeによって
+\Lpack{chemobabel} パッケージは,デフォルトでは化学構造式をInkscapeによって
 PDF形式の画像ファイルに変換して文書中に取り込みます。
 しかし,オプションで画像形式と変換プログラムを変更することができます。
 
@@ -612,19 +628,19 @@
 \end{verbatim}
 %<*en>
 The option \verb|eps| switches the image format (that is, output format
-from Inkscape) into EPS ($\ge$ \textsf{chemobabel} v0.9d [2016/02/28]).
+from Inkscape) into EPS (since \Lver{v0.9d [2016/02/28]}).
 
 You can also change the image conversion program from ``Inkscape'' to
-``rsvg-convert'' ($\ge$ \textsf{chemobabel} v0.9e [2016/03/07]).
+``rsvg-convert'' (since \Lver{v0.9e [2016/03/07]}).
 The program rsvg-convert is faster than inkscape, so it will be useful.
 For this purpose, use \verb|librsvg| option:
 %</en>
 %<*ja>
 というように \verb|eps| オプションを指定すれば,内部でInkscapeから出力される
-画像形式をPDFではなくEPSに変更します(\textsf{chemobabel} v0.9d [2016/02/28] 以降)。
+画像形式をPDFではなくEPSに変更します(\Lver{v0.9d [2016/02/28]}以降)。
 
 また,画像変換プログラムを Inkscape から rsvg-convert に変更することもできます
-(\textsf{chemobabel} v0.9e [2016/03/07] 以降)。
+(\Lver{v0.9e [2016/03/07]}以降)。
 rsvg-convertはInkscapeより高速ですから,便利かもしれません。
 この場合は,以下のように \verb|librsvg| オプションを指定します。
 %</ja>
@@ -646,13 +662,13 @@
 Moreover, Open Babel v2.4.0 or later versions generate images with
 a rather large margin. To avoid this, the images are cropped
 using \verb|pdfcrop| for PDF or \verb|ps2eps| for EPS
-($\ge$ \textsf{chemobabel} v0.9i [2022/09/12]).
+(since \Lver{v0.9i [2022/09/12]}).
 If you want to disable this cropping, please add \verb|nocrop| option:
 %</en>
 %<*ja>
 さらに,Open Babel v2.4.0以降で生成される画像はデフォルトで余白が大きいため,
 \verb|pdfcrop|(PDFの場合)あるいは\verb|ps2eps|(EPSの場合)で
-クロップしています(\textsf{chemobabel} v0.9i [2022/09/12] 以降)。
+クロップしています(\Lver{v0.9i [2022/09/12]}以降)。
 これをやめたい場合は \verb|nocrop| オプションを指定してください。
 %</ja>
 \begin{verbatim}
@@ -704,7 +720,7 @@
 $ pdflatex test.tex
 \end{verbatim}
 can be used. 
-With \verb|extract| option, all \textsf{chemobabel} does is extracting
+With \verb|extract| option, all \Lpack{chemobabel} does is extracting
 all \verb|\chemobabel| and \verb|\smilesobabel| commands from the
 original \LaTeX\ file.
 You will get ``ChemFigFile.tex'' in the same directory, a minimal
@@ -718,7 +734,7 @@
 $ platex test.tex
 \end{verbatim}
 というコマンドを使います。
-\verb|extract| オプションを付けると,\textsf{chemobabel}パッケージは
+\verb|extract| オプションを付けると,\Lpack{chemobabel}パッケージは
 単に元の\LaTeX ソースから \verb|\chemobabel| と \verb|\smilesobabel| コマンド
 だけを抽出するはたらきをします。
 その結果,同じディレクトリに「ChemFigFile.tex」というファイルが生成します。
@@ -730,9 +746,9 @@
 \end{verbatim}
 %<*ja>
 欧文と同じ仕様に統一したため,抽出される「ChemFigFile.tex」では
-\textsf{graphicx}パッケージに \texttt{[dvipdfmx]} オプション
+\Lpack{graphicx}パッケージに \verb+[dvipdfmx]+ オプション
 を与えずに読み込んでいます。したがって,
-このタイプセットだけは\texttt{pdflatex}を用いてください。
+このタイプセットだけは\Lcode{pdflatex}を用いてください。
 %</ja>
 %<*en>
 and you will get PDF figures in the same way
@@ -776,12 +792,12 @@
 
 %<*en>
 As I have already mentioned, in both \verb|\chemobabel| and \verb|\smilesobabel|,
-you can give some \textit{obabel options} in the second braces.
+you can give some \Lmeta{obabel options} in the second braces.
 Here I will introduce some examples.
 %</en>
 %<*ja>
 既に述べたとおり,\verb|\chemobabel| と \verb|\smilesobabel| の両方について,
-2つめの中括弧に \textit{obabel options} を与えることができます。
+2つめの中括弧に \Lmeta{obabel options} を与えることができます。
 ここで,いくつかの有用な例を挙げておきます。
 %</ja>
 \begin{itemize}
@@ -807,8 +823,8 @@
 \begin{verbatim}
 \chemobabel{ATP.cdx}{-xd}
 \end{verbatim}
-%<en>You can add \texttt{-xd} option to remove filenames from ChemDraw figures with Open Babel 2.x.
-%<ja>Open Babel 2.x系列でChemDrawの図からファイル名を取り除くには,\texttt{-xd} オプションを付けます:
+%<en>You can add \Lcode{-xd} option to remove filenames from ChemDraw figures with Open Babel 2.x.
+%<ja>Open Babel 2.x系列でChemDrawの図からファイル名を取り除くには,\Lcode{-xd} オプションを付けます:
 \begin{verbatim}
 $ obabel -:"ATP.cdx" -O chemobabelimg[NUM].svg -xd
 \end{verbatim}
@@ -819,7 +835,7 @@
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{} \hspace{1cm}
   \smilesobabel[width=25mm]{CC(=O)Nc1ccc(cc1)O}{-xa} \hspace{1cm}
   \smilesobabel[width=21mm]{CC(=O)Nc1ccc(cc1)O}{-xu}
-  \caption{Acetaminophen (Paracetamol): Nothing, \texttt{-xa}, \texttt{-xu}}
+  \caption{Acetaminophen (Paracetamol): Nothing, \Lcode{-xa}, \Lcode{-xu}}
   SMILES: \verb|CC(=O)Nc1ccc(cc1)O|
 \end{figure}
 
@@ -828,7 +844,7 @@
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xC} \hspace{1cm}
   \smilesobabel[width=25mm]{C1[C at H](C)C[C@@H](O)C1}{-xt}
-  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \texttt{-xC}, \texttt{-xt}}
+  \caption{(1\textit{S},3\textit{S})-3-Methylcyclopentanol: Nothing, \Lcode{-xC}, \Lcode{-xt}}
   SMILES: \verb|C1[C at H](C)C[C@@H](O)C1|
 \end{figure}
 
@@ -837,7 +853,7 @@
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xa -xu} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xu -xC}
-  \caption{3-Ethylbenzoyl chloride: Nothing, \texttt{-xa -xu}, \texttt{-xu -xC}}
+  \caption{3-Ethylbenzoyl chloride: Nothing, \Lcode{-xa -xu}, \Lcode{-xu -xC}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -845,7 +861,7 @@
   \centering
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{--highlight "cC=O blue"} \hspace{1cm}
   \smilesobabel[width=42mm]{CCc1cccc(c1)C(=O)Cl}{-xA --genalias}
-  \caption{3-Ethylbenzoyl chloride: \texttt{--highlight "cC=O blue"}, \texttt{-xA --genalias}}
+  \caption{3-Ethylbenzoyl chloride: \Lcode{--highlight "cC=O blue"}, \Lcode{-xA --genalias}}
   SMILES: \verb|CCc1cccc(c1)C(=O)Cl|
 \end{figure}
 
@@ -853,7 +869,7 @@
   \centering
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{} \hspace{1cm}
   \chemobabel[width=65mm]{draw/Firefly luciferin.mol}{-xa}
-  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \texttt{-xa}}
+  \caption{Firefly luciferin (from MDL Molfiles): Nothing, \Lcode{-xa}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -860,7 +876,7 @@
   \centering
   \chemobabel[width=70mm]{draw/ATP.cdx}{} \hspace{1cm}
   \chemobabel[width=70mm]{draw/ATP.cdx}{-xd}
-  \caption{ATP (from ChemDraw files): Nothing, \texttt{-xd}}
+  \caption{ATP (from ChemDraw files): Nothing, \Lcode{-xd}}
 \end{figure}
 
 \begin{figure}[ht]
@@ -897,7 +913,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}{}
+  \smilesobabel*[width=55mm]{CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O}
   \caption{($-$)-Morphine}
   SMILES: \verb|CN1CC[C@]23c4c5ccc(c4O[C at H]2[C at H](C=C[C at H]3[C at H]1C5)O)O|
 \end{figure}
@@ -904,7 +920,7 @@
 
 \begin{figure}[ht]
   \centering
-  \smilesobabel[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}{}
+  \smilesobabel*[width=150mm]{C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C}
   \caption{Brevetoxin A}
   SMILES (Sorry but too long): \verb|C[C@@H]1C[C at H]2[C@@H](CC(=O)O2)O[C at H]3C[C@@H]4[C at H](C[C@@H]([C@@H]5[C@@H](O4)C/C=C\C[C@@H]6[C@@H](O5)C/C=C\[C@@H]7[C@@H](O6)CCC[C@@H]8[C@@](O7)(C[C@@H]9[C@@H](O8)C[C@@H]2[C@@H](O9)[C at H](C[C at H](O2)CC(=C)C=O)O)C)C)O[C@@]3(C1)C|
 \end{figure}
@@ -939,10 +955,10 @@
   \centering
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Mac231-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Mac 2.3.1; Normal and \Lcode{--gen2d})}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-normal.pdf}
   \includegraphics[scale=0.5]{figures/Win232-sesamin-gen2d.pdf}
-  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \texttt{--gen2d})}
+  \caption{Sesamin (figures from Open Babel for Win 2.3.2; Normal and \Lcode{--gen2d})}
 \end{center}
 \end{figure}
 
@@ -963,7 +979,7 @@
   \caption{Firefly luciferin: exact structure from ChemSpider ID 4588411}
   \includegraphics[scale=0.6]{figures/Win232-FireflyLuciferin.pdf}
   \caption{Firefly luciferin?: output from Open Babel for Win 2.3.2}
-  \smilesobabel[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}{}
+  \smilesobabel*[width=66mm]{C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O}
   \caption{Firefly luciferin?: output from current Open Babel}
   SMILES: \verb|C1[C@@H](N/C(=c\2/nc3c(=CC(=O)C=C3)s2)/S1)C(=O)O|
 \end{figure}
@@ -991,24 +1007,24 @@
 %</ja>
 
 %<*en>
-\subsection{Advantages of \textsf{chemobabel}}
+\subsection{Advantages of \Lpack{chemobabel}}
 %</en>
 %<*ja>
-\subsection{\textsf{chemobabel}パッケージの有利な点}
+\subsection{\Lpack{chemobabel}パッケージの有利な点}
 %</ja>
 
 %<*en>
 The macros \verb|\smiles| (written by Noel O'Boyle \cite{NOB1}) and
-\verb|\obabel| (depends on \textsf{graphvizObabel.sty} by
+\verb|\obabel| (depends on \Lpack{graphvizObabel.sty} by
 Jakob Lykke Andersen's \cite{JLA}) can be used as follows:
 %</en>
 %<*ja>
 Noel O'Boyleさんによる \verb|\smiles| \cite{NOB1} あるいは
-Jakob Lykke Andersenさんによる\textsf{graphvizObabel.sty}が
+Jakob Lykke Andersenさんによる\Lpack{graphvizObabel.sty}が
 提供する \verb+\obabel+ \cite{JLA} は以下のようにして使うことになっています:
 %</ja>
 \begin{verbatim}
-% ----- for \smiles command -----
+%% ----- for \smiles command -----
 \newcounter{smilescounter}
 \setcounter{smilescounter}{1}
 \newcommand{\smiles}[1]{
@@ -1016,11 +1032,16 @@
   \includegraphics{smilesimg\arabic{smilescounter}.png}
   \addtocounter{smilescounter}{1}
 }
-% ----- for \obabel command -----
+ ...
+\smiles{CCO}
+%% -----
+\end{verbatim}
+\begin{verbatim}
+%% ----- for \obabel command -----
 \usepackage{graphvizObabel}
-% ============ usage ============
-\smiles{CCO}
+ ...
 \obabel[scale=0.6]{CCO}
+%% -----
 \end{verbatim}
 %<*en>
 However, \verb|\smiles| command creates raster graphics (.png) and
@@ -1055,7 +1076,7 @@
 Therefore this method will be useful only when you need a simple method
 for inserting structural formulas with minimal modification.
 If you are not satisfied with the output, consider using {\XyMTeX} or
-\textsf{chemfig} packages instead.
+\Lpack{chemfig} packages instead.
 
 I also found following packages which can be used for similar purpose:
 %</en>
@@ -1068,7 +1089,7 @@
 好ましくない場合もあるかもしれません。
 したがって,この方法は構造式の出力を完全に制御したいという意図がなく,
 構造式を簡便に挿入したい場合にのみ役に立つでしょう。
-出力に満足できない場合は,\XyMTeX や\textsf{chemfig}のようなパッケージを
+出力に満足できない場合は,\XyMTeX や\Lpack{chemfig}のようなパッケージを
 代わりに使うことをご検討ください。
 
 同様の目的を達成するために使えそうなパッケージとして,
@@ -1075,9 +1096,9 @@
 以下のようなものもあります:
 %</ja>
 \begin{itemize}
-  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\textsf{mol2chemfig}}:
+  \item \href{http://www.ctan.org/pkg/mol2chemfig}{\Lpack{mol2chemfig}}:
     convert chemical structures from MDL molfile format
-    to \textsf{chemfig} source code
+    to \Lpack{chemfig} source code
 \end{itemize}
 
 \clearpage
@@ -1126,7 +1147,7 @@
 \LaTeX\ special characters.
 However, a backslash (\verb|\|) is a default escape character in \LaTeX,
 and a percent symbol (\verb|%|) also has a special meaning as a comment character.
-In \textsf{chemobabel} (higher than v0.7), all these characters are
+In \Lpack{chemobabel} (higher than v0.7), all these characters are
 handled properly by changing category codes temporarily (like \verb+\verb+). \\
 %</en>
 %<*ja>
@@ -1134,18 +1155,12 @@
 必要がありますが,バックスラッシュ \verb|\| はデフォルトの
 エスケープ文字であり,またパーセント記号 \verb|%| もコメント文字と
 しての特殊な意味を持っています。
-\textsf{chemobabel} v0.7以上では,カテゴリーコードを一時的に変更することで
+\Lpack{chemobabel} v0.7以上では,カテゴリーコードを一時的に変更することで
 これらすべての文字を適切に扱うようになっています(\verb+\verb+と同様の手法)。
 %</ja>
 
 \clearpage
 
-To do (if possible):
-\begin{itemize}
-\item Check whether \texttt{obabel} and \texttt{inkscape} are successfully
-installed or not, before running programs.
-\end{itemize}
-
 %<*en>
 \section{Version History}
 %</en>
@@ -1156,10 +1171,10 @@
 \begin{table}[h]
 \centering
 \begin{tabular}{ll}
-2014/12/01 v0.1  & Made public as \textsf{smilesobabel.sty} \\
+2014/12/01 v0.1  & Made public as \Lpack{smilesobabel.sty} \\
 2014/12/02 v0.2  & Add options which can be passed to obabel. \\
-2014/12/07 v0.3  & Change name of package: \textsf{chemobabel.sty} \\
-                 & Images are stored in \texttt{chemobabelimgdir}. \\
+2014/12/07 v0.3  & Change name of package: \Lpack{chemobabel.sty} \\
+                 & Images are stored in \Lcode{chemobabelimgdir}. \\
                  & Add \verb|\chemobabel| command. \\
 2014/12/09 v0.4  & Fix a bug: (Thanks: Yusuke Terada) \\
                  & Extra spaces at the end of lines are removed. \\
@@ -1179,6 +1194,10 @@
 2022/09/11 v0.9h & Support Inkscape version 1.0 command line syntax. \\
 2022/09/12 v0.9i & Crop images before inclusion, add \verb|nocrop| option. \\
 2022/09/19 v0.9j & Check shell-escape status to show better error message. \\
+                 & This is the first release on CTAN! \\
+2022/10/09 v0.9k & Add \verb|\chemobabel*| and \verb|\smilesobabel*|. \\
+                 & Warn if a user need to run another \LaTeX. \\
+                 & Improve \verb|[extract]| to take over user-given package options. \\
 \end{tabular}
 \end{table}
 
@@ -1185,7 +1204,7 @@
 \textbf{Important!}
 \begin{itemize}
 \item In Version 0.2, the number of parameters set in \verb|\smilesobabel| is changed!
-\item From Version 0.3, the package name is changed to \textsf{chemobabel.sty}.
+\item From Version 0.3, the package name is changed to \Lpack{chemobabel.sty}.
 \item From Version 0.7, the \verb|\catcode|-related workaround is rather harmful.
 \end{itemize}
 

Modified: trunk/Master/texmf-dist/tex/latex/chemobabel/chemobabel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chemobabel/chemobabel.sty	2022-10-09 20:17:16 UTC (rev 64664)
+++ trunk/Master/texmf-dist/tex/latex/chemobabel/chemobabel.sty	2022-10-09 20:18:38 UTC (rev 64665)
@@ -17,7 +17,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{chemobabel}
-  [2022/09/19 v0.9j Chemical structures with Open Babel]
+  [2022/10/09 v0.9k Chemical structures with Open Babel]
 
 %% Start of package main code
 %% Thanks: http://imada.sdu.dk/~jlandersen/latex/graphvizObabel.sty
@@ -25,6 +25,9 @@
 \RequirePackage{verbatim}
 \RequirePackage{graphicx}
 
+%% ----- Check status -----
+\chardef\chemob at bel@status\z@
+
 %% ----- External command execution -----
 \ifx\directlua\@undefined
   \def\chemob at bel@exec#1{\immediate\write18{#1}}
@@ -44,6 +47,17 @@
   \chardef\chemob at bel@shellescape =\directlua{tex.sprint(status.shell_escape)}
 \fi
 
+%% ----- Ensure -shell-escape when processing ChemFigFile.tex
+\edef\chemob at bel@jobname{\jobname}
+{\escapechar=-1 \xdef\chemob at bel@outname{\string\ChemFigFile}}
+\ifx\chemob at bel@jobname\chemob at bel@outname
+  \ifnum\chemob at bel@shellescape=\@ne\else
+    \PackageError{chemobabel}{%
+      Processing \chemob at bel@outname.tex needs -shell-escape.\MessageBreak
+      Run 'pdflatex -shell-escape \chemob at bel@outname.tex'}\@ehc
+  \fi
+\fi
+
 %% ----- Make a directory for images -----
 \newcommand\chemobabelimgdir{chemobabelimgdir}
 \chemob at bel@exec{mkdir \chemobabelimgdir}
@@ -98,6 +112,7 @@
         No log file.%
       }%
     \end{minipage}}%
+    \global\chardef\chemob at bel@status\@ne
   }%
 }
 %% ----- Common part of \smilesobabel and \chemobabel end -----
@@ -111,14 +126,28 @@
 % 1: (optional) options for includegraphics
 % 2: SMILES notation
 % 3: options for obabel
-\newcommand\smilesobabel[1][scale=1]{%
+\newcommand\smilesobabel{\@ifstar{\smilesobabel at i}{\smilesobabel at ii}}
+\newcommand\smilesobabel at i[1][scale=1]{%
   \def\smilesobabel at next{\includegraphics[#1]}%
   \begingroup
     \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
-    \@smilesobabel
+    \@smilesobabel at i
 }
-\newcommand\@smilesobabel[2]{%
+\newcommand\smilesobabel at ii[1][scale=1]{%
+  \def\smilesobabel at next{\includegraphics[#1]}%
+  \begingroup
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@smilesobabel at ii
+}
+\def\@smilesobabel at i#1{%
   \endgroup
+  \@smilesobabel at main{#1}{}%
+}
+\def\@smilesobabel at ii#1#2{%
+  \endgroup
+  \@smilesobabel at main{#1}{#2}%
+}
+\def\@smilesobabel at main#1#2{%
   \chemob at bel@exec{%
     \smilesob at bel@obabelcmd{#1}{#2} 2>\smilesob at belGetName.log
     && \chemob at bel@svgtoimgcmd{\smilesob at belGetName}{\chemob at belimgExt} 2>>\smilesob at belGetName.log
@@ -138,14 +167,28 @@
 % 1: (optional) options for includegraphics
 % 2: original files (.mol, .cdx, etc.)
 % 3: options for obabel
-\newcommand\chemobabel[1][scale=1]{%
+\newcommand\chemobabel{\@ifstar{\chemobabel at i}{\chemobabel at ii}}
+\newcommand\chemobabel at i[1][scale=1]{%
   \def\chemobabel at next{\includegraphics[#1]}%
   \begingroup
     \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
-    \@chemobabel
+    \@chemobabel at i
 }
-\newcommand\@chemobabel[2]{%
+\newcommand\chemobabel at ii[1][scale=1]{%
+  \def\chemobabel at next{\includegraphics[#1]}%
+  \begingroup
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@chemobabel at ii
+}
+\def\@chemobabel at i#1{%
   \endgroup
+  \@chemobabel at main{#1}{}%
+}
+\def\@chemobabel at ii#1#2{%
+  \endgroup
+  \@chemobabel at main{#1}{#2}%
+}
+\def\@chemobabel at main#1#2{%
   \IfFileExists{"#1"}{%
     % the file exists: start processing
     % (``#1'' can contain spaces, so ``"'' required)
@@ -157,7 +200,7 @@
     \chemob at bel@common at maybeimg{\chemobabel at next}{\chemob at belGetName}{file ``#1''}%
   }{%
     % the file does not exist: show a std error
-    \PackageError{chemobabel}{File ``#1'' not found}{}%
+    \PackageError{chemobabel}{File ``#1'' not found}\@ehc
     \fbox{\begin{minipage}{0.9\textwidth}
       Error in chemobabel: the file ``#1'' does not exist.
     \end{minipage}}%
@@ -201,14 +244,85 @@
 \DeclareOption{librsvg}%
   {\let\chemob at bel@svgtoimgcmd\chemob at bel@librsvgcmd}
 % crop image or not
-\DeclareOption{nocrop}{%
-  \let\chemob at bel@cropcmd\@gobble
-  \let\chemob at bel@maybecrop\@empty}
+\let\chemob at bel@nocrop\relax
+\DeclareOption{nocrop}{\let\chemob at bel@nocrop\@empty}
 % default settings
 \ExecuteOptions{pdf,inkscape}
-\ProcessOptions\relax
+% handle user settings - arbitrary order allowed
+\ProcessOptions*\relax
+\ifx\chemob at bel@nocrop\relax \else
+  \let\chemob at bel@cropcmd\@gobble
+  \let\chemob at bel@maybecrop\@empty
+\fi
 %% ----- Declaration of options end -----
 
+%% ----- Warn if something went wrong -----
+% e.g.) \chemob at bel@common at maybeimg is not an image
+%   --- when current processing failed
+%        AND previous shell-escape run not found
+% e.g.) \chemob at bel@common at maybeimg is definitely a wrong image
+%   --- when current processing failed
+%        BUT previous shell-escape run with different total number found
+% --- note that re-run after removing [extract] should avoid the warning
+% --- as it will include all the correct images from previous shell-escape run
+\def\chemob at bel@record at imgnum#1{%
+  \immediate\write#1{\gdef\string
+    \smilesob at bel@imgNum{\number\value{smilesob at belCounter}}}%
+  \immediate\write#1{\gdef\string
+    \chemob at bel@imgNum{\number\value{chemob at belCounter}}}%
+}
+\def\chemob at bel@preserve at imgnum#1{%
+  \immediate\write#1{\gdef\string
+    \smilesob at bel@imgNum{\smilesob at bel@imgNum}}%
+  \immediate\write#1{\gdef\string
+    \chemob at bel@imgNum{\chemob at bel@imgNum}}%
+}
+\def\chemob at bel@atenddocument{%
+  \ifnum\chemob at bel@status>\z@ % at least one is not an image
+      \PackageWarningNoLine{chemobabel}{%
+        Some processing failed.\MessageBreak
+        Please rerun}%
+  \else % all images
+    \ifnum\chemob at bel@shellescape=\@ne % current run is shell-escape
+      % record number of images of the current run
+      \if at filesw
+        \chemob at bel@record at imgnum{\@mainaux}%
+      \fi
+      % when processing ChemFigFile.tex, also write to the original .aux
+      \ifx\chemob at bel@jobname\chemob at bel@outname
+        \IfFileExists{\chemobabelfile.tex}{%
+          \if at filesw
+            \newwrite\chemob at bel@origaux
+            \immediate\openout\chemob at bel@origaux=\chemobabelfile.aux\relax
+            \chemob at bel@record at imgnum{\chemob at bel@origaux}%
+            \immediate\closeout\chemob at bel@origaux
+          \fi
+        }{}%
+      \fi
+    \else
+      % compare number of images with the previous shell-escape run
+      \ifx\smilesob at bel@imgNum\@undefined\def\smilesob at bel@imgNum{0}\fi
+      \ifnum\value{smilesob at belCounter}=\smilesob at bel@imgNum\relax\else
+        \PackageWarningNoLine{chemobabel}{%
+          Number of \noexpand\smilesobabel changed.\MessageBreak
+          Please rerun}%
+      \fi
+      \ifx\chemob at bel@imgNum\@undefined\def\chemob at bel@imgNum{0}\fi
+      \ifnum\value{chemob at belCounter}=\chemob at bel@imgNum\relax\else
+        \PackageWarningNoLine{chemobabel}{%
+          Number of \noexpand\chemobabel changed.\MessageBreak
+          Please rerun}%
+      \fi
+      % record number of images of the previous shell-escape run
+      \if at filesw
+        \chemob at bel@preserve at imgnum{\@mainaux}%
+      \fi
+    \fi
+  \fi
+}
+\AtEndDocument{\chemob at bel@atenddocument}
+%% ----- Warn if something went wrong end -----
+
 %% ----- Exit this package now, if [extract] is not specified -----
 \ifx\chemob at bel@extract\relax \endinput \fi
 
@@ -215,53 +329,95 @@
 %% Extracting all codes of Open Babel figures
 %% Thanks: http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1411
 
+%% ----- Safety check before opening output file -----
+\ifx\chemob at bel@jobname\chemob at bel@outname
+  \PackageWarningNoLine{chemobabel}{%
+    Wow! Your file name is `\chemob at bel@outname'!\MessageBreak
+    Option [extract] ignored to avoid overwriting}
+  \expandafter\endinput
+\fi
+
 \PackageWarningNoLine{chemobabel}{%
   You are using [extract] option.\MessageBreak
   No chemical structures will be printed}
 
+%% ----- Accumulate user-given options to be passed -----
+% the image extension (non-empty)
+\edef\chemob at bel@options{\chemob at belimgExt}
+% image conversion command (except default=inkscape)
+\ifx\chemob at bel@svgtoimgcmd\chemob at bel@inkscapeoldcmd
+  \edef\chemob at bel@options{\chemob at bel@options,inkscape-old}
+\else\ifx\chemob at bel@svgtoimgcmd\chemob at bel@librsvgcmd
+  \edef\chemob at bel@options{\chemob at bel@options,librsvg}
+\fi\fi
+% crop image or not
+\ifx\chemob at bel@nocrop\relax \else
+  \edef\chemob at bel@options{\chemob at bel@options,nocrop}
+\fi
+
 %% ----- Define intermediate output file and load packages -----
-\newwrite\ChemFigFile
-\immediate\openout\ChemFigFile=ChemFigFile.tex\relax
-\immediate\write\ChemFigFile{\string\documentclass{article}}
-\immediate\write\ChemFigFile{\string\usepackage{graphicx}}
-\immediate\write\ChemFigFile{\string\usepackage{chemobabel}}
+\newwrite\chemob at bel@outfile
+\immediate\openout\chemob at bel@outfile=\chemob at bel@outname.tex\relax
+\immediate\write\chemob at bel@outfile{\string\def\string\chemobabelfile{\chemob at bel@jobname}}
+\immediate\write\chemob at bel@outfile{\string\documentclass{article}}
+\immediate\write\chemob at bel@outfile{\string\usepackage[\chemob at bel@options]{chemobabel}}
 
 %% ----- Read and write -----
-\immediate\write\ChemFigFile{\string\begin{document}}
-\AtEndDocument{%
-  \immediate\write\ChemFigFile{\string\end{document}}%
-  \immediate\closeout\ChemFigFile
+\immediate\write\chemob at bel@outfile{\string\begin{document}}
+\def\chemob at bel@atenddocument{%
+  \immediate\write\chemob at bel@outfile{\string\end{document}}%
+  \immediate\closeout\chemob at bel@outfile
   \chemob at bel@ifnochem{}{%
     \PackageWarningNoLine{chemobabel}{%
       Some chemical structures are extracted.\MessageBreak
       Run 'pdflatex -shell-escape ChemFigFile.tex'}}%
 }
-\renewcommand\smilesobabel{%
+% \smilesobabel*[#1]{#2} => normalized to \smilesobabel[#1]{#2}{#3}
+\renewcommand\smilesobabel at i{%
   \begingroup
-  \let\do\@makeother
-  \dospecials
-  \catcode`\{=1
-  \catcode`\}=2
-  \@@smilesobabel
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@smilesobabel at i
 }
-\newcommand\@@smilesobabel[3][scale=1]{%
+\renewcommand\smilesobabel at ii{%
+  \begingroup
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@smilesobabel at ii
+}
+\renewcommand\@smilesobabel at i[2][scale=1]{%
   \endgroup
-  \immediate\write\ChemFigFile{%
+  \@smilesobabel at main{#1}{#2}{}%
+}
+\renewcommand\@smilesobabel at ii[3][scale=1]{%
+  \endgroup
+  \@smilesobabel at main{#1}{#2}{#3}%
+}
+\def\@smilesobabel at main#1#2#3{%
+  \immediate\write\chemob at bel@outfile{%
     \string\smilesobabel[#1]{#2}{#3}%
     \string\newpage}%
   [\smilesob at belGetName.\chemob at belimgExt]%
   \addtocounter{smilesob at belCounter}{1}}
-\renewcommand\chemobabel{%
+% \chemobabel*[#1]{#2} => normalized to \chemobabel[#1]{#2}{#3}
+\renewcommand\chemobabel at i{%
   \begingroup
-  \let\do\@makeother
-  \dospecials
-  \catcode`\{=1
-  \catcode`\}=2
-  \@@chemobabel
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@chemobabel at i
 }
-\newcommand\@@chemobabel[3][scale=1]{%
+\renewcommand\chemobabel at ii{%
+  \begingroup
+    \let\do\@makeother \dospecials \catcode`\{=1 \catcode`\}=2
+    \@chemobabel at ii
+}
+\renewcommand\@chemobabel at i[2][scale=1]{%
   \endgroup
-  \immediate\write\ChemFigFile{%
+  \@chemobabel at main{#1}{#2}{}%
+}
+\renewcommand\@chemobabel at ii[3][scale=1]{%
+  \endgroup
+  \@chemobabel at main{#1}{#2}{#3}%
+}
+\def\@chemobabel at main#1#2#3{%
+  \immediate\write\chemob at bel@outfile{%
     \string\chemobabel[#1]{#2}{#3}%
     \string\newpage}%
   [\chemob at belGetName.\chemob at belimgExt]%



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