What you want is called folding, and there are 2 ways you can do that.
This is a built-in minor mode that is exactly what org-mode uses to
hide and display it's headlines. You can make sure it's always turned
on in latex-mode with
(add-hook 'LaTeX-mode-hook #'outline-minor-mode)
The keybinds it defines are a little hard to use, so you ...
OK, thanks to @wvxvw putting me on the right track I figured it out.
You can get rid of the author and date with:
#+OPTIONS: author:nil date:nil
The Org Manual says that you can also toggle title with title:nil (org-export-with-title). However, this option didn't get rid of the title, and I couldn't find a variable or command org-export-with-title. ...
I had to run some test, but I managed to run a small file that exports correctly to both latex and HTML, I tested only in org 8.2.10, but it should work on other versions.
The answer is actually the same as in Org export to latex and HTML references
Here I have a small example
* This is a latex experiment
so with the text...
In the built-in latex-mode, C-c C-e runs latex-close-block, which closes the highest level open block. No need to type the \end first.
If you're using AUCTex, C-c ] does the same thing, or you can use C-c C-e to insert a matched \begin, \end pair.
@sykora's comment about (setq LaTeX-item-indent -2 LaTeX-indent-level 4) is almost there, but it does mean we spill over to every other environment as well. So, for example, we would also have:
This indents to the 4th column, which is way too far!
The following function builds off an old (and seemingly broken?) code ...
NB: much of this text came from an answer to a question that turned out to be a duplicate of this question. Some of the material is sufficiently different that it seemed worthwhile to add it to this question.
Outline mode and the AUCTeX folding facilities are two different beasts that are meant to do broadly the same thing: hide and show selected parts of ...
You can make use of a #+SETUPFILE:
Put all of these settings in a file, for example ./setup/setupfile.org, and then include them into your document with
In this file, you can also include #+OPTIONS:, #+AUTHOR, and similar in-buffer settings. What's even more useful, is that if you load the #+SETUPFILE: first, you can ...
For (1), I would use an enlarged margin, so that visual-line-mode wraps lines at the desired fill-column. This will affect both text lines and equations, though.
As for (2), one can define a custom filling command to be bound to M-q and correctly fill paragraphs. I haven't yet managed to write a command with the correct behaviour for auto-filling.
From a LaTeX point of view, these are different cases.
In the first case, LaTeX isn't going to wrap -- and it shouldn't! A "verbatim" environment, which is what source-code is set in, respects lines precisely and doesn't break paragraphs, because LaTeX simply can't know where to break them. If you want to wrap the lines, you have to wrap them in the source-...
Also, it is good to know that the dollar syntax $...$ is not always recommended in LaTeX (and the double dollar syntax, $$...$$, for displayed equations, in strongly discouraged). For further info see this and this question on TeX.SE.
Needless to say, Org-mode supports both \(...\) and \[...\]. Try exporting this to LaTeX:
If you just want something like visual-line-mode but configurable, you can try longlines-mode which is what I use for most of my prose. longlines-mode wraps your text similarly to visual-line-mode with the width configured by fill-column.
Here's a screenshot with fill-column set to 70 (the window actually extends even more to the right).
comment-add is a variable defined in newcomment.el. Its value is 1
Local in buffer .emacs; global value is 0
Documentation: How many more comment chars should be inserted by
comment-region. This determines the default value of the numeric
argument of comment-region. The plain comment style doubles this
This should ...
As of ESS 19.04, the ess-noweb and ess-swv libraries are obsolete:
Libraries for literate data analysis are obsolete and not loaded by
default. This includes 'ess-noweb', 'ess-swv', and related
functionality like 'Rnw-mode'. Users are encouraged to switch to
one of several other packages that deal with these modes. For
A possible solution is to write a file with the LaTeX preamble, like
%% This is the file MyTeXHeader.tex
\newcount\instr \instr=1 % hide/show instructions
and then use a single ...
When the cursor is somewhere in the entry, run the command bibtex-fill-entry (bound to C-c C-q), which will
align the fields. You may also want to set variable bibtex-align-at-equal-sign to a non nil value to change the details of alignment.
After doing a long research in the web and careful examination of ac documentation with a lot of trials on my machine to examine code line by line, I came up with this solution that can have yasnippet working as well (optioinal) without any confict.
put this in your init.el or .emacs taking care of sequence:
Try this function:
(defun mg-TeX-delete-current-macro (&optional arg)
"Remove the current macro.
With an optional argument ARG, delete just the ARG-th macro
starting from the innermost."
(let (macro end)
(dotimes (i arg macro)
(setq macro (TeX-current-macro)
Expanding Constantine's answer.
You can use C-h v org-format-latex-options RET to understand what can be changed in this variable. One of the options is the scale. In the help page in Emacs you can click to change the value of the scale to 2.0, for example, so that the equations look bigger when you run C-c C-x C-l.
Alternatively, you can add the following ...
For others who stumble upon this question, the following is available. As hinted to by yantar92, this is included in ox-extra which is included in the org-plus-contrib elpa package.
Headers can take an :ignore: tag, which excludes the heading upon export while still including its contents.
To make it work, add the following to your emacs setup (having ...
The function texmathp defined in AUCTeX (autoloaded from texmathp) does exactly that (ok, actually it does a bit more).
Used interactively, it will give you some more information, including whether the point is in a math construct.
Used in elisp, it will be t if in math, nil otherwise. The additional pieces of informations are then stored in the variable ...
If you set LaTeX-includegraphics-read-file to LaTeX-includegraphics-read-file-relative, autocompletion with helm provides this feature:
Setting up AUCTeX
You can either customize LaTeX-includegraphics-read-file (M-x customize-variable RET LaTeX-includegraphics-read-file RET) and select the relative option or add the following to your init file:
If you use org-ref (https://github.com/jkitchin/org-ref), you can do this:
#+caption: test label:some-source-code
for i in 1:10:
See Listing ref:some-source-code
This exports to PDF and HTML with active links.