From 996c9b239bde82dc3ef3e5b69cd525e87fdb61a8 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 19 Sep 2021 03:01:05 +0000
Subject: CTAN sync 202109190301

---
 .../luatex/generic/luatexja/doc/luatexja-ruby.tex  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

(limited to 'macros/luatex/generic/luatexja/doc/luatexja-ruby.tex')

diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
index a01994faa7..3148d1df9e 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
@@ -45,6 +45,31 @@
 \DeclareFontShape{JY3}{mc}{mc}{n}{<-> [0.92487] 
   HaranoAjiMincho-Regular:extend=0.67;jfm=ujisc33}{}
 
+%%%% \ltjruby 内に \texorpdfstring + | 除去を仕込む
+\RequirePackage{xparse}
+\makeatletter
+\def\removevert#1{\if\noexpand#1|%
+    \expandafter\expandafter\expandafter\@firstofone\expandafter{%
+  \else\ifnum0=1}\fi#1%
+    \ifx#1\relax\expandafter\@gobble%
+    \else\expandafter\@firstofone
+    \fi{\expandafter\@firstofone
+  \fi
+  \removevert}}
+\makeatother
+\ExplSyntaxOn
+\cs_set_eq:NN \myorigltjruby \ltjruby
+\DeclareExpandableDocumentCommand {\ltjruby} { O{} m m } {%
+   \texorpdfstring {
+    \exp_not:n { \myorigltjruby[#1]{#2}{#3} }
+  } {
+    \removevert #2 \relax
+  }
+}
+\cs_set_eq:NN \ruby \ltjruby
+\ExplSyntaxOff
+%%%%
+
 \title{\textsf{luatexja-ruby}パッケージ}
 \author{\LuaTeX-jaプロジェクトチーム}
 \date{\texttt{\csname ver@luatexja-ruby.sty\endcsname}（\today）}
-- 
cgit v1.2.3

