As the final installment in this series, I’ll describe how to add some convenient features to TexNicCenter. The most important issue is to make sure you can create PDF documents from Latex.
In TexNicCenter, notice the Output profile menu in the middle of the toolbar. When you start a project, it is set to the default LaTeX => DVI. In those mode, Latex writes a DVI file as part of the Build output process. You can view the file in Yap when you click on the View output tool. Yap is a WYSIWYG viewer that is supplied with the MikTex distribution. There are several reasons to use DVI output when you are writing a document:
- The files build quickly.
- The Yap display is automatically updated when you rebuild the document.
- When you click View output, the Yap view automatically moves to the section of the document you are editing.
- If you double-click in the Yap window, the TexNicCenter editor loads a source file (if necessary) and moves to the corresponding position.
With Yap, it is almost as easy to work in Latex as with a word processor.
You need to change the output profile when you are ready to create a PDF document. The built-in profile LaTeX => PDF uses routines supplied with MikTex and does not handle graphics correctly. You should use the profile LaTeX => PS => PDF which produces a postscript file and then uses Ghostscript for the final conversion. Sometimes this profile appears magically when you install TexNicCenter and sometimes it doesn’t. If you don’t have the profile, here’s how to add it:
- Download the following file to your desktop: http://www.fieldp.com/myblog/examples/latexpspdf.tco
- In TexNicCenter, click on Build/Define output profiles.
- To avoid future headaches, highlight LaTeX => PDF and remove it.
- Click on Import and specify the file
latexpspdf.tco. - The profile LaTeX => PS => PDF is now in the list. Highlight it and go to the Viewer tab. In the box Path to executable, navigate to Adobe Reader or Foxit Reader.
You can test the profile with the sample files I included with the first post. In principle, you should be able to generate a PDF file with a good reproduction of the color photograph.
When beginning Latex, you may find that you have to look up common structures (like the commands to insert and to size a figure) over and over. There is an easy way to avoid repetition in TexNicCenter. You can incorporate common structures into the program. To do this, click on Insert/Own text modules/Manage text modules. Click New to add a new command. Give it a name and supply the text that should appear before the cursor or highlighted section and after. To help you get started, I have prepared a file of common commands that I use. Here is a link to the text file:
http://www.fieldp.com/myblog/examples/texniccenterprofile.txt
Finally, I thought of a much easier to run the utility to create EPS versions of your illustrations than I described in the previous post. We can add a tool to the TexNicCenter menu. I assume you installed Active Perl and downloaded my utility gc.pl to \batch. Click on Tools/Customize and choose the Tools tab. Click on the New icon and give the entry the name Graphics conversion. Add the following information in the boxes:
- Command: Perl
- Arguments: \batch\gc.pl
- Initial directory: %dc
Just call up the tool and all graphics files in the directory of the current document are automatically updated.
