Sie sind auf Seite 1von 31

TeXnicCenter v1 Beta 7.

01

Frank Van Puyvlde


ICT for Research
K.U.Leuven

March 2008
Contents

1 TeXnicCenter Installation 2
1.1 Installing TeXnicCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 TeXnicCenter and a new MiKTeX installation . . . . . . . . . . . . . . 3
1.3 TeXnicCenter and Acrobat pdf viewer . . . . . . . . . . . . . . . . . . 5

2 Using TeXnicCenter: the basics 6


2.1 Typing the source file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Compile the text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 TeXnicCenter: the buttons 11


3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1 File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.2 Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.3 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.4 View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.5 Insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.6 Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.7 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.8 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.9 Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.10 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2.11 Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.12 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

1
Chapter 1

TeXnicCenter Installation

1.1 Installing TeXnicCenter


Note: it is better to have MiKTeX installed prior before installing TeXnicCenter.

• Download TeXnicCenter Setup from the TeXnicCenter Downloads page (www.


toolscenter.org).

• Launch TXCSetup and walk through the installation. The defaults should be
fine, unless you have a specific desire to change them
install to C:\Program Files\TeXnicCenter, use Typical installation, put
the shortcuts in the TeXnicCenter Start Menu folder).

• Launch TeXnicCenter from Start > Programs.

• The Configuration Wizard opens. Click Next to continue. It is important


to point to the correct locations of the executables needed to compile your
LATEXdocuments.

• For the path to the Distribution Directory,


browse to C:\Program Files\ MiKTeX 2.x\miktex\bin\ (in case of
a standard MiKTex installation)and then click Next.

• At the Postscript Viewer screen, click Next.

• If prompted for a path to the PDF Viewer, browse to the location of your
PDF application, such as Adobe Reader. Click Next. Click Finish to complete
installation.

• When the installation completes, you’re done.

2
1.2. TEXNICCENTER AND A NEW MIKTEX INSTALLATION

1.2 TeXnicCenter and a new MiKTeX installation


After installing a new version of MiKTeX (and de-installing the old version), TeXnic-
Center might have problems in finding back the compiler, as shown in fig(1.1)

Figure 1.1: Problem finding the latex compiler

In order to update the link to MiKTeX, running the configuration wizard again will
help. Click Build on the menu bar and select output profiles fig(1.2)

Figure 1.2: Select the Output Profile option

Select the configuration wizard to start fig(1.3)


Locate the correct directory fig(1.4) and the wizard will update necessary informa-
tion.

3
1.2. TEXNICCENTER AND A NEW MIKTEX INSTALLATION

Figure 1.3: Select to start the configuration wizard

Figure 1.4: Locate the correct directory

4
1.3. TEXNICCENTER AND ACROBAT PDF VIEWER

1.3 TeXnicCenter and Acrobat pdf viewer


Check the settings for the pdf viewer, use the settings as shown in fig(1.5), then the
viewer will be closed and openend automatically by TeXnicCenter.

1. In the field View projects output enable the option DDE command, delete
whatever command there is in the next line and write there:
[DocOpen("%bm.pdf")][DocOpen("%bm.pdf")]

2. In the field Forward Search enable the option DDE command, delete what-
ever command there is in the next line and write there:
[DocOpen("%bm.pdf")][DocOpen("%bm.pdf")]

3. In the field Close document before running (La)TeX enable the option DDE
command, delet whatever command there is in the next line and write there:
[DocOpen("%bm.pdf")][DocOpen("%bm.pdf")][DocClose("%bm.pdf")]

Figure 1.5: Configuration for the acrobat viewer

This information was retrieved from


http://dikkie.net/2007/02/16/texniccenter-and-adobe-reader-80/

5
Chapter 2

Using TeXnicCenter: the basics

2.1 Typing the source file


1. start TeXnicCenter, the TeXnicCenter sreen will show up. fig(2.1)

Figure 2.1: Initial TeXnicCenter Screen

