diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/inlinelabel')
-rw-r--r-- | Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty b/Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty new file mode 100644 index 00000000000..93c4822c837 --- /dev/null +++ b/Master/texmf-dist/tex/latex/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 |