## Setting preferences

### General

- Multiple Document Interface: let you choose the way windows (i.e. drawing sheets and palettes) are managed within jPicEdt. In Child-frames mode, all windows are actually Java internal-frames components that are contained in a single application window, whereas in the new Gimp-like mode, all windows are native and are directly laid out on your desktop.
- Look'n feel : let you choose your favorite Look'n Feel ; defaults to metal (a SUN look'n feel) on startup.
- Language : English, French,... You must restart jPicEdt if you want a new language choice to take effect.

- Undoable steps : let you specify the number of undoable steps ; 0 means that undo is deactivated.

- Default content-type : this is the default formatter used when creating a new drawing. The preferred way is to use PSTricks, because then you get a real high quality rendering (colours, textures, shadows,...), but if you don't want to rely on add-ons packages, simply choose the Emulated LaTeX content-type (then you'll get only a minimal subset of those graphical attributes, i.e. no-filling, no colours,...). The epic/eepic choice is a reasonable choice for those who don't need colours and textures, but are willing to draw ellipses, arcs, polygons,... with a satisfying rendering quality. Note also that PSTricks uses PostScript in the background so if your DVI Viewer dooesn't handle PostScript special, use `dvips` first to convert your DVI file to a PS file, then run `ghostscript` to display it.

### LaTeX, eepic and PSTricks tab panes

Let you set a variety of package-specific parameters. One thing common to all formats is the prolog/epilog string, which is used when running LaTeX on the active picture (the one corresponding to the highlighted inner frame) from within jPicEdt.
These strings get prepended/appended to the text generated by the formatter (i.e. the text starting with `\begin{picture}`) so that the resulting text is a "stand-alone" LaTeX file, and can be directly compiled by LaTeX. The default prolog/epilog simply include necessary packages, but you can add your own macro definition here, so that, for example, arguments of text-boxes which use macros of your own are compiled properly.

By default, unitlength is set to 1 mm at the beginning of the saved file. However, it is often convenient to change the unit to rescale the figure. There is a convenient way to do this from the main tex file using by defining the command `\JPicScale`. Here is an example rescaling the picture at 80%:

`\def\JPicScale{0.8}
\input{figure.tex}`

One can alternatively use `\newcommand{\JPicScale}{0.8}` or `\renewcommand{\JPicScale}{0.8}` according to whether `\JPicScale` is already defined or not (the use of the TeX primitive `\def`allows you not to bother about this).``

#### 1. LaTeX picture environment specific parameters

- Max LaTeX circle/disk diameter : this depends on your own LaTeX installation. You'll have to set it to the biggest circle/disk diameter contained in your LaTeX font (actually, 14mm for circles, and 5.4mm for disks, which incidentally are the default values, match almost every TeX distribution).

LaTeX picture environment only allows for a small number of line slopes ; in emulated mode, jPicEdt use the `\multiput` command to emulate lines of any slope, using a set of very closed and tiny horizontal or vertical segments. As a result, lines of any thickness can now be drawn (FYI, the `\thickness` command doesn't work with standard slanted lines).

- Emulated line segment length : this is the length of the small segments that compose emulated lines.
- Emulated line max slope : when do we have to switch between an almost (hence emulated) vertical emulated line and a TRUE vertical line ?
- Emulated circle segment length : this is the length of the small segments that compose emulated circles (that is, circles having a radius greater than Max-LaTeX-Circle-Diameter). Note : big disk can't be emulated using LaTeX picture environment commands, but they can if you decide to use the eepic package.

#### 2. eepic package

- Maximum width for thinlines/thicklines: eepic supports three line-thickness values, which correspond to the commands \thinlines, \thicklines and \Thicklines. The default values should work (e.g. any line smaller than 0.15mm will be considered as thin, and any line larger than 0.3mm will be formatted as Thick), yet if you experience discrepancies between what is displayed on the screen and what you get after compilation, you may want to alter these values to improve the WYSIWYG behaviour.

#### 3. PSTricks package

No alterable parameter.

### External commands

How does it work?

When running LaTeX/DVI/... from within jPicEdt, a LaTeX file is created on the fly by jPicEdt in the standard temp' directory of the OS you're using (e.g. c:\windows\temp), or another temp' dir if you changed it (see Directories panel). The variety of operating systems and LaTeX distributions made it impossible to design a scheme for running external commands that wouldn't rely on scripts (e.g. batches on DOS, AppleScript on MacOS).

So the best thing to do is (as for me) to use external scripts which call the adequate programs (latex, dviwin32.exe/xdvi,...). You can pass argument to this script by using the predefinite symbols "{p}" and "{f}".

- "{p}" gets replaced by your temp. directory (this is where the LaTeX file gets created), e.g. `/tmp/` on Linux, `c:\windows\temp` on Win9x, etc...
- "{f}" gets replaces by the name of the temp. file (usually "jpicedt" with a random number appended to it, e.g. "jpicedt542163"), w/o any "tex" extension.
- {i} gets replaced by the location of the "add-ons" directory where some scripts already reside for some LaTeX distributions.

Here's an example of an external batch that will work with Linux's bash-shell :

`#!/bin/sh`
`cd $1`
`$2 $3`

Suppose this script was saved in the "add-ons" directory, then the command line which appears under the "external-commands"'s tab in the preferences-setting tabsheet will be typeset as follows:

`{i}/ext_proc {p} latex {f}`

(where "latex" can be replaced by any appropriate name, e.g. xdvi, kghostview, kdvi,...).

This will lead, once "{p}" and "{f}" have been replaced, to :

`ext_proc /tmp latex jpicedt46858`

which finally yields,

`cd /tmp`
`latex jpicedt46858`

(latex accept a file w/o extension on the command line, otherwise simply add ".tex" manually in your script).

Loading predefined configurations

Currently, there are scripts and predefined configurations for the following LaTeX distribution :

- Unix : TeTeX
- Windows : MikTeX, WinGUT, and ScientificWorkplace.

These scripts reside in the add-ons subdirectory of where jPicEdt got installed (you need to have installed the add-ons package during jPicEdt's installation).
To load a predefined configuration file, go to the Preferences->Commands pane, press the LOAD PREDEFINED CONFIGURATION button, and browse the directory tree until you find a file matching your LaTeX distribution.

### Shortcuts

Allows you to change keyboard-shortcuts binding for every menu item (including tools from the toolkit palette). To add, modify or remove a shortcut, double-click on the appropriate cell in the right column, directly type the shortcut, and click OK (to delete a shortcut, just click the eraser).

### Page format

Allows you to set the default page format when creating a new drawing from scratch (this has no effect on drawings loaded from disk).