summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-07 19:55:41 +0000
committerKarl Berry <karl@freefriends.org>2022-07-07 19:55:41 +0000
commit2dfebf86a81ab6ed22dd5bc664b75ea9259c1be1 (patch)
treeced931eadf2c62e4a94c24bf52de13deae84245c
parent59c31a211eedb2d287756b4ae1f29f39f5fa2dab (diff)
inlinelabel (7jul22)
git-svn-id: svn://tug.org/texlive/trunk@63831 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/inlinelabel/README.md24
-rw-r--r--Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-en.md55
-rw-r--r--Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-ja.md55
-rw-r--r--Master/texmf-dist/doc/latex/inlinelabel/inlinelabel.pdfbin0 -> 159832 bytes
-rw-r--r--Master/texmf-dist/doc/latex/inlinelabel/inlinelabel_example.tex11
-rw-r--r--Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty49
6 files changed, 61 insertions, 133 deletions
diff --git a/Master/texmf-dist/doc/latex/inlinelabel/README.md b/Master/texmf-dist/doc/latex/inlinelabel/README.md
index e7acb7ca7e2..ea7e66799c8 100644
--- a/Master/texmf-dist/doc/latex/inlinelabel/README.md
+++ b/Master/texmf-dist/doc/latex/inlinelabel/README.md
@@ -1,29 +1,31 @@
-# Inlinelabel Package
+# inlinelabel
This package can assign equation numbers to inline equations. When Japanese is supported, you can switch to circled equation numbers.
-## System Requirements
+## Documents
-+ TeX format: LaTeX
-+ Prerequisite package: amsmath and refcount
-+ Prerequisite package with [circled] option: japanese-otf
-
-
-## Installation
-
-Move inlinelabel.sty file to $TEXMF/tex/latex/hideanswer.
+Documents for this pacakge are available in English and Japanese.
## License
This package released under [the MIT license](https://ctan.org/license/mit).
+(C) 2022 Yukoh KUSAKABE
+
## Revision History
++ Version 1.2 2022-07-08
+ + Add the \equationreset.
+ + Improve the documentation.
++ Version 1.1 2022-07-07
+ + Rewrite README.
+ + Add the document (inlinelabel.pdf).
+ + Add the [luacircled] option.
+ Version 1.0 2022-06-28
- + The first public version.
+ + The first public version.
---
diff --git a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-en.md b/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-en.md
deleted file mode 100644
index dd726d5533f..00000000000
--- a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-en.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Inlinelabel Package
-
-This package can assign equation numbers to inline equations. When Japanese is supported, you can switch to circled equation numbers.
-
-
-## System Requirements
-
-+ TeX format: LaTeX
-+ Prerequisite package: amsmath and refcount
-+ Prerequisite package with [circled] option: japanese-otf
-
-
-## Installation
-
-Move inlinelabel.sty file to $TEXMF/tex/latex/hideanswer.
-
-
-## Usage
-
-### \inlinelabel{<label>}
-
-Put the inline equation number. Place it outside of the equation (outside of the $--$). Take the name of the label as an argument. Take a small margin before and after the text to make it look natural. If you don't want margins, use \inlinelabel*{<label>}.
-
-
-### Option [circled]
-
-Assuming you are using a Japanese environment. Switch to circled equation numbers. All equation numbers are rewritten, not just the inline equation numbers.
-
-
-### \circledref{<label>}
-
-Only valid when [circled] option is loaded.
-Refer to the circled equation number.
-
-
-### \equationref{<label>}
-
-Only valid when [circled] option is loaded.
-This macro is the same as \circledref{<label>}.
-
-
-## License
-
-This package released under [the MIT license](https://ctan.org/license/mit).
-
-
-## Revision History
-
-+ Version 1.0 2022-06-28
- + The first public version.
-
-
----
-
-[Yukoh KUSAKABE](https://twitter.com/metaphysicainfo) (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-ja.md b/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-ja.md
deleted file mode 100644
index a0e14fe4031..00000000000
--- a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel-ja.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Inlinelabel パッケージ
-
-このパッケージは,インライン数式に数式番号を振ることができます。また,日本語を扱えるときには,丸で囲まれた数式番号に切り替えることができます。
-
-
-## 前提条件
-
-+ TeX format: LaTeX
-+ Prerequisite package: amsmath and refcount
-+ Prerequisite package with [circled] option: japanese-otf
-
-
-## インストール
-
-inlinelabel.sty を $TEXMF/tex/latex/hideanswer (TeXが見つけられる場所)に置いてください。
-
-
-## 使用方法
-
-### \inlinelabel{<label>}
-
-インラインの数式番号を置きます。数式の外($--$の外)に置いてください。引数にラベルの名前を取ります。文章を自然に見せるために,前後に少しの余白を取ります。余白がいらないときは,\inlinelabel*{<label>} を使ってください。
-
-
-### Option [circled]
-
-あなたが日本語の環境を使用していることを前提とします。丸で囲まれた数式番号に切り替えます。インラインの数式番号だけでなく,すべての数式番号が書き換えられます。
-
-
-### \circledref{<label>}
-
-[circled] オプションを読み込んでいるときにのみ有効です。
-丸で囲まれた数式番号を参照します。
-
-
-### \equationref{<label>}
-
-[circled] オプションを読み込んでいるときにのみ有効です。
-\circledref{<label>} と同じです。
-
-
-## ライセンス
-
-このパッケージは[MITライセンス](https://ctan.org/license/mit)のもとで配布しています。
-
-
-## 更新履歴
-
-+ Version 1.0 2022-06-28
- + The first public version.
-
-
----
-
-[Yukoh KUSAKABE](https://twitter.com/metaphysicainfo) (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel.pdf b/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel.pdf
new file mode 100644
index 00000000000..4aef9a8f7db
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel_example.tex b/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel_example.tex
deleted file mode 100644
index bf70bcaf824..00000000000
--- a/Master/texmf-dist/doc/latex/inlinelabel/inlinelabel_example.tex
+++ /dev/null
@@ -1,11 +0,0 @@
-\documentclass[uplatex]{article}
-\usepackage{inlinelabel}
-\begin{document}
-$1=2$\inlinelabel{a}
-
-$1=2$\inlinelabel*{b}
-
-\ref{a}
-
-\ref{b}
-\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty b/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty
index 93c4822c837..d249d60ad37 100644
--- a/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty
+++ b/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty
@@ -10,11 +10,18 @@
%%
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{inlinelabel}[2022/06/28 v1.0]
+\ProvidesPackage{inlinelabel}[2022/07/08 v1.2]
%
% When you meet ''Package pxufont Error: You must load this package
% after 'otf'.'', move \usepackage{otf} to a forward row.
%
+%% \if@inlinelabel@nospace
+\newif\if@inlinelabel@nospace
+\@inlinelabel@nospacefalse
+%
+%% [nospace]
+\DeclareOption{nospace}{\@inlinelabel@nospacetrue}
+%
%% \if@inlinelabel@circled
\newif\if@inlinelabel@circled
\@inlinelabel@circledfalse
@@ -22,6 +29,14 @@
%% [circled]
\DeclareOption{circled}{\@inlinelabel@circledtrue}
%
+%% \if@inlinelabel@luacircled
+\newif\if@inlinelabel@luacircled
+\@inlinelabel@luacircledfalse
+%
+%% [luacircled]
+\DeclareOption{luacircled}{\@inlinelabel@luacircledtrue}
+%
+%
\ExecuteOptions{}
\ProcessOptions\relax
%
@@ -47,9 +62,41 @@
\fi
%%
%
+%% When [luacircled]
+\if@inlinelabel@luacircled
+%
+% for \ajMaru
+\RequirePackage{luatexja-otf}
+% for \getrefnumber
+\RequirePackage{refcount}
+%
+% renew tagform
+\def\tagform@#1{\maketag@@@{$\ldots\hspace*{-0.075em}$\ignorespaces\ajMaru{#1}\unskip\@@italiccorr}}%
+%
+%% \circledref{<label>}
+%% \equationref{<label>}
+\DeclareRobustCommand{\circledref}[1]{\mbox{\ajMaru{\getrefnumber{#1}}}}
+\DeclareRobustCommand{\equationref}[1]{\mbox{\ajMaru{\getrefnumber{#1}}}}
+%
+\fi
+%
+\if@inlinelabel@nospace
+%
+%% [nospace]\inlinelabel{<label>}
+\DeclareRobustCommand{\inlinelabel}{\@ifstar{\@inlinelabelstar}{\@inlinelabelnostar}}
+\DeclareRobustCommand{\@inlinelabelnostar}[1]{\refstepcounter{equation}\tagform@\theequation\expandafter\label{#1}}
+\DeclareRobustCommand{\@inlinelabelstar}[1]{\hspace{0.5em}\refstepcounter{equation}\tagform@\theequation\expandafter\label{#1}\hspace{0.5em}}
+%
+\else
+%
%% \inlinelabel{<label>}
\DeclareRobustCommand{\inlinelabel}{\@ifstar{\@inlinelabelstar}{\@inlinelabelnostar}}
\DeclareRobustCommand{\@inlinelabelstar}[1]{\refstepcounter{equation}\tagform@\theequation\expandafter\label{#1}}
\DeclareRobustCommand{\@inlinelabelnostar}[1]{\hspace{0.5em}\refstepcounter{equation}\tagform@\theequation\expandafter\label{#1}\hspace{0.5em}}
%
+\fi
+%
+%% \equationreset
+\DeclareRobustCommand{\equationreset}{\setcounter{equation}{0}}
+%
%% EOF \ No newline at end of file