]> git.lyx.org Git - lyx.git/blob - lib/layouts/ruby.module
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing...
[lyx.git] / lib / layouts / ruby.module
1 #\DeclareLyXModule{Ruby (Furigana)}
2 #\DeclareCategory{Annotation & Revision}
3 #DescriptionBegin
4 #Defines an inset to typeset reading aids (ruby, furigana) to Chinese
5 #characters. Uses the "okumakro", "luatexja-ruby", or "ruby" package
6 #(depending on the TeX engine) or a fallback definition.
7 #DescriptionEnd
8 #Requires
9 #Excludes
10
11 #Authors: Koji Yokota (original implementation as local layout),
12 #         Günter Milde <milde@lyx.org> (module)
13
14 # References:
15 # required packages
16 #   okumacro.sty:       https://ctan.org/pkg/jsclasses
17 #   luatexja-ruby.sty:  https://ctan.org/pkg/luatexja
18 #   ruby.sty:           https://www.ctan.org/pkg/cjk
19 # extended ruby support package (currently not used): 
20 #   https://ctan.org/pkg/pxrubrica
21 # W3W spec: 
22 #   https://www.w3.org/International/articles/ruby/markup.en.html
23
24 Format 99
25
26 InsetLayout Flex:Ruby
27         LyxType         charstyle
28         LatexType       command
29         LatexName       ruby
30         HTMLTag         ruby
31         HTMLAttr        ""
32         HTMLInnerTag    rb
33         HTMLInnerAttr   ""
34         BgColor         none
35         LabelString     "Ruby"
36         Decoration      Conglomerate
37         Preamble
38           \ifdefined\kanjiskip
39             \IfFileExists{okumacro.sty}{\usepackage{okumacro}}{}
40           \else \ifdefined\luatexversion
41             \usepackage{luatexja-ruby}
42           \else \ifdefined\XeTeXversion
43             \usepackage{ruby}%
44           \fi\fi\fi
45           \providecommand{\ruby}[2]{\shortstack{\tiny #2\\#1}}
46         EndPreamble
47         # Fixme: Currently the ruby text is ignored in HTML
48         Argument        post:1
49                 LabelString     "ruby text"
50                 MenuString      "Ruby Text|R"
51                 Tooltip         "Reading aid (ruby, furigana) for Chinese characters."
52                 Decoration      Conglomerate
53                 Font
54                   Size          tiny
55                 EndFont
56                 LabelFont
57                   Size          tiny
58                 EndFont
59                 Mandatory       1
60         EndArgument
61 End