summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/start/en/ma-cb-en-frames.tex
blob: bbdb6a61cbf0a19ad6c08c21a28a9bc77dd33e3e (plain)
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
\startcomponent ma-cb-en-frames

\enablemode[**en-us]

\project ma-cb

\startchapter[title=Outlined text]

\index{outline+text}

\Command{\tex{framed}}
\Command{\tex{setupframed}}
\Command{\tex{inframed}}

You can \inframed{outline} a text with \type{\framed}. The
command looks like this:

\shortsetup{framed}

The bracket pair is optional and contains the set up parameters. The curly braces
enclose the text. To be honest, the outlined text in the first paragraph was done
with \type{\inframed}. This command takes care of the interline spacing.

Some other examples of \type{\framed} and its set up parameters are shown below.

\startbuffer[a]
\framed
  [height=fit,
   width=.5\textwidth]
  {Hasselt}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[a][type=buffer]}
\typebuffer[a]

\startbuffer[b]
\framed
  [height=3em,
   width=.5\textwidth]
  {Hasselt now has more space}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[b][type=buffer]}
\typebuffer[b]

\startbuffer[d]
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue]
  {Hasselt now has some color}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[d][type=buffer]}
\typebuffer[d]

\startbuffer[e]
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt]
  {Hasselt now has more frame}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[e][type=buffer]}
\typebuffer[e]

\startbuffer[f]
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green]
  {Hasselt now has a colorful background}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[f][type=buffer]}
\typebuffer[f]

\startbuffer[g]
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=color,
   backgroundcolor=green,
   foregroundstyle=bold]
  {Hasselt now has another style}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[g][type=buffer]}
\typebuffer[g]

\startbuffer[needed-for-h]
\definecolor[a][black]
\definecolor[b][white]

\startuniqueMPgraphic{LinearShade}
  fill OverlayBox
    withshademethod "linear" withcolor \MPcolor{a} shadedinto \MPcolor{b} ;
\stopuniqueMPgraphic

\defineoverlay
  [linear shade]
  [\uniqueMPgraphic{LinearShade}]
\stopbuffer

\getbuffer[needed-for-h]

\startbuffer[h]
\framed
  [height=3em,
   width=.5\textwidth,
   foregroundcolor=red,
   framecolor=blue,
   rulethickness=2pt,
   background=linear shade,
   foregroundstyle=bold]
  {Hasselt now has a little shade}
\stopbuffer

\placefigure[right,none][]{}{\externalfigure[h][type=buffer]}
\typebuffer[h]

The shady background was defined with:

\typebuffer[needed-for-h]

The \type{\framed} command is very sophisticated and is used in many macros.
The command to set up frames is:

\shortsetup{setupframed}

\stopchapter

\stopcomponent