3

I am running one file in LaTeX (through MiKTeX) it is having error; when I am entering the errorstopmode 'e' on the console the TeX file is opening in the TeXworks editor, but I want to open in WinEdt, how to change the default editor in MiKTeX?

1
  • 1
    Right-click on any .tex file, select Properties, then General tab, and click on Modify Open with.
    – Bernard
    Oct 4, 2016 at 11:05

1 Answer 1

6

The first solution is that you reinstall WinEdt over the existing installation, and, during the same, you select "Associate TeX Filetypes with WinEdt".

enter image description here

The installer has admin privileges so this is the best way to go. Note that none of your customizations will be lost by this process.

A second way to go is to associate filetypes directly within WinEdt (not recommended unless you start WinEdt with admin privileges: Options -> Configuration Wizard -> Start WinEdt as Admin").

To do that open the Configuration Wizard (under the Options menu) and go to the "Filetypes Associations" tab.

There select "Modify filetypes associations" button (All or current user depending on the fact that you have admin privileges)

enter image description here

Then choose the filetypes you want to associate with WinEdt.

enter image description here

Note that you may have to restart your PC to make the changes effective.


Note also that if you are running latex through the command line this may not suffice.

In this case you have two options:

  1. Set the environmental variable MIKTEX_EDITOR to WinEdt, that is, in the command line write:

    set MIKTEX_EDITOR="C:\<winedt_path>\WinEdt.exe" "[Open(|%f|);SelPar(%l,7);]"
    
  2. Edit the MiKTeX configuration file and add a line for the "editor" value, that is, in the command line write:

    initexmf --edit-config-file=miktex
    

    and, in the file that gets opened, write

    editor="C:\<winedt_path>\WinEdt.exe" "[Open(|%f|);SelPar(%l,7);]"
    

    and then save.

2
  • yes it working thanks for your timely Help, Thanks a lot Oct 5, 2016 at 15:43
  • 1
    @venkatesanRamachandiran Glad about it. Remember that you can accept (and upvote) the answer to say thanks :) Oct 5, 2016 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.