ox-latex: Don't use `length' to get string width

* lisp/ox-latex.el (org-latex-src-block--listings,
org-latex-src-block--engraved, org-latex-src-block--minted): Use
`string-width' instead of `length' to gauge the displayed width of the
string in LaTeX.  This may not be a perfect match, but it should be an
improvement.
This commit is contained in:
TEC 2022-05-07 13:59:13 +08:00
parent d30738b786
commit bbba45a07f
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 2 additions and 2 deletions

View File

@ -3306,7 +3306,7 @@ and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
(let* ((code-info (org-export-unravel-code src-block))
(max-width
(apply 'max
(mapcar 'length
(mapcar 'string-width
(org-split-string (car code-info)
"\n")))))
(org-export-format-code
@ -3458,7 +3458,7 @@ and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
(let* ((code-info (org-export-unravel-code src-block))
(max-width
(apply 'max
(mapcar 'length
(mapcar 'string-width
(org-split-string (car code-info) "\n")))))
(org-export-format-code
(car code-info)