Crimson Editor::Help Topics::How-Tos


General Task
   - How to use built-in calculator
   - How to use context help
   - How to use Yahoo! online dictionary
   - How to execute binary executable file

C/C++ Task
   - How to install C/C++ compiler
   - How to compile C/C++ source code
   - How to execute binary executable file

Java Task
   - How to install Java 2 SDK
   - How to compile Java source code
   - How to execute Java byte code

Perl Task
   - How to install Perl interpreter
   - How to execute Perl script

LaTeX Task
   - How to install LaTeX compiler
   - How to compile LaTeX document
   - How to view dvi file with Yap
   - How to convert dvi file into PostScript with dvips
   - How to use context help

 


How to use context help Top


If you have a help file (*.hlp) or a html help file (*.chm) which explains something based on keyword index, then you can set up user tools to look up keyword you just have typed in without escaping from Crimson Editor.

The following example shows how to set up 'User Tools' to use LaTeX help file. We assume that you have LaTeX help file (LATEX2E.HLP) in the following directory.
C:\texmf\doc\latex\help\LATEX2E.HLP

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: LaTeX Context Help
    - Command: C:\texmf\doc\latex\help\LATEX2E.HLP
    - Argument: $(CurrWord)
    - Initial dir: $(FileDir)
    - Hot key: F1
    - Close on exit: Yes
    - Save before execute: No

After that, you can press F1 to see the search index when the caret is on the word you want to look up.


How to use Yahoo! online dictionary Top


If you want to use online dictionary (Yahoo!: American Heritage) to look-up a word which you have just typed in without escaping from Crimson Editor, then

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Yahoo! Online Dictionary
    - Command: C:\Program Files\Internet Explorer\IEXPLORE.EXE
    - Argument: http://education.yahoo.com/search/ahd?p=$(CurrWord)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F1
    - Close on exit: Yes
    - Save before execute: No

After that, you can press Ctrl+F1 to see the dictionary contents when the caret is on the word you want to look up.


How to execute binary executable file Top


If you have finished editing 'test.c', and you already compiled this file into binary executable file named 'test.exe', then you can use user tools to execute this binary file to see the result without escaping from Crimson Editor.

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Execute Binary Executable
    - Command: C:\Windows\command.com
    - Argument: /C $(FileTitle)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F5
    - Capture output: Yes or No
    - Save before execute: No

After that, you can press Ctrl+F5 while editing 'test.c' to execute 'test.exe'.


How to install C/C++ compiler Top


If you want to learn how to write C/C++ program, you may want to install a C/C++ compiler first of all. Here is a guideline you can follow to install a compiler.

In this example, we assume that you install Borland C++ compiler which is free to use. Of course, there are more compilers available (Cygnus, DJGPP for example). It is up to you which compiler to use.

