(Parte 1 de 12)

The Kile Handbook

Jonathan Pechta Federico Zenith

Holger Danielsson

Thomas Braun Michel Ludwig Felix Mauch

The Kile Handbook 2


1.1 Requirements1
1.2 Intended Audience1
2.1 Basic facts2
2.1.1 About Kile2
2.1.2 Kile and the Kate Editor Component2
2.1.3 What is LATEX?2
2.1.4 How do you pronounce it? Why that strange typesetting?2
2.2 LATEX 1013
2.3 Kile’s Main Features3
2.3.1 QuickStart Wizard3
2.3.2 Predefined Templates4
2.3.3 Syntax Highlighting4
2.3.4 Auto-Completion of Environments4
2.3.5 Jump to Structure Element5
2.3.6 Inverse Search5
2.3.7 Forward Search5
2.4 The Toolbar5
3.1 Writing a LATEX Document with Kile for Beginners9
3.2 Environments10
3.3 Using Kile10
3.4 DVI Files1
3.4.1 Viewing a DVI1
3.4.2 Printing a DVI1
3.4.3 Converting DVI files1
3.5 Forward Search between Kile and Okular1
3.6 Inverse Search between Kile and Okular1

The Kile Handbook

4.1 Templates13
4.1.1 Create a New Template13
4.1.2 Configuring Automatic Substitutions14
4.1.3 Create a Template from the Wizard14
4.1.4 Creating a Template from any File14
4.1.5 Removing a Template14

4 Starting a New Document 13

5.1 The LATEX Reference15
5.2 Cursor Movements15
5.3 Brackets16
5.4 Highlighting16
5.5 Bullets16
5.6 Select16
5.6.1 Select LATEX commands17
5.7 Delete18
5.8 Environment18
5.9 TEX Group19
5.10 Double Quotes20
5.1 Smart Newline20
5.12 Smart Tabulator21

5 Editing LATEX Documents 15

6.1 Automatic Environment Completion2
6.2 LATEX Commands2
6.3 Environments24
6.4 Abbreviations24
6.4.1 Abbreviations25
6.5 Autocompletion Modes25
6.5.1 LATEX Commands25
6.5.2 Document Words26
6.6 Writing Own Completion Files26

6 Code Completion 2

7.1 QuickStart Wizard27
7.2 Include Graphics27
7.3 Arrays and tabulars29
7.4 Inserting floating elements30
7.5 Inserting Math environments31
7.6 PostScript® Utilities31
7.7 Document Statistics35

The Kile Handbook

8.1 Using the LATEX Tag Library36
8.2 Using Bibitems38
8.3 User-Defined Tags39
8.3.1 Placeholders in User-Defined Tags40

8 Special Tags in LATEX 36

9.1 Compiling, converting and viewing41
9.1.1 BibTEX41
9.1.2 MetaPost and Asymptote41
9.1.3 PDFLATEX41
9.1.4 LATEX to Web42
9.1.5 Passing Command-Line Parameters42
9.2 Quick Preview42
9.2.1 Selection Mode43
9.2.2 Environment Mode43
9.2.3 Subdocument Mode4
9.2.4 Mathgroup Mode4
9.2.5 Quick Preview in Bottom Bar4
9.3 Graphic File Formats4
9.3.2 Graphics Conversion4
9.3.3 Use the right File for the right Graphic45
9.4 EPS Graphics45
9.4.1 LATEX and EPS Graphics46
9.4.2 The PostScript® Way of Kile46
9.4.3 The PostScript® Way and Bitmap Graphics46
9.4.4 PDFLATEX and EPS Graphics47
9.5 Master Document48
9.6 Error Handling48
9.7 The Watch File Mode49

9 The Build Tools 41

10.1 Using the Structure View50
10.1.1 Using the Context Menu50
10.1.2 Updating the Structure View52
10.2 Bookmarks52

10 Navigating the LATEX Source 50 5

The Kile Handbook

1.1 Working with Projects53
1.2 Creating a Project53
1.3 The Files and Projects View54
1.4 Adding and Removing Files54
1.4.1 Archiving your Project5
1.5 Project Options5
1.6 Closing a Project56
12.1 The ucs Package58
12.2 XeLaTeX58
12.3 CJK Support58
12.3.1 CJK Troubleshooting59
12.3.2 How do I input CJK in Unicode?60

12 Document Encoding 57

13.1 Scripting in Kile61
13.2 API Reference61
14.1 Help Documents63
14.2 Context Sensitive Help63
14.3 Searching for Keywords64
14.4 User Defined Help65

14 Help 63 15 Credits and License 68

Abstract Kile is a TEX and LATEX source editor and shell.

The Kile Handbook

Chapter 1 Preface

1.1 Requirements

To run Kile, you need to have the following components installed on your system:

• K Desktop environment (KDE): KDE is a popular open-source desktop environment. • Qt: Qt™ is a C++ GUI and network library needed to compile Kile.

• LATEX: high-quality document typesetting program. Most likely you want the TeX Live (or on older systems the teTEX) package, if you are on a Unix-like system.

Most of these items might be included in your Linux® distribution; please refer to your distribu- tion documentation, or refer to your installation CD or DVD, for adding these packages to your computer.

Kile might also be available as a pre-compiled package for your Linux® distribution already. Please check with the package manager of your distribution.

1.2 Intended Audience

This manual is intended for any individual, regardless of her or his experience with LATEX, KDE, Kile or Linux®.

Advanced users are not likely to read this manual, but all suggestions on documentation will be considered. If you would like to contribute to this project or the documentation, please consult the Kile web page.

Do you need answers about Kile? Are you stuck with the compilation process? Do you want to see a new feature implemented? The preferred way to ask technical questions or to start a discussion is to use our mailing list: kile-devel@lists.sourceforge.net.

The Kile Handbook

Chapter 2 Introduction

2.1 Basic facts

2.1.1 About Kile

Kile is an integrated LATEX environment for the KDE desktop. Kile gives you the ability to use all the functionalities of LATEX in a graphical interface, giving you easy, immediate, and customized access to all programs for LATEX code-completion, compiling, postprocessing, debugging, con- version and viewing tools; you also get very handy wizards, a LATEX reference and a powerful project management.

2.1.2 Kile and the Kate Editor Component

Kile is based on the Kate editor component, i.e. a lot of its editing capabilities stem from the Kate editor component itself. Kile extends these capabilities with features to edit LATEX documents. To learn more about the Kate editor component and its capabilities, see the Kate webpage.

2.1.3 What is LATEX?

LATEX is a text-processing system derived from TEX, a program developed originally in 1977 by Donald Knuth to help layout text in a professional way and obtain a layout quality that is on par with the work of a professional typesetter. LATEX was created by Leslie Lamport to give authors an automatic typesetter, especially to ease the expensive and painstaking process of typesetting of mathematical formulas and expressions, which are enclosed within dollar signs in LATEX for a reason. Today, word-processing programs let any user act as typesetter, but what is often needed is a document that simply looks good without having to spend hours to bring it into shape.

LATEX takes that burden on its shoulders, and lets you concentrate on the document instead of on the layout. And yes, it will look good!

2.1.4 How do you pronounce it? Why that strange typesetting?

There is a funny tradition of TEX-related packages to have the strangest pronunciation and typesetting possible. TEX was supposed to be brought in from the Greek τεχ, in Latin letters tech.

There are a lot of explanations why, but most likely it is because TEX was originally conceived for technical reports, and indeed its foremost ability was the correct and easy typesetting of mathe- matical formulae, then an extremely expensive, time-consuming and frustrating business.

The Kile Handbook

The pronunciation is supposed to be as follows: T as you would expect, E as in get, and X as in the German ich. If you do not know what ch sounds like, it is more or less like the sound a hissing cat produces; the IPA symbol is /ç/. Many people report a different pronunciation of ach (IPA symbol /x/), but according to some Greeks, the first version is indeed correct. You should be aware that a lot of people mispronounce TEX as /teks/ or /tek/.

Last, in LATEX the first LA is pronounced as lay: the idea being, while raw TEX is difficult, even a layman can use LATEX macros. A less inspiring, but more realistic explanation is that it stems from the surname of Leslie Lamport, the creator of LATEX. Now you know!

2.2 LATEX 101

The LATEX typesetting system is similar to other markup languages such as XML, which is used in many types of documents (including the one you are reading), or HTML, which is used for web pages. The general idea behind markup languages is to have special keywords, called tags, that tell a program (a word processor, a web browser, or the LATEX compiler) how to the text enclosed within the tags is to be interpreted. Kile offers a number of such tags in the LaTeX menu in the menu bar.

While we will try to give you a good idea of what LATEX is, this document is, of course, not

The Definitive Book on LATEX. If you want to learn LATEX in depth, you may want to borrow a specialized book from your local library.

(Parte 1 de 12)