File: ruby.module

package info (click to toggle)
lyx 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 138,444 kB
  • sloc: cpp: 244,268; ansic: 106,398; xml: 72,791; python: 39,384; sh: 7,666; makefile: 6,584; pascal: 2,143; perl: 2,101; objc: 1,084; tcl: 163; sed: 16
file content (61 lines) | stat: -rw-r--r-- 1,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#\DeclareLyXModule{Ruby (Furigana)}
#\DeclareCategory{Annotation & Revision}
#DescriptionBegin
#Defines an inset to typeset reading aids (ruby, furigana) to Chinese
#characters. Uses the 'okumakro', 'luatexja-ruby', or 'ruby' package
#(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)

# 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

Format 111

InsetLayout Flex:Ruby
	LyxType		charstyle
	LatexType	command
	LatexName	ruby
	HTMLTag		ruby
	HTMLAttr	""
	HTMLInnerTag	rb
	HTMLInnerAttr	""
	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
        # Fixme: Currently the ruby text is ignored in HTML
	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