File: shapepar.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 (154 lines) | stat: -rw-r--r-- 3,001 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#\DeclareLyXModule[shapepar.sty]{Custom Paragraph Shapes}
#\DeclareCategory{Paragraph Styles}
#DescriptionBegin
#Provides several paragraph shapes as well as commands to define custom
#shapes. For a description see LyX's Additional features manual,
#section Modules > Paragraph Styles > Custom Paragraph Shapes.
#DescriptionEnd
#Author: Uwe Stöhr <uwestoehr@web.de>

Format 111

AddToPreamble
 % used for custom paragraph shapes
 \IfFileExists{candleshape.def}{%
  \input{candleshape.def}}{}
 \IfFileExists{dropshape.def}{%
  \input{dropshape.def}}{}
 \IfFileExists{TeXshape.def}{%
  \input{TeXshape.def}}{}
 \IfFileExists{triangleshapes.def}{%
  \input{triangleshapes.def}}{}

EndPreamble

# first the standard shapes

Style "CD label"
	LatexType	command
	LatexName	CDlabel
	Requires	shapepar
	Category	ShapedParagraphs
	NextNoIndent	1
	Margin		Static
	ParIndent	MM
	ParSkip		0.4
	Align		Block
	LabelType	No_Label
	DocBookWrapperTag  sidebar
	DocBookWrapperAttr role='cd-label'
	DocBookTag  para
End

Style "Circle"
	CopyStyle	"CD label"
	LatexName	circlepar
	DocBookWrapperAttr role='circle'
End

Style "Diamond"
	CopyStyle	"CD label"
	LatexName	diamondpar
	DocBookWrapperAttr role='diamond'
End

Style "Heart"
	CopyStyle	"CD label"
	LatexName	heartpar
	DocBookWrapperAttr role='heart'
End

Style "Hexagon"
	CopyStyle	"CD label"
	LatexName	hexagonpar
	DocBookWrapperAttr role='hexagon'
End

Style "Nut"
	CopyStyle	"CD label"
	LatexName	nutpar
	DocBookWrapperAttr role='nut'
End

Style "Square"
	CopyStyle	"CD label"
	LatexName	squarepar
	DocBookWrapperAttr role='square'
End

Style "Star"
	CopyStyle	"CD label"
	LatexName	starpar
	DocBookWrapperAttr role='star'
End

# now the shapes defined in the .def files

Style "Candle"
	CopyStyle	"CD label"
	LatexName	shapepar{\candle}
	DocBookWrapperAttr role='candle'
End

Style "Drop down"
	CopyStyle	"CD label"
	LatexName	droppar
	DocBookWrapperAttr role='drop-down'
End

Style "Drop up"
	CopyStyle	"CD label"
	LatexName	dropuppar
	DocBookWrapperAttr role='drop-up'
End

Style "TeX"
	CopyStyle	"CD label"
	LatexName	shapepar{\TeXshape}
	DocBookWrapperAttr role='tex'
End

Style "Triangle up"
	CopyStyle	"CD label"
	LatexName	triangleuppar
	DocBookWrapperAttr role='triangle-up'
End

Style "Triangle down"
	CopyStyle	"CD label"
	LatexName	triangledownpar
	DocBookWrapperAttr role='triangle-down'
End

Style "Triangle left"
	CopyStyle	"CD label"
	LatexName	triangleleftpar
	DocBookWrapperAttr role='triangle-left'
End

Style "Triangle right"
	CopyStyle	"CD label"
	LatexName	trianglerightpar
	DocBookWrapperAttr role='triangle-right'
End

# finally the low-level commands
Style "shapepar"
	CopyStyle	"CD label"
	LatexName	shapepar
	Argument 1
	  Mandatory	0
	  LabelString	"Scale"
	  Tooltip	"For scaling the <Shape specification> to positions on the page"
	EndArgument
	Argument 2
	  Mandatory	1
	  LabelString	"Shape specification"
	  Tooltip	"Specification of the shape"
	EndArgument
End

Style "Shapepar"
	CopyStyle	"shapepar"
	LatexName	Shapepar
End