forked from mirrors/org-mode
org-latex-preview: Work around XeTeX misbehaviour
* lisp/org-latex-preview.el (org-latex-preview--latex-preview-filter): Since XeLaTeX seems to misbehave with tightpage, we special-case the tightpage processing to account for it.
This commit is contained in:
parent
178fd49021
commit
ce260ed2c9
|
@ -1772,8 +1772,11 @@ fragments in EXTENDED-INFO."
|
||||||
(setq preview-marks (nreverse preview-marks))
|
(setq preview-marks (nreverse preview-marks))
|
||||||
(while preview-marks
|
(while preview-marks
|
||||||
(goto-char (caar preview-marks))
|
(goto-char (caar preview-marks))
|
||||||
;; Check for tightpage-info
|
;; Check for tightpage-info, as long as XeLaTeX is not being used,
|
||||||
(unless tightpage-info
|
;; as it seems to behave differently to pdfLaTeX and luaLaTeX and
|
||||||
|
;; produces an image without the margins that tightpage reports.
|
||||||
|
(unless (or tightpage-info (equal (plist-get extended-info :latex-processor)
|
||||||
|
"xelatex"))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when (re-search-forward
|
(when (re-search-forward
|
||||||
"^Preview: Tightpage \\(-?[0-9]+\\) *\\(-?[0-9]+\\) *\\(-?[0-9]+\\) *\\(-?[0-9]+\\)"
|
"^Preview: Tightpage \\(-?[0-9]+\\) *\\(-?[0-9]+\\) *\\(-?[0-9]+\\) *\\(-?[0-9]+\\)"
|
||||||
|
|
Loading…
Reference in New Issue