This Elisp/LaTeX package will render your displayed LaTeX equations right into the editing window where they belong. The purpose of preview-latex is to embed LaTeX environments such as display math or figures into the source buffers. By mouse-clicking, you can open the original text. After editing, another click will just run the region in question through LaTeX and redisplay the new results. Works in Lyx too. You need to run Edit->Reconfigure and restart Lyx. Please apply and test. felix Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 18958 [details] ebuild and metadata
usata can you check out the emacs stuff ? (/me = no emacs atm) i'll try it out with lyx.
It works fine with emacs. Fantastic :-) Thanks for introducing such a nice package. (I used to run xdvi every time I want to preview latex source file) However, there are several mistakes in the ebuild. First, it would be better to use SRC_URI="mirror://sourceforge/preview-latex/${P}.tar.gz" instead of one of sourceforge sites (it reduces traffic). Second, newdepend should be DEPEND (newdepend is typically used inside eclass) and app-emacs/emacs should be app-editors/emacs (it will be automatically in DEPEND list if you inherit elisp.eclass, though). Third, I added lispdir=${D}/usr/share/emacs/site-lisp/${PN} to make in src_install() otherwise I get sandbox violation. I didn't test it with lyx so I leave it to you, Obz ;-)
Thank you for correcting my mistakes and applying. According to INSTALL this pkg should also work with xemacs. But I never tested it. Someone with xemacs can test it ?
Okay, I basically followed usata's instructions, just a few things. I included the following as depends, because as a general rule, DEPEND's should follow configure.in where possible. DEPEND="|| ( >=app-editors/emacs-21 >=app-editors/xemacs-21 ) app-emacs/auctex app-text/ghostscript virtual/tetex" Secondly, in src_compile() wont econf || die suffice instead of manually running configure ?
I know little about xemacs package but if we support xemacs as well,we need to rewrite the ebuild (and it will go to dev-tex instead ofapp-emacs) since the attached ebuild installs files only for FSF Emacs.However, I think it would be better to write another ebuild for app-xemacs and open a new bug for it. There are many packages reside in both app-emacs andapp-xemacs with the same name (the package installation is so differentthat we better split ebuilds, one for app-emacs and the other for app-xemacs,rather than creating an ebuild that supports both).
It should also possible to use this pkg for lyx only. Without the emacs dependencies. If you use it only for lyx you can also leave out the auctex-dependency. In this case, the best place would be dev-tex for sure. I think we schoul use the "emacs" use flag. If it set, depend on emacs/xemacs and auctex otherwise not. (And dont install the elisp stuff in this case) felix
Created attachment 20026 [details] preview-latex-0.7.8.ebuild
Created attachment 20027 [details] 60preview-latex-gentoo.el
Cc'ing to rendhelver, because he seems to maintain app-xemacs/auctex. rendhelver, can you modify the ebuild to support xemacs? There is no xemacs USE flag and if I inherit xemacs-packages it will pull in xemacs dependencies. I don't think emacs USE flag is appropriate for XEmacs, but I have no idea how to support XEmacs with the ebuild.
Added to Portage. I created xemacs local USE flag to determine whether we install xemacs package or not. (The reason why I didn't use "if has_version 'virtual/xemacs' ; then ..." is it should pull in app-xemacs/auctex if you want to install xemacs package for this package) It'll be installed under /usr/lib/xemacs/site-packages directory. I tested this on both emacs and xemacs and it worked fine, but if you encounter any problem please let me know. Thanks for the contribution. (Sorry for the delay)