How to execute commands with TeXnicCenter (MiKTeX, Windows)?

1,023

As in the comments the question was changed to "how to get the new xindy working in miktex" here some background:

xindy.exe in the miktex bin-folder is a small wrapper which calls perl xindy.pl. A lot of the applications in the miktex folder are only wrappers (which explains why they are so small).

The wrappers are normally created with initexmf --mklinks --admin (or without --admin in the case of single user installation). In most cases the installation creates the wrappers.

The wrappers are listed in scripts.ini. This is a protected file and one can't change it manually. New wrapper applications must be added by miktex updates.

This means that for a new application like xindy it is not enough to install the relevant xindy packages one should also run the update manager (admin) to update other core miktex packages.

Beside this: when managing miktex one should close other miktex applications (like YAP) so that they don't block core files.

Share:
1,023

Related videos on Youtube

Dominik
Author by

Dominik

The LaTeX beginner...

Updated on June 30, 2020

Comments

  • Dominik
    Dominik over 3 years

    A very basic question: I am a beginner using MiKTeX with Windows (8.1). I only know how to edit and compile with TeXnicCenter. Now and then I learn from this very helpful TeX-forum that it is necessary to execute ("run") some commands like e. g. xindy -M texindy -L vietnamese -C utf8 dominik.idx. How is this to be done? I tried with the Windows command line but I only get the following response: 'xindy' is not recognized as an internal or external command, operable program or batch file - no matter which directory I'm in. Could someone please explain how to do this?

    • Ulrike Fischer
      Ulrike Fischer over 8 years
      xindy is rather special: it has been added to miktex only a few days ago. Try first other tools.
    • Dominik
      Dominik over 8 years
      How about executing commands in general? How/where do you do that?
    • Bernard
      Bernard over 8 years
      Are you sure xindy is installed? For me it works fine on a Windows 7 system.
    • Dominik
      Dominik over 8 years
      @Bernard Well, I think so. I downloaded all available packages with xindy in their names; respective directories have been created (like \MiKTeX 2.9\xindy). Still I do not know where to go in order to execute these commands...
    • Ulrike Fischer
      Ulrike Fischer over 8 years
      Using the windows command line should work fine. If you need a command more often, you can add buttons/profiles in texniccenter similar to the one which now starts pdflatex (which you could run on the command line too). I wouldn't want to have to write all the xindy options constantly ;-).
    • Dominik
      Dominik over 8 years
      @UlrikeFischer Well, then maybe the problem is that I haven't installed xindy properly, as Bernard suggested. Is downloading and installing the packages via MiKTeX Package Manager enough?
    • Ulrike Fischer
      Ulrike Fischer over 8 years
      What happens if you run pdflatex --version in the command line?
    • Dominik
      Dominik over 8 years
      @UlrikeFischer It works. Throws out the current version and copyright.
    • Ulrike Fischer
      Ulrike Fischer over 8 years
      Then find out where pdflatex.exe is (miktex/bin or similar) and check if xindy.exe is in the same folder. Btw: Do you have perl installed?
    • Dominik
      Dominik over 8 years
      @UlrikeFischer xindy.exe is not there. I just recently installed Strawberry Perl. Is this what you mean?
    • Ulrike Fischer
      Ulrike Fischer over 8 years
      Try initexmf --mklinks --admin (or without --admin if you have a single user installation). If this doesn't create the exe, check again in the package manager (admin) if there is something xindy related.
    • Dominik
      Dominik over 8 years
      @UlrikeFischer The response is: initexmf: Windows API error 87: the parameter is incorrect initexmf: Data: C:\ProgramData\MiKTeX\2.9\miktex/data/le\be48a8a88e3570f31e8‌​be8fd4a43a2fd.fndb. No exe file created. All four xindy-related packages are installed.
    • Bernard
      Bernard over 8 years
      I have xindy.exe in \MiKTeX 2.9\miktex\bin\x64 with other .exe files. You should check if you have it there.
    • Dominik
      Dominik over 8 years
      @Bernard Well, the problem is: I don't have it there... :-(
    • Ulrike Fischer
      Ulrike Fischer over 8 years
      Make sure that you haven't some miktex programs running. And check with the update manager (admin) if there are updates starting with "miktex" (imho the info about the xindy wrapper is in one of the other packages).
    • Bernard
      Bernard over 8 years
      Which way did it go? I didn't install it there myself. It seems to have been created at installation, since it is not in the archive files miktex-xindy-bin-x64.tar.lzma and miktex-tex2xindy-bin-xindy-2.9.tar.lzma. Also since theses packages have been updated in the past few days, are you sure you have the very latest version?
    • Dominik
      Dominik over 8 years
      @UlrikeFischer All miktex-related programs closed. All packages updated and all available miktex-... packages installed. Now it finally worked. Thank you very much for your help. If you'd put your directions in an answer, I'd upvote :-)