[Tex/LaTex] Get help on errors in TeXnicCenter

compilingerrorstexniccenter

Sometimes, I get errors when I compile with pdfLaTeX in TeXnicCenter. Looking through the error logs, I get something like:

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.

How do I take advantage of this Type H <return> for immediate help? I'm new to LaTeX and I would purposefully introduce errors to my source so I could learn more about them.

Best Answer

Since your plan is to "purposefully introduce errors to my source so I could learn more about them", you might find this will help expedite your cunningly twisted goals:

Define a new profile in TeXnicCenter:

  1. Choose Define Output Profiles... from TeXnicCenter's Build menu
  2. Select the profile you'd like to use, e.g., LaTeX => PDF
  3. Clone it by clicking the Copy button
  4. Give it a nice new name, e.g., LaTeX => PDF (shell)
  5. In the Path to the (La)TeX compiler box, type launchpdflatex.bat
  6. In the Command line arguments to pass to the compiler box, type "%pm"

Create a new file called launchpdflatex.bat containing this line:

start cmd /K pdflatex.exe -interaction=errorstopmode %1

(you can omit the -interaction=errorstopmode part if you like.)

Save this file somewhere in your system path. (NB, this command assumes that the shell processor can also find pdflatex.exe somewhere in your system path.)

Now, whenever you've run a compile that has errors in it for which you'd like to Type H <return>, simply select your LaTeX => PDF (shell) profile from TeXnicCenter's LaTeX toolbar dropdown listbox and, voila, it will launch pdflatex in an interactive command shell for you. (Of course, TeXnicCenter won't run makeindex or whatever other postprocessor commands you have in your build profile, but, hey, you've got an error to deal with, so there's no point in chugging any further along.)