2019-05-13 14:31:53 +00:00
|
|
|
#\DeclareLyXModule{Ruby (Furigana)}
|
|
|
|
#\DeclareCategory{Annotation & Revision}
|
|
|
|
#DescriptionBegin
|
|
|
|
#Defines an inset to typeset reading aids (ruby, furigana) to Chinese
|
2023-01-16 07:43:18 +00:00
|
|
|
#characters. Uses the 'okumakro', 'luatexja-ruby', or 'ruby' package
|
2019-05-13 14:31:53 +00:00
|
|
|
#(depending on the TeX engine) or a fallback definition.
|
|
|
|
#DescriptionEnd
|
|
|
|
#Requires
|
|
|
|
#Excludes
|
|
|
|
|
|
|
|
#Authors: Koji Yokota (original implementation as local layout),
|
|
|
|
# Günter Milde <milde@lyx.org> (module)
|
|
|
|
|
2019-05-15 15:32:09 +00:00
|
|
|
# References:
|
|
|
|
# required packages
|
|
|
|
# okumacro.sty: https://ctan.org/pkg/jsclasses
|
|
|
|
# luatexja-ruby.sty: https://ctan.org/pkg/luatexja
|
|
|
|
# ruby.sty: https://www.ctan.org/pkg/cjk
|
|
|
|
# extended ruby support package (currently not used):
|
|
|
|
# https://ctan.org/pkg/pxrubrica
|
|
|
|
# W3W spec:
|
|
|
|
# https://www.w3.org/International/articles/ruby/markup.en.html
|
|
|
|
|
2022-12-23 01:26:52 +00:00
|
|
|
Format 99
|
2019-05-13 14:31:53 +00:00
|
|
|
|
|
|
|
InsetLayout Flex:Ruby
|
|
|
|
LyxType charstyle
|
|
|
|
LatexType command
|
|
|
|
LatexName ruby
|
2019-05-15 15:32:09 +00:00
|
|
|
HTMLTag ruby
|
|
|
|
HTMLAttr ""
|
|
|
|
HTMLInnerTag rb
|
|
|
|
HTMLInnerAttr ""
|
2019-05-13 14:31:53 +00:00
|
|
|
BgColor none
|
|
|
|
LabelString "Ruby"
|
|
|
|
Decoration Conglomerate
|
|
|
|
Preamble
|
|
|
|
\ifdefined\kanjiskip
|
|
|
|
\IfFileExists{okumacro.sty}{\usepackage{okumacro}}{}
|
|
|
|
\else \ifdefined\luatexversion
|
|
|
|
\usepackage{luatexja-ruby}
|
|
|
|
\else \ifdefined\XeTeXversion
|
|
|
|
\usepackage{ruby}%
|
|
|
|
\fi\fi\fi
|
|
|
|
\providecommand{\ruby}[2]{\shortstack{\tiny #2\\#1}}
|
|
|
|
EndPreamble
|
2019-05-15 15:32:09 +00:00
|
|
|
# Fixme: Currently the ruby text is ignored in HTML
|
2019-05-13 14:31:53 +00:00
|
|
|
Argument post:1
|
|
|
|
LabelString "ruby text"
|
|
|
|
MenuString "Ruby Text|R"
|
|
|
|
Tooltip "Reading aid (ruby, furigana) for Chinese characters."
|
|
|
|
Decoration Conglomerate
|
|
|
|
Font
|
|
|
|
Size tiny
|
|
|
|
EndFont
|
|
|
|
LabelFont
|
|
|
|
Size tiny
|
|
|
|
EndFont
|
|
|
|
Mandatory 1
|
|
|
|
EndArgument
|
|
|
|
End
|