1. Download 'FreeCommandLineTools.exe' from Borland software corporation
    homepage. (http://www.borland.com)
2. Install 'FreeCommandLineTools.exe' into 'C:\Borland\BCC55' directory.
3. Add 'C:\Borland\BCC55\bin' to the existing path.
4. Set compiler options and linker options.
    From the bin directory of your installation, create a 'bcc32.cfg' file which will set
    the compiler options for the Include and Lib paths (-I and -L switches to compiler)
    by adding these lines:
       -I"C:\Borland\BCC55\include"
       -L"C:\Borland\BCC55\lib"
    create an 'ilink32.cfg' file which will set the linker option for the Lib path by adding
    this line:
       -L"c:\Borland\BCC55\lib"


How to compile C/C++ source code Top


If you have finished writing C/C++ program, then you can use user tools to compile this program into binary file without escaping from Crimson Editor.

The following example assume that you already installed C++ Builder in 'C:\Borland\BCC55' directory. (ref: How to install C/C++ compiler)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Compile C/C++ Source Code
    - Command: C:\Borland\BCC55\bin\bcc32.exe
    - Argument: $(FileName)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F7
    - Capture output: Yes
    - Save before execute: Yes

After that, you can press Ctrl+F7 while editing 'test.c' to compile this source code.


How to install Java 2 SDK Top


If you want to learn how to write Java program, you need to install Java 2 SDK first of all. Here is a guideline you can follow to install Java 2 SDK.

1. Download Java 2 SDK for Windows from Sun Microsystems homepage.
    (http://java.sun.com)
2. Install Java 2 SDK into 'C:\jdk1.3.1' directory.
3. Add 'C:\jdk1.3.1\bin' to the existing path.


How to compile Java source code Top


If you have finished writing Java program, then you can use user tools to compile this program into byte code without escaping from Crimson Editor.

The following example assume that you already installed Java 2 SDK in 'C:\jdk1.3.1' directory. (ref: How to install Java 2 SDK)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Compile Java Source Code
    - Command: C:\jdk1.3.1\bin\javac.exe
    - Argument: $(FileName)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F7
    - Capture output: Yes
    - Save before execute: Yes

After that, you can press Ctrl+F7 while editing 'test.java' to compile this source code.


How to execute Java byte code Top


If you have finished editing 'test.java', and you already compiled this file into byte code named 'test.class', then you can use user tools to execute this byte code to see the result without escaping from Crimson Editor.

The following example assume that you already installed Java 2 SDK in 'C:\jdk1.3.1' directory. (ref: How to install Java 2 SDK)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Execute Java Byte Code
    - Command: C:\jdk1.3.1\bin\java.exe
    - Argument: $(FileTitle)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F5
    - Capture output: Yes or No
    - Save before execute: No

After that you can press Ctrl+F5 while editing 'test.java' to execute 'test.class'.


How to install Perl interpreter Top


If you want to learn how to write Perl script, you need to install Perl interpreter first of all. Here is a guideline you can follow to install Perl interpreter.

In this example, we assume that you install ActivePerl which is free to use. Of course there are more Perl interpreters you can use. It is up to you which interpreter to use.

1. Download ActivePerl for Windows from ActiveState Corporation homepage.
    (http://www.activestate.com)
2. Install ActivePerl into 'C:\Perl' directory.
3. Add 'C:\Perl\bin' to the existing path.


How to execute Perl script Top


If you have finished writing Perl program, then you can use user tools to run this program without escaping from Crimson Editor.

The following example assume that you already installed Perl interpreter in 'C:\Perl' directory. (ref: How to install Perl interpreter)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Execute Perl Script
    - Command: C:\Perl\bin\perl.exe
    - Argument: $(FileName)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F5
    - Capture output: Yes
    - Save before execute: Yes

After that, you can press Ctrl+F5 while editing 'test.pl' to execute this script.


How to install LaTeX compiler Top


If you want to learn how to write LaTeX document, you need to install LaTeX compiler first of all. Here is a guideline you can follow to install LaTeX compiler.

In this example, we assume that you install MiKTeX which is implementation of TeX and related programs for Windows

1. Download MiKTeX from MiKTeX Project Page. (http://www.miktex.org)
2. Install MiKTeX into 'C:\texmf' directory.
3. Add 'C:\texmf\miktex\bin' to the existing path.


How to compile LaTeX document Top


If you have finished writing LaTeX document, then you can use user tools to compile this document into dvi file without escaping from Crimson Editor.

The following example assume that you already installed MiKTeX in 'C:\texmf' directory. (ref: How to install LaTeX compiler)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Compile LaTeX Document
    - Command: C:\texmf\miktex\bin\latex.exe
    - Argument: $(FileName)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F7
    - Capture output: Yes
    - Save before execute: Yes

After that, you can press Ctrl+F7 while editing 'test.tex' to compile this document.


How to view dvi file with Yap Top


If you have finished writing LaTeX document, and also have compiled this document into dvi file already, then you can use user tools to view this dvi file with Yap without escaping from Crimson Editor.

The following example assume that you already installed MiKTeX in 'C:\texmf' directory. (ref: How to install LaTeX compiler)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: View dvi file with Yap
    - Command: C:\texmf\miktex\bin\yap.exe
    - Argument: $(FileTitle)
    - Initial dir: $(FileDir)
    - Hot key: Ctrl+F5
    - Close on exit: Yes
    - Save before execute: No

After that, you can press Ctrl+F5 while editing 'test.tex' to view 'test.dvi' with Yap.


How to convert dvi file into PostScript with dvips Top


If you have a dvi file named 'test.dvi' compiled from 'test.tex', then you can use user tools to convert this file into PostScript file 'test.ps' without escaping from Crimson Editor.

The following example assume that you already installed MiKTeX in 'C:\texmf' directory. (ref: How to install LaTeX compiler)

1. Open Preferences dialog box and select User Tools page
2. Select an empty slot and fill with the following arguments.
    - Menu Text: Convert to PostScript
    - Command: C:\texmf\miktex\bin\dvips.exe
    - Argument: $(FileTitle)
    - Initial dir: $(FileDir)
    - Hot key: F7
    - Capture output: Yes
    - Save before execute: No

After that, you can press F7 while editing 'test.tex' to convert 'test.dvi' into 'test.ps'.


Copyright © 1999-2003 by Ingyu Kang, All rights reserved.