Next: , Previous: , Up: Compositions   [Contents][Index]

#### 6.8.10.3 Vertical Compositions

The `cvert` function makes a vertical composition. Each component of the vector is centered in a column. The baseline of the result is by default the top line of the resulting composition. For example, ‘f(cvert([a, bb, ccc]), cvert([a^2 + 1, b^2]))’ formats in Big mode as

```f( a ,  2    )
bb   a  + 1
ccc     2
b
```

There are several special composition functions that work only as components of a vertical composition. The `cbase` function controls the baseline of the vertical composition; the baseline will be the same as the baseline of whatever component is enclosed in `cbase`. Thus ‘f(cvert([a, cbase(bb), ccc]), cvert([a^2 + 1, cbase(b^2)]))’ displays as

```        2
a  + 1
a      2
f(bb ,   b   )
ccc
```

There are also `ctbase` and `cbbase` functions which make the baseline of the vertical composition equal to the top or bottom line (rather than the baseline) of that component. Thus ‘cvert([cbase(a / b)]) + cvert([ctbase(a / b)]) + cvert([cbbase(a / b)])’ gives

```        a
a       -
- + a + b
b   -
b
```

There should be only one `cbase`, `ctbase`, or `cbbase` function in a given vertical composition. These functions can also be written with no arguments: ‘ctbase()’ is a zero-height object which means the baseline is the top line of the following item, and ‘cbbase()’ means the baseline is the bottom line of the preceding item.

The `crule` function builds a “rule,” or horizontal line, across a vertical composition. By itself ‘crule()’ uses ‘-’ characters to build the rule. You can specify any other character, e.g., ‘crule("=")’. The argument must be a character code or vector of exactly one character code. It is repeated to match the width of the widest item in the stack. For example, a quotient with a thick line is ‘cvert([a + 1, cbase(crule("=")), b^2])’:

```a + 1
=====
2
b
```

Finally, the functions `clvert` and `crvert` act exactly like `cvert` except that the items are left- or right-justified in the stack. Thus ‘clvert([a, bb, ccc]) + crvert([a, bb, ccc])’ gives:

```a   +   a
bb     bb
ccc   ccc
```

Like `choriz`, the vertical compositions accept a second argument which gives the precedence to use when formatting the components. Vertical compositions do not support separator strings.

Next: Other Compositions, Previous: Horizontal Compositions, Up: Compositions   [Contents][Index]
{"ft_lang_label":"__label__en","ft_lang_prob":0.7072055,"math_prob":0.9710793,"size":2307,"snap":"2023-14-2023-23","text_gpt3_token_len":635,"char_repetition_ratio":0.16891012,"word_repetition_ratio":0.041775458,"special_character_ratio":0.2605115,"punctuation_ratio":0.1308204,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.979441,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-04-01T23:08:48Z\",\"WARC-Record-ID\":\"<urn:uuid:7fa42a2c-5c34-4dce-84be-b3771bc7c420>\",\"Content-Length\":\"5855\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1901530a-eb50-4028-9e04-8e593006b656>\",\"WARC-Concurrent-To\":\"<urn:uuid:443fd1c9-837a-491a-8749-7b06eba92a80>\",\"WARC-IP-Address\":\"209.51.188.116\",\"WARC-Target-URI\":\"https://www.gnu.org/software/emacs/manual/html_node/calc/Vertical-Compositions.html\",\"WARC-Payload-Digest\":\"sha1:4TOTBUIFVXGHVHRXRFG7VMY635IU33ZU\",\"WARC-Block-Digest\":\"sha1:A65EIH3ZDAJLOUBVRGT4SFKULVMFW2JY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296950363.89_warc_CC-MAIN-20230401221921-20230402011921-00653.warc.gz\"}"}