Input and compilation/Text editors/TeXnicCenter

Unofficial ConTeXt Wiki mirror

Last modified: 2025-01-09


NOTE: This page is outdated and needs to be updated

Adapting TeXnicCenter for processing ConTeXt documents

You can build and view a ConTeXt document in TeXnicCenter as follows:

C:\ConTeXt\usr\local\context\tex\setuptex.bat & C:\ConTeXt\usr\local\context\tex\texmf-mswin\bin\texmfstart

If you have another root, then change C:\ConTeXt accordingly.

texexec.rb, the parameters and "%bm" for the file to be compiled.

In my case this line reads as follows:

texexec.rb --bat --nonstop --pdf --interface=nl --color "%bm" 

Now your ConTeXt file should compile after selecting "Build -> Build" from the menu or pressing Ctrl+F7 or clicking on the corresponding toolbar icon.

With Adobe Acrobat Reader

With SumatraPDF

With SumatraPDF you get forward and inverse search capabilities. To enable them, you have to adjust the texexec arguments accordingly and add the "--synctex=-1" option:

texexec.rb --batch --nonstop --pdf --interface=en --color "%bm" --synctex=-1
"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance 
-inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f', '%l')]\""
select DDE-command
Command: [Open("%bm.pdf",0,1,1)]
Server: SUMATRA
Topic: control
Select option 'DDE command'
Command: [ForwardSearch("%bm.pdf","%Wc",%l,0,0,0)]
Server: SUMATRA
Topic: control
Select 'Do not close'

Cleaning up

Automatically deleting unnecessary auxiliary files after compilation is realised as follows:

C:\ConTeXt\usr\local\context\tex\setuptex.bat & C:\ConTeXt\usr\local\context\tex\texmf-mswin\bin\texmfstart.exe

And in the edit line after "Arguments" enter:

texutil.rb --purgeall.

If you have another root, then change C:\ConTeXt accordingly.