diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-07 19:55:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-07 19:55:41 +0000 |
commit | 2dfebf86a81ab6ed22dd5bc664b75ea9259c1be1 (patch) | |
tree | ced931eadf2c62e4a94c24bf52de13deae84245c /Master/texmf-dist/tex/latex | |
parent | 59c31a211eedb2d287756b4ae1f29f39f5fa2dab (diff) |
inlinelabel (7jul22)
git-svn-id: svn://tug.org/texlive/trunk@63831 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/inlinelabel/inlinelabel.sty | 49 |
1 files changed, 48 insertions, 1 deletions
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 |