org-mode latex preview not working -newbie - latex

I have recently installed org-mode for emacs through its package manager, and for some reason the latex-previewing feature does not work. I've tried both imagemagick and dvipng.
The message that I get when I try [C-c C-x C-l] is: "Symbol's function definition is void: org-infile-export-plist." I'm relatively new to emacs so I'm not sure how to proceed. I've been googling for about 2 hours and I haven't found anyone with a similar problem.
I have the latest version of emacs and org-mode 7.9. I checked about mixed installation issues (as suggested by the org manual) and everything checks out. I'm running Linux mint 17.
Can someone suggest a solution?
ps: I've tried AucTex and that works, but I think it only works on .tex files, not on .org files.
Edit: since I made the post I've found out that several other commands are giving me the same error (with different variables after the colon). Is there something wrong with my installation?

I was facing similar issue while trying to solve a bug in org-mode on spacemac, preview-toggle-latex-fragment which apparently causing the bug when the stack is in this order
spacemac 0.200.13
emacs-plus 25.3_2
org-plus-contrib-20180521
a few of this solution might come in handy, it didn't work for but it definitely gave me a broader view of the situation I'm facing
org-mode-9-unable-to-eval-code-block
org-latex-preview
As I google-fu my way through, I stumbled upon a issue posted on d12frosted/homebrew-emacs, which sort of convince me to give mituharu/emacs-mac a try and it turned out that it worked really well out of the box and solve the problem.
My current working configuration for my (org-mode + latex) would be
spacemacs 0.300.0 ( dev branch )
emacs-mac 26.1
+emacs/org ( spacemac layer )
org-plus-contrib-20180521
latex-math-preview (elpa)
dvipng ( it wasn't on brew, it came with TexLive)
$ tlmgr install dvipng
TeXLive
Once you've solved the problem, you might find this helpful as well.
auto preview latex fragment

This is old but since I had the same issue, maybe it'll help someone else. This happens because the Org export functions haven't been loaded. Try doing export and cancelling it with the sequence C-c C-e q this will cause ox (Org export) to be loaded, and latex preview should now work. If that fixes your issue, add this to your .emacs:
;; Preload org export functions, needed for latex preview.
(require 'ox)

Related

Compile Library for local use with Latex

I'm have a Latex template that still uses scrpage2. Since this library has been marked as outdated Miktex and Texlive both report File 'scrpage2.sty' not found. The recommendation is, to simply replace it with scrlayer-scrpage but if I do that, other things in the template, which is quite elaborate, break. My Idea was, to download the library from https://www.ctan.org/pkg/scrpage2, compile it and simply change the imports in the template to the locally compiled scrpage2.sty. Unfortunately the package only contains scrlettr.ins which in turn, when i run latex scrlettr.ins builds scrlettr.cls but not scrpage2.sty.
How do I get scrpage2.sty so I can use it locally?
Preface:
Using an old package version with a newer latex distribution can lead to all kinds of problems. Modifications to the kernel/class/other packages might be incompatible. My recommendation would be:
Solve the problems with scrlayer-scrpage and your template instead
If these problems can't be solved, use an older version of texlive which still has the package. You can find links to historic releases here: https://www.tug.org/historic/
To answer the actual question:
run tex scrpage2-obsolete.dtx to extract the .sty file

Curious about how opencv_cudaoptflow.lib, where to find it or make?

I am about to try YOLO as dll in Win10, x64, opencv 3.4.0, CUDA 10, MSVS 2015 as suggested here.
All the steps are done but when I build I have an error
The curious part for me is I couldn't find that opencv_cudaoptflow340.lib anywhere, not in the CUDA folders, not in the opencv340 (where my opencv resides), not even in the whole PC. So, naturally I tried to find it on the web, no luck. Only possible solution seemed to be this with CMake building. Obviously I followed it, however, CMake didn't give an opencv_cudaoptflow340.lib option at all.
How should I approach to find/make/create this .lib file?
I would like to see your experiences on this.
I think this would help others too.
Cheers!

After I've updated Latex, why I still get an error?

I am using MacTex on my Mac and try to us Texmaker as my editor.
However, when I type \usepackage{algorithms} in Texmaker, it always warn me that algorithms.sty is not found. I also tried this in Texshop, the error was the same.
I firstly checked TexLive Utility to make sure algorithms package is installed. It gives an yes. Then I tried to copy algorithms.sty from /usr/local/texlive/2015/texmf-dist/tex/latex/algorithms folder to /usr/local/texlive/2015/texmf-dist/tex/latex/base folder and execute texhash to update. Still not working and get the same error.
Can someone help me with this? Any help is appreciated.
algorithms is actually a bundle that provides two separate *packages":
algorithm
Provides the algorithm float and float-associated accessories.
algorithmic
A environment that provides a layout of algorithm pseudo-code.
So, to use algorithms, you need either or both of
\usepackage{algorithm}
\usepackage{algorithmic}

OpenCV 2.4.2 library files using CMake and MinGW - Target IDE CodeBlocks

I have been having this issue with OpenCV 2.4.2 that it doesn't really get installed properly with Microsoft VS 2010 Express; It is always missing a dll file or two doesn't matter what I follow by Googling. Also, Visual Studio 2010 Express is only valid for a few days, so it is acceptable that VS will not behave well with OpenCV at that point. However, when I changed my IDE to CodeBlocks, it is even stranger because now I have missing dll files and also "Missing Entry Point" error because of a duplicate .dll file. I found this guide and followed what it told me to do:
http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
But it still doesn't work!! What I am after is a complete and definitive solution to integrating OpenCV (preferrably 2.4.2 version) on a Windows 7 64-bit machine. I have been turning Stackoverflow inside out but no solution is working for me. The problems are
WHEN USING VISUAL STUDIO:
Missing dll file (e.g. libopencv_core242d.dll, etc.)
WHEN USING CODE BLOCKS:
First it complains that libstdc++-6.dll is missing. When I download it to my C:\MinGW\libexec\gcc\mingw32\4.7.0 folder, it stops complaining about this. But now it complains that there is any entry point problem and some other .dll file is missing!!!
If someone has managed to make it work by hook or crook, I will be more than happy to know what it is, IN DEPTH. I don't believe that such an important library can be so stupidly distributed so that developers have to struggle night and day to make this work.
FYI, I have tried even the OPenCV website and frankly their instructions are a bit useless. Also, all the necessary information e.g. adding PATH, adding includes and libraries, etc. Please someone point me to the right direction as it has been two days and I cannot get anywhere. It is literally stopping my job now :(
As an answer, but probably a very simple one, I did the following and got rid of the problem:
1) Uninstalled code::blocks completely from the PC and downloaded the IDE-only version (i.e. withouth MinGW compiler), then installed it.
2) Downloaded the latest stable version of MinGW, installed, and added C:\MinGW\bin to PATH
3) Followed rest of the instructions from [link] http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
4) Just to be sure, copied the opencv .dll files from the build folder (i.e. the one that you have created "make" and "install" files using CMake) to the debug (i.e. the executables') folder.
This will fix the problems. In case, it doesn't it might be that you need to add some environment variables.

Texments package not working on Ubuntu

I am trying to use the Texments Latex package on Ubuntu to do syntax highlighting.
Texments is a wrapper around Pygments.
I installed Texments and followed the steps to add the style file to the path.
But when I try to compile the .tex file, I get the error.
!Undefined Control Sequence
and then it prints out a bunch of wierd characters and places the ? prompt.
Anybody facing this error? What is the resolution?
If there is any other better way to provide syntax highlighting of source code I would be glad to accept it.
I know there is something called "listings" but frankly, i did not find the colors so good in it.
Thanks,
Perhaps you could give minted a try … it basically does the same as texments but has more features and is a little more robust in the face of errors.
Furthermore, as the maintainer of minted I’m always glad of error reports. ;-)
Texments uses a special control sequence for pdftex to allow shell escapes, needed to call the pygmentize binary. You need to call it with pdflatex, and you need to pass pdflatex the -shell-escape switch. Cf. the texments documentation.

Resources