CambridgeSoft   Schrodinger   CrystalMaker   EndNote   Systat 
  ´º½º     ¼ÒÇÁÆ®¿þ¾î     ÇÑ±Û È¨ ÆäÀÌÁö     ±â¼úÁö¿ø     È¸»ç     ÁÖ¹®     ÁúÀÇ/ÀÀ´ä  
WinEdt Logo (3 KB)
  WinEdt Ȩ | ¸ÞÀϸµ ¸®½ºÆ® | ¼Ò°³ | Snapshots | ÁÖ¿ä »ç¾ç | °¡°Ý/ÁÖ¹® | ¼³Ä¡ ¿ä·É | ´Ù¿î·Îµå  
  WinEdt Ȩ < ÁÖ¿ä »ç¾ç < WinEdt and TeX

WinEdt and TeX

By default WinEdt is configured as a front end for MiKTeX. If you want to use WinEdt with fpTeX (web2c) or YandY TeX you can execute the corresponding command in WinEdt's Options| Configurations Menu in order to immediately reconfigure WinEdt for another TeX system:

WinEdt's Configurations Submenu (10 KB)

If you want to use WinEdt as an HTML Editor or as a plain ASCII editor without TeX support you can choose the HTML or (basic) ASCII Editor initial configuration.

HINT: Later you can customize the current configurations through the dialogs in the Options Menu. If you want your customization to become a part of the currently selected configuration use the Update Configurations command in the above menu and in the resulting interface check the components that should be updated.

IMPORTANT: Before experimenting with different configurations you are strongly advised to create a backup of your current configuration through the Backup menu command in the above menu. Later you can use the Restore command to restore the previously backed up settings. Finally, the "Default" command can be used to selectively restore the default configuration components (menus, highlighting, colors, etc...).

Some components in WinEdt's Accessories menu are optional and may not be included with your TeX system. For more information on TeX and related software visit:

http://www.tug.org

WinEdt's default settings provide an interface for the most commonly used accessories. However, you may want to add additional items specific to your needs...


Important Guidelines for TeX Installation

You should install your TeX system (and WinEdt) with administrative privileges and thus allow the TeX Setup program to properly update Windows Registry. This information is used by WinEdt to automatically detect your TeX's Root Folder. If Windows Registry doesn't contain the expected information WinEdt may be unable to automatically detect your TeX System and you'll have to make manual corrections to the default configurations which many users find intimidating...

IMPORTANT: If you have installed your TeX system (or additional components and accessories) after WinEdt is already running, make sure to restart WinEdt and thus give it a chance to detect your TeX installation in its Startup Macro! Re-installing WinEdt is not necessary and does not improve TeX's integration in WinEdt's default settings.

Testing your TeX Configuration

Assuming that your TeX System is properly installed and WinEdt has been restarted you can perform a test and see if your TeX Installation is properly installed and integrated with WinEdt. Open a sample "AMS Paper" in WinEdt's Document/ Current Work (Samples) menu. You will notice that this makes some WinEdt's Buttons (such as LaTeX, TeX,...) enabled while others (eg. DVI Preview, GSView, Acrobat Reader) remain disabled. This indicates that the TeX document is ready to be compiled but currently there is no output suitable for Previewing or further processing (eg. dvi2ps or ps2pdf).

Press the LaTeX button in WinEdt's Tool Bar. If this is the first time you have activated TeX it may take some time to compile the document due to the generation of font metric files. If everything works fine you'll end up with a few warnings about undefined citations and references. The file "Paper.dvi" file gets created by LaTeX during the compilation, and the "DVI Preview" Tool Bar Button in WinEdt should now become enabled. You can execute the BibTeX command (from the Accessories Menu) and then run LaTeX two more times to get a properly cross-referenced document with Bibliography and no more warnings. Now click on the the "DVI Preview" button to start YAP. Again, YAP may take some time to generate fonts (if this is the first time you have started it) but after a while you should see the dvi document displayed. You can also perform a dvips conversion and preview the resulting Post Script file in GSView. Finally, you can try dvipdfm to generate the PDF file that can be previewed in Acrobat Reader. The result in all previewers should be pretty much the same.

While ps and pdf formats offer some advantage when it comes to graphics and portability, the dvi format produced with YAP and WinEdt supports a feature that can be a real life saver when it comes to interactive work and corrections. The feature is called DVI Forward and Inverse Search, and it allows you to jump between the corresponding places in the source and the previewed text, and vice versa. WinEdt's Status Line (by default) contains a small panel that can be toggled to display "--src" or nothing, by clicking on it. If the document was compiled when "--src" was on and you have a recent enough version of YAP (0.96h or later will do) you can immediately try this by moving somewhere in the source of "Paper.tex" and then click the DVI Search Icon. YAP should display the text (roughly) corresponding to your position in the text. To navigate through the Paper.tex in WinEdt try to use WinEdt's "Gather" command (click on the button displaying the funnel in WinEdt's Tool Bar to display or hide the Gather form) and then move through the document by clicking on the sectioning commands displayed in the Gather form's list box.

In YAP you can activate the Inverse DVI Search by double-clicking anywhere in the text to return to the corresponding line in WinEdt. However, before this works you should enter:

WinEdt.exe -F "[Open(|%f|);SelPar(%l,8)]"

in YAP's View| Options| Inverse Search| Command Line.

If the above process fails (eg. the LaTeX compilation results in a message such as, for example, "Cannot run LATEX.EXE" or "Bad Command or File Name" follow the instructions in the Diagnostic Frames of the TeX Configuration Wizard (pressing the "Searching for Executables" button produces a detailed report on the state of your TeX system as seen by WinEdt).

If, on the other hand, everything works as it should, you may want to try another sample "Thesis" to see how to organize projects consisting of sub-documents. After opening the Main file (from the Document| Current Work Menu) you should display the Project Tree and press the buttons "Build Tree" and "Open All".

WinEdt TeX Example (35 KB)

You can compile the project the same way as in the previous sample (or use the TeXify button to perform the compilation in one step). You can refresh the information in all Gather Tab Pages by clicking on the Gather Form with the right mouse button and choose the command "Refresh All" from the resulting Popup Context Menu. A topic on Gather in WinEdt's Help contains more information on how to take advantage of the Gather form for purposes of navigating and cross-referencing. Note that setting the Main File is crucial when you are working with sub-documents. The Tool Bar Buttons "+" and "-" can be used to set and remove the main file. In the absence of the Main File the current document is passed as a parameter to compilers (such as TeX). For your convenience the name of the Main File (when set) is displayed in the last panel of the Status Line.


Troubleshooting: TeX Configuration Wizard

WinEdt's default settings have been carefully prepared and a great effort has been made to make WinEdt work with your TeX System without any modifications on your part. However, if this failed and some of your TeX accessories cannot be started from WinEdt this indicates that your Windows Registry does not contain the necessary information that would enable WinEdt to detect your accessories. This information can be lost during Windows Upgrades or bad system crashes and in some cases it was not initialized because you have installed software without administrative privileges thus preventing the installation setup programs from properly updating Windows Registry. However, do not worry, it is easy to manually correct WinEdt's configuration.

The TeX Configuration Wizard has been designed to diagnose your TeX System and suggest the solutions to any problems with the default accessories. In WinEdt's Options Menu start the Configuration Wizard. The following dialog appears on the screen:

Configuration Wizard (17 KB)

This is the Main Configuration Wizard. From the Panel on the right start the TeX Configuration Wizard and go to the "Diagnostic Frames" Tab Page. To produce a report press the button "Searching for Executables":

Configuration Wizard (19 KB)

Read the report carefully (for your convenience the Wizard can be resized). If the suggested solutions don't help and you need more assistance you should include this report together with a detailed description of your problem. Most problems can be fixed by modifying the Startup Macro or TeX System macro and restarting WinEdt. You'll get the detailed instructions if you press the button "Fixing the Startup Macro".

Of course, you should exercise some judgement when you encounter a problem: is it a WinEdt-related issue or is your problem with your document, graphics or TeX configuration. WinEdt's Wizard can only assist you when it comes to WinEdt's ability to launch your TeX accessories. Should the result not be what you have anticipated this usually has nothing to do with WinEdt. For example, your previewer may not be handle postscript graphics, or your document is refereing to sty files that are missing or misplaced. WinEdt has nothing to do with such problems and WinEdt Team cannot and will not assist you in resolving them. You should seek help on the forum (Mailing List) dedicated to your TeX system or, when the problem is a pure TeX/LaTeX issue, on TeX's Newsgroup. You are more likely to get a useful answer if you mention relevant details and skip the rest...


Fixing WinEdt's Startup Macro

During its startup WinEdt attempts to locate the executables for GS, GSView and Acrobat Reader, as well as TeX's Root directory, from the Windows Registry. If you have any of the above installed but WinEdt did not properly locate them due to a lack of information in your registry, you'll have to fix the Startup and/or TeX System macro manually. In WinEdt's Options| Configurations Menu, start the command "Startup Macro". WinEdt opens the file "...WinEdt\Config\Startup.edt" for editing. Similarly, the TeX System command opens the macro "...WinEdt\Exec\MiKTeX\TeX System.edt".

Startup Macro contains non-TeX system specific definitions (Ghostscript, GSView and Acrobat) while the TeX System Macro determines the TeX Install Root and Binary folder and the default dvi previewer. There is a good reason for separating the two because this allows for quick and easy reconfiguration for another TeX System by executing any of the Configuration commands in WinEdt's Options/ Configurations Menu. If you have more than one TeX System installed you should be able to switch between MiKTeX, fpTeX (web2c), and YandY TeX by executing the corresponding configuration command in WinEdt's menu...

If your Registry contains the "expected" information WinEdt will automatically detect TeX's Root folder and the basic TeX-ing functionality should be there without any changes. If there are problems (eg. Registry does not contain the proper information) start the command Options/ Configurations/ TeX System to open the file TeX System.edt for editing. Depending on your TeX System you'll find one of the following lines:

      // MiKTeX Root: Enter it explicitly if the above fails!
      //? Assign('TeX-Root',|c:\texmf|);

      // fpTeX Root: Enter it explicitly if the above fails!
      //? Assign('TeX-Root',|c:\Local\TeX|);

      // YandY TeX Root: Enter it explicitly if the above fails!
      //? Assign('TeX-Root','%~(|d:\yandy|);');

Remove the comment //? from the beginning of the line and explicitly enter the location of your TeX Root folder between |...| (you can use Windows Explorer to verify that this is the proper location- make sure that you type it properly and that there are no extra spaces in the folder specification). Save the macro script TeX System.edt and from the Macros menu execute the command "Run Startup Macro" to refresh WinEdt's Environmental Variables.

IMPORTANT: The above should make the selected TeX system work with the default WinEdt settings. There is, however, one exception: on Win9x/ME you can not use the BATCH Execution Mode (you cannot run TeX through the BATCH files) unless your PATH already contains TeX's Binary folder. On this platforms a private Environmental Block cannot be passed to BATCH files (nothing WinEdt can do about this; it works as expected on NT/2000/XP). Of course, you can always edit the bat files but most users are not thrilled by this prospect...

In its Startup macro WinEdt detects Ghostscript (used for ps2pdf conversion), GSView (used for previewing ps files) and Acrobat or Acrobat Reader (for previewing pdf files).

The detection is again based on the information in Windows Registry (GSView and Acrobat are detected based on the association with ps and pdf files). If any of the above fails, you can open Startup.edt for editing (Options/ Configurations/ Startup Macro). You'll find the lines like:

       //? Assign('GS-Bin','C:\gs\gs7.00\bin'); // GS

        ...
      //? Assign('GSView','C:\Ghostgum\gsview\gsview32.exe'); // GSView
        ...
      //? Assign('AcroRead','"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe"'); // Acrobat Reader

If any of the above is problematic, you can enter the location of the executables explicitly (don't forget to remove the comment //? from the beginning of the line) and execute the Macros/ Run Startup Macro menu command. If you don't have the above utilities check www.tug.org for links to these (and other) TeX related applications. Ghostscript is needed for pdf conversion and interpretation of eps graphics.

The parameters pertaining to other (default) accessories can be handled in a similar manner by modifying the appropriate lines (commented out by //?) in the Startup.edt. You have to know where an accessory or TeX is installed on your system. If you have any doubts please use Windows Explorer to locate the correct folders and executable files. If you don't have GSView or Acrobat Reader installed on your system then, of course, WinEdt cannot successfully launch them. Both utilities are optional and are not required for a basic TeX cycle: Edit-Compile-Preview. If later you decide to install GSView or Acrobat Reader you can download them from:

  http://www.cs.wisc.edu/~ghost/gsview/  http://www.adobe.com

Both utilities are free and come with their own installation instructions and documentation.

In WinEdt's Startup Macro you'll find the following attempt to locate the latest installed GS:

  // Get AFPL Ghostscript from Windows Registry

...

If for some reason your Registry does not contain the required information but GS is installed you should manually correct the assignment by appending a line:

  Assign("GS-Bin","C:\gs\gs7.00\bin");

Ghostscript in WinEdt's default settings is only used for ps2pdf conversion.

In its default settings WinEdt provides an interface to many PDF generating accessories. The interface is defined as a macro which first closes ".pdf" files currently previewed by the Acrobat Reader. This is necessary because Acrobat Reader locks the opened ".pdf" files for writing and thus the utilities in WinEdt's Accessories| PDF menu would fail to produce any output until the Acrobat Reader's document is manually closed. This applies to PDFTeXify, PDFTeX, PDFLATeX, dvi2pdf, and ps2pdf. The corresponding "*.edt" macro scripts (either in Exec folders) start with the code that closes the current document in Acrobat if the pdf file is currently locked.

The variable %$(|Acro-Title|) is initialized in WinEdt's Startup Macro:

    // Which Acrobat: AcroRd32.exe or Acrobat.exe
    FindInString(`%$('AcroRead')`,>
                  'Acrobat.exe',1,2,1000,1);
    // Acrobat (Reader) Title/Caption ...
    IfNum("%!1","%!2",">",>
      `Assign("Acro-Title","Acrobat Reader");`,>
      `Assign("Acro-Title","Adobe Acrobat");`);
    // Set manually if necessary
    //? Assign("Acro-Title","Adobe Acrobat");

This should work fine if you have AcroRd32 (Version 4.0 or later) or a full Adobe Acrobat installed on your system. Otherwise you may have to correct the Assign function in the Startup Macro by replacing the title string "Acrobat Reader" with the Title (Caption) displayed in the application bar of your version of Acrobat Reader, eg. "Adobe Acrobat". The exact string depends on your language: make sure to copy it exactly as it is displayed in Acrobat Reader's Windows Bar (including spaces and capitalization).

IMPORTANT: After making changes to the Startup.edt or TeX System.edt you must either restart WinEdt or explicitly execute the Startup.edt through the "Macros| Run Startup Macro" Command.

IMPORTANT: If the "Search for Executables" frame displayed a diagnose:

  *** Environment Block Inheritance: OFF

(typical for Win9x/ME systems) then changes to the environment variables (such as PATH) in WinEdt's Startup.edt does not affect the BATCH files. In this case you should read the information under the frame "Fixing the BATCH files" and if you are using the BATCH configuration to call accessories proceed according to the instructions there...

HINT: If you manage to corrupt your Startup.edt macro you can always restore the original one from the "...Config\Recovery" Folder!

WinEdt Ȩ | ¸ÞÀϸµ ¸®½ºÆ® | ¼Ò°³ | Snapshots | ÁÖ¿ä »ç¾ç | °¡°Ý/ÁÖ¹® | ¼³Ä¡ ¿ä·É | ´Ù¿î·Îµå
Copyright ¨Ï 1998-2008 by Aleksander Simonic (alex@winedt.com). All rights reserved.
 È¨ ÆäÀÌÁö | ¼ÒÇÁÆ®¿þ¾î | ÇÑ±Û È¨ÆäÀÌÁö | ±â¼úÁö¿ø | È¸»ç | ÁÖ¹® | ÁúÀÇ/ÀÀ´ä