[ESS] Fwd: Optimum use of AUCTeX (with knitr)

Frank Harrell f.harrell at Vanderbilt.Edu
Thu Jul 18 20:58:44 CEST 2013


Thanks very much.  That did it, along with putting this in .emacs:

; Turn on RefTeX for AUCTeX, 
http://www.gnu.org/s/auctex/manual/reftex/reftex_5.html
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
; Make RefTeX interact with AUCTeX, 
http://www.gnu.org/s/auctex/manual/reftex/AUCTeX_002dRefTeX-Interface.html
(setq reftex-plug-into-AUCTeX t)

Frank


On 07/18/2013 09:01 AM, Ahmadou Dicko wrote:
> You can solve this problem by using
> Polymode<https://github.com/vitoshka/polymode>
> .
>
> ;;; Emacs polymode
> (setq load-path
>        (append '("~/.emacs.d/polymode/"  "~/.emacs.d/polymode/modes")
>                load-path))
>
> (require 'poly-R)
> (require 'poly-markdown)
> (require 'poly-noweb)
>
>
>
>
>
> On Thu, Jul 18, 2013 at 12:27 PM, Frank Harrell <f.harrell at vanderbilt.edu>wrote:
>
>> Thanks.  That works - sort of.  My problems are -
>>
>> - how to get reftex-mode to auto start when entering an Rnw or .tex file
>> - how to get the mode to persist
>>
>> Once reftex-mode is in effect I can do C-c = and it works fine.  But if I
>> move the cursor to a line of R code reftex mode is deactivated and C-c = no
>> longer works when I return the cursor to a LaTeX line.
>>
>> Frank
>>
>>
>>
>> On 07/18/2013 01:49 AM, Stephen Eglen wrote:
>>
>>> I have been stymied trying to figure out the optimum configuration of
>>>> Emacs for use with ESS and AUCTeX.  In the old days I remember using
>>>> Emacs with AUCTeX and easily getting a document overview showing
>>>> \section, \subsection etc.  Now I can't see how to get a document
>>>> overview.
>>>>
>>>
>>> Hi Frank,
>>>
>>> AUCTEX's "C-c =" (M-x reftex-toc) should work still both in .tex
>>> buffers, and .Rnw when you are in tex chunks.  Is that not working for
>>> you?
>>>
>>> Stephen
>>>
>>>
>>>
>> --
>> Frank E Harrell Jr Professor and Chairman      School of Medicine
>>                     Department of Biostatistics Vanderbilt University
>>
>> ______________________________**________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/ess-help<https://stat.ethz.ch/mailman/listinfo/ess-help>
>>
>
>
>

-- 
Frank E Harrell Jr Professor and Chairman      School of Medicine
                    Department of Biostatistics Vanderbilt University



More information about the ESS-help mailing list