EmTeX and the WorkPlace Shell: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
Created page with "Date: 11-Aug-1992 You don't need an integrated TeX environment to use emTeX under OS/2 2.0. An integrated environment comes with OS/2 2.0: the WorkPlace Shell. Here's a tuto..."
 
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Date: 11-Aug-1992
{{Article
 
|Author=N/A
 
|Date=1992-08-11
You don't need an integrated TeX environment to use emTeX under OS/2 2.0.
|OS=OS/2 2.0
An integrated environment comes with OS/2 2.0: the WorkPlace Shell.
|File=N/A
Here's a tutorial.
|Source=N/A
}}
You don't need an integrated TeX environment to use emTeX under OS/2 2.0. An integrated environment comes with OS/2 2.0: the WorkPlace Shell. Here's a tutorial.


Note: texit.cmd can also be used from the command prompt under OS/2 1.3.
Note: texit.cmd can also be used from the command prompt under OS/2 1.3.


This has to be done only once:
This has to be done only once:
------------------------------
Create an emTeX folder and put there program icon for texit.cmd.  (see
your OS/2 documentation for details).  texit.cmd is available in the
directory where you've found this file.


Enter "%**n" (omit the quotes) in the "Parameters" field of the
Create an emTeX folder and put there program icon for texit.cmd. (see your OS/2 documentation for details). texit.cmd is available in the directory where you've found this file.
program objects and leave the "Working directory" field empty.


You can also create program objects for vp.cmd (using the same settings)
Enter "%**n" (omit the quotes) in the "Parameters" field of the program objects and leave the "Working directory" field empty.
and prthplj.cmd, for instance. Then, you can print a DVI file by moving
the icon of the DVI file onto the icon for vp.cmd or prthplj.cmd.


Make a copy of the "Data File" icon in the "Templates" folder (use
You can also create program objects for vp.cmd (using the same settings) and prthplj.cmd, for instance. Then, you can print a DVI file by moving the icon of the DVI file onto the icon for vp.cmd or prthplj.cmd.
Ctrl and the right mouse button) and rename it "TeX File.tex". (You'll
get asked whether you want to keep the extension. Answer "No".)


Make a copy of the "Data File" icon in the "Templates" folder (use Ctrl and the right mouse button) and rename it "TeX File.tex". (You'll get asked whether you want to keep the extension. Answer "No".)


This has to be done once per document:
This has to be done once per document:
--------------------------------------


Create a folder for your document: Drag a Folder icon from the Templates
Create a folder for your document: Drag a Folder icon from the Templates folder to somewhere. Rename the folder "textest", for instance. Drag the "TeX File.tex" icon from the Templates folder to the "textest" folder to create a new TeX document. Rename it "textest.tex".
folder to somewhere. Rename the folder "textest", for instance. Drag
the "TeX File.tex" icon from the Templates folder to the "textest" folder
to create a new TeX document. Rename it "textest.tex".


This is how to use the icons:
This is how to use the icons:


Double-click on the icon to invoke the editor.
Double-click on the icon to invoke the editor.
   %Format: lplain
   %Format: lplain
   \documentstyle{article}
   \documentstyle{article}
Line 46: Line 33:
   \end{document}
   \end{document}


and save the file. Move the icon onto the texit.cmd icon. LaTeX will
and save the file. Move the icon onto the texit.cmd icon. LaTeX will be invoked to compile the text. If the dvitest.dvi etc. icons don't show up automatically, select "Refresh" for the textest folder. Move the textest.dvi icon onto the dvipm icon to preview. Move the textest.dvi icon onto the prthplj icon to print.
be invoked to compile the text. If the dvitest.dvi etc. icons don't
show up automatically, select "Refresh" for the textest folder.
Move the textest.dvi icon onto the dvipm icon to preview. Move the
textest.dvi icon onto the prthplj icon to print.
 


Using menus
Using menus
-----------
Put texit2.cmd (available in the same directory as this file) into a
directory listed in the PATH environment variable, c:\emtex for
instance.  Change the "TeX File.tex" object in the Templates folder by
opening the Settings notebook, choosing the Menu tab, selecting the
"~Open" entry in the upper list box, selecting the lower "Create
another..." button, filling the dialog box with "TeX" (Menu item name)
and "texit2.cmd" (Program name).


After doing that, new "TeX File.tex" objects will have an additional
Put texit2.cmd (available in the same directory as this file) into a directory listed in the PATH environment variable, c:\emtex for instance.  Change the "TeX File.tex" object in the Templates folder by opening the Settings notebook, choosing the Menu tab, selecting the
item in the Open menu, TeX. Selecting that item will run texit2.cmd,
"~Open" entry in the upper list box, selecting the lower "Create another..." button, filling the dialog box with "TeX" (Menu item name) and "texit2.cmd" (Program name).
which will call texit.cmd (which will call emTeX) to compile your TeX
file (the "TeX file.tex" object).


After doing that, new "TeX File.tex" objects will have an additional item in the Open menu, TeX. Selecting that item will run texit2.cmd, which will call texit.cmd (which will call emTeX) to compile your TeX file (the "TeX file.tex" object).


texit.cmd details
texit.cmd details
-----------------
texit.cmd is a batch file (written in REXX -- it will run under OS/2
1.2 extended edition, OS/2 1.3 and OS/2 2.0) for running emTeX. It
reads the first line of the input file to find out what format file to
use for the input file. For instance, place
    %format lplain
in the first line of your file to automatically choose lplain.fmt. You can
also use
    %Format: lplain
    %format: lplain


texit.cmd is a batch file (written in REXX - it will run under OS/2 1.2 extended edition, OS/2 1.3 and OS/2 2.0) for running emTeX. It reads the first line of the input file to find out what format file to use for the input file. For instance, place
%format lplain
in the first line of your file to automatically choose lplain.fmt. You can also use
%Format: lplain
%format: lplain
and
and
%format lplain
Text after the name of the format file will be ignored. You can insert any number of blanks between "%" and "format". You can insert any number of blanks between "format" (or "format:") and the name of the format.


    %format lplain
The batch file also runs an editor if you correctly set the EMTEXED environment variable and exit TeX by typing e (see texware.doc or tex.doc). texit.cmd automatically chooses a unique temporary file name for the /a option.
 
Text after the name of the format file will be ignored. You can insert
any number of blanks between "%" and "format". You can insert any number
of blanks between "format" (or "format:") and the name of the format.
 
The batch file also runs an editor if you correctly set the EMTEXED
environment variable and exit TeX by typing e (see texware.doc or
tex.doc). texit.cmd automatically chooses a unique temporary file name
for the /a option.
 
texit.cmd calls tex386.exe if you're using OS/2 2.0 and if tex386.exe
is present. Otherwise, texp.exe is used.


texit.cmd calls tex386.exe if you're using OS/2 2.0 and if tex386.exe is present. Otherwise, texp.exe is used.


Icon for dvipm
Icon for dvipm
--------------


Here's how to set the dvipm icon for vp.cmd: Open the settings notebook
Here's how to set the dvipm icon for vp.cmd: Open the settings notebook for dvipm.exe. Select the "General" page. Edit the icon. Select "Save as" and store the icon into dvipm.ico, for instance. Quit Icon Editor. Now you can select dvipm.ico as icon for vp.cmd.
for dvipm.exe. Select the "General" page. Edit the icon. Select "Save as"
and store the icon into dvipm.ico, for instance. Quit Icon Editor. Now
you can select dvipm.ico as icon for vp.cmd.


This does not yet work


This does not yet work
To make dvipm be called when you double-click a DVI file icon, open the settings for vp.cmd, select the Association tab, type "*.dvi" in the "New Name" field and press the "Add" button.
----------------------


To make dvipm be called when you double-click a DVI file icon, open
As the name of the Desktop folder contains special characters (a blank, for instance), this works only for DVI files in 'sane' directories, that is, folders that are not subfolders of the desktop folder.
the settings for vp.cmd, select the Association tab, type "*.dvi" in
the "New Name" field and press the "Add" button.


As the name of the Desktop folder contains special characters (a
[[Category:How To‎]]
blank, for instance), this works only for DVI files in `sane'
directories, that is, folders that are not subfolders of the desktop
folder.

Latest revision as of 21:54, 19 June 2022

Article Info
Author N/A
Date 1992-08-11
OS Version OS/2 2.0
Companion File N/A
Source N/A

You don't need an integrated TeX environment to use emTeX under OS/2 2.0. An integrated environment comes with OS/2 2.0: the WorkPlace Shell. Here's a tutorial.

Note: texit.cmd can also be used from the command prompt under OS/2 1.3.

This has to be done only once:

Create an emTeX folder and put there program icon for texit.cmd. (see your OS/2 documentation for details). texit.cmd is available in the directory where you've found this file.

Enter "%**n" (omit the quotes) in the "Parameters" field of the program objects and leave the "Working directory" field empty.

You can also create program objects for vp.cmd (using the same settings) and prthplj.cmd, for instance. Then, you can print a DVI file by moving the icon of the DVI file onto the icon for vp.cmd or prthplj.cmd.

Make a copy of the "Data File" icon in the "Templates" folder (use Ctrl and the right mouse button) and rename it "TeX File.tex". (You'll get asked whether you want to keep the extension. Answer "No".)

This has to be done once per document:

Create a folder for your document: Drag a Folder icon from the Templates folder to somewhere. Rename the folder "textest", for instance. Drag the "TeX File.tex" icon from the Templates folder to the "textest" folder to create a new TeX document. Rename it "textest.tex".

This is how to use the icons:

Double-click on the icon to invoke the editor.

 %Format: lplain
 \documentstyle{article}
 \begin{document}
 Blah blah bla
 \end{document}

and save the file. Move the icon onto the texit.cmd icon. LaTeX will be invoked to compile the text. If the dvitest.dvi etc. icons don't show up automatically, select "Refresh" for the textest folder. Move the textest.dvi icon onto the dvipm icon to preview. Move the textest.dvi icon onto the prthplj icon to print.

Using menus

Put texit2.cmd (available in the same directory as this file) into a directory listed in the PATH environment variable, c:\emtex for instance. Change the "TeX File.tex" object in the Templates folder by opening the Settings notebook, choosing the Menu tab, selecting the "~Open" entry in the upper list box, selecting the lower "Create another..." button, filling the dialog box with "TeX" (Menu item name) and "texit2.cmd" (Program name).

After doing that, new "TeX File.tex" objects will have an additional item in the Open menu, TeX. Selecting that item will run texit2.cmd, which will call texit.cmd (which will call emTeX) to compile your TeX file (the "TeX file.tex" object).

texit.cmd details

texit.cmd is a batch file (written in REXX - it will run under OS/2 1.2 extended edition, OS/2 1.3 and OS/2 2.0) for running emTeX. It reads the first line of the input file to find out what format file to use for the input file. For instance, place

%format lplain

in the first line of your file to automatically choose lplain.fmt. You can also use

%Format: lplain
%format: lplain

and

%format lplain

Text after the name of the format file will be ignored. You can insert any number of blanks between "%" and "format". You can insert any number of blanks between "format" (or "format:") and the name of the format.

The batch file also runs an editor if you correctly set the EMTEXED environment variable and exit TeX by typing e (see texware.doc or tex.doc). texit.cmd automatically chooses a unique temporary file name for the /a option.

texit.cmd calls tex386.exe if you're using OS/2 2.0 and if tex386.exe is present. Otherwise, texp.exe is used.

Icon for dvipm

Here's how to set the dvipm icon for vp.cmd: Open the settings notebook for dvipm.exe. Select the "General" page. Edit the icon. Select "Save as" and store the icon into dvipm.ico, for instance. Quit Icon Editor. Now you can select dvipm.ico as icon for vp.cmd.

This does not yet work

To make dvipm be called when you double-click a DVI file icon, open the settings for vp.cmd, select the Association tab, type "*.dvi" in the "New Name" field and press the "Add" button.

As the name of the Desktop folder contains special characters (a blank, for instance), this works only for DVI files in 'sane' directories, that is, folders that are not subfolders of the desktop folder.