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:
parent
d30738b786
commit
bbba45a07f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue