# Tag Info

27

Stick point somewhere near \usepackage{array,colortbl} and two buffers will open up for array and colortbl packages if you do M-x getpackage which you can bind to a key of your choice (defun getpackage () (interactive) (search-backward "\\") (re-search-forward "usepackage[^{}]*{" nil t) (while (looking-at "\\s-*,*\$$[a-zA-Z0-9]+\$$") (re-search-forward "\...

19

The general problem of finding where a command is defined has no viable solution. Macros can and do change their meaning; a typical example is \\. This simple document \documentclass{article} \begin{document} \show\\ {\centering\show\\} \begin{tabular}{c} \show\\ \end{tabular} \end{document} gives the following output in the terminal window: > \\=...

13

I don't think this is possible with pdflatex but it is with latexmk by using the option -c as in latexmk -c foo.tex See Prevent pdflatex from writing a bunch of files for details. Why use latemk instead of pdflatex? Because it makes compilation easier. You just have to issue latexmk once and it runs pdflatex, bibtex or biber and makeindex as many times as ...

8

I think I solved the problem by using custom preferences in Skim. I changed the command to: /Applications/Aquamacs.app/Contents/MacOS/bin/emacsclient And now the backward search works again! Thank you all for the help.

5

Assuming you're using AUCTeX (which I think Aquamacs ships with), either of (setq-default TeX-engine 'luatex) or M-x customize-variable RET TeX-engine RET will work.

5


5

Emacs development version now has this feature builtin (see this commit). This will go live in Emacs 25.1. You just have to issue M-x ffap RET. Below there is my old answer, for reference. Starting from David's answer, I've written the following functions (they need AUCTeX). (defun mg-TeX-kpsewhich-find-file (&optional name) "Visit file associated ...

5

Just click on the LaTeX button in the tool bar. :) Alternatively, do Command-O to open a file and navigate to <HOME>/Library/Preferences/Aquamacs Emacs and open Preferences.el (which is preferred in Aquamacs to the .emacs file). Add at the bottom (add-hook 'LaTeX-mode-hook (lambda () (local-set-key (kbd "C-c c") (lambda nil (...

4

FlySpell has a variable that controls that behaviour: flyspell-use-meta-tab. The documentation says: Non-nil means that FlySpell uses M-TAB to correct word. So just put this on your .emacs file: (setq flyspell-use-meta-tab nil)

4

Aquamacs is a porting of Emacs to the Mac OS X interface. Installing it doesn't provide with a TeX distribution. So you need to install a TeX system; my recommended choice is the full MacTeX that installs the current release of TeX Live. Installing the basic version is possible, but then it forces you to chase after package sets when you need a TeX package ...

3

In general, Emacs' user interface is somewhat Minibuffer-tabcompletion-centric. If you don't like the current implementation of LaTeX-section, you can add the following lines to your init file: (defun My-LaTeX-section () (interactive) (let ((LaTeX-section-hook '(LaTeX-section-title LaTeX-section-section ...

3

I am using Aquamacs and had the same question. The post from Sean Allred helped me find the answer I was looking for. The only thing I would add is that if you solely use Aquamacs it is better to edit the file Preference.el located in ~/Library/Preferences/Aquamacs\ Emacs/ Once you add the code below in the file the command sequence C-c C-a will run the ...

3

I found a temporary fix: I will wrap \Sexpr like this: \verb+\Sexpr{...}+. Look here on how to avoid having different typsets.

3

In your Preferences.el file (the init file for Aquamacs) put this code (setq TeX-electric-sub-and-superscript t)

3

What does M-TAB do - anything? Is there a key combination mentioned in your LaTeX menu after "Complete Macro"? The lisp function which should be called is "TeX-complete-macro". Try running it manually by typing \newc and leave the cursor after this and do M-x TeX-complete-macro If this works, then you can probably just rebind the key in your .emacs with ...

3

After digging in the customization options of the preview mode, I can suggest the following solution. Since I can't get preview to work due to other problems, I couldn't test it. So, M-x customize-group RET preview RET. Select Preview Latex. Now, you have to find the two following configuration options : Preview pdf2dsc command : replace %s.pdf with %s-...

2

The problem (I think, since it used to plaque me as well), is that AUCTeX uses the most recent process because it presumes that's what you are interested in. However, I am very rarely interested in the output of preview. I added (defadvice TeX-view (around always-view-master-file activate) (let ((TeX-current-process-region-p nil)) ad-do-it)) to my ....

2

In the Command menu, choose TeXing Options and uncheck Generate PDF; the keyboard combination is Control+C Control+T Control+P

2

You have to customize TeX-fold-env-spec-list (LaTeX-fold-env-spec-list is more appropriate but the result is just the same if you use only LaTeX and not plain TeX). In your init file add this code (add-to-list 'TeX-fold-env-spec-list '("[figure]" ("figure"))) Then with C-c C-o C-b (M-xTeX-fold-bufferRET) all figure environments in the current buffer will ...

2

I finally found a solution for that by configuring emacs (aquamacs): source: http://article.gmane.org/gmane.emacs.auctex.general/4285 (defadvice server-goto-line-column (after server-visit-region.tex (line-col) activate) "When visiting _region_.tex from an external source (e....

2

You can change the dictionary with M-xispell-change-dictionaryRET. It's also possible to select the dictionary using the menu Tools > Spell Checking > Change Dictionary.... In addition, you can specify the spelling language on a per-file basis with the file local variable ispell-local-dictionary, whose description (C-h v ispell-local-dictionary RET) ...

1

In a comment, @ArashEsbati speculated I had multiple AUCTeXs installed, and suggested trying M-x list-load-path-shadows RET in Aquamacs after triggering the odd status message in a .tex file. @ArashEsbati was correct: M-x list-load-path-shadows RET revealed that I did indeed have two AUCTeXs installed. I removed one, then found that my .tex files failed to ...

1

Here's how to do it: first type C-u and then the level (a number between 0 through 6, see here) and then type C-c C-s and fill in the prompts as normal. So (after disabling LaTeX-section-heading under the settings for LaTeX-section-hook; see below), if one types C-u 2 C-c C-s RET title RET label one gets: \section{title} \label{label} and if one types ...

1

After C-c C-s type su and then TAB. Emacs will autocomplete as far as possible.

1

I don't know about Aquamacs, but it should be sufficient if you install the latest version of AUCTeX (11.91), preferably from ELPA, put this line in your .emacs: (setq TeX-parse-self t) restart Emacs and open your .tex file. comment.el had a bug in fontification which was fixed upstream.

1

I had this same problem. I have a common Dropbox with someone else. Apparently he had set the default compiler to be latex --> dvips, as opposed to pdflatex. Aquamacs called TeXShop to deal with the ps output. The problem was solved by switching to pdflatex via selecting "Generate PDF" under TeXing options in the Command menu.

1

You could try a regex (PCRE) similar to /(\\def|\\renewcommand|\\newkeycommand).*\$cmdname/. Hope this helps, I can't write any lisp for it right now, but it should be trivial to implement.

1

Barring any specific key sequence (which I know there is one, I just can't find it), this will work: (add-hook 'LaTeX-mode-hook (lambda () (local-set-key (kbd "C-c c") (lambda (&optional arg) "Run the current document through LaTeX." (interactive "p") (kmacro-exec-ring-item (quote ([3 3 76 97 84 101 88 return] 0 "%d"...

1

The problem was the .emacs file in my home directory. I put below contents, which I copy and pasted, to enable spell checking function. Once I remove the contents, the preview function turn on. But I'm still not aware of why following made the problem. Thank you for all in this thread. (setq ispell-program-name "aspell") ; could be ispell as well, depending ...

1

I upgraded to the latest Xquartz, which broke preview in all emacsen, including Aquamacs - I was now getting the notorious road-block sign. gs was returning an error from the latest Freetype 2, which is distributed with X11 on OS X. I downgraded to 2.4.8 (https://bbs.archlinux.org/viewtopic.php?id=137638) and all emacsen work. There's no telling anymore ...

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