Re: [AUCTeX] beamer
giacomo.bo...@gmail.com writes: > Arash Esbatiwrites: > >> I'm not sure if we have an issue with the manual of preview here, but >> IIRC, one must pass the environments option(s) explicitly to preview.sty >> if loaded in .tex file, `active' alone doesn't suffice. This code >> produces the desired result: >> >> \documentclass{beamer} >> >> \usepackage[textmath,displaymath,sections,active]{preview} >> \PreviewEnvironment*{frame} > > Ciao Arash, > > the documentation of the latex side of preview has > > *active* is the most essential option. If this option is not > specified, the preview package will be inactive and the document > will be typeset as if the preview package were not loaded, except > that all declarations and environments defined by the package are > still legal but have no effect. This allows defining previewing > characteristics in your document, and only activating them by > calling LaTeX as > > latex ’\PassOptionsToPackage{active}{preview}\input{filename}’ > > my understanding is that you manually specify "active" only in the > relatively rare case in which you want to extract. e.g., the formulas > from a document as a set of png files --- in all the other cases, in > which you want to normally process the .tex file and just want to modify > the behavior of preview, e.g., with respect to beamer's "frame" > environments, you DO NOT put "active" in the latex source, because it's > the job of preview the elisp package to correctly invoke latex. Hi Giacomo, yes, you're right in this respect; `active' is not necessary in a .tex file; I should have checked more carefully. But my point was a different one: If you load preview as a package in your .tex file, you must pass options like `displaymath' to the package. preview.sty doesn't set any defaults as it doesn't have a \ExecuteOptions{...} in the .sty file. This is the reason why your test2.tex didn't work. > I have to add that the behavior described in the manual is no more what > happens using preview.el these days. Can you please elaborate? Best, Arash ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] beamer
Arash Esbatiwrites: > I'm not sure if we have an issue with the manual of preview here, but > IIRC, one must pass the environments option(s) explicitly to preview.sty > if loaded in .tex file, `active' alone doesn't suffice. This code > produces the desired result: > > \documentclass{beamer} > > \usepackage[textmath,displaymath,sections,active]{preview} > \PreviewEnvironment*{frame} Ciao Arash, the documentation of the latex side of preview has *active* is the most essential option. If this option is not specified, the preview package will be inactive and the document will be typeset as if the preview package were not loaded, except that all declarations and environments defined by the package are still legal but have no effect. This allows defining previewing characteristics in your document, and only activating them by calling LaTeX as latex ’\PassOptionsToPackage{active}{preview}\input{filename}’ my understanding is that you manually specify "active" only in the relatively rare case in which you want to extract. e.g., the formulas from a document as a set of png files --- in all the other cases, in which you want to normally process the .tex file and just want to modify the behavior of preview, e.g., with respect to beamer's "frame" environments, you DO NOT put "active" in the latex source, because it's the job of preview the elisp package to correctly invoke latex. I have to add that the behavior described in the manual is no more what happens using preview.el these days. Thank you for the interest in my post ፨ g ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] beamer
Ciao Mosè, thank you for the working solution > (with-eval-after-load "preview" > (add-to-list 'preview-default-preamble >"\\PreviewEnvironment*{frame}" t)) that you have posted. Preview's info manual suggests to customize the "preview-default-preamble" variable but it's more or less equivalent, isn't it?. I didn't know of this elisp mechanism to influence the behaviour of preview, the latex package. Is it possible that the breakage of my "test2.tex" file, that used to work perfectly, is connected to the emacs side of preview manipulating the latex side? Again, thank you for the code ፨ g ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] beamer
Mosè Giordanowrites: > 2018-02-28 23:53 GMT+01:00 : >> I have two files, test1.tex >> >> \documentclass{beamer} >> \begin{document} >> \begin{frame} >> \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] >> \end{frame} >> \end{document} >> >> and test2.tex (* note that here I load preview.sty and use one of the >> commands here defined *) >> >> \documentclass{beamer} >> \usepackage{preview} >> \PreviewEnvironment*{frame} >> \begin{document} >> \begin{frame} >> \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] >> \end{frame} >> \end{document} >> >> When I hit C-c C-p C-d (preview-document) in the buffer of test1 I have >> that the image representing the displayed equation is produced, but it >> is not correctly placed --- it is placed instead at the end of the frame >> source > > Using the test1 file, try adding the following snippet to your Emacs init > file: > > (with-eval-after-load "preview" > (add-to-list 'preview-default-preamble >"\\PreviewEnvironment*{frame}" t)) > > In the attached image you can see how it's rendered for me with this code. Hi Mosè, I'm not sure if we have an issue with the manual of preview here, but IIRC, one must pass the environments option(s) explicitly to preview.sty if loaded in .tex file, `active' alone doesn't suffice. This code produces the desired result: \documentclass{beamer} \usepackage[textmath,displaymath,sections,active]{preview} \PreviewEnvironment*{frame} \begin{document} \begin{frame} \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] \end{frame} \end{document} Best, Arash ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] beamer
Ciao Giacomo, 2018-02-28 23:53 GMT+01:00: > I have two files, test1.tex > > \documentclass{beamer} > \begin{document} > \begin{frame} > \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] > \end{frame} > \end{document} > > and test2.tex (* note that here I load preview.sty and use one of the > commands here defined *) > > \documentclass{beamer} > \usepackage{preview} > \PreviewEnvironment*{frame} > \begin{document} > \begin{frame} > \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] > \end{frame} > \end{document} > > When I hit C-c C-p C-d (preview-document) in the buffer of test1 I have > that the image representing the displayed equation is produced, but it > is not correctly placed --- it is placed instead at the end of the frame > source Using the test1 file, try adding the following snippet to your Emacs init file: (with-eval-after-load "preview" (add-to-list 'preview-default-preamble "\\PreviewEnvironment*{frame}" t)) In the attached image you can see how it's rendered for me with this code. Bye, Mosè ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] beamer
I have two files, test1.tex \documentclass{beamer} \begin{document} \begin{frame} \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] \end{frame} \end{document} and test2.tex (* note that here I load preview.sty and use one of the commands here defined *) \documentclass{beamer} \usepackage{preview} \PreviewEnvironment*{frame} \begin{document} \begin{frame} \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \] \end{frame} \end{document} When I hit C-c C-p C-d (preview-document) in the buffer of test1 I have that the image representing the displayed equation is produced, but it is not correctly placed --- it is placed instead at the end of the frame source When I hit C-c C-p C-d (preview-document) in the buffer of test2 I have the following message in the minibuffer error in process sentinel: LaTeX found no preview images and a longish output from latex that I'm going to append at the end of my post. The first version (test1) is known to be buggy, the second one was suggested by someone on the list to tell preview.sty how to fix the problem with beamer frames and has worked for years. I don't know exactly when the problem started because I use beamer two months each year... Any help will be appreciated, thank you in advance ፨ g Here follows the log of the preview compilation v Running `Preview-LaTeX' on `test' with ``pdflatex -file-line-error --synctex=1 "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" "\input" test.tex'' This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode LaTeX2e <2017-04-15> Babel <3.18> and hyphenation patterns for 56 language(s) loaded. No auxiliary output files. (./test.tex (/usr/share/texlive/texmf-dist/tex/latex/beamer/beamer.cls Document Class: beamer 2018/02/20 v3.50 A class for typesetting presentations (/usr/share/texlive/texmf-dist/tex/latex/beamer/beamerbasemodes.sty (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/beamerbasedecode.sty)) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/beamerbaseoptions.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)) (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo) (/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def (/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def))) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex)) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex) (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex (/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
Re: [AUCTeX] Beamer | C-c = the TOC buffer is returning frame numbers
FOLLOW UP: I've done some testing and observe that C-c = on my Beamer documents (Beamer document class) produces the same kind of TOC buffer as in common LaTeX documents with sections, subsections, and so on until I apply style hooks C-c C-n on the document. After I apply style hooks, the TOC buffer presentation format changes to a listing of frame numbers (1,2,3, and so on). If I close the file and reopen, before applying style hooks, I can get the TOC buffer that I want. I prefer to generate the kind of TOC buffer with sections at all times in my Beamer documents. Is there anyway to alter this TOC buffer behavior on Beamer documents? spinner wrote: In Beamer documents, C-c = is returning a listing of my frame numbers and any frame title associated with them. In contrast, in common LaTeX documents C-c = returns a TOC window organized with sections, subsections, subsubsections, etc. Since I prepare my Beamer documents with sections and subsections, I prefer to produce a TOC window like that in common LaTeX documents (rather than a list of frames) because, for me, it is easier to organize and navigate. Is there a way to do this in Beamer files? -- View this message in context: http://old.nabble.com/Beamer-%7C-C-c-%3D-%28TOC%29-is-returning-frame-numbers-tp32404405p32405651.html Sent from the Gnu - AUCTeX - General mailing list archive at Nabble.com. ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Beamer | C-c = the TOC buffer is returning frame numbers
On Tue, Sep 06 2011,spinner wrote: FOLLOW UP: I've done some testing and observe that C-c = on my Beamer documents (Beamer document class) produces the same kind of TOC buffer as in common LaTeX documents with sections, subsections, and so on until I apply style hooks C-c C-n on the document. After I apply style hooks, the TOC buffer presentation format changes to a listing of frame numbers (1,2,3, and so on). If I close the file and reopen, before applying style hooks, I can get the TOC buffer that I want. I prefer to generate the kind of TOC buffer with sections at all times in my Beamer documents. Is there anyway to alter this TOC buffer behavior on Beamer documents? [snipped 14 lines] The reftex documentation has this? Is it what you're looking for? Controlling what gets displayed ... `t' Change the maximum level of toc entries displayed in the `*toc*' buffer. Without prefix arg, all levels will be included. With prefix arg (e.g `3 t'), ignore all toc entries with level greater than ARG (3 in this case). Chapters are level 1, sections are level 2. The mode line `T' indicator shows the current value. The default depth can be configured with the variable `reftex-toc-max-level'. sivaram -- ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Beamer | C-c = (TOC) is returning frame numbers
In Beamer documents, C-c = is returning a listing of my frame numbers and any frame title associated with them. In contrast, in common LaTeX documents C-c = returns a TOC window organized with sections, subsections, subsubsections, etc. Since I prepare my Beamer documents with sections and subsections, I prefer to produce a TOC window like that in common LaTeX documents (rather than a list of frames) because, for me, it is easier to organize and navigate. Is there a way to do this in Beamer files? -- View this message in context: http://old.nabble.com/Beamer-%7C-C-c-%3D-%28TOC%29-is-returning-frame-numbers-tp32404405p32404405.html Sent from the Gnu - AUCTeX - General mailing list archive at Nabble.com. ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Beamer
Hi Salvatore Enrico Indiogine [EMAIL PROTECTED] writes: Are there any features for beamer, such as commands that can insert a frame in text without having to type it all out? Any other beamer suggestions? There are some latex-beamer specific pieces of code I gathered from different places in my .emacs. Here is a copy. Greetings Sven ;; ;; LaTeX-Beamer ;; (eval-after-load tex '(TeX-add-style-hook beamer 'my-beamer-mode)) (setq TeX-region regionsje) (defun my-beamer-mode () My adds on for when in beamer. ;; when in a Beamer file I want to use pdflatex. ;; Thanks to Ralf Angeli for this. (TeX-PDF-mode 1) ;turn on PDF mode. ;; Tell reftex to treat \lecture and \frametitle as section commands ;; so that C-c = gives you a list of frametitles and you can easily ;; navigate around the list of frames. ;; If you change reftex-section-level, reftex needs to be reset so that ;; reftex-section-regexp is correctly remade. (require 'reftex) (set (make-local-variable 'reftex-section-levels) '((lecture . 1) (frametitle . 2))) (reftex-reset-mode) ;; add some extra functions. (define-key LaTeX-mode-map \C-cf 'beamer-template-frame) (define-key LaTeX-mode-map \C-\M-x 'tex-frame) (define-key LaTeX-mode-map \C-cn 'beamer-make-note) ) (defun tex-frame () Run pdflatex on current frame. Frame must be declared as an environment. (interactive) (let (beg) (save-excursion (search-backward \\begin{frame}) (setq beg (point)) (forward-char 1) (LaTeX-find-matching-end) (TeX-pin-region beg (point)) (letf (( (symbol-function 'TeX-command-query) (lambda (x) LaTeX))) (TeX-command-region)) ) )) (defun beamer-template-frame () Create a simple template and move point to after \\frametitle. (interactive) (LaTeX-environment-menu frame) (insert \\frametitle{}) (backward-char 1)) (defun beamer-make-note () Create a note template and move point to the first item. (interactive) (insert \\note[itemize]{ \\item % }) (backward-char 4)) pgpsTa22LWzN9.pgp Description: PGP signature ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Beamer
Greetings! I am new to Aquamacs which includes AucTeX (and other neat packages as well). I am starting to use it for all my LaTeX work and enjoying the power of this software. I have googled for information on using AucTeX for beamer presentations, but have not found anything that was clear for me. Are there any features for beamer, such as commands that can insert a frame in text without having to type it all out? Any other beamer suggestions? Thanks, Enrico -- Enrico Indiogine Mathematics Education Texas AM University [EMAIL PROTECTED] ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Beamer frame environment
I remember recently using a version of AucTex where a frame environement was an option under C-c C-e and it prompted me for a frametitle. I just installed 11.83 on this computer and don't have that option. Am I remembering that correctly? (I don't think I dreamed it.) How can I get such a feature (back) on my Windows machine? Thanks, Ryan ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Beamer customizations
Ryan Krauss [EMAIL PROTECTED] writes: I would like to have two things customized for my for using Auctex with Beamer. First, when the document class is Beamer, is there a way to have the itemize environment default to \begin{itemize}[+-| [EMAIL PROTECTED]] Second, when in an itemize enviroment, after a line containing \item blah, blah, blah, when I hit return it would be great if the next line automatically indented to the same place and inserted a \item . Can this be done? Alternatively, would would I write a short lisp function so that some hot key like alt-i would insert a correctly indented \item ? Doesn't M-RET work for this? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
RE: [AUCTeX] Re: How to use auctex/beamer commands to insert environments
Thank you Ralf. Looks like the right tool for the job Mirko -Original Message- From: Ralf Angeli [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 25, 2006 1:42 PM To: auctex@gnu.org Subject: [AUCTeX] Re: How to use auctex/beamer commands to insert environments * mirko vukovic (2006-10-25) writes: Suppose I have a string that is supposed to be a frame title (and optionally subtitle). Is there a function that will insert the \begin\end frame, together with the frame title, and optional subtitle, and position the cursor beamer.el uses `LaTeX-insert-environment' for inserting the environment and adds the frame title by means of some special code. See the part (LaTeX-add-environments [...] '(frame (lambda (env rest ignore) [...] in style/beamer.el. -- Ralf ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] How to use auctex/beamer commands to insert environments
Hello, I am writing an emacs utility to convert mind maps (See for example Freemind on http://freemind.sourceforge.net/wiki/index.php/Main_Page) to beamer presentations. There is a Perl utility that does an OK job, but needs tweaking. Since I find programming in Perl much harder than in elisp (even though I only recently started in elisp), I decided to try to re-write it in elisp (That is how I get my thrills instead of bungee cord jumping and similar activities). I can read the maps (which are in xml format) using the xml library, and parse the resulting nested list into a flattened list, This list has depth info attached to each node. Using the depth info, I can now start generating the .tex file. Here I am wondering whether I can re-use some of the auctex/beamer facilities. Here is an example of what I have in mind: Suppose I have a string that is supposed to be a frame title (and optionally subtitle). Is there a function that will insert the \begin\end frame, together with the frame title, and optional subtitle, and position the cursor The same question goes for document structure commands, blocks and columns (Here I am trying to do it in a way to be compatible with RefTex, if possible). I realize that I could go digging through the existing code, but I am afraid that I will mis-understand some of the functions, etc (or you could label it as just plain lazy). Thanks, Mirko ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Re: How to use auctex/beamer commands to insert environments
* mirko vukovic (2006-10-25) writes: Suppose I have a string that is supposed to be a frame title (and optionally subtitle). Is there a function that will insert the \begin\end frame, together with the frame title, and optional subtitle, and position the cursor beamer.el uses `LaTeX-insert-environment' for inserting the environment and adds the frame title by means of some special code. See the part (LaTeX-add-environments [...] '(frame (lambda (env rest ignore) [...] in style/beamer.el. -- Ralf ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex