Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
6

I have the same problem with you on my Mac(El Capitan), and the colon ":" maybe affects. After I delete the colon ":", the preview works in my Emacs. Here is my code on my .emacs: (setenv "PATH" (concat "/Library/TeX/texbin" (getenv "PATH"))) (setq exec-path (append '("/Library/TeX/texbin") exec-path))


4

So first of all, there's no easy way to get to that outcome. While it would certainly be possible to hack around preview-toggle to make the overlay that displays the preview image also display the underlying text, I do believe that the design choice in AucTeX makes sense. The reason is that previews are generated on demand, whenever the image needs to be ...


4

From org-preview-latex-fragment documentation, if you use a double prefix, it'll display all fragments in the buffer: It is bound to C-c C-x C-l. (org-preview-latex-fragment &optional SUBTREE) Preview the LaTeX fragment at point, or all locally or globally. If the cursor is in a LaTeX fragment, create the image and overlay it over the ...


4

The variable preview-scale-function in the preview-appearance group controls this. From the customization menu: Preview Scale Function: [Value Menu] preview-scale-from-face Calculate preview scale from ‘preview-reference-face’. This calculates the scale of EPS images from a document assumed to have a default font size given by function ‘preview-...


3

Why You Cannot Display SVG Images in Your Emacs In order to use dvisvgm properly, and have Emacs actually overlay the svg images, Emacs must be able to not only generate svg files, but also display them. If you have a Latex package installed on your machine, like MacTex, then you already have dvisvgm installed, and Emacs will be able to generate the svg ...


3

Remove the stuff like \documentclass, \begin{document} and \end{document}. This does not belong into an org-document. Only keep the formulas. The document structure is controlled by org and not by latex.


3

The \mathscr problem is simply that Org mode LaTeX doesn't by default load the LaTeX package that provides that command. Just add #+LATEX_HEADER: \usepackage{mathrsfs} to your Org file and that should fix both preview and PDF export. As for getting unicode math to work, you need, again, to load a package (so add #+LATEX_HEADER: \usepackage{unicode-math} to ...


3

While I do not know how to do it realtime, I know it is possible to do after each save. You can use emacs local variables to do the trick. https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables . This will generate all latex fragments whenever you save the file. Just append this to the end each ...


3

Use \(...\) instead of $...$ and it should work just fine.


3

The problem is solved. I just added (require 'ox)


3

I followed @giordano's advice and made a clean install of emacs-24.5-bin-i686-mingw32.zip. I basically still followed Schlosser's youtube tutorial, including the bit where he edits and installs the *.reg file. This time, however, I got the libpng16-16.dll and zlib1.dll files from here and I did NOT extract the AUCTeX zip file's content into emacs' path. I ...


3

Auctex 11.86 has known issues with Ghostscript ver >=9.0. Either downgrading ghostscript or updating Auctex will fix the issue.


2

Based on the babel's recommendation do you have this exports header someplace in the document? #+header: :exports none However for graphical rendering to file/displaying that file in-place, the manual recommends #+header: :exports results #+header: :results graphics The other thing to check is the scale variable > 1 under org-format-latex-options. Yet I ...


2

You might want to try WhizzyTeX mode that tries to compile latex code on the fly. It comprises of a minor mode for emacs along with a bash script which provides a preview in a separate dvi window. Note that it only supports *nix platforms (no windows) and that too only in dvi mode. It also recommends using advi instead of xdvi to view generated dvi files. ...


2

From docstring of TeX-view-program-list: The second element can be a command line to be run as a process or a Lisp function to be executed. So you have to specify the name of the function (latex-preview-pane-mode), not a function call ((latex-preview-pane-mode)). This is the specification for "preview-pane-mode" you have to use: ("preview-pane-mode" ...


2

Your question is based on faulty assumptions. As already explained by Karol, configuration for the package installed via ELPA is different from the "standard" configuration, you have NOT to add the lines (load "auctex.el" nil t t) (load "preview-latex.el" nil t t) After you install a package with ELPA, usually you don't have to write anything at all in ...


2

Org-mode recognizes Latex fragments by the $ symbol at the start and end of the fragment. If you add a trailing -, then the fragment doesn't end with a $ anymore, so Org won't recognize it as a fragment. You can work around this by placing a space between the closing $ and the -: $\frac{a}{b}$ -fraction


2

Solution There are incompatibilities between recent LuaTeX versions and the preview LaTeX package, but they can be fixed by loading the luatex85 package in your document. Note however that this issue has been already fixed in upstream version of preview: the preview package load itself luatex85, if present, so that you don't have to do it manually in your ...


2

It looks like the way to do this in LaTeX is to add this in the document body: \mathversion{bold} It doesn't look there is a way to do this out of the box with org, the document template is hard-coded in org-create-formula image. You can modify that function like this to achieve what you want. You can put this in your init file. (defun org-create-formula-...


2

I think an easier approach is through an advice. Here we use an around advice to modify the string that gets used to make the fragment, and then calling the original function with the new string. It allows you to put new latex before and after the equation if you want. Just make sure the code has a \n at the end like this: (plist-put org-format-latex-...


1

The preamble is in org-format-latex-header. You can customize it via M-x customize-option RET org-format-latex-header RET. For red equations (as an example) add \AtBeginDocument{\color{red}} at the end of the header lines. Apply and save the option.


1

The problem was fixed when I installed package texlive-full. I was missing some latex packages, which led to a white box being rendered instead of the equation. The update on this question led me to question whether I had all required latex packages: Preview Latex Fragment in org mode : blank square shown Sure enough, when I checked my logs in /tmp ...


1

Do you have dvipng or imagemagick installed? Depending on the setting of org-preview-latex-default-process (in versions of org-mode >= 9.0) or org-latex-create-formula-image-program (in earlier versions), you need one or the other (or you could install both).


1

I find indirect buffers to be indispensable when using org-mode. Use clone-indirect-buffer instead of make-indirect-buffer to remedy your issue. You will then be able to render and hide Latex fragments independently within each buffer.


1

Here is my start of solution, it can be improved, see below. Add the following code to your init file and restart Emacs: (defun mg-LaTeX-preview-formulae () (and (eq major-mode 'latex-mode) (not (texmathp)) (preview-section))) (add-hook 'LaTeX-mode-hook (lambda () (setq mg-LaTeX-preview-formulae-timer (run-with-idle-...


1

Same issue. If you uninstall the elpa org (8.3.3), emacs will use the built in org (8.2.10). This solves the issue for me. Note: I'd like to comment on BejaminSchiel's instead of posting an answer but I don't have enough reputation for that.


1

I experienced the exact same issue. The proposed "solution" using emacs -Q works (also in my case), because it loads a different version of org-mode, in which the bug with previewlatex does not yet exist. (compare M-x org-version if you start emacs with and without the -Q option). So this problem is probably not related to the .emacs file. Its probably a ...


1

One partial fix would be to export the only the table to latex. highlight the table -> C-e l L to get the org-table converted into latex. Then you can preview the latex table with C-c-x l. Of course the idea would be to do it automatically but I don't know how costly it would be.


1

Here is the code I have in my .emacs: prepare (defun advice:org-ctrl-c-ctrl-c (orig-func &rest args) (let (org-latex-fragment-image-overlays) (apply orig-func args))) (advice-add 'org-ctrl-c-ctrl-c :around #'advice:org-ctrl-c-ctrl-c) With the settings above, I can do things like this: use (defun org-toggle-preview-latex-fragment (arg) "...


1

Putting (require 'tex-fold) (add-hook 'LaTeX-mode-hook 'TeX-fold-mode) in .emacs then M-x TeX-fold-buffer (or the shortcut C-c C-o C-b) can do what I was looking for.


Only top voted, non community-wiki answers of a minimum length are eligible