From: Vladimir Lomov <lomov.vl@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-preview-latex-fragment not working with #+latex_header:\input{}
Date: Sat, 21 Apr 2012 08:58:59 +0900 [thread overview]
Message-ID: <20120420235859.GA1360@smoon> (raw)
In-Reply-To: <u13bkmx6671o4.fsf@majorana.uni-muenster.de>
Hello,
** Benjamin Motz [2012-04-20 19:28:43 +0200]:
> Bug:
> #+latex_header:\input{commands.tex} is not considered in
> org-preview-latex-fragment. Reason: the fragment is generated in /tmp
> from where the file commands.tex can not be found. In my case,
> commands.tex contains essential latex-code for displaying the
> latex-fragment, so I consider this to be a bug.
IMHO, you doing it in wrong way, I presume you are using some Linux:
create ~/texmf/tex/latex/ben
and put there your `commands.tex', then `\input{commands.tex}' will pick
up that file.
Of course it is true for LaTeX, if you use plain TeX use
`~/texmf/tex/plain/ben' directorythen.
> I have set the environment variable TEXINPUTS in
> (org-create-formula-image) to work around this bug (see patch).
Don't do it. If it is Ok to use in isolated environment and only once
the TEXINPUTS variable it is bad practice.
> However, this is the first time that I have written something like a
> patch and furthermore I'm not at all familiar with lisp-programming. So
> could you please have a look at my solution and tell me if it's complete
> crap and how it could be done better?!
> If it's no crap, I presume it should be submitted.
> Thank you, Benjamin
> diff --git a/org.el b/org.el.orig
> index 4f5bef0..b1c15fb 100644
> --- a/org.el
> +++ b/org.el.orig
> @@ -17040,7 +17040,6 @@ inspection."
> (condition-case nil
> (progn
> (cd tmpdir)
> - (setenv "TEXINPUTS" concat(default-directory ":.:"))
> (call-process "latex" nil nil nil texfile))
> (error nil))
> (cd dir))
P.S. I'm using org with latex math code and all works fine (I'm using very
customized setup but it works very well).
---
WBR, Vladimir Lomov
--
I knew her before she was a virgin.
-- Oscar Levant, on Doris Day
prev parent reply other threads:[~2012-04-20 23:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 17:28 [PATCH] org-preview-latex-fragment not working with #+latex_header:\input{} Benjamin Motz
2012-04-20 23:07 ` Bastien
2012-04-21 10:32 ` Achim Gratz
2012-04-20 23:58 ` Vladimir Lomov [this message]
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=20120420235859.GA1360@smoon \
--to=lomov.vl@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).