![](https://secure.gravatar.com/avatar/d7c3317235884569312c31f786d43bbc.jpg?s=120&d=mm&r=g)
Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file: %%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End: I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 1/10/2014 7:52 PM, Fabrice Couvreur wrote:
Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files.
context filename ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/2b1965851d1faf8215b2af801f63bafb.jpg?s=120&d=mm&r=g)
On 1/10/2014 1:52 PM, Fabrice Couvreur wrote:
Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you.
Set ConTeXt as your default TeX flavor in the AUCTEX settings. AUCTEX -> Tex Default Mode -> Check "Other" then type in context-en-mode or, if English is not your language, modify appropriately -- Bill Meahan, Westland, Michigan
![](https://secure.gravatar.com/avatar/2b1965851d1faf8215b2af801f63bafb.jpg?s=120&d=mm&r=g)
On 1/10/2014 1:52 PM, Fabrice Couvreur wrote:
Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you.
This /fragment/ from my .emacs file should show you some other helpful settings ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ConTeXt-clean-intermediate-suffixes (quote ("\\.tuc" "\\.tui" "\\.tup" "\\.ted" "\\.tes" "\\.top" "\\.log" "\\.tmp" "\\.run" "\\.bck" "\\.rlg" "\\.mpt" "\\.mpx" "\\.mpd" "\\.mpo" "\\.tuo" "\\.tub" "\\.top" "-mpgraph\\.mp" "-mpgraph\\.mpd" "-mpgraph\\.mpo" "-mpgraph\\.mpy" "-mprun\\.mp" "-mprun\\.mpd" "-mprun\\.mpo" "-mprun\\.mpy"))) '(ConTeXt-clean-output-suffixes (quote ("\\.tuc" "\\.log" "\\.dvi" "\\.pdf" "\\.ps"))) '(ConTeXt-engine nil) '(LaTeX-beamer-item-overlay-flag nil) '(LaTeX-biblatex-use-Biber nil) '(LaTeX-mode-hook (quote (preview-mode-setup))) '(TeX-PDF-mode t) '(TeX-bar-LaTeX-buttons (quote (new-file open-file dired kill-buffer save-buffer undo cut copy paste [separator nil] latex next-error view nil))) '(TeX-bar-TeX-buttons (quote (new-file open-file dired kill-buffer save-buffer undo cut copy paste [separator nil] tex next-error view nil))) '(TeX-close-quote "}") '(TeX-command-list (quote (("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") ("ConTeXt" "context --once --synctex %t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") ("ConTeXt Full" "context --synctex %t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber") ("View" "%V" TeX-run-discard-or-function nil t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-command t t :help "Generate PostScript file") ("Index" "makeindex %s" TeX-run-command nil t :help "Create index file") ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary command")))) '(TeX-default-mode (quote context-en-mode)) '(TeX-engine (quote luatex)) '(TeX-kpathsea-path-delimiter t) '(TeX-modes (quote (tex-mode plain-tex-mode latex-mode doctex-mode))) '(TeX-open-quote "\\quotation{") '(TeX-source-correlate-method (quote synctex)) '(TeX-source-correlate-mode t) '(TeX-source-correlate-start-server t) '(TeX-view-predicate-list (quote ((nil nil)))) '(TeX-view-program-list (quote (("Sumatra PDF" ("\"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe\" -reuse-instance" (mode-io-correlate " -forward-search %b %n") " %o"))))) '(TeX-view-program-selection (quote (((paper-letter style-pstricks) "dvips and start") (output-dvi "Yap") (output-pdf "Sumatra PDF") (output-html "start")))) -- Bill Meahan, Westland, Michigan
![](https://secure.gravatar.com/avatar/4da8dbbf92ebc6723a2215b6043a25c7.jpg?s=120&d=mm&r=g)
in the simplest case a Context document consists of
\starttext
Your text
\stoptext
(commented) lines added after \stoptext are ignored.
Willi
On 10 jan. 2014, at 19:52, Fabrice Couvreur
Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you. ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/d7c3317235884569312c31f786d43bbc.jpg?s=120&d=mm&r=g)
Thank you for the answers.
If I summarize, we can not comment on the files at the end because
everything that comes after \stoptext is ignored.
I was already using the command line 'contest file.tex.
Or Set ConTeXt as my default TeX flavor in the AUCTEX settings.
2014/1/10 Willi Egger
in the simplest case a Context document consists of
\starttext Your text \stoptext
(commented) lines added after \stoptext are ignored.
Willi On 10 jan. 2014, at 19:52, Fabrice Couvreur
wrote: Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you.
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 1/10/2014 9:40 PM, Fabrice Couvreur wrote:
Thank you for the answers. If I summarize, we can not comment on the files at the end because everything that comes after \stoptext is ignored.
ignored by context, so you can put there whatever you want
I was already using the command line 'contest file.tex. Or Set ConTeXt as my default TeX flavor in the AUCTEX settings.
2014/1/10 Willi Egger
mailto:context@boede.nl> in the simplest case a Context document consists of
\starttext Your text \stoptext
(commented) lines added after \stoptext are ignored.
Willi On 10 jan. 2014, at 19:52, Fabrice Couvreur
mailto:fabrice1.couvreur@gmail.com> wrote: Hello, I use Emacs as an editor and I compile my files with LuaLaTeX by adding the following lines to the end of the file:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
I discovered ConTeXt, and I would like to know which lines to add to the end of files. Thank you. ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Fri, Jan 10 2014, Fabrice Couvreur wrote:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
%%% Local Variables: %%% Mode: context %%% End: For using "context" instead of "texexec", put this in your init-file: (eval-after-load 'tex '(add-to-list 'TeX-command-list '("ConTeXt" "context --nonstopmode %t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt"))) If you prefer to use context-mode by default for every file with ".tex" as suffix, then you can add this to your init-file: (add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode)) Then you won't need the "Local Variables" section at the end of each ConTeXt-file. -- Peter
![](https://secure.gravatar.com/avatar/d55e3a0cc5e218bdcf3c95c563ff8a22.jpg?s=120&d=mm&r=g)
my .emacs looks like this:
;; Open in ConTeXt mode
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;; AucTeX turn on PDF mode by
default
(add-hook 'LaTeX-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX
when AucTeX loads
(add-hook 'ConTeXt-mode-hook 'yas/minor-mode-on) ;; Turn on YaSnippet minor
mode in ConTeXt-en-mode
(add-hook 'ConTeXt-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX
when AucTeX loads
(setq TeX-default-mode 'context-mode) ;; Make context-mode the default
tex-mode
(setq reftex-plug-into-AUCTeX t) ;; Turn on RefTeX when AucTeX loads
(add-hook 'TeX-mode-hook '(lambda () (TeX-fold-mode 1)))
;; Add option for MKIV and make it the default for C-c C-c
(add-hook 'ConTeXt-mode-hook (lambda()
(add-to-list 'TeX-command-list '("ConTeXt MKIV" "context %t" TeX-run-TeX
nil (context-mode) ))
(setq TeX-command-default "ConTeXt MKIV")
(setq TeX-save-query nil )
))
On Fri, Jan 10, 2014 at 1:37 PM, Peter Münster
On Fri, Jan 10 2014, Fabrice Couvreur wrote:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
%%% Local Variables: %%% Mode: context %%% End:
For using "context" instead of "texexec", put this in your init-file:
(eval-after-load 'tex '(add-to-list 'TeX-command-list '("ConTeXt" "context --nonstopmode %t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt")))
If you prefer to use context-mode by default for every file with ".tex" as suffix, then you can add this to your init-file:
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
Then you won't need the "Local Variables" section at the end of each ConTeXt-file.
-- Peter
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/d7c3317235884569312c31f786d43bbc.jpg?s=120&d=mm&r=g)
Thank you all,
C-c C-c displayed 'Command : (default ConTeXt)' then RET, and the file is
compiled.
Only a second C-c C-c does not allow me to have 'Command : (default View)'.
How ?
2014/1/10 Mica Semrick
my .emacs looks like this:
;; Open in ConTeXt mode (add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;; AucTeX turn on PDF mode by default (add-hook 'LaTeX-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX when AucTeX loads (add-hook 'ConTeXt-mode-hook 'yas/minor-mode-on) ;; Turn on YaSnippet minor mode in ConTeXt-en-mode (add-hook 'ConTeXt-mode-hook (function turn-on-reftex)) ;; Turn on RefTeX when AucTeX loads (setq TeX-default-mode 'context-mode) ;; Make context-mode the default tex-mode (setq reftex-plug-into-AUCTeX t) ;; Turn on RefTeX when AucTeX loads (add-hook 'TeX-mode-hook '(lambda () (TeX-fold-mode 1)))
;; Add option for MKIV and make it the default for C-c C-c
(add-hook 'ConTeXt-mode-hook (lambda() (add-to-list 'TeX-command-list '("ConTeXt MKIV" "context %t" TeX-run-TeX nil (context-mode) )) (setq TeX-command-default "ConTeXt MKIV") (setq TeX-save-query nil ) ))
On Fri, Jan 10, 2014 at 1:37 PM, Peter Münster
wrote: On Fri, Jan 10 2014, Fabrice Couvreur wrote:
%%% Local Variables: %%% Mode: LaTeX %%% LaTeX-command "LuaLaTeX-shell-escape" %%% End:
%%% Local Variables: %%% Mode: context %%% End:
For using "context" instead of "texexec", put this in your init-file:
(eval-after-load 'tex '(add-to-list 'TeX-command-list '("ConTeXt" "context --nonstopmode %t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt")))
If you prefer to use context-mode by default for every file with ".tex" as suffix, then you can add this to your init-file:
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
Then you won't need the "Local Variables" section at the end of each ConTeXt-file.
-- Peter
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Fri, Jan 10 2014, Fabrice Couvreur wrote:
Only a second C-c C-c does not allow me to have 'Command : (default View)'. How ?
http://www.ntg.nl/pipermail/ntg-context/2013/075877.html -- Peter
![](https://secure.gravatar.com/avatar/d7c3317235884569312c31f786d43bbc.jpg?s=120&d=mm&r=g)
Sorry Peter, but I do not understand what you mean by "So just pressing up".
2014/1/10 Peter Münster
On Fri, Jan 10 2014, Fabrice Couvreur wrote:
Only a second C-c C-c does not allow me to have 'Command : (default View)'. How ?
http://www.ntg.nl/pipermail/ntg-context/2013/075877.html
-- Peter
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/d7c3317235884569312c31f786d43bbc.jpg?s=120&d=mm&r=g)
oops !
I just realized.
Sorry for this useless post.
2014/1/11 Fabrice Couvreur
Sorry Peter, but I do not understand what you mean by "So just pressing up".
2014/1/10 Peter Münster
On Fri, Jan 10 2014, Fabrice Couvreur wrote:
Only a second C-c C-c does not allow me to have 'Command : (default View)'. How ?
http://www.ntg.nl/pipermail/ntg-context/2013/075877.html
-- Peter
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
participants (6)
-
Bill Meahan
-
Fabrice Couvreur
-
Hans Hagen
-
Mica Semrick
-
Peter Münster
-
Willi Egger