diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-29 03:00:54 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-29 03:00:54 +0000 |
commit | 1803d67dcb084b1d6b825dd2f1a39df83c11db02 (patch) | |
tree | 083814d64daa39afbd3ceea4804d903a2585077a /macros/latex/contrib/inlinelabel | |
parent | 2ef43af0215fc52966c9bbd8d5df6db6d6af224b (diff) |
CTAN sync 202206290300
Diffstat (limited to 'macros/latex/contrib/inlinelabel')
-rw-r--r-- | macros/latex/contrib/inlinelabel/README.md | 31 | ||||
-rw-r--r-- | macros/latex/contrib/inlinelabel/inlinelabel-en.md | 55 | ||||
-rw-r--r-- | macros/latex/contrib/inlinelabel/inlinelabel-ja.md | 55 | ||||
-rw-r--r-- | macros/latex/contrib/inlinelabel/inlinelabel.sty | 55 | ||||
-rw-r--r-- | macros/latex/contrib/inlinelabel/inlinelabel_example.tex | 11 |
5 files changed, 207 insertions, 0 deletions
diff --git a/macros/latex/contrib/inlinelabel/README.md b/macros/latex/contrib/inlinelabel/README.md new file mode 100644 index 0000000000..e7acb7ca7e --- /dev/null +++ b/macros/latex/contrib/inlinelabel/README.md @@ -0,0 +1,31 @@ +# 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. + + +## 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/macros/latex/contrib/inlinelabel/inlinelabel-en.md b/macros/latex/contrib/inlinelabel/inlinelabel-en.md new file mode 100644 index 0000000000..dd726d5533 --- /dev/null +++ b/macros/latex/contrib/inlinelabel/inlinelabel-en.md @@ -0,0 +1,55 @@ +# 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/macros/latex/contrib/inlinelabel/inlinelabel-ja.md b/macros/latex/contrib/inlinelabel/inlinelabel-ja.md new file mode 100644 index 0000000000..a0e14fe403 --- /dev/null +++ b/macros/latex/contrib/inlinelabel/inlinelabel-ja.md @@ -0,0 +1,55 @@ +# 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/macros/latex/contrib/inlinelabel/inlinelabel.sty b/macros/latex/contrib/inlinelabel/inlinelabel.sty new file mode 100644 index 0000000000..93c4822c83 --- /dev/null +++ b/macros/latex/contrib/inlinelabel/inlinelabel.sty @@ -0,0 +1,55 @@ +%% +%% inlinelabel.sty +%% +%% Copyright (C) 2022 Yukoh KUSAKABE (screen-name) +%% https://www.metaphysica.info/ +%% https://twitter.com/metaphysicainfo +%% +%% This package released under +%% [the MIT license](https://ctan.org/license/mit). +%% +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{inlinelabel}[2022/06/28 v1.0] +% +% When you meet ''Package pxufont Error: You must load this package +% after 'otf'.'', move \usepackage{otf} to a forward row. +% +%% \if@inlinelabel@circled +\newif\if@inlinelabel@circled +\@inlinelabel@circledfalse +% +%% [circled] +\DeclareOption{circled}{\@inlinelabel@circledtrue} +% +\ExecuteOptions{} +\ProcessOptions\relax +% +% for \tagform@ \maketag@@@ +\RequirePackage{amsmath} +% +%% When [circled] +\if@inlinelabel@circled +% +% for \ajMaru +\RequirePackage{otf} +% for \getrefnumber +\RequirePackage{refcount} +% +% renew tagform +\def\tagform@#1{\maketag@@@{\ldots\ignorespaces\ajMaru{#1}\unskip\@@italiccorr}}% +% +%% \circledref{<label>} +%% \equationref{<label>} +\DeclareRobustCommand{\circledref}[1]{\mbox{\ajMaru{\getrefnumber{#1}}}} +\DeclareRobustCommand{\equationref}[1]{\mbox{\ajMaru{\getrefnumber{#1}}}} +% +\fi +%% +% +%% \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}} +% +%% EOF
\ No newline at end of file diff --git a/macros/latex/contrib/inlinelabel/inlinelabel_example.tex b/macros/latex/contrib/inlinelabel/inlinelabel_example.tex new file mode 100644 index 0000000000..bf70bcaf82 --- /dev/null +++ b/macros/latex/contrib/inlinelabel/inlinelabel_example.tex @@ -0,0 +1,11 @@ +\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 |