Function: math--big-bracket

math--big-bracket is a byte-compiled function defined in calccomp.el.gz.

Signature

(math--big-bracket BRACKET-CHAR HEIGHT BASELINE)

Documentation

Composition for BRACKET-CHAR of HEIGHT with BASELINE.

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calccomp.el.gz
(defun math--big-bracket (bracket-char height baseline)
  "Composition for BRACKET-CHAR of HEIGHT with BASELINE."
  (if (<= height 1)
      (char-to-string bracket-char)
    (let ((pieces (cdr (assq bracket-char math--big-bracket-alist))))
      (if (memq nil (mapcar #'char-displayable-p pieces))
          (char-to-string bracket-char)
        (let* ((upper (nth 0 pieces))
               (lower (nth 1 pieces))
               (extension (nth 2 pieces))
               (midpiece (nth 3 pieces)))
          (cons 'vleft        ; alignment doesn't matter; width is 1 char
                (cons baseline
                      (mapcar
                       #'char-to-string
                       (append
                        (list upper)
                        (if midpiece
                            (let ((lower-ext (/ (- height 3) 2)))
                              (append
                               (make-list (- height 3 lower-ext) extension)
                               (list midpiece)
                               (make-list lower-ext extension)))
                          (make-list (- height 2) extension))
                        (list lower))))))))))