3
This behaviour comes from the TeX-insert-dollar function which is described as
(defun TeX-insert-dollar (&optional arg)
"Insert dollar sign.
If current math mode was not entered with a dollar, refuse to
insert one. Show matching dollar sign if this dollar sign ends
the TeX math mode and `blink-matching-paren' is non-nil.
When outside math mode, ...
2
The syntax of \newcommand requires a backslash for the command to be defined: so not \newcommand{ds}{...}, but \newcommand{\ds}{...}
\begin{document}
blah blah
\newcommand{\ds}[1]{\Delta\{#1\}}
%% ^^^
\[
\{x\} := \ds{a} + \ds{b_1} + \ds{c}
\]
blah blah
\end{document}
2
You can use the function align-regexp from align.el library supplied by Emacs itself. With cursor in the table, hit C-c . to mark the environment. Now hit C-u M-x align-regexp RET and append & to the suggested regexp in the minibuffer (which should look like this \(\s-*\)&), hit RET 2 times and finally y to repeat the procedure through the line. ...
2
As noted in a comment, the answer
(setq same-window-regexps '("\\.tex$"))
has the unintended consequence of breaking the AucTeX commands C-c C-l and C-c C-` . One way to fix this is to restrict the new value of same-window-regexps to TeX-mode buffers, i.e. replace the above line with
(add-hook 'LaTeX-mode-hook
'(lambda () (set (make-...
2
A solution to this question, provided by Mike Shulman, is to use
(setq same-window-regexps '("\\.tex$"))
1
I'm not sure if you can achieve what you're looking for by setting a variable. Not tested, but I can think of the following:
Start Emacs, open a .tex file so that AUCTeX is loaded. Then do M-x TeX-auto-generate RET. When asked for a TeX file, enter the preamble.tex. When asked for an AUTO directory, take /path/to/your-tex-file/auto or the directory ...
1
Thanks for ShreevatsaR's comment, I found it and it was simple! I don't know why I was so obsessed with macros, but I just put
\renewenvironment{equation*}{\begin{math}\displaystyle}{\end{math}}
and it worked perfect. (I could not put $ in place of \begin{math} and \end though but that's not a big issue and is understandable why it doesn't work.)
I'll also ...
1
Please find the code here:
\documentclass[12pt]{article}
\usepackage{amsbsy, amsmath, amssymb, amsthm, bbold, xcolor, xspace}
\usepackage[all,pdf]{xy}
\usepackage{Documents/tex/essentials/symbols} % line 1
%\input{Documents/tex/essentials/symbols-command} % line 2
%\newcommand{\arrp}[4]{\mbox{$\xymatrix{ {#3} \ar@<0.6ex>[r]^-{#1} \ar@<-0.6ex>...
1
You can activate outline-minor-mode.
: M-x outline-minor-mode . Next
C-c @ C-< C-c @ C-> to promote or demote section level
1
You can use \subsection{} instead:
\documentclass{a4paper}[report]
\usepackage{lipsum}
\begin{document}
\section{This is a Section}
\lipsum[2]
\subsection{This is a subsection}
\lipsum[2-3]
\subsection{This is a 2nd subsection}
\lipsum[2-3]
\end{document}
1
AUCTeX comes with plenty of style files which add support for the corresponding LaTeX package. For example, AUCTeX style hyperref.el includes additions catered by hyperref.sty.
AUCTeX manual says:
5.3 Automatic Parsing of TeX Files
AUCTeX depends heavily on being able to extract information from the
buffers by parsing them. Since parsing the ...
1
Adding the following to the .emacs file worked for me:
(require 'mode-local)
(defvar-mode-local tex-mode fill-column 1000000 "")
It basically increases the fill-column size to a large value (only in the tex-mode).
A minimal example using use-package:
(use-package tex
:ensure auctex
:if (display-graphic-p)
:defer t
:mode
("\\.tex\\'&...
1
See some of the answers here. In your .emacs.d, place the line
(setq tex-fontify-script nil)
The font-latex-fontify-script property that you reference applies only if you are using the font-latex scheme (which comes packaged with things like AUCTeX). For a generic setup, use tex-fontify-script.
1
As of 2021, any OpenType math font should work. New Computer Modern Math is the version of Computer Modern with the most-comprehensive Unicode coverage.
DejaVu Sans Mono is a free, fixed-width font with excellent coverage of Unicode math symbols.
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
auctex × 553emacs × 393
reftex × 43
preview × 42
forward-inverse-search × 28
pdftex × 22
mac × 16
math-mode × 14
biblatex × 14
compiling × 14
aquamacs × 14
errors × 12
editors × 12
bibtex × 11
xetex × 11
tikz-pgf × 10
cross-referencing × 10
indentation × 10
windows × 10
viewers × 10
ghostscript × 10
beamer × 9
macros × 9
latexmk × 9
installing × 8