emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Y. E. via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: [BUG] Set org-format-latex-options in .dir-locals.el [9.5.1 (release_9.5.1-11-g96d91b @ emacs-28.0.90/lisp/org/)]
Date: Fri, 17 Dec 2021 14:55:38 +0200	[thread overview]
Message-ID: <m2fsqr75md.fsf@ego.team> (raw)

Hello,

I tried configuring 'org-format-latex-options' per a org-mode
file/directory by adding the following configuration into the
.dir-locals.el file:

((org-mode . ((org-format-latex-options . (:foreground default
                                           :background default
                                           :scale 1.5
                                           :html-foreground "#002277"
                                           :html-background "Transparent"
                                           :html-scale 1.0
                                           :matchers ("begin" "\\(" "\\["))))))

When I load the org file, I'm being asked if I'd like to load local
variables, so I agree on that.

After that, 'C-h v org-format-latex-options' outputs:

Value:
(:foreground default :background default :scale 1.5 :html-foreground "#002277" :html-background "Transparent" :html-scale 1.0 :matchers
             ("begin" "\\(" "\\["))
Original value was 
(:foreground default :background default :scale 1.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers
             ("begin" "$1" "$" "$$" "\\(" "\\["))
Local in buffer Notes/Blog/concrete-math.org; global value is 
(:foreground default :background default :scale 1.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers
             ("begin" "$1" "$" "$$" "\\(" "\\["))


Then I do 'M-x org-html-export-to-html' to see that custom/local
settings are not taken into an account: an exported HTML contains SVGs
corresponding to the default settings.

The file settings I use:

#+STARTUP: content latexpreview
#+OPTIONS: tex:dvisvgm html-style:nil
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css" />

The LaTeX formulas are embedded into the text as shown here:
https://orgmode.org/manual/LaTeX-fragments.html

Am I overlooking something?

(Setting the value of 'org-format-latex-options' *globally* results in
expected behavior.)


I didn't have a chance to look deeper, but this mailing list discussion
might be related:
https://lists.gnu.org/archive/html/emacs-orgmode/2019-11/msg00050.html


Thanks,
YE

Emacs  : GNU Emacs 28.0.90 (build 1, x86_64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559))
 of 2021-12-03
Package: Org mode version 9.5.1 (release_9.5.1-11-g96d91b @ /Users/yuga/Downloads/emacs-28.0.90/lisp/org/)


             reply	other threads:[~2021-12-18 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 12:55 Y. E. via General discussions about Org-mode. [this message]
2022-05-06 10:21 ` [PATCH] Re: [BUG] Set org-format-latex-options in .dir-locals.el [9.5.1 (release_9.5.1-11-g96d91b @ emacs-28.0.90/lisp/org/)] Ihor Radchenko
2022-07-20  7:14   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2fsqr75md.fsf@ego.team \
    --to=emacs-orgmode@gnu.org \
    --cc=yet@ego.team \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).