6
2.1. TYPING THE SOURCE FILE
2. Open a new file (either by clicking on the new file icon or selecting the option
from the menu (file entry). Once a blanc sheet appears, you can start typing
the source code.

Figure 2.2: Blanc Page

3. Type the LATEXsource code and save the file, an tex will be added automati-
cally.

7
2.1. TYPING THE SOURCE FILE

Figure 2.3: Type the source code

8
2.2. COMPILE THE TEXT
2.1.1 Tips
The right side of the lower toolbar is full of shortcut buttons for mathematics syn-
tax ( ).
The left side of the lower toolbar is full of shortcut buttons for changing font - bold-
face, italics, etc ...- ( ) and text alignment ( )

2.2 Compile the text


Once the text is completed, you can compile it, to view the output. Scroll the mouse
pointer over the buttons in the toolbars to get descriptions of their functions.

• In the toolbar directly below the TeXnicCenter menu bar, there are shortcut
buttons for building ( ) and viewing ( ) documents. There is a particu-
larly useful button ( ) that builds and displays your typeset document in
one step.

• The result of the compilation is shown in the output pane, check this pane, if
error or warning messages appear.

9
2.2. COMPILE THE TEXT

Figure 2.4: Compilation result

10
Chapter 3

TeXnicCenter: the buttons

3.1 Overview
Most of the functionalities is available in the different toolbars. The different but-
tons are grouped into categories (that can be changed. This page was inspired by
Académie Versailles (http://euler.ac-versailles.fr/)

1. Create a new document


Open an existing document
Save the current document
Save all open documents

2. Cut
Paste
Copy

3. Undo the last action


Redo the last action

4. Show navigation window (useful to get the structure of a project)


Show compile log file (errors, warnings, etc.)

5. show blancs
manage the windows of the edited files (save, close, minimize)

6. Choice of output profile (DVI, PS or PDF)

11
3.1. OVERVIEW
7. Compilation of the open documents
Compilation of the current document
Stop the compilation
Show the resulting output of the compiled document (the form will depend
on the choice made under the output profile: Yap (.dvi), GSview (.ps) or Ac-
robat reader (.pdf)

8. Go to the next error


Go to the previous error
Go to the next warning
Go to the previous warning
Go to the next bad box
Go to the previous bad box

9. LATEXenvironments
Structure (section, etc.)
Lists (environment itemize)
Numbered Lists (environment enumerate)
Figures (environment figure)
Tables (environment table/tabular)

10. Insert footnote

11. Mathematical environment (displaymath)


Multiple equations (eqnarray)

12. Toggle the math toolbar


mathematics, symbols, operators, etc. : each button shows a complete palette.

13. Search tools


Find, find next, find previous
Incremental search (forward and backward)
Replace
Go to the last change
Bookmarks (toggle, go to next, go to previous, remove all)
Find in files (next and previous result)

12
3.2. MENU BAR
14. Typeface commands (emphasized, bold, italic, etc.)
Alignment command (left, center, right)
15. Navigation bar (useful in case of working with a project)
16. Edit window
17. Output bar: provides information on the compilation (errors, warnings, etc.)

3.2 Menu bar

The different options on the menu bar are reviewed in order to grasp all the
possibilities. If you are familiar with windows software, most of the options
are straightforward, and are implemented the very same way as in other
windows software. Actions can be chosen from the drop-down menu’s,
icon or even better with short-cut key combinations

3.2.1 File

The file menu pro-


vides in actions
concerning open-
ing, closing, saving
files, etc. as we
are used to see in
regular windows
applications.

13
3.2. MENU BAR

14
3.2. MENU BAR
New
The New command opens a new empty file, this action can also be achieved by
clicking onto the New file icon

Open a new empty


file

New from template


Choosing this option allows to select from a list of pre-defined templates.
You can create your own templates for different types of documents. You can find,
and set, the directories where the templates are located using the Tools → Options
menu. (See further).

Open
The Open command opens an existing file, browse through the different directo-
ries to select the file.

Open an existing file

Save, Save As, Save All


The Save command saves an open file, browse through the different directories to
select a location for the file to save. The extension determining the file type can be
changed, etc. Save All saves all the open files in the editor

15
3.2. MENU BAR

Open an existing file

These file commands


are also repeated in
the toolbar

To project or Not to project


This information was retrieved from the TeXniccenter FAQ
(http://www.toolscenter.org/).
The project handling is especially useful for larger documents, which are distributed
over several files.
When writing a large document (book, report, etc.), the document will be split into
several files. The common approach is to have a main file specifying the document
class, packages, etc. The structure of the document is set with inclusion of the
different chapters (using input or include).
If you are working on one of the chapter files and you would like to create the
output, you will have to open the main file first and compile this one to get the
output. This is where TeXnicCenter’s project management comes in: when you
create a project, you specify its main file, which is the file that should be passed to
the LaTeX compiler to generate the output for the whole document. If you are now
working on a chapter file and you would like to generate output, you will only
have to choose the Build command and TeXnicCenter will start the compilation for
the main file, even if it isn’t opened in the editor at the moment.
There are some additional advantages when working with projects:

1. The navigator window (docked window at the left) will show the structure
of your document.

2. You can spell check all files of your project.

3. TeXnicCenter remembers which files are open and where the cursor is placed
for projects, each time you close a project. Next time, when you open it, the
state of the latest session will be restored.

Projects offer advantages, the only case where projects are unnecessary, are non-
structured documents, created from a single file.

16
3.2. MENU BAR
New project
When starting with a new project, TexnicCenter proposes a collection of templates
to choose from, or you can start from an empty project. Enter a name for your
project, and specify the directory where you want to save your work.

Open a new project.


Specify the name of
the project and the
location. Check the
options BibTeX and
MakeIndex if used

In this example the


project was called
latexexample. The
main file is latex-
example.tex (same
name as the project!).
If in the main file
the different chapters
are included, the
files to be written
already appear in
the tree view of the
navigator. If the file
is not yet created,
an interrogation
sign is visible on
the icon. Once the
file is created, the
interrogation sign
disappears.

Open Save Close project


With open project, another project can be opened. The other options save and close
speak for themselves.

17
3.2. MENU BAR
Recent
With the recent options, the recent files and projects that were edited, can be se-
lected. This provides a shortcut to recent files used, no need to retrieve the whole
path.

3.2.2 Edit
The Edit menu con-
tains the editing com-
mands that we are
used to find in reg-
ular windows appli-
cations. The easiest
way to use these fea-
tures is to remember
the shortcut.
These edit com-
mands are also
repeated in the
toolbar
undo ctrl-z
redo ctrl-y
cut ctrl-x
copy ctrl-c
paste ctrl-v
select all ctrl-a
select brace block ctrl-m select everything inside { }

Block comment
In the process of testing, it sometimes is necessary to restrict a part of the text, the
easiest way is to put a comment sign (%) in front of the lines of text. This is what
block comment can do for you. Instead of putting (or removing) a % in front of each
line, just select a block of text and select the option, to perform the action on the
whole selection. Toggling will put the comment on/off.

Complete word
The complete word option (ctrl + space) is very useful if you partially (the first
few letters of it!) remember the LATEXcommand. A list is presented with all possi-

18
3.2. MENU BAR
ble commands that start with the letters provided, a simple selection from the list
completes the word.

3.2.3 Search

The search menu pro-


vides in a number of
utilities for searching The easiest way
and replacing text in
the files edited.

to use these features is to remember the shortcut (corresponds with the shortcuts
found in other windows software).
find ctrl-f
find next F3
find previous shift-F3

19
3.2. MENU BAR
Find in files
TeXniccenter takes
the find function
even further, you can
search for a word or
sentence in a bunch
of files. Specify the
directory (with or
without inclusion
of subdirectories) to
search in.

The result of the


search can be di-
rected to the output
area 1 or 2. Clicking
on a search result will
open that specific file
on the specified line.

Incremental search
A very handy incremental search tool exists too. Incremental search is an inline,
progressive search that allows you to find matched text as you type. The key bind-
ings are part of the default window key binding. Select the key-binding first and
start typing the search string. The cursor will jump to the first occurrence. Pushing
the esc-button, will place the cursor back to its initial position.
find incremental up ctrl-i select ctrl-i first and start
typing the search string
find incremental down ctrl-shift-i

Bookmarks
Lines in open files can be bookmarked, just toggle the bookmark option. Remem-
ber the key binding to jump through the different bookmarks.

20
3.2. MENU BAR
toggle bookmark ctrl-F2
next bookmark F2
previous bookmark shift-F2
remove all bookmarks ctrl-shift-F2
It is also possible to explicitly enumerate the bookmarks (from 0 to 9) and jump to
these. These key-bindings are more difficult to remember.
These bookmark
commands are also
repeated in the
toolbar

3.2.4 View
The view option changes the appearance of the TeXniccenter editor. The navigator,
gives extra information, which is very useful when working in the project mode.
The output bar provides information windows displaying the results of build oper-
ations, find operations and parse operations.
It is possible to track white spaces, when the option display white spaces is on.
If multiple files are open in the editor, the position of the tabs can be changed, as
well as the appearance of the information on the tab.
The view option
changes the ap-
pearance of the
TeXniccenter editor.
These view com-
mands are also
repeated in the
toolbar

3.2.5 Insert
The insert option
provides a bunch
of LATEXfunctions
and constructions,
that can be readily
included in the text
being edited.
Here again, working with the shortcut keys can be helpful

21
3.2. MENU BAR
insert section ctrl-alt-s
insert footnote ctrl-alt-f
insert tabular ctrl-alt-t
insert graphics (picture) ctrl-alt-g
Each of these inserts, calls a gui, where you can select the specific LATEXconstruction.
For the section, you can choose from the different section commands possible
(part, chapter, section, subsection, etc.).

All the information


needed to insert a ta-
ble in the text is pro-
vided in the gui and
can be filled out as
such.

A similar GUI is provided for inserting a picture. The label is automatically filled
out with the name of the file, what is a nice feature.
These insert cat-
egories are also
repeated in the
toolbar
LATEXlist commands can also be inserted in the file, by choosing the right entry from
the menu; Or (faster) by a key combination.
enumerations
itemize (begin - end) ctrl-alt-z
enumerate (begin - end) ctrl-alt-n
description (begin - end) ctrl-alt-b
insert enumeration/itemize item ctrl-alt-e
insert description item ctrl-alt-l

22
3.2. MENU BAR
3.2.6 Math

A wealth of mathe-
matical symbols is
available in LATEX,
most of them are
displayed on the
menu, so you only
have to choose the
right symbol from
the list.

The most impor-


tant mathematical
symbols, are also
repeated in the
toolbar

3.2.7 Format
The format option
provides in op-
tions to change the
appearance of the
letters, choosing
some action will put
the corresponding
LTEXcommand into
A

the text.
Some of these format
commands are also
repeated in the tool-
bar

23
3.2. MENU BAR
3.2.8 Project

The options under the project entry in the menu bar are not that extensive. You
can look at the properties of a project. In this screen the option to use bibtex and
makeindex are provided. Checking these options will set the right code in the main
file of the project.

3.2.9 Build
This section is the most important one, since it concerns the building of the text to
its final format.

If you want to view result of the text, you need to compile the text. On detection of
MikTeX, TeXnicCenter automatically configures several output profiles. An output
profile specifies how the output file is to be produced. Different paths are possible:

• LATEX=⇒ DVI
• LATEX=⇒ PDF
• LATEX=⇒ PS

24
3.2. MENU BAR
• LATEX=⇒ PS =⇒ PDF

LATEX=⇒ DVI
This profile is commonly used during the edit-compile-debug cycle. The result
is shown in the Yap (Yet Another Previewer) previewer. Noteworthy is the re-
verse search (a very handy and underexploited) feature: double clicking in the Yap
window, moves to the corresponding point in the input file in the TeXnicCenter
window. Putting the cursor at a point in the edited file and hitting the DVI button
(F5) moves to the corresponding point in the DVI file.

LATEX=⇒ PDF
This profile uses PdfLaTeX to produce PDF files. Since PS is not an intermediate
format in this process, EPS figures must be converted to PDF format before inclu-
sion.

LATEX=⇒ PS
This profile is seldom used, since PS (postscript) output files are typically used for
printing. The LATEXcompiler is used to produce a dvi file, wich is transformed into
a PS-file in a postprocessing step. A PS-viewer needs to be installed in order to
view the result.

LATEX=⇒ PS =⇒ PDF
This profile uses Ghostscript to produce PDF files. This profile uses the LATEXcompiler
and the result is postprocessed afterwards: dvi to PS and from PS to PDF. This
profile is used when the figures are eps files (that cannot be treated in the PdfLatex
compiler).

25
3.2. MENU BAR
Build
The easiest way to build the output is by using the shortcut keys.
Build F7 when working on a project, the
project will be compiled
Build current file ctrl-F7 the current file must be compil-
able
Build and view output ctrl-F5
Build and view output current file ctrl-shift-F5
View output F5
Depending on the output profile chosen, the result will be shown in the chosen
format (DVI or PS or PDF)

Errors
A nice feature of the integrated environment is the easy tracking of errors and bad
boxes. To find the position of the error in the source file, click on the Next Error
button (F9) and correct the error in the file. The same goes for warnings (F10) and
bad boxes (F11).

Output profiles
You can define your own profiles and add them to the list of output profiles. This
can be very handy if you have some extra’s, you can add them yourself.

3.2.10 Tools

26
3.2. MENU BAR
Options
Different options
concerning the gen-
eral behavior of the
editor can be set
using the Options
window. General
issues concerning
the look and feel are
found in the General
tab. Features like
autosaving files can
be changed under
the File tab, etc.
Line numbers Line numbers can be very useful, especially during debugging. The
compiler output will reference errors, warnings to line numbers. If those line num-
bers are shown, the problem can be tracked down more easily. The option to show
line numbers is somewhat hidden in the option menu Text Format. Check the
option Show line numbers.

27
3.2. MENU BAR
Customize
Interesting (and more advanced) information can be collected at the Clemson Uni-
versity page (http://www.ces.clemson.edu/linux/latex.shtml) and the
pages of Prof. Schechter (Vanderbilt University) (http://www.math.vanderbilt.
edu/˜schectex/).

The customize option


goes deeper than the
options, here you can
personalize your edi-
tor.

General gives an overview of the different commands available in the different


menu’s. You can remove elements from the menu items by dragging them away
from the menu. If you want to add an item again, then open this menu, look for
the right entry and move it into the menu of your choice.
Toolbar gives an overview of the different symbol groups that can be placed on the
toolbar. Depending on your needs, you can add or delete certain groups. Check-
ing or unchecking the boxes will change which buttonbars are shown; New... will
create a new buttonbar. Buttons can be moved from one to another, or deleted by
dragging it away from the toolbars.
Keyboard allows you to change the shortcuts for the different commands available.
Tools leaves the option to incorporate other tools into the environment, as an ex-
ample the windows explorer is

3.2.11 Window

Options concerning
windows

The Window option, provides in layout options for the editing windows. You
can open the same file in another window, split a window (can be useful when
you want to keep on viewing a certain part of the file while editing another part),
browsing through the different windows, etc.

28
3.2. MENU BAR
3.2.12 Help

The F1-button provides context sensitive help. When a LATEXcommand is selected,


the help screen provides information on the command selected (if available). Push
the F1-button, without selecting a string, calls the help screen.

29
Index

autocompletion, 19

block comment, 18
bookmarks, 20
build (output), 24

edit shortcut, 18

file
New, 15
New from template, 15
Open, 15
Save, 15
find in files, 20
format, 23

incremental search, 20
insert LATEXcommands, 21

line numbers, 27

math, 23

project, 16

search shortcut, 19

view panes, 21

30

Das könnte Ihnen auch gefallen