summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/inlinelabel
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-10 03:00:39 +0000
committerNorbert Preining <norbert@preining.info>2022-07-10 03:00:39 +0000
commit20ce5b015c76436ed3c8022b778a877bcf4852dd (patch)
tree1f3e497cdfb61208cb0bbc703320a6df0c2e9d63 /macros/latex/contrib/inlinelabel
parent7891283a2f2fb8a8a884bb212c36da8082764a9b (diff)
CTAN sync 202207100300
Diffstat (limited to 'macros/latex/contrib/inlinelabel')
-rw-r--r--macros/latex/contrib/inlinelabel/README.md5
-rw-r--r--macros/latex/contrib/inlinelabel/inlinelabel.pdfbin159832 -> 159742 bytes
-rw-r--r--macros/latex/contrib/inlinelabel/inlinelabel.sty2
-rw-r--r--macros/latex/contrib/inlinelabel/inlinelabel.tex373
4 files changed, 378 insertions, 2 deletions
diff --git a/macros/latex/contrib/inlinelabel/README.md b/macros/latex/contrib/inlinelabel/README.md
index ea7e66799c..ed2838e8d4 100644
--- a/macros/latex/contrib/inlinelabel/README.md
+++ b/macros/latex/contrib/inlinelabel/README.md
@@ -5,7 +5,7 @@ This package can assign equation numbers to inline equations. When Japanese is s
## Documents
-Documents for this pacakge are available in English and Japanese.
+Documents for this package are available in English and Japanese.
## License
@@ -17,6 +17,9 @@ This package released under [the MIT license](https://ctan.org/license/mit).
## Revision History
++ Version 1.2.1 2022-07-08
+ + Add the .tex source of the documentation.
+ + Improve the documentation.
+ Version 1.2 2022-07-08
+ Add the \equationreset.
+ Improve the documentation.
diff --git a/macros/latex/contrib/inlinelabel/inlinelabel.pdf b/macros/latex/contrib/inlinelabel/inlinelabel.pdf
index 4aef9a8f7d..253ea95264 100644
--- a/macros/latex/contrib/inlinelabel/inlinelabel.pdf
+++ b/macros/latex/contrib/inlinelabel/inlinelabel.pdf
Binary files differ
diff --git a/macros/latex/contrib/inlinelabel/inlinelabel.sty b/macros/latex/contrib/inlinelabel/inlinelabel.sty
index d249d60ad3..384c7fddb4 100644
--- a/macros/latex/contrib/inlinelabel/inlinelabel.sty
+++ b/macros/latex/contrib/inlinelabel/inlinelabel.sty
@@ -10,7 +10,7 @@
%%
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{inlinelabel}[2022/07/08 v1.2]
+\ProvidesPackage{inlinelabel}[2022/07/08 v1.2.1]
%
% When you meet ''Package pxufont Error: You must load this package
% after 'otf'.'', move \usepackage{otf} to a forward row.
diff --git a/macros/latex/contrib/inlinelabel/inlinelabel.tex b/macros/latex/contrib/inlinelabel/inlinelabel.tex
new file mode 100644
index 0000000000..66f961ce7b
--- /dev/null
+++ b/macros/latex/contrib/inlinelabel/inlinelabel.tex
@@ -0,0 +1,373 @@
+\documentclass[%
+fleqn,%
+paper=a4paper,%
+fontsize=10pt,%
+open_bracket_pos=zenkakunibu_nibu,%
+hanging_punctuation,%
+]%
+{jlreq}
+\jlreqsetup{%
+itemization_beforeafter_space=0pt,%
+itemization_itemsep=0pt%
+}
+\makeatletter
+\RequirePackage{luatexja}
+\RequirePackage{luatexja-otf}
+\RequirePackage{graphicx}
+\RequirePackage{amsmath}
+\DeclareRobustCommand{\metaphysicaicon}{\raisebox{-4.0pt}{\includegraphics[width=16pt]{metaphysicaicon.pdf}}}
+\RequirePackage[normalem]{ulem}
+\RequirePackage[explicit]{titlesec}
+\titleformat{\section}[hang]{}{}{0pt}{\uuline{\raisebox{1pt}{\textsf{\thesection\quad #1}}}}[\vspace{0.35\baselineskip}]
+\renewcommand{\thesection}{\S\,\arabic{section}}
+\let\originalsection\section
+\DeclareRobustCommand{\section}{\@ifstar{\@metaphysica@section@star}{\@metaphysica@section@nostar}}
+\DeclareRobustCommand{\@metaphysica@section@star}[1]{\vspace{0.5\baselineskip}\originalsection{#1}\vspace*{-\baselineskip}}
+\DeclareRobustCommand{\@metaphysica@section@nostar}[1]{\vspace{0.5\baselineskip}\originalsection{#1}}
+\RequirePackage[%
+truedimen,%
+margin=30truemm,
+includehead%
+]{geometry}
+\RequirePackage{lastpage}
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+\DeclareRobustCommand{\headertitle}[2][\metaphysicaicon]{%
+\rhead[#2]{#1{}\quad\thepage{}/{}\pageref{LastPage}}%
+\lhead[\thepage{}/{}\pageref{LastPage}\quad{}#1]{#2}%
+\cfoot{}%
+}
+\RequirePackage{setspace}
+\setstretch{1.155}
+\DeclareRobustCommand{\linespace}{\@ifstar{\vspace{\baselineskip}}{\vspace{0.25\baselineskip}}}
+\DeclareRobustCommand{\linesmash}{\@ifstar{\vspace{-\baselineskip}}{\vspace{-0.25\baselineskip}}}
+\AtBeginDocument{%
+\abovedisplayskip =0.125\abovedisplayskip
+\abovedisplayshortskip=0.125\abovedisplayshortskip
+\belowdisplayskip =0.125\belowdisplayskip
+\belowdisplayshortskip=0.125\belowdisplayshortskip}
+\setlength{\jot}{0pt}%
+\setlength{\mathindent}{2\zw}%
+\renewcommand{\floatpagefraction}{0.75}
+\allowdisplaybreaks[2]
+\RequirePackage[no-math]{fontspec}
+\RequirePackage[no-math,deluxe,haranoaji]{luatexja-preset}
+\RequirePackage{multicolpar}
+\RequirePackage[style=iso]{datetime2}
+\RequirePackage[unicode]{hyperref}
+\RequirePackage{xparse}
+\RequirePackage{dashbox}
+\newcounter{psuedosectioncounter}
+\setcounter{psuedosectioncounter}{1}
+\newcounter{psuedocontentscounter}
+\setcounter{psuedocontentscounter}{1}
+\DeclareRobustCommand{\psuedosection}[3]{%
+\hypertarget{#1}{\mbox{}}\begin{multicolpar}{2}%
+\noindent\uuline{{\raisebox{1pt}{\textsf{\S\ \thepsuedosectioncounter\quad #2}}}}
+
+\noindent\uuline{{\raisebox{1pt}{\textsf{\S\ \thepsuedosectioncounter\quad #3}}}}
+\end{multicolpar}%
+\stepcounter{psuedosectioncounter}%
+\vspace{\baselineskip}%
+}
+\DeclareRobustCommand{\psuedocontents}[3]{%
+\begin{multicolpar}{2}%
+\noindent{\textsf{\hyperlink{#1}{\S\ \thepsuedocontentscounter\quad #2}}}
+
+\noindent{\textsf{\hyperlink{#1}{\S\ \thepsuedocontentscounter\quad #3}}}\end{multicolpar}%
+\stepcounter{psuedocontentscounter}%
+}
+\newenvironment{translateing}%
+{\begin{multicolpar}{2}}
+{\end{multicolpar}\vspace{\baselineskip}}
+\DeclareRobustCommand{\maketitletranslating}%
+{\maketitle\thispagestyle{fancy}
+\vspace{\baselineskip}\begin{multicolpar}{2}
+\textsf{English}
+
+\noindent
+\textsf{日本語 (Japanese)}
+\end{multicolpar}\vspace{\baselineskip}}
+\NewDocumentCommand\macroexplanation{v}{%
+\noindent\hspace*{\fill}{\texttt{#1}}\hspace*{\fill}\linespace%
+}
+\NewDocumentEnvironment{macroexample}{O{0.625} +b}{%
+\noindent\hspace*{\fill}\dbox{\parbox{#1\textwidth}{%
+#2%
+}}\hspace*{\fill}}%
+{\vspace{\baselineskip}}
+\NewDocumentEnvironment{macroexample*}{O{0.625} m +b}{%
+\noindent\hspace*{\fill}\dbox{\parbox{#1\textwidth}{%
+\vspace{-0.5\baselineskip}\begin{#2}%
+#3
+\end{#2}%
+}}\hspace*{\fill}}
+{\vspace{\baselineskip}}
+\let\code\texttt
+\setlength{\fboxsep}{1em}
+\setstretch{1.05}
+\DeclareRobustCommand{\commandtojskip}{\hspace{2.40554pt plus 1.49994pt minus 0.59998pt}}
+\RequirePackage{listings, jlisting}
+\lstset{
+ language=[LaTeX]TeX,
+ basicstyle={\ttfamily},
+ identifierstyle={\small},
+ commentstyle={\small\itshape},
+ keywordstyle={\small\bfseries},
+ ndkeywordstyle={\small},
+ stringstyle={\small\ttfamily},
+ frame=single,
+ breaklines=true,
+ columns=[l]{fullflexible},
+ stepnumber=1,
+ xrightmargin=0.1709\textwidth,
+ xleftmargin=0.1709\textwidth,
+ lineskip=-0.5ex
+}
+\RequirePackage{bxtexlogo}
+\RequirePackage{shortvrb}
+\MakeShortVerb{\|}
+\RequirePackage[luacircled]{inlinelabel}
+\makeatother
+%
+\hypersetup{%
+bookmarksnumbered=true,%
+colorlinks=true,%
+linkcolor=blue,%
+urlcolor=blue,%
+setpagesize=false,%
+pdftitle={The inlinelabel package},%
+pdfauthor={Yukoh KUSAKABE},%
+pdfsubject={The inlinelabel package},%
+pdfkeywords={TeX LaTeX inlinel label}}
+\title{The \code{inlinelabel} package:\\[0.25\baselineskip]
+assign equation numbers to inline equations}
+\author{Yukoh KUSAKABE}
+%\author{Y\=uk\=o KUSAKABE}
+\date{\today}
+\headertitle[Yukoh KUSAKABE\quad\metaphysicaicon]{The \code{inlinelabel} package}
+%\headertitle[Y\=uk\=o KUSAKABE\quad\metaphysicaicon]{The \code{inlinelabel} package}
+\begin{document}
+\maketitletranslating
+
+\begin{translateing}
+This package can assign equation numbers to inline equations. When Japanese is supported, you can switch to circled equation numbers.
+
+このパッケージは,インライン数式に数式番号を振ることができます。また,日本語を扱えるときには,丸で囲まれた数式番号に切り替えることができます。
+\end{translateing}
+
+%\psuedocontents{inlinelabel}
+%{Package \code{inlinelabel}}
+%{\code{inlinelabel} パッケージ}
+
+\psuedocontents{Requirements}{System Requirements}{前提条件}
+
+\psuedocontents{Installation}{Installation}{インストール}
+
+\psuedocontents{Loading}{Loading}{読み込み}
+
+\psuedocontents{Usage}{Usage}{使用方法}
+
+\psuedocontents{moreinfo}{For More Information}{問い合わせ・詳しくは}
+
+%\psuedosection{inlinelabel}{Package \code{inlinelabel}}{\code{inlinelabel} パッケージ}
+%
+%\begin{translateing}
+%This package can assign equation numbers to inline equations. When Japanese is supported, you can switch to circled equation numbers.
+%
+%このパッケージは,インライン数式に数式番号を振ることができます。また,日本語を扱えるときには,丸で囲まれた数式番号に切り替えることができます。
+%\end{translateing}
+
+\psuedosection{Requirements}{System Requirements}{前提条件}
+
+\begin{translateing}
+\textbullet\ \LaTeXe\ format\\
+\textbullet\ \code{amsmath} package\\
+\textbullet\ \code{refcount} package\\
+\textbullet\ \pTeX\ engine (\code{[circled]} only)\\
+\textbullet\ \code{japanese-otf} package (\code{[circled]} only)\\
+\textbullet\ \LuaTeX\ engine (\code{[luacircled]} only)\\
+\textbullet\ \scalebox{0.95}[1]{\code{luatexja-otf} package (\code{[luacircled]} only)}
+
+\noindent
+\textbullet\ \LaTeXe フォーマット\\
+\textbullet\ \code{amsmath} パッケージ\\
+\textbullet\ \code{refcount} パッケージ\\
+\textbullet\ \pTeX エンジン(\code{[circled]}使用時)\\
+\textbullet\ \scalebox{0.9}[1]{\code{japanese-otf} パッケージ(\code{[circled]}使用時)}\\
+%\textbullet\ \code{luatexja-otf} パッケージ\\
+%\hfill (\code{[luacircled]}使用時)
+\textbullet\ \LuaTeX エンジン(\code{[luacircled]}使用時)\!\\
+\textbullet\ \scalebox{0.8375}[1]{\code{luatexja-otf} パッケージ(\code{[luacircled]}使用時)}
+\end{translateing}
+
+\newpage
+\psuedosection{Installation}{Installation}{インストール}
+
+\begin{translateing}
+If not available, move inlinelabel.sty file to\\\code{\$TEXMF/tex/latex/inlinelabel}.
+
+直ちに使えなければ,inlinelabel.sty を\\\code{\$TEXMF/tex/latex/inlinelabel}\\%(\TeX が見つけられる場所)
+に置いてください。
+\end{translateing}
+
+\psuedosection{Loading}{Loading}{読み込み}
+
+\begin{translateing}
+To use this package, load .sty file with |\usepackage{inlinelabel}| command in
+preamble.
+
+このパッケージを使用するには,プリアンブルに\commandtojskip|\usepackage{inlinelabel}|\commandtojskip と書いてください。
+%\end{translateing}
+
+%\begin{translateing}
+There are three options:\\
+\textbullet\ |[nospace]| swaps with no space command and with space command.\\
+\textbullet\ |[circled]| switches to circled equation numbers on \pLaTeX, which is an engine for Japanese.\\
+\textbullet\ |[luacircled]| switches to circled equation numbers on \LuaLaTeX\ (and Japanese environment required).
+
+3つのオプションがあります。\\
+\textbullet\ |[nospace]|はスペースなし命令とスペースあり命令が入れ替えます。\\
+\textbullet\ |[circled]|は丸で囲まれた数式番号に切り替えます(\pLaTeX 用)。\\
+\textbullet\ |[luacircled]|は丸で囲まれた数式番号に切り替えます(\LuaLaTeX 用)。
+\end{translateing}
+
+
+
+\psuedosection{Usage}{Usage}{使用方法}
+
+\macroexplanation{\inlinelabel{<label>}}
+
+\begin{translateing}
+This command puts the inline equation number. It takes the name of the label as an argument. Place it outside of the equation (outside of the \$--\$). It makes a small margin before and after the text to make it look natural (in Japanese). If you don't want margins, use |\inlinelabel*{<label>}|.
+
+インラインの数式番号を置きます。引数にラベルの名前を取ります。数式(\$--\$)の外に置いてください。自然に見せるために,前後に少しの余白を取ります。余白がいらないときは\commandtojskip|\inlinelabel*{<label>}|\commandtojskip を使ってください。
+%
+%If you don't want margins (not in Japanese), use |\inlinelabel*{<label>}|.
+%
+%日本語組版を念頭に作っていますので,英語では |\inlinelabel*{<label>}| を使って原稿でスペースを入れるのが自然でしょう。
+
+For inconvenience, there is the |[nospace]| option.
+In this case, |\inlinelabel{<label>}| is swapped with no space and |\inlinelabel*{<label>}| has space.
+
+それが面倒なときのために,|[nospace]|オプションが用意されています。
+このとき,|\inlinelabel{<label>}|\commandtojskip がスペースなし,|\inlinelabel*{<label>}|\commandtojskip がスペースありに入れ替わります。
+\end{translateing}
+
+\begin{lstlisting}
+An inlinelabel makes
+$e^{i\theta}=\cos\theta+i\sin\theta$\inlinelabel{test1}.
+
+An asterisked one makes
+$e^{i\pi}+1=0$\inlinelabel*{test2}.
+\end{lstlisting}
+
+\begin{macroexample}
+An inlinelabel makes $e^{i\theta}=\cos\theta+i\sin\theta$\hspace{0.5em}(1)\hspace{0.5em}.
+
+An asterisked one makes $e^{i\pi}+1=0$(2).
+\end{macroexample}
+
+\begin{translateing}
+The |<label>| can be used for |\ref|.
+
+|<label>|\commandtojskip を\commandtojskip|\ref|で使うことができます。
+\end{translateing}
+
+\begin{lstlisting}
+Substituting $\theta=\pi$
+for (\ref{test1}) yields (\ref{test2}).
+\end{lstlisting}
+
+\begin{macroexample}
+Substituting $\theta=\pi$ for (\ref*{test1}) yields (\ref*{test2}).
+\end{macroexample}
+
+\macroexplanation{Options [circled] [luacircled]}
+
+\begin{translateing}
+Assuming you are using a Japanese environment. Switch to circled equation numbers. All equation numbers are rewritten, not just the inline equation numbers.
+
+あなたが日本語の環境を使用していることを前提とします。丸で囲まれた数式番号に切り替えます。インラインの数式番号だけでなく,すべての数式番号が書き換えられます。
+
+When using \pLaTeX\ with the \code{japanese-otf} package, specify \code{[circled]}; when using \LuaLaTeX\ with the \code{luatexja-otf} package, specify \code{[luacircled]}.
+
+\pLaTeX を使っているときは,\code{japanese-otf} パッケージの読み込みとともに\code{[circled]}オプションを指定してください。
+\LuaLaTeX を使っているときは,\code{luatexja-otf} パッケージの読み込みとともに\code{[luacircled]}オプションを指定してください。
+\end{translateing}
+%
+%\begin{lstlisting}
+%$e^{i\theta}=\cos\theta+i\sin\theta$\inlinelabel{test1}はテストです。
+%
+%アスタリスクをつけると$e^{i\pi}+1=0$\inlinelabel*{test2}です。
+%\end{lstlisting}
+
+\begin{macroexample}
+$e^{i\theta}=\cos\theta+i\sin\theta$\inlinelabel{test1}はテストです。
+
+アスタリスクをつけると$e^{i\pi}+1=0$\inlinelabel*{test2}です。
+\end{macroexample}
+
+\begin{translateing}
+The following example is just an align environment.
+
+次の例は単なる align 環境です。
+\end{translateing}
+
+\begin{lstlisting}
+\begin{align}
+&\phantom{=}\log_{3}x+\log_{3}(6-x)\\
+&=\log_{3}x(6-x)\\
+&=\log_{3}(-(x-3)^{2}+9)
+\end{align}
+\end{lstlisting}
+
+%\equationreset
+\begin{macroexample*}{align}
+&\phantom{=}\log_{3}x+\log_{3}(6-x)\\
+&=\log_{3}x(6-x)\\
+&=\log_{3}(-(x-3)^{2}+9)
+\end{macroexample*}
+
+\macroexplanation{\circledref{<label>} \equationref{<label>}}
+
+\begin{translateing}
+These commands are only valid when \code{[circled]} or \code{[luacircled]} option is loaded.
+They refer to the circled equation number.
+
+\code{[circled]}または\code{[luacircled]}オプションを読み込んでいるときにのみ有効です。
+丸で囲まれた数式番号を参照します。
+\end{translateing}
+
+\begin{translateing}
+|\equationref| is synonym with |\circledref|.
+
+|\equationref|は\commandtojskip|\circledref|の別名です。
+\end{translateing}
+
+\begin{lstlisting}
+Substituting $\theta=\pi$
+for \equationref{test1} yields \equationref{test2}.
+\end{lstlisting}
+
+\begin{macroexample}
+Substituting $\theta=\pi$ for \equationref{test1} yields \equationref{test2}.
+\end{macroexample}
+
+\macroexplanation{\equationreset}
+
+\begin{translateing}
+Reset the equation number back to 1.
+
+数式番号を1に戻します。
+\end{translateing}
+
+\psuedosection{moreinfo}{For More Information}{問い合わせ・詳しくは}
+
+\noindent\hspace*{\fill}\begin{tabular}{rl}
+The inlinelabel package:&\url{https://www.metaphysica.info/technote/package_inlinelabel/}\\
+Yukoh KUSAKABE:&\url{https://www.metaphysica.info/}\\
+&\url{https://twitter.com/metaphysicainfo}\\
+&(screen-name, 日下部幽考 in Japanese)
+\end{tabular}\hspace*{\fill}
+\end{document} \ No newline at end of file