TeXShell help (Start)

# TeXShell (J. Pönisch)

If you are using the internal help, you can navigate with the following keys:

`
Tab
`
  Select next link. ``
Shift-Tab
  Select prev. link. ``
Enter
  Goto this link. ``
Page-Up
  Page up. ``
Page-Down
  Page down. ``
i
  Help index. ``
m
  Goto the start screen (Main) ``
Ctrl-c
  Copy the sample into the Paste Buffer. ``
Escape
  Leave the help screen.

You can find help to the following topics:

- Starting TeXShell
- Working with TeXShell
- TeX Editor
- Using keys
- Settings
- Global settings
- Document templates
- Project management
- LaTeX syntax
- Configuration files

# Starting TeXShell

You can start the TeXShell by calling the command

        ts [primary file]

If there are no dots in the file name, the extension .tex will be added automatically. But if you work with files like a.b.c.tex, you must specify the full file name!

-> Start

# Working with TeXShell

1. Select Primary file with `F13` or `Shift-F3`.
2. Edit the primary file with `Alt-0`. If it is a new file, you can use a template.
3. You can open some more files for edit with `F3`. Changing between them is possible with `Alt-[Window number]`.
4. Compose the Primary file with `F6`. If an error occurs, you can return to the right place in Editor by pressing `e`.
5. View the dvi file with `F8`. If the viewer needs a PostScript file, it will be generated automatically by dvips.
6. Print the dvi file with `F9`. Close the printing dialog with `Ctrl-Enter`.
7. Finish working with `Alt-x`.

-> Start

# Using keys

`
F1
`
  Help ``
Shift-F3, F13
  Select Primary file. If nessecary, changing working directory. ``
F3
  Open editor after selecting the file. ``
Alt-0
  Edit Primary file. ``
Alt-1 ... Alt-9
  Select edit window (only internal editor). ``
F4
  Open project window. ``
F5
  Start graphics editor. ``
F6
  Compose the document (Primary file). ``
F7
  Generate references (makeindex, bibtex etc.). ``
F8
  Viewer ``
F9
  Print the document. ``
F11
  Utilities. ``
F12
  Filter (dvibook, latex2html, ...) ``
Alt-F5
  Show terminal window (back with `Alt-[Number]`). ``
Ctrl-F2...Ctrl-F12
  Select and configure the used command for the F# operations. ``
Alt-x
  Exit

-> Dialog keys
-> Keys for the internal editor
-> Start

# Dialog keys

`
Tab, Enter
`
  Next Field ``
Shift-Tab
  Previous Field ``
Ctrl-Enter
  OK ``
Escape
  Cancel the dialog ``
Alt-[Letter]
  Select the action with the underlined letter.

The file dialog will be finished with `Enter`, if you have selected a file.
If an extension is specified, it will be added to a specified filename without extension automatically.

-> Start

# Action settings

The `Ctrl-Function key` shows the Settings dialog for the specified action. You can add new functions with `Alt-i` or `Alt-a`, or edit defined functions with `Alt-e`:

Name
  Short name for the action.
Scope
  Executing scope of the program:
  `
  Foreground
  `
    Program runs in the terminal window. ``
  Background
    Program runs in background. ``
  xterm
    Program opens a new xterm and runs in background. ``
  intern
    Internal functions (only an internal editor yet).
Command
  Command line for program call. This options can include variable parameters for file names, printing options etc.
  If you want to use pipe, you have to call a shell for executing:
  Eg. showing the log file: `sh -c "cat %r.log | more"`

-> Variable parameters
-> Start

# Variable Parameters for Programs

There are two kinds of variable parameters.

% parameters are always used by TeXShell. !?...! includes an option which is used only if there is a valid value. There position of this variable value is marked with % sign.

`
%p
`
  Primary file (full file name). If it is not set, the previous edited file will be used. ``
%r
  Root name of the primary file. All characters after the last dot will be cutted. (e.g. `"xdvi %r.dvi"` or `"xdvi %r"`) ``
%e
  Edit file (Full name). A file selection dialog will be opened. Default extension is `.tex` and can changed in the file dialog. (eg. `"vi %e.tex"`) ``
%o
  Other file (root name). A file selection dialog will be opened. You must specify the extension. (e.g. `"xfig %o.fig"`) ``
%g
  Geometry for the `-geometry` option generated by TeXShell. ``
!i..%..!
  Option for line selection of the used editor. The position for the number is marked with %. ``
!0..%..!
  First page for printing. ``
!9..%..!
  Last page for printing. ``
!l...!
  Print driver option for landscape printing. ``
!o...!
  Option for printing odd pages. ``
!e...!
  Option for printing even pages.

-> Start

# Global Options

You can call the dialog for the global Options with the menu `Options|Settings ...`. All options will be saved when you press `Apply` or `Save & Exit`.

If there is chosed a Primary file, the Options will be saved in the file `<primary_file>.prj`, otherwise in the global option file `~/.ts/ts.cfg`. If you want to save these options as the default, choose the menu entry `Options|Save as default`.

`
Window position
`
  The dialog shows the actual position of the TS main window without decoration. You can change this value. After closing the dialog the window will moved to the new position. At the end of the program this value will be saved and used in future. ``
Edit options
  You can configure automatic line wrap, auto save, and the autosave interval.

-> Start

# Document Templates

You can create templates for often used document structures. These are TeX files with the extension `.tpl` and two special comment lines:

    %! Description of the template
    %! Cursor position line for editing (without these lines)
    Document template (line 1)
    ...

Save the templates in the global TeX directory or in `$HOME/.ts`. If you open a new primary file for editing, you get a dialog for selecting a template. After creating new templates, you must include them with the `Rescan` button.

-> Start

# Files

There are global and local configuration files. The directory of global files is specified in the Makefile and hard compiled in ts (Default: `/usr/local/lib/ts`). Local configuration files and templates are saved in `$HOME/.ts`.

## Global files

`
texshell.cfg
`
  Global configuration file. It is used, if you have not your own config file which is created after the first use.

  If you want to create a new one, make the wished configuration and overwrite the global config file with your own. ``

help/*.html
  Help files in HTML 2.0. Language selection is made during installation. there is no support for user dependent language yet. ``
templates/*.tpl
  Global template files. Every user of ts can select these patterns.

## Local files

`
ts.cfg
`
  User configuration file. If not changed, a copy of the global config file. ``
templates.idx
  Index of the templates file. It is created during the first program start. When you create new templates, you have to rebuild this file with the `Rescan` button of the template selection dialog. ``
*.tpl
  User specific template files. ``
includes.cfg
  Scan patterns for project included files. ``
apps.cfg
  Used editors for special files.

-> Start

# Project Management

By pressing `F4`, the project window is opened. The file `includes.cfg` contains the regular expressions for scanning the primary file.

The first char of a line indicates whether the founded fill should be scan recursively (1) or not (0), the second char is a space, the third char allows edit of the file (1) or not (0), following by a space, and the rest of the line is a regular expression for an included file. It's first group builds the command, the second the filename.

The scanning will be cutted after 10 recursions. You can select an existing file and open for editing. Create the non-existing files by calling the appropriate editor explicitly.

The used editor will by selected under control of `apps.cfg`.

-> Start