From 3633ea2876a175c16b5421887ec2eac4b2eef263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 4 Jan 2022 18:02:23 +0100 Subject: Update CMake rules accorting to TDE style. Copy translations to a new directory layout. Move documentation to a new directory layout. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit bb9ea88afc543cba3c07805fc6491c517ec38f83) --- CMakeLists.txt | 83 + ConfigureChecks.cmake | 27 + config.h.cmake | 8 + doc/Makefile.am | 7 +- doc/TODO | 1 - doc/bullets.png | Bin 8975 -> 0 bytes doc/complete_cmd1.png | Bin 15613 -> 0 bytes doc/complete_cmd2.png | Bin 2974 -> 0 bytes doc/complete_env1.png | Bin 7702 -> 0 bytes doc/complete_env2.png | Bin 3743 -> 0 bytes doc/config-complete.png | Bin 46403 -> 0 bytes doc/config-dblquotes.png | Bin 26336 -> 0 bytes doc/config-encoding.png | Bin 83375 -> 0 bytes doc/config-quickpreview.png | Bin 47956 -> 0 bytes doc/config-userhelp.png | Bin 26609 -> 0 bytes doc/delete.png | Bin 19087 -> 0 bytes doc/dialog-addhelp.png | Bin 13112 -> 0 bytes doc/dialog-docbrowser1.png | Bin 40989 -> 0 bytes doc/dialog-docbrowser2.png | Bin 26841 -> 0 bytes doc/dialog-pstools.png | Bin 20391 -> 0 bytes doc/dialog-tabular.png | Bin 19155 -> 0 bytes doc/en/Makefile.am | 2 + doc/en/TODO | 1 + doc/en/bullets.png | Bin 0 -> 8975 bytes doc/en/complete_cmd1.png | Bin 0 -> 15613 bytes doc/en/complete_cmd2.png | Bin 0 -> 2974 bytes doc/en/complete_env1.png | Bin 0 -> 7702 bytes doc/en/complete_env2.png | Bin 0 -> 3743 bytes doc/en/config-complete.png | Bin 0 -> 46403 bytes doc/en/config-dblquotes.png | Bin 0 -> 26336 bytes doc/en/config-encoding.png | Bin 0 -> 83375 bytes doc/en/config-quickpreview.png | Bin 0 -> 47956 bytes doc/en/config-userhelp.png | Bin 0 -> 26609 bytes doc/en/delete.png | Bin 0 -> 19087 bytes doc/en/dialog-addhelp.png | Bin 0 -> 13112 bytes doc/en/dialog-docbrowser1.png | Bin 0 -> 40989 bytes doc/en/dialog-docbrowser2.png | Bin 0 -> 26841 bytes doc/en/dialog-pstools.png | Bin 0 -> 20391 bytes doc/en/dialog-tabular.png | Bin 0 -> 19155 bytes doc/en/environment.png | Bin 0 -> 12969 bytes doc/en/includegraphics.png | Bin 0 -> 34743 bytes doc/en/index.docbook | 3720 +++++++++ doc/en/latex_example.png | Bin 0 -> 4086 bytes doc/en/latexhelp.html | 3633 +++++++++ doc/en/psutils1.png | Bin 0 -> 1080 bytes doc/en/psutils15.png | Bin 0 -> 1613 bytes doc/en/psutils16.png | Bin 0 -> 1607 bytes doc/en/psutils2.png | Bin 0 -> 1086 bytes doc/en/psutils3.png | Bin 0 -> 1638 bytes doc/en/psutils5.png | Bin 0 -> 3342 bytes doc/en/psutils6.png | Bin 0 -> 1275 bytes doc/en/psutils7.png | Bin 0 -> 1308 bytes doc/en/psutils8.png | Bin 0 -> 1947 bytes doc/en/quickpreview.png | Bin 0 -> 72586 bytes doc/en/select.png | Bin 0 -> 18516 bytes doc/en/snap_autocomplete.png | Bin 0 -> 5402 bytes doc/en/snap_compile_error.png | Bin 0 -> 26770 bytes doc/en/snap_editusertag.png | Bin 0 -> 12314 bytes doc/en/snap_encoding.png | Bin 0 -> 5622 bytes doc/en/snap_kdvi_settings.png | Bin 0 -> 23369 bytes doc/en/snap_projectview.png | Bin 0 -> 35220 bytes doc/en/snap_projectview_add.png | Bin 0 -> 27265 bytes doc/en/snap_ref_choose.png | Bin 0 -> 22550 bytes doc/en/snap_ref_select.png | Bin 0 -> 7728 bytes doc/en/snap_sidebarmenu.png | Bin 0 -> 34982 bytes doc/en/snap_structview_label.png | Bin 0 -> 46714 bytes doc/en/snap_usertag.png | Bin 0 -> 35026 bytes doc/en/texgroup.png | Bin 0 -> 10299 bytes doc/environment.png | Bin 12969 -> 0 bytes doc/includegraphics.png | Bin 34743 -> 0 bytes doc/index.docbook | 3720 --------- doc/latex_example.png | Bin 4086 -> 0 bytes doc/latexhelp.html | 3633 --------- doc/psutils1.png | Bin 1080 -> 0 bytes doc/psutils15.png | Bin 1613 -> 0 bytes doc/psutils16.png | Bin 1607 -> 0 bytes doc/psutils2.png | Bin 1086 -> 0 bytes doc/psutils3.png | Bin 1638 -> 0 bytes doc/psutils5.png | Bin 3342 -> 0 bytes doc/psutils6.png | Bin 1275 -> 0 bytes doc/psutils7.png | Bin 1308 -> 0 bytes doc/psutils8.png | Bin 1947 -> 0 bytes doc/quickpreview.png | Bin 72586 -> 0 bytes doc/select.png | Bin 18516 -> 0 bytes doc/snap_autocomplete.png | Bin 5402 -> 0 bytes doc/snap_compile_error.png | Bin 26770 -> 0 bytes doc/snap_editusertag.png | Bin 12314 -> 0 bytes doc/snap_encoding.png | Bin 5622 -> 0 bytes doc/snap_kdvi_settings.png | Bin 23369 -> 0 bytes doc/snap_projectview.png | Bin 35220 -> 0 bytes doc/snap_projectview_add.png | Bin 27265 -> 0 bytes doc/snap_ref_choose.png | Bin 22550 -> 0 bytes doc/snap_ref_select.png | Bin 7728 -> 0 bytes doc/snap_sidebarmenu.png | Bin 34982 -> 0 bytes doc/snap_structview_label.png | Bin 46714 -> 0 bytes doc/snap_usertag.png | Bin 35026 -> 0 bytes doc/texgroup.png | Bin 10299 -> 0 bytes src/CMakeLists.txt | 149 +- src/dist/build_tarball.sh | 2 - src/dist/createPackage.sh | 874 --- src/dist/quick_tarball.sh | 2 - src/kile/CMakeL10n.txt | 2 +- src/kile/CMakeLists.txt | 297 +- src/kile/complete/CMakeLists.txt | 17 +- src/kile/complete/abbreviation/CMakeLists.txt | 7 - src/kile/complete/dictionary/CMakeLists.txt | 4 - src/kile/complete/tex/CMakeLists.txt | 109 - src/kile/encodings/CMakeLists.txt | 8 +- src/kile/help/CMakeLists.txt | 8 +- src/kile/icons/CMakeLists.txt | 11 +- src/kile/icons/actions/CMakeLists.txt | 9 +- src/kile/pics/CMakeLists.txt | 8 +- src/kile/symbols/CMakeLists.txt | 70 +- src/kile/symbols/arrows/CMakeLists.txt | 77 - src/kile/symbols/cyrillic/CMakeLists.txt | 164 - src/kile/symbols/delimiters/CMakeLists.txt | 44 - src/kile/symbols/greek/CMakeLists.txt | 72 - src/kile/symbols/misc-math/CMakeLists.txt | 105 - src/kile/symbols/misc-text/CMakeLists.txt | 142 - src/kile/symbols/operators/CMakeLists.txt | 120 - src/kile/symbols/relation/CMakeLists.txt | 159 - src/kile/symbols/special/CMakeLists.txt | 185 - src/kile/syntax/CMakeLists.txt | 8 +- src/kile/templates/CMakeLists.txt | 8 +- src/kile/test/CMakeLists.txt | 20 +- src/patches/.gitignore | 0 translations/Makefile.am | 2 +- translations/messages/Makefile.am | 1 + translations/messages/ar.po | 7340 ++++++++++++++++++ translations/messages/bg.po | 8044 ++++++++++++++++++++ translations/messages/br.po | 7599 +++++++++++++++++++ translations/messages/ca.po | 8359 +++++++++++++++++++++ translations/messages/cs.po | 7894 ++++++++++++++++++++ translations/messages/cy.po | 7608 +++++++++++++++++++ translations/messages/da.po | 8050 ++++++++++++++++++++ translations/messages/de.po | 8145 ++++++++++++++++++++ translations/messages/el.po | 8259 ++++++++++++++++++++ translations/messages/en_GB.po | 8269 ++++++++++++++++++++ translations/messages/es.po | 8180 ++++++++++++++++++++ translations/messages/et.po | 8004 ++++++++++++++++++++ translations/messages/eu.po | 8635 +++++++++++++++++++++ translations/messages/fi.po | 8585 +++++++++++++++++++++ translations/messages/fr.po | 8425 +++++++++++++++++++++ translations/messages/ga.po | 7699 +++++++++++++++++++ translations/messages/gl.po | 8268 ++++++++++++++++++++ translations/messages/hi.po | 8036 ++++++++++++++++++++ translations/messages/hu.po | 9648 ++++++++++++++++++++++++ translations/messages/is.po | 7282 ++++++++++++++++++ translations/messages/it.po | 9924 +++++++++++++++++++++++++ translations/messages/ja.po | 7957 ++++++++++++++++++++ translations/messages/kile.pot | 7287 ++++++++++++++++++ translations/messages/lt.po | 7546 +++++++++++++++++++ translations/messages/ms.po | 8227 ++++++++++++++++++++ translations/messages/mt.po | 7620 +++++++++++++++++++ translations/messages/nb.po | 8089 ++++++++++++++++++++ translations/messages/nds.po | 8383 +++++++++++++++++++++ translations/messages/nl.po | 8141 ++++++++++++++++++++ translations/messages/nn.po | 8368 +++++++++++++++++++++ translations/messages/pa.po | 7514 +++++++++++++++++++ translations/messages/pl.po | 8579 +++++++++++++++++++++ translations/messages/pt.po | 8163 ++++++++++++++++++++ translations/messages/pt_BR.po | 8306 +++++++++++++++++++++ translations/messages/ro.po | 7398 ++++++++++++++++++ translations/messages/ru.po | 7791 +++++++++++++++++++ translations/messages/rw.po | 9212 +++++++++++++++++++++++ translations/messages/sk.po | 8608 +++++++++++++++++++++ translations/messages/sr.po | 8083 ++++++++++++++++++++ translations/messages/sr@Latn.po | 8481 +++++++++++++++++++++ translations/messages/sv.po | 8049 ++++++++++++++++++++ translations/messages/ta.po | 8378 +++++++++++++++++++++ translations/messages/th.po | 7609 +++++++++++++++++++ translations/messages/tr.po | 8075 ++++++++++++++++++++ translations/messages/uk.po | 8060 ++++++++++++++++++++ translations/messages/zh_CN.po | 8055 ++++++++++++++++++++ 174 files changed, 381975 insertions(+), 9776 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake create mode 100644 config.h.cmake delete mode 100644 doc/TODO delete mode 100644 doc/bullets.png delete mode 100644 doc/complete_cmd1.png delete mode 100644 doc/complete_cmd2.png delete mode 100644 doc/complete_env1.png delete mode 100644 doc/complete_env2.png delete mode 100644 doc/config-complete.png delete mode 100644 doc/config-dblquotes.png delete mode 100644 doc/config-encoding.png delete mode 100644 doc/config-quickpreview.png delete mode 100644 doc/config-userhelp.png delete mode 100644 doc/delete.png delete mode 100644 doc/dialog-addhelp.png delete mode 100644 doc/dialog-docbrowser1.png delete mode 100644 doc/dialog-docbrowser2.png delete mode 100644 doc/dialog-pstools.png delete mode 100644 doc/dialog-tabular.png create mode 100644 doc/en/Makefile.am create mode 100644 doc/en/TODO create mode 100644 doc/en/bullets.png create mode 100644 doc/en/complete_cmd1.png create mode 100644 doc/en/complete_cmd2.png create mode 100644 doc/en/complete_env1.png create mode 100644 doc/en/complete_env2.png create mode 100644 doc/en/config-complete.png create mode 100644 doc/en/config-dblquotes.png create mode 100644 doc/en/config-encoding.png create mode 100644 doc/en/config-quickpreview.png create mode 100644 doc/en/config-userhelp.png create mode 100644 doc/en/delete.png create mode 100644 doc/en/dialog-addhelp.png create mode 100644 doc/en/dialog-docbrowser1.png create mode 100644 doc/en/dialog-docbrowser2.png create mode 100644 doc/en/dialog-pstools.png create mode 100644 doc/en/dialog-tabular.png create mode 100644 doc/en/environment.png create mode 100644 doc/en/includegraphics.png create mode 100644 doc/en/index.docbook create mode 100644 doc/en/latex_example.png create mode 100644 doc/en/latexhelp.html create mode 100644 doc/en/psutils1.png create mode 100644 doc/en/psutils15.png create mode 100644 doc/en/psutils16.png create mode 100644 doc/en/psutils2.png create mode 100644 doc/en/psutils3.png create mode 100644 doc/en/psutils5.png create mode 100644 doc/en/psutils6.png create mode 100644 doc/en/psutils7.png create mode 100644 doc/en/psutils8.png create mode 100644 doc/en/quickpreview.png create mode 100644 doc/en/select.png create mode 100644 doc/en/snap_autocomplete.png create mode 100644 doc/en/snap_compile_error.png create mode 100644 doc/en/snap_editusertag.png create mode 100644 doc/en/snap_encoding.png create mode 100644 doc/en/snap_kdvi_settings.png create mode 100644 doc/en/snap_projectview.png create mode 100644 doc/en/snap_projectview_add.png create mode 100644 doc/en/snap_ref_choose.png create mode 100644 doc/en/snap_ref_select.png create mode 100644 doc/en/snap_sidebarmenu.png create mode 100644 doc/en/snap_structview_label.png create mode 100644 doc/en/snap_usertag.png create mode 100644 doc/en/texgroup.png delete mode 100644 doc/environment.png delete mode 100644 doc/includegraphics.png delete mode 100644 doc/index.docbook delete mode 100644 doc/latex_example.png delete mode 100644 doc/latexhelp.html delete mode 100644 doc/psutils1.png delete mode 100644 doc/psutils15.png delete mode 100644 doc/psutils16.png delete mode 100644 doc/psutils2.png delete mode 100644 doc/psutils3.png delete mode 100644 doc/psutils5.png delete mode 100644 doc/psutils6.png delete mode 100644 doc/psutils7.png delete mode 100644 doc/psutils8.png delete mode 100644 doc/quickpreview.png delete mode 100644 doc/select.png delete mode 100644 doc/snap_autocomplete.png delete mode 100644 doc/snap_compile_error.png delete mode 100644 doc/snap_editusertag.png delete mode 100644 doc/snap_encoding.png delete mode 100644 doc/snap_kdvi_settings.png delete mode 100644 doc/snap_projectview.png delete mode 100644 doc/snap_projectview_add.png delete mode 100644 doc/snap_ref_choose.png delete mode 100644 doc/snap_ref_select.png delete mode 100644 doc/snap_sidebarmenu.png delete mode 100644 doc/snap_structview_label.png delete mode 100644 doc/snap_usertag.png delete mode 100644 doc/texgroup.png delete mode 100755 src/dist/build_tarball.sh delete mode 100755 src/dist/createPackage.sh delete mode 100755 src/dist/quick_tarball.sh delete mode 100644 src/kile/complete/abbreviation/CMakeLists.txt delete mode 100644 src/kile/complete/dictionary/CMakeLists.txt delete mode 100644 src/kile/complete/tex/CMakeLists.txt delete mode 100644 src/kile/symbols/arrows/CMakeLists.txt delete mode 100644 src/kile/symbols/cyrillic/CMakeLists.txt delete mode 100644 src/kile/symbols/delimiters/CMakeLists.txt delete mode 100644 src/kile/symbols/greek/CMakeLists.txt delete mode 100644 src/kile/symbols/misc-math/CMakeLists.txt delete mode 100644 src/kile/symbols/misc-text/CMakeLists.txt delete mode 100644 src/kile/symbols/operators/CMakeLists.txt delete mode 100644 src/kile/symbols/relation/CMakeLists.txt delete mode 100644 src/kile/symbols/special/CMakeLists.txt delete mode 100644 src/patches/.gitignore create mode 100644 translations/messages/Makefile.am create mode 100644 translations/messages/ar.po create mode 100644 translations/messages/bg.po create mode 100644 translations/messages/br.po create mode 100644 translations/messages/ca.po create mode 100644 translations/messages/cs.po create mode 100644 translations/messages/cy.po create mode 100644 translations/messages/da.po create mode 100644 translations/messages/de.po create mode 100644 translations/messages/el.po create mode 100644 translations/messages/en_GB.po create mode 100644 translations/messages/es.po create mode 100644 translations/messages/et.po create mode 100644 translations/messages/eu.po create mode 100644 translations/messages/fi.po create mode 100644 translations/messages/fr.po create mode 100644 translations/messages/ga.po create mode 100644 translations/messages/gl.po create mode 100644 translations/messages/hi.po create mode 100644 translations/messages/hu.po create mode 100644 translations/messages/is.po create mode 100644 translations/messages/it.po create mode 100644 translations/messages/ja.po create mode 100644 translations/messages/kile.pot create mode 100644 translations/messages/lt.po create mode 100644 translations/messages/ms.po create mode 100644 translations/messages/mt.po create mode 100644 translations/messages/nb.po create mode 100644 translations/messages/nds.po create mode 100644 translations/messages/nl.po create mode 100644 translations/messages/nn.po create mode 100644 translations/messages/pa.po create mode 100644 translations/messages/pl.po create mode 100644 translations/messages/pt.po create mode 100644 translations/messages/pt_BR.po create mode 100644 translations/messages/ro.po create mode 100644 translations/messages/ru.po create mode 100644 translations/messages/rw.po create mode 100644 translations/messages/sk.po create mode 100644 translations/messages/sr.po create mode 100644 translations/messages/sr@Latn.po create mode 100644 translations/messages/sv.po create mode 100644 translations/messages/ta.po create mode 100644 translations/messages/th.po create mode 100644 translations/messages/tr.po create mode 100644 translations/messages/uk.po create mode 100644 translations/messages/zh_CN.po diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..aed0140 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,83 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 3.1 ) + + +#### general package setup + +project( kile ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPerl ) +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( src ) + + +##### other data ################################ + +tde_conditional_add_project_docs( BUILD_DOC ) +tde_conditional_add_project_translations( BUILD_TRANSLATIONS ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..116924c --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,27 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + +find_package( TQt ) +find_package( TDE ) + + +##### check for gcc visibility support ######### + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/doc/Makefile.am b/doc/Makefile.am index 6fed977..e946108 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,2 +1,7 @@ +# the SUBDIRS is filled automatically by am_edit. If files are +# in this directory they are installed into the english dir + KDE_LANG = en -KDE_DOCS = kile +KDE_DOCS = AUTO +SUBDIRS = $(AUTODIRS) + diff --git a/doc/TODO b/doc/TODO deleted file mode 100644 index dc5cba3..0000000 --- a/doc/TODO +++ /dev/null @@ -1 +0,0 @@ -- add section on how to use character encodings in Kile diff --git a/doc/bullets.png b/doc/bullets.png deleted file mode 100644 index 8d25b45..0000000 Binary files a/doc/bullets.png and /dev/null differ diff --git a/doc/complete_cmd1.png b/doc/complete_cmd1.png deleted file mode 100644 index 5c9509b..0000000 Binary files a/doc/complete_cmd1.png and /dev/null differ diff --git a/doc/complete_cmd2.png b/doc/complete_cmd2.png deleted file mode 100644 index c8b54cc..0000000 Binary files a/doc/complete_cmd2.png and /dev/null differ diff --git a/doc/complete_env1.png b/doc/complete_env1.png deleted file mode 100644 index 6a5c3c2..0000000 Binary files a/doc/complete_env1.png and /dev/null differ diff --git a/doc/complete_env2.png b/doc/complete_env2.png deleted file mode 100644 index 493807c..0000000 Binary files a/doc/complete_env2.png and /dev/null differ diff --git a/doc/config-complete.png b/doc/config-complete.png deleted file mode 100644 index 5305c36..0000000 Binary files a/doc/config-complete.png and /dev/null differ diff --git a/doc/config-dblquotes.png b/doc/config-dblquotes.png deleted file mode 100644 index 117138d..0000000 Binary files a/doc/config-dblquotes.png and /dev/null differ diff --git a/doc/config-encoding.png b/doc/config-encoding.png deleted file mode 100644 index 26aa22c..0000000 Binary files a/doc/config-encoding.png and /dev/null differ diff --git a/doc/config-quickpreview.png b/doc/config-quickpreview.png deleted file mode 100644 index e16987f..0000000 Binary files a/doc/config-quickpreview.png and /dev/null differ diff --git a/doc/config-userhelp.png b/doc/config-userhelp.png deleted file mode 100644 index a39e6c1..0000000 Binary files a/doc/config-userhelp.png and /dev/null differ diff --git a/doc/delete.png b/doc/delete.png deleted file mode 100644 index eaa2e57..0000000 Binary files a/doc/delete.png and /dev/null differ diff --git a/doc/dialog-addhelp.png b/doc/dialog-addhelp.png deleted file mode 100644 index f0053a3..0000000 Binary files a/doc/dialog-addhelp.png and /dev/null differ diff --git a/doc/dialog-docbrowser1.png b/doc/dialog-docbrowser1.png deleted file mode 100644 index 3093c25..0000000 Binary files a/doc/dialog-docbrowser1.png and /dev/null differ diff --git a/doc/dialog-docbrowser2.png b/doc/dialog-docbrowser2.png deleted file mode 100644 index 88c327c..0000000 Binary files a/doc/dialog-docbrowser2.png and /dev/null differ diff --git a/doc/dialog-pstools.png b/doc/dialog-pstools.png deleted file mode 100644 index 0dead3c..0000000 Binary files a/doc/dialog-pstools.png and /dev/null differ diff --git a/doc/dialog-tabular.png b/doc/dialog-tabular.png deleted file mode 100644 index fd60334..0000000 Binary files a/doc/dialog-tabular.png and /dev/null differ diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am new file mode 100644 index 0000000..6fed977 --- /dev/null +++ b/doc/en/Makefile.am @@ -0,0 +1,2 @@ +KDE_LANG = en +KDE_DOCS = kile diff --git a/doc/en/TODO b/doc/en/TODO new file mode 100644 index 0000000..dc5cba3 --- /dev/null +++ b/doc/en/TODO @@ -0,0 +1 @@ +- add section on how to use character encodings in Kile diff --git a/doc/en/bullets.png b/doc/en/bullets.png new file mode 100644 index 0000000..8d25b45 Binary files /dev/null and b/doc/en/bullets.png differ diff --git a/doc/en/complete_cmd1.png b/doc/en/complete_cmd1.png new file mode 100644 index 0000000..5c9509b Binary files /dev/null and b/doc/en/complete_cmd1.png differ diff --git a/doc/en/complete_cmd2.png b/doc/en/complete_cmd2.png new file mode 100644 index 0000000..c8b54cc Binary files /dev/null and b/doc/en/complete_cmd2.png differ diff --git a/doc/en/complete_env1.png b/doc/en/complete_env1.png new file mode 100644 index 0000000..6a5c3c2 Binary files /dev/null and b/doc/en/complete_env1.png differ diff --git a/doc/en/complete_env2.png b/doc/en/complete_env2.png new file mode 100644 index 0000000..493807c Binary files /dev/null and b/doc/en/complete_env2.png differ diff --git a/doc/en/config-complete.png b/doc/en/config-complete.png new file mode 100644 index 0000000..5305c36 Binary files /dev/null and b/doc/en/config-complete.png differ diff --git a/doc/en/config-dblquotes.png b/doc/en/config-dblquotes.png new file mode 100644 index 0000000..117138d Binary files /dev/null and b/doc/en/config-dblquotes.png differ diff --git a/doc/en/config-encoding.png b/doc/en/config-encoding.png new file mode 100644 index 0000000..26aa22c Binary files /dev/null and b/doc/en/config-encoding.png differ diff --git a/doc/en/config-quickpreview.png b/doc/en/config-quickpreview.png new file mode 100644 index 0000000..e16987f Binary files /dev/null and b/doc/en/config-quickpreview.png differ diff --git a/doc/en/config-userhelp.png b/doc/en/config-userhelp.png new file mode 100644 index 0000000..a39e6c1 Binary files /dev/null and b/doc/en/config-userhelp.png differ diff --git a/doc/en/delete.png b/doc/en/delete.png new file mode 100644 index 0000000..eaa2e57 Binary files /dev/null and b/doc/en/delete.png differ diff --git a/doc/en/dialog-addhelp.png b/doc/en/dialog-addhelp.png new file mode 100644 index 0000000..f0053a3 Binary files /dev/null and b/doc/en/dialog-addhelp.png differ diff --git a/doc/en/dialog-docbrowser1.png b/doc/en/dialog-docbrowser1.png new file mode 100644 index 0000000..3093c25 Binary files /dev/null and b/doc/en/dialog-docbrowser1.png differ diff --git a/doc/en/dialog-docbrowser2.png b/doc/en/dialog-docbrowser2.png new file mode 100644 index 0000000..88c327c Binary files /dev/null and b/doc/en/dialog-docbrowser2.png differ diff --git a/doc/en/dialog-pstools.png b/doc/en/dialog-pstools.png new file mode 100644 index 0000000..0dead3c Binary files /dev/null and b/doc/en/dialog-pstools.png differ diff --git a/doc/en/dialog-tabular.png b/doc/en/dialog-tabular.png new file mode 100644 index 0000000..fd60334 Binary files /dev/null and b/doc/en/dialog-tabular.png differ diff --git a/doc/en/environment.png b/doc/en/environment.png new file mode 100644 index 0000000..1bb57fb Binary files /dev/null and b/doc/en/environment.png differ diff --git a/doc/en/includegraphics.png b/doc/en/includegraphics.png new file mode 100644 index 0000000..ccf9caf Binary files /dev/null and b/doc/en/includegraphics.png differ diff --git a/doc/en/index.docbook b/doc/en/index.docbook new file mode 100644 index 0000000..5ec2f64 --- /dev/null +++ b/doc/en/index.docbook @@ -0,0 +1,3720 @@ + +Kile"> + ATEX"> + ATEX"> + EX"> + teTEX"> + TeX Live"> + EX"> + + EX"> + + + ImageMagick"> + KDE"> + KDVI"> + dvipng"> + KGhostView"> + KPDF"> + PostScript"> + makeidx"> + Kate"> + CJK"> + ucs"> + URL"> + + + + +]> + + + + +The &kile; Handbook + + + JonathanPechta + FedericoZenith +
zenith@chemeng.ntnu.no
+ HolgerDanielsson +
holger.danielsson@versanet.de
+ ThomasBraun + MichelLudwig +
michel.ludwig@kdemail.net
+
+ + + + +2003 +Jonathan Pechta + + + +200320052006 +Federico Zenith + + + +20052006 +Holger Danielsson + + + +2007 +Thomas Braun + + + +2007 +Michel Ludwig + + +November 19, 2007 +2.0 + + +&FDLNotice; + + + + +&kile; is a &tex; and &latex; source editor and shell. + + + + +KDE +kdenonbeta +Kile +LaTeX +TeX + + +
+ + + +Preface + + + + Requirements + + To Run &kile;, you will be required to have the following components + installed on your system: + + + Trinity Desktop environment (&tde;): + &tde; 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 &texlive; (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 + distribution documentation, or refer to your installation CD or DVD, for adding these + packages to your computer. + + The &kile; project includes several binary packages of &kile; for different distributions that can be easily + installed and run without having to compile; check out the &kile; + homepage. + + + + + + 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. + + Need answers about &kile;? Are you stuck with your compile? Want to see a new + feature? The preferred way to ask technical questions or start a discussion is to + use our mailing list: kile-devel@lists.sourceforge.net. + + + + + + + + Introduction + + + + Basic facts + + + + 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; codecompletion, compiling, postprocessing, + debugging, conversion and viewing tools; you also get very handy wizards, a &latex; + reference and a powerful project management. + + + + + + What is &latex; + + &latex; is a text-processing system derived from &tex;, a program developed originally in + 1977 by Donald Knuth to help him layout his work professionally, obtaining a work similar + to a typesetter's; the typesetter is the professional that styles a document's look according to + specifications for the type of document. + &latex; was created by Leslie Lamport to give authors an automatic typesetter, especially when + it came to the expensive and painstaking typesetting of mathematical formulas and expressions, + that by no chance are enclosed in dollar signs in &latex;. + Today, word-processing programs let any user be the typesetter; but what you often want + is a document that looks good, not one that you spent hours on to make it look good. + &latex; takes that burden, and lets you think of the document, not of the layout. And yes, + it will look good! + + + + + + How do you pronounce it? Why that strange typesetting? + + There is a funny traditions 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 mathematical formulae, then an extremely expensive, time-consuming and + frustrating business. + 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 as an hissing cat; the IPA symbol is /ç/. Many people report the different pronunciation + of ach (IPA symbol /x/), but I have personally asked some Greeks, and can + confirm the first version. You should be aware that a lot of people mispronounce /teks/ or /tek/. + Last, in &latex; the first LA is pronounced as + lay: the idea is that, 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! + + + + + + + + &latex; 101 + + The &latex; typesetting system is similar to other markup languages as XML, used for + many types of documents (including the one you are reading), or HTML, used for web + pages. The general idea is about having specially wrapped keywords, called + tags, that tell a program (a word processor, a web browser, or the &latex; + compiler) how to present text. &kile; offers you a good number of such tags in the + menu LaTeX in the menu bar. + + While we will try to give you a good idea of what &latex; is, this is not The Definitive + Book on &latex;. If you want to learn &latex; well, you may want to loan a book in your + library. The writer has had a good experience with A Guide to &latex; by H. Kopka + and P. W. Daly, and still keeps it on the shelf. + + As other markup languages, &latex; contains a preamble, which + sets global commands, such as paper size, page numbering, dimensions of the text on the page, + and a body, that contains the document text; the preamble contains + at least the \documentclass command, and precedes the body, that + starts with the command \begin{document}, and is quite predictably + concluded by the command \end{document}. + + + + + + &kile;'s Main Features + + + + QuickStart Wizard + + The QuickStart wizard built into &kile; is a useful feature to quickly start creating documents + in &kile;. Choosing the wizard from the menubar gives you several choices + for the creation of your document. + You can also specify some options related to the document right away. + + Class options: + + + Document Class: choose the type of document you want to create: + article, book, letter, report, scrartcl, scrreprt, scrbook, prosper, beamer or other + custom-defined. + Typeface Size: tell &kile; what point size (pt) + you want to use. + Paper Size: choose the size or style of sheets. + Encoding: In general it is a good idea to use your systems standard + encoding. Modern systems now move more and more to UTF-8 as the standard encoding. + If you can, use utf8x (which is indeed the correct spelling for &latex; documents). + + Other options: this allows you to set further options such as printing, + draft, and others. + + + Packages + This lists some of the most common additional packages used in &latex;. Select the checkbox to include it. + + Document Properties + + Author: put your name here. + Title: add the document title here. + Date: specify the date. + + + + + + + Predefined Templates + + The predefined templates in &kile; are: + + + Empty document: real freaks start from scratch! + Article: sets the article format, for a document short enough not to + be broken down to chapters. + Report: sets the report format, for a middle-sized document, with for + example page numbering on the page's outer edge. + Book: sets the book format, a full-fledged flavor, so powerful that + it is used to write many university textbooks. + Letter: sets the letter format, that can automatically do those nasty + indentations that nobody really remembers. + Beamer,HA-Prosper: create nice presentations in PDF with a superior look and all + &latex; power. + Scrartcl,Scrbook,Scrreprt,Scrlttr2: the KOMA-Script document classes, + especially adapted to german typography. Use them whenever you write german + texts. + + + New users need not to worry, this list is just a brief description of features, + and more attention will be paid to complete these tasks in detail later in + . + + + + + + Syntax Highlighting + + &kile; is similar to programs that deal with source code and editing, and will + automatically highlight commands, options and items that are used (and abused). + &kile; makes it possible to spot easily problem areas: for example, if you see major + areas of text turned green, it is likely that you forgot closing a math environment somewhere; + you would have noticed anyway by how crappy the output file would have looked, but + highlighting really saves you time and frustration. + + + + + + Auto-Completion of Environments + + The auto-completion of environments means that, when you begin a new environment by typing + \begin{environment}, &kile; will automatically insert a matching + \end{environment} command, with a line in between them + for your text. You can of course deactivate it if you want in + SettingsConfigure Kile... + LaTeXEnvironments. + + + + + + Jump to Structure Element + + All documents are normally structured in a hierarchy of some type. + &latex; allows you to break up documents into the following hierarchy + (part being highest in the hierarchy, and subparagraph being lowest): + + + \part + \chapter + \section + \subsection + \subsubsection + \paragraph + \subparagraph + + + When viewing a document in the Structure view, you can jump + between elements by clicking on the element you would like to view. + + + + + + Inverse Search + + When creating your own &latex; files, inverse search can be very helpful. Once you + have created a DVI file (DeVice Independent File), you can click the middle- + mouse button in the DVI viewer and &kile; will jump to the corresponding line in the + &latex; source code. + + A DVI is a type of file containing a + description of a formatted document, along with other + information including character font, and is besides PDF the usual output of + &tex; or &latex;. A number of utilities exist to view, convert and print DVI files on + various systems and devices. + + + + + + Forward Search + + When using inverse search, the selection of items in the DVI file is associated with + the editor, so when you click on the DVI file, the main window jumps to the + corresponding section of &latex; code in the editor. Forward search is the exact + opposite of this. Forward search will allow you to click on a specific section of text + in the &latex; code, and jump to the associated position in the DVI viewer window. + + + + + + + + The Toolbar + + + New: begin a new document. + Open: open a new document. + Close: close your document. + Define document as master: this is used when working with multiple files. + Having a master document will let you work more easily with other .tex files included + in your document. If you are using projects, you can also set in Project->Project + Options a project-wide master document. + Quickbuild: compiles your &latex; source code and displays the results + automatically, unless you have code errors. + Watch file mode: this mode will "watch" the DVI file for changes, and + will not launch a new session of &kdvi; after Quickbuild. + View logfile: views the .log file, + so you can spot errors. + Previous error: jumps backward through the + .log file + and highlights errors in source. + Next error: jumps forward through + .log file and + highlights errors in source. + Stop: halts current tool. + LaTeX: runs &latex; on the active document. + View DVI: launches DVI viewer. + DVI to PS: converts a DVI to a &postscript; (PS). + View PS: launches &postscript; (PS) viewer. + PDFLaTeX: runs &pdflatex; on the active document. + View PDF: launches the PDF viewer. + DVI to PDF: converts a DVI to a PDF. + PS to PDF: converts a PS to a PDF. + View HTML: views HTML created. + Kdvi Forward Search: jump to page that corresponds to the current line in the + editor. + + + If you look at the Edit toolbar, you will notice three large + drop-down menus. The drop-down menus were designed for you to be able to quickly add + certain common features into your document. The first drop-down box + is used for quickly dividing your document by parts, chapter, sections and so on; the + available commands to add segments to your &latex; source code are: + + + part: highest level of sectioning for a document. + chapter: starts a new chapter. + section: create a new section. + subsection: create a new subsection. + subsubsection: a secondary section between subsection and + paragraph. + paragraph: create a new paragraph. + subparagraph: create a new subparagraph. + + + The drop-down box named label is used to insert items to your document such as + indexes, footnotes, and references; the available commands are: + + + label: a command that produces a label for a chapter, + a figure or another element. + index: creates an entry for the index. + footnote: creates a footnote in your document. + ref: used to refer to a predefined label, which + you can choose from a drop-down list. + pageref: just like ref, but refers to + a page instead of a structure element. + cite: create a reference with data from a bibliography. + cite from ViewBib: ask the ViewBib tool for all selected references and insert them. + Currently this is only avaible with &kbib; as ViewBib tool. + + + + The Label drop-down menu + + + + + + The Label drop-down menu + + The Label drop-down menu + + + + + Selecting the label for a reference + + + + + + Selecting the label for a reference + + Selecting the label for a reference + + + + When using cite, you are presented with a drop-down + list of bibitems, but if you are using &bibtex; this will only work if the file + belongs to a Project. For editing &bibtex; files the usage of specialised editors is recommened. + The author has made good experience with &kbibtex; and &kbib;. Of course you can also write the &bibtex; files by hand inside &kile;. + + The last drop-down box labeled tiny is used to set the size of the text. You can + set the size of the main text, of footnotes, and so on. The available commands are: + + + tiny: smallest. + scriptsize: very small. + footnotesize: smaller. + small: small. + normalsize: normal. + large: large. + Large: larger. + LARGE: even larger. + huge: still larger. + Huge: largest. + + + + + + + + Quickstart + + + + Writing a &latex; Document with &kile; for Beginners + + Users of &kile; have two choices when starting a new document: they can use the + Wizard to begin a new document, select the type of document they + would like to create and options such as font size, paper size, and so on; otherwise, + they can write the code by hand. + + + \documentclass[12pt]{article} + \begin{document} + Here is a bunch of text coded in \LaTeX. + \end{document} + + Every document in &latex; begins with the command + \documentclass[optional argument]{class}, where class specifies the document type. + + Typing in the code example above from the text box gives you the following output: + + + Compiled text in DVI output + + + + + + Compiled text in DVI output + + Compiled text in DVI output + + + + The brackets that come after the command \documentclass + contain the options for the command. The option [12pt] sets the size + of the font for your article; if you do not set the font size in the beginning, you can set + it later in the text. + + Once you have typed in the code example from the box above, you will need to + compile your &latex; source code. The easiest way for you to compile &latex; is to + use the Build menu, or using the Quickbuild button. + + &Alt;2 + is the keyboard shortcut to compile your source code. + + You have to save your source code before you can compile; &kile; will do this automatically for you. + + If your document did not compile, check the log for errors. When using the Quickbuild + key, the &kdvi; viewer should be launched automatically; if it does not, look at the log. + + + + + Environments + + An environment is a segment of text that is managed differently + than the rest of the document. For example, you create a report with font size 12, + but you need to change your font size for a few sentences. The commands + \begin{environment}, \huge and + \end{environment} will let you temporarily alter the text inside + the environment commands to be size huge. + + Changes are only effective from \begin{environment} to + \end{environment}. There are no limits as how many changes + you can make inside an environment. + + There are many features you can add to your document that will make it more + readable and user-friendly. You can add features such as specific fonts, bold, italics, + underline etc. to your document, and these commands will end with either an + \end command, or at the end of your environment. + + + \begin{emph}: this command makes + text italicized, and is valid until the code comes across a \end{emph}, + \end{emph} or another environment. To italicize one word in a sentence, you + can use the syntax: this is \emph{my} sentence. + \textbf{I am making this text inside the brackets bold}: this + command makes your text bold. + \quote: to create a quote inside your document; begin your quote + with \begin{quote} and end it with \end{quote}. + \center: centers the text. + \verse: creates offset text for poems. + \itemize: makes an itemized list. + + + + + + + Using &kile; + + Now that we have given you some background about how to write code using the + &latex; markup language, we will show you how to create a document + using &kile; step-by-step. + + + Start &kile;. + Select WizardQuick Start, + then choose a format, and set your preferences in the wizard. + Once the wizard has entered text, do some customization to make the + document more readable, add a minimum of one quote, some bold text, + italics, and a verse to see the difference between the commands. + Save your file, and give it the name intro.tex. + Build your document using &Alt;2, or the + button labeled LaTeX. + Select View DVI. + Check out all your new text. + When you are done viewing your document, click the Editor View + button or press &Ctrl;e + to return to the editor if you are using the embedded + viewer, or close the viewer window if you are using a separate viewer. + + + That's it! You have just created your first &latex; document! + + Once you have created your DVI, you will be able to print your document, or change + it into a &postscript; or PDF file if you want. Experiment and have fun! + + + + + + DVI Files + + DVI stands for DeVice Independent file. These files are produced + by &tex; or &latex; to be read by a driver of some sort on your computer. There are many different types of output that + a .dvi can be sent to, such as a printer, &postscript; or PDF file converter, or your computer screen. + + + + Viewing a DVI + + You have already seen how to view a DVI file on the screen by using the View + DVI button in the toolbar. + + + + + + Printing a DVI + + To print a DVI, you can use the same process that you used to create your + document earlier (see ). At step 7, after + clicking View DVI, select + FilePrint + in the viewer, and if you have your printer properly configured, you will be able + to print the DVI. + + + + + + Converting DVI files + + The toolbar gives the options of Converting a DVI to other formats. Once you + have created a DVI from your &latex; source code, you will be able to export it + to a format of your choice using the toolbar buttons. + + + + + + + + Forward Search between &kile; and &kdvi; + + The forward search functions allow you to jump from your + editor directly into the associated position of the &DVI; + file. + &kile; offers a configuration with this option for all &latex; binaries. + Go to SettingsConfigure Kile... + ToolsBuild + and always choose the Modern configuration. + + To execute a forward search, position the cursor on a line of source code, and click + Kdvi Forward Search to jump to the associated position + in the DVI viewer window. + + + + + Inverse Search between &kile; and &kdvi; + + Inverse search is a very useful feature when you are writing + a &latex; document yourself. If everything is set up properly, you can + click into &kdvi;'s window with the &MMB; (on some systems, + when you do not have a three-button mouse, you can simultaneously + use the left and the + right button). After that kile load the &latex; source file and jump to + the proper paragraph. To use inverse search, you have to compile your &latex; file with the Modern configuration. + + Inverse search cannot work unless: + + + The source file has been compiled successfully. + &kdvi; knows which editor you would like to use. + + + With this feature of &kdvi;, a middle mouse click in the DVI document will + result in &kile; opening the corresponding &latex; document and attempt to go to the + corresponding line. Remember to tell &kdvi; to use &kile; as a text editor, in &kdvi;'s + menu item SettingsDVI Options.... + + + Configuring &kdvi; + + + + + + Configuring &kdvi; + + Configuring &kdvi; + + + + + + + Resolving Errors + + If you are trying to use quickbuild, and the DVI viewer does not open, chances are + you have an error. If you have an error, it will be visible in the log file / message area, + and the summary of the error will be given. + + The log file will explain the source of the error in your code. In the + editor, you can use the buttons in the toolbar labeled Previous LaTeX Error + and Next LaTeX Error to jump to and from errors. The log file always states + in which line the error occurred. To view the line where an error occurred, click on the error + in the log window, and &kile; will take you to error's line. + + + + + + + Starting a New Document + + When you click the button in the toolbar to begin a new document a dialog appears, + asking which type of template you would like to use to write your document. The + default choices are: + + + Empty document + Article + Beamer + Book + HA-Prosper + Letter + Report + Scrartcl (from the KOMA-Script package) + Scrbook (from the KOMA-Script package) + Scrlttr2 (from the KOMA-Script package) + Scrreprt (from the KOMA-Script package) + + + If you selected an Empty document, you can either start + writing a document from scratch, or you can use the wizard to quickly start a new + document (see ). + + + + + Templates + + Frequent users of &latex; typically use the same preamble for almost every document they use. + Templates can be created, saved and loaded within &kile; to make it easier to start a new document. + + + + Create a New Template + + To create a new template, you must first either open a &tex; / &latex; file, or create a file + of your own. &kile; can generate a template from an existing document by opening the desired document and selecting + FileCreate Template from Document. + + + + + + Configuring Automatic Substitutions + + When creating a new document by selecting a template from + FileNew, + certain character combinations will be replaced by data such as your name, + or the character encoding your are using. These variables can be configured in + SettingsConfigure Kile... + SettingsGeneral. + + When designing your own template, it is useful to known which character + combinations are replaced by which template variables: + + + $$AUTHOR$$: This string + will be replaced by the author variable. + $$DOCUMENTCLASSOPTIONS$$: This string will be replaced + by the documentclass options variable. Typically this is used as follows: + \documentclass[$$DOCUMENTCLASSOPTIONS$$]{article}. + $$INPUTENCODING$$: If the + inputencoding variable is set to, say, latin1 this string is replaced by + \input[latin1]{inputenc}. + + + + + + + Create a Template from the Wizard + + The easiest way to create a new template is to start the wizard, + and then add commands in the editor. Once you have your + document set up the way you like: + + + Save your file; + Go to File; + Choose Create Template from Document; + Make any corrections necessary to the template; + Enter a name for your new template; + Click OK to add your template to the menu. + + + Next time you start up a new document, you will be able to choose + your customized template instead of the default ones. + + + + + + Creating a Template from any File + + A template can be created from any &latex; file. If you are looking for an easy way to + configure a template, go find one you like on the Internet and follow the same steps + listed in . + + For instance, you may want to create a full-fledged A0 poster. These posters are usually seen + at scientific conferences, and &latex; will help you making an attractive, catchy poster. You can get a + template for A0 posters at Jonathan Marchini's + home page, but many more are available. Remember that you will need the a0poster + package, which is normally not in standard tex distributions included. Download it from + here and place it in the same directory as your &latex; file. + + + + + Removing a Template + + To remove a template from &kile;, do as follows: + + + Go to FileRemove + Template...; + A dialog box will appear with all templates listed: select a template; + Click OK, and your template will be removed. + + + Templates marked with an asterisk (*) cannot be removed without the proper permission. + + + + + + + + + Editing &latex; Documents + + The internal editor that &kile; uses is &kate;. + Kate is a text editor created for programmers, which incorporates the ability to read + and highlight many different types of text files, among which are &latex; and &bibtex;; you can access + many options for &kate; directly from &kile;'s Tools menu. + + To learn more about &kate; and its capabilities, see the Kate Handbook. + &kile; users can start reading from the chapter Working with the Kate Editor. + + + + The &latex; Reference + + &kile; features a very practical &latex; tag reference, which you can access + by choosing HelpLaTeX + Reference. It contains a thorough description + of almost all the commands that you may use in &latex; and their syntax. + + + + + + Cursor Movements + + To select text, you have the following options: + + + Hold left mouse button, and drag mouse to highlight text. + Click once on a word to move the cursor to a new area. + Click twice on a word to select the whole word. + Click twice on a word and pressing &Ctrl; to select the whole tex word. + This means clicking in this way on \par from \par\bigskip only select \par. + Click three times to select the whole sentence. + + + Holding the left mouse button, and dragging the text you want to select, + automatically copies the selected text to the clipboard. + + Holding shift and using the arrow keys allows you to select portions of the source + code in the editor window. + + + + + + Brackets + + Bracket completion is a visual tool that the editor view uses to indicate you + which bracket matches which. If you open any .tex file, + and select any bracket, whether it be a parenthesis (), square brackets [] or braces {}, the + editor will highlight the bracket and its match in yellow (this default color can be changed). + So, for example, if you position the cursor on the braces in + \section{Introduction}, you would see + \section{Introduction} in the default yellow highlight, + showing you the location of the beginning and ending brackets. + + + + + + Highlighting + + &kile; has the ability to look for and highlight different types of code. For example, &latex; commands + are distinguished from normal text, and math formulas are highlighted also in a different color. + + + + + + Bullets + + Many wizards can insert optional bullets, a special kind of bookmarks within the text. The + menu entries EditBullets or + the corresponding keyboards shortcuts will allow you to jump to the next or last bullet. + This will also highlight this bullet so that it will be deleted automatically, + when you enter your first letter. + + + Bullets + + + + + + Bullets + + + + + + + + &Ctrl;&Alt;Right + Next Bullet + Jump to the next bullet in the text if there is one. + + + + &Ctrl;&Alt;Left + Last Bullet + Jump to the previous bullet in the text if there is one. + + + + + + + + + Select + + Editing is of course one of the main aspects when you use a program like &kile;. + Although &kate; already has great capabilities, &kile; adds some important features, + which are especially needed to write &latex; source. &latex; always needs a lot of + environments and groups, so &kile; supports very special commands to select them. + Under EditSelect + you will find the following commands to select text. + + + Edit->Select items + + + + + + Edit->Select items + + + + + + + &Ctrl;&Alt;S + E + Environment (inside) + Select an environment + without the surrounding tags. + + + + &Ctrl;&Alt;S + F + Environment (outside) + Select an environment + including the surrounding tags. + + + + &Ctrl;&Alt;S + T + TeX Group (inside) + Select a TeX group + inside the surrounding braces. + + + + &Ctrl;&Alt;S + U + TeX Group (outside) + Select a TeX group + including the surrounding braces. + + + + &Ctrl;&Alt;S + M + Math Group + Select the current math group including the math commands. + + + + &Ctrl;&Alt;S + P + Paragraph + Select a whole paragraph, + &ie; a group of text lines separated on both sides by empty lines. + A paragraph does not mean just continuous lines of text, as it is + in other text editors. This extended meaning also includes tables, &latex; + commands and all other lines of source. The only important thing for &kile; + is that kind of paragraph is separated by two empty lines. + + + + &Ctrl;&Alt;S + L + Line + Select the text line of the + current cursor position. + + + + &Ctrl;&Alt;S + W + TeX Word + Select the word under + the current cursor position. This selection has also en extended meaning, + because this command can also select &latex; commands, which begin with a + backslash and may also have an optional star at the + end. + + + + + + + + + Delete + + To delete some parts of a document you can of course select them, and then + use the Delete key. Kate also offers the command + &Ctrl;K which deletes the hole line.But &kile; offers a + faster way with its own delete commands. + Under EditDelete + you will find following commands to delete text. + + + Edit->Delete items + + + + + + Edit->Delete items + + + + + + + &Ctrl;&Alt;T + E + Environment (inside) + Delete an environment without the surrounding tags. + + + + &Ctrl;&Alt;T + F + Environment (outside) + Delete an environment including the surrounding tags. + + + + &Ctrl;&Alt;T + T + TeX Group (inside) + Delete a TeX group inside the surrounding braces. + + + + &Ctrl;&Alt;T + U + TeX Group (outside) + Delete a TeX group including the surrounding braces. + + + + &Ctrl;&Alt;T + M + Math Group + Delete the current math group including the math commands. + + + + &Ctrl;&Alt;T + P + Paragraph + Delete a whole paragraph. Look at the + SelectParagraph + command, how a paragraph is + defined in &kile;. + + + + + &Ctrl;&Alt;T + I + To End of Line + Delete the text from the current cursor position to the end of the line. + + + + + &Ctrl;&Alt;T + W + TeX Word + Delete the word or &latex; + command under the current cursor position. + + + + + + + + + Environment + + It was already mentioned that environments are a central point in &latex;. + So &kile; offers five other commands to make the work with &latex; as easy as possible + under submenus EditEnvironment. + + + Edit->Environment items + + + + + + Edit->Environment items + + + + + + + + &Ctrl;&Alt;E + B + Go to Begin + This command will jump to the beginning of the current environment, + wherever your current position is. The cursor will be placed directly + in front of the opening environment tag. + + + + &Ctrl;&Alt;E + E + Go to End + This command will jump to the end of the current environment, + wherever your current position is. The cursor will be placed directly + behind the closing environment tag. + + + + &Ctrl;&Alt;E + M + Match + When your cursor is placed in front of or above the + \begin{environment} tag, it will be moved to the + opposite end of the environment and vice versa. + + + + &Ctrl;&Alt;E + C + Close + Typing a lot of nested environment tags, you may lose + control of all those environments. This command will close the last + opened environment, so that the nested structure of environments + will not be broken. + + + + &Ctrl;&Alt;E + A + Close All + This closes all open environments, not only the last opened environment. + + + + + + + + + &tex; Group + + &kile; also offers some special commands for &latex; groups;, + which are determined by braces {...}. In submenu + EditTeX Group + you will find some important commands, which correspond to those from + EditEnvironment. + + + + Edit->TeX Group + + + + + + Edit->TeX Group + + + + + + + &Ctrl;&Alt;G + B + Go to Begin + This command will jump to the beginning of the current group, + wherever your current position is. The cursor will be placed directly in front + of the opening brace. + + + + &Ctrl;&Alt;G + E + Go to End + This command will jump to the end of the current group, + wherever your current position is. The cursor will be placed directly + behind the closing brace. + + + + &Ctrl;&Alt;G + M + Match + When your cursor is placed in front of or behind an + opening brace of a &tex; group, he will be moved to the opposite end of + the group and vice versa. + + + + &Ctrl;&Alt;G + C + Close + Typing a lot of nested group braces may be hard work. + This command will close the last opened group, so that the nested + structure of &tex; groups will not be broken. + + + + + + + + + Double Quotes + + In &latex;, two single quotes are used as double quotes. To + help you insert these efficiently, &kile; allows you to press + " to insert two opening + single quotes. Furthermore, if you want to close a quotation, you also + have to press ". &kile; will + be smart enough to recognize this case and inserts two closing quotes + for &latex;. + + To get a literal double quote on the other side, press + " twice. + + You can enable or disable this auto insertion of opening and + closing double quotes in section + SettingsConfigure + Kile...LaTeX. + + + Double Quotes + + + + + + Double Quotes + + + + + If you also include language-specific options + like ngerman or french, + you will also be able to use German or French double quotes. Many more languages are available. + + + + + + + Smart Newline + + If you press &Shift;Return, + &kile; inserts an intelligent newline. If your current position + is inside a list environment, like enumerate + or itemize, &kile; will not only insert + a newline, but also add a \item command. + + If you are inside a tabular environment, &kile; will finish the + current line with \\, followed by the newline. + + If you are inside a &latex; comment, &kile; will start the next line with a + %. + + Even better, &kile; is smart enough to support predefined &latex; + and user defined environment, which can be added in section + SettingsConfigure + Kile...LaTeX. + + + + + + Smart Tabulator + + Some users like to arrange columns in tabular environments and + put all ampersand characters & beneath each other. &kile; tries + to support this. If you press &Shift;&Alt;&, + &kile; will look for the next tab in the row above. Although his which may not the + corresponding tab, &kile; will add some spaces to adjust the column position with + the current tab. + + + + + + + + Code Completion + + Although &kate; already offers a good completion mode, &kile; extended + code completion to support some special methods especially for &latex;. Five different + modes are integrated. Three of them work on demand, the other two are autocompletion + modes. All modes can be configured to work very differently at + SettingsConfigure Kile.... + + + + Automatic Environment Completion + + When you begin a new environment, typing \begin{environment}, + &kile; will automatically add an \end{environment} command, with a + line in between for your text. + + Autocompletion can be turned off in the &latex; section of + SettingsConfigure Kile... + LaTeXEnvironments. + + + Completing an Equation Environment + + + + + + Completing an Equation Environment + + Completing an Equation Environment + + + + + + + + &latex; Commands + + When you type some letters, you can activate this completion mode for &latex; commands + and normal words with EditComplete(La)TeX Command or the keyboard shortcut + &Ctrl;Space. + &kile; first reads the letters from the current cursor position to the + left and stops at the first non-letter character or a backslash. If this + pattern begins with a backslash, &kile; will enter completion mode for &tex; or &latex; + commands. Otherwise it enters normal dictionary mode, where you will not find any + &latex; commands. Depending on the chosen mode, a completion box will be opened. + You will see all commands or words whose beginning matches the current pattern. + You can navigate with the cursor keys through this list and select one entry with + &Enter; or a double click with the mouse. + + + Completing a LaTeX Command + + + + + + Completing a LaTeX Command + + + + + When you push the &Backspace; key, the last letter of your + pattern will be deleted, and the completion list may grow. On the other hand, if + you type another letter will expand the pattern and the + visible word list may shrink. + + If you decide not to select any of the suggestions, you can leave this + dialog with &Esc;. + + You will see that all commands are written with a short description of + their parameters. These descriptions are of course stripped when you select a command. + Optionally you can let &kile; insert bullets at these places, so that you can easily + jump to the these positions with EditBulletsNext Bullet + and insert the parameter you want. + + + Completing a LaTeX Command + + + + + + Completing a LaTeX Command + + + + + Go to + SettingsConfigure Kile... + KileComplete + to configure one or more of these lists. You can choose different word lists + for &tex; and &latex; commands and dictionary mode for normal words. + + + + + + Environments + + The command mode is not useful to complete environments. + You always have to type some letters of \begin, and invoking + the completion mode will result in a huge list of environments tags. On the other + hand, environments are so often used that &kile; offers a special mode to complete + environments. Forget the opening tag and write, for example, eq. + + When you call the completion mode with + EditCompleteEnvironment or keyboard shortcut &Alt;Space, + the opening tag is automatically added and you will see \begin{eq}. + After this change, the completion list is much less cluttered. + + + Completing a LaTeX Command + + + + + + Completing a LaTeX Command + + + + + Now select an environment, and you will see that it is also automatically closed. + Even more, if &kile; recognizes it as a list environment, it will also insert a first + \item tag. + + + Completing a LaTeX Command + + + + + + Completing a LaTeX Command + + + + + Go to + SettingsConfigure Kile... + KileComplete + to configure one or more of these lists. This mode uses the same word lists as the + completion mode for &tex; and &latex; commands. + + + + + + Abbreviations + + &kile; supports user defined lists of abbreviations, which are replaced + on demand by longer text strings. Look at + SettingsConfigure Kile... + KileComplete + to configure one or more of theses lists. For the example given here, the + abbreviation list in example.cwl must be chosen. + In this file you will find for example the entry L=\LaTeX for example. + + For example, type only the letter L. Now invoke + the abbreviation mode of word completion with + EditCompleteAbbreviation or keyboard shortcut &Ctrl;&Alt;Space, + and the letter L is replaced by the string + \LaTeX. + + + + + + Autocompletion Modes + + + + &latex; Commands + + You can also enable an autocompletion mode for &latex; commands. + When a given threshold of letters (default: 3) is entered, a popup window opens + with a list of all matching &latex; commands. You can select one of these commands, + or ignore this window and type further letters. The entries of the completion box + will always change and match your currently typed word. + + Go to + SettingsConfigure Kile... + KileComplete + to enable or disable this mode or to change the threshold. + + + Completing an Equation Environment + + + + + + Completing an Equation Environment + + + + + + + + + Document Words + + Large dictionaries are not useful in autocompletion mode. But, we have seen + that a lot of words in a document are typed more than once. So &kile; offers a + completion for all words from the document that the user has already typed before. + + If you want to turn this mode on or off, go to + SettingsConfigure Kile... + KileComplete. + In this configuration dialog you can also change the threshold at which + the completion box pops up. + + + + + + + + Writing Own Completion Files + + The specification of the completion file format can found in the + CWL file format specification. + + + + Completion files can be installed in a user's home directory under the ~/.trinity/share/apps/kile/complete/<mode>/ + subdirectory, where <mode> either stands for abbreviation, dictionary or tex. + + + + + + + + Wizards and Dialogs + + + + Include Graphics + + The Include Graphics dialog makes insertion of + graphics as easy as possible. Please take a look at + and to + get an overview of some basic facts concerning graphic formats. + + + Including a graphics element + + + + + + Including a graphics element + + + + + + Choose a graphics file. This can be a JPEG, PNG, EPS + or even a zipped or gzipped EPS file. If you have installed + &imagemagick; + and also configured &kile; to use it + (SettingsConfigure Kile... + LaTeXGeneral), + the width and the height of the graphic is automatically shown. + If &imagemagick; can determine a resolution, the size of the graphics + is also shown in centimeters. + + Decide whether your image shall be centered on the page. + + Choose either traditional &latex; or &pdflatex;. + Please remember that &pdflatex; can also create DVI output, + not only PDF. + + You can choose whether the filename should be taken + relative. This is the preferred way, when you use the + \graphicspath command. + + By default graphics files have to be in the same + folder than your master document. However + it is possible to put them in other folders to make + things tidier. Without a \graphicspath + command, &kile; would include the path for the graphics file. + But if you use \graphicspath, + like: + + + \graphicspath{{/path/to/my/graphics}{other/path/to/more/graphics}} + + + and check this option, &kile; with only use the + base name of the graphics file. + + Another example: if you set \graphicspath + command like: + + + \graphicspath{{./}{camera/}{images/}} + + + &latex; will search in the current folder, then in + camera and finally in + images to find your graphics file. + + If you choose either a width or a height, the whole graphics + will be proportionally scaled. If you set two values for width and height + at the same time, width and height may be scaled with different factors, + and this could not be what you want. See also the information near the top + of dialog to know the original size of the graphics. + + Insert an angle by which to rotate the graphics counterclockwise. + + The bounding-box information is set automatically + when you choose a graphics file. This information is only needed + when you work with traditional &latex; and bitmapped graphics. + See the discussion of EPS graphics. + + + Your last choice is whether to embed this graphics into a + figure environment. If you decide to do so, you can also insert a + caption and a label. It is a good idea to add a different prefix to + each kind of label. It is common to use the prefix + fig: for images. + + + + + + + Array Wizard + + One of the most boring jobs one can do in &latex; is to write a matrix or a + tabular environment. One has to keep track of all the elements, ensure that the environment + is well formed, and that all things are where they are supposed to be. Good indentation helps, + but there is a simpler way: using &kile;'s Wizard menu. It contains + Tabular and Array (used in math environments). + You will then have a matrix-formed input form that you can easily fill in with your entries. This dialog also + offers some options to typeset the tabular material. + + + Inserting a tabular environment + + + + + + Inserting a tabular environment + + + + + The Tabbing option will display a simpler menu + to set up a tabbing environment. In all these environments, you can easily set the + number of rows and columns, along with other specific options. + + + + + &postscript; Utilities + + PS files are not so popular as PDF files, but are an excellent base + for manipulations and rearrangements of pages. If you need PDF + output, you can rearrange pages with some &postscript; utilities and then + convert it to PDF with ps2pdf. + + The &postscript; Wizard will suggest the most + popular rearrangements, but you are free to do your own choice. Work is done + by the programs pstops and psselect, which + you will find in most distributions in the package psutils. + If one of these programs is not available, the corresponding item will not + be visible. + + + Dialog PSTools + + + + + + Dialog PSTools + + + + + First choose your input file. If &kile; finds a PS file corresponding to your + current master document, it is already filled in as input file, but you are also free + to choose another file. Then choose an output file, and select one of the tasks. + Finally, you have to decide whether you want to do the conversion only, or also invoke + &kghostview; to view the result. + + + + + 1 A5 page + empty page --> A4 + Combine one A5 page together with one empty page + on one A4 page. Whenever two A5 pages are combined together, + they are rotated 90 degrees and will be arranged + on an A4 page in landscape mode. + + A5 + empty page + + + + + + A5 + empty page + + + + + + + + 1 A5 page + duplicate --> A4 + Put one A5 page and a duplicate together + on one A4 page. + + duplicate A5 pages + + + + + + Duplicate an A5 page + + + + + + + + 2 A5 pages --> A4 + Put two consecutive A5 pages together + on one A4 page. + + Combine two A5 pages + + + + + + Combine two A5 pages + + + + + + + + 2 A5L pages --> A4 + Put two consecutive A5 pages in landscape mode together + on one A4 page. + + + + 4 A5 pages --> A4 + Combine four consecutive A5 pages together on one + A4 page. The A5 pages have to be scaled with factor 0.7 to fit + on the page. + + 4 A5 pages --> A4 + + + + + + 4 A5 pages --> A4 + + + + + + + + 1 A4 page + empty page --> A4 + Combine one A4 page together with one empty page + on one A4 page. Whenever two A4 pages are combined together on one + resulting A4 page, they have to be scaled with factor 0.7 and will + be arranged in portrait mode. + + 1 A4 page + empty page --> A4 + + + + + + 1 A4 page + empty page --> A4 + + + + + + + + 1 A4 page + duplicate --> A4 + Put one A4 page and a duplicate together + on one A4 page. + + 1 A4 page + duplicate --> A4 + + + + + + 1 A4 page + duplicate --> A4 + + + + + + + + 2 A4 pages --> A4 + Put two consecutive A4 pages together + on one A4 page. + + Combine two A4 pages + + + + + + Combine two A4 pages + + + + + + + + 2 A4L pages --> A4 + Put two consecutive A4 pages in landscape mode together + on one A4 page. + + + + select even pages + Select all even pages of a document. + + + + select odd pages + Select all odd pages of a document. + + + + select even pages (reverse order) + Select all even pages of a document and reverse the order. + + + + select odd pages (reverse order) + Select all even pages of a document and reverse the order. + + + + reverse all pages + Reverse all pages of a document. + + + + copy all pages (sorted) + Copy all pages of a document. You have to + choose the number of sorted copies. + + Copy all pages (sorted) + + + + + + Copy all pages (sorted) + + + + + + + + copy all pages (unsorted) + Copy all pages of a document. You have to + choose the number of non-sorted copies. + + Copy all pages (unsorted) + + + + + + Copy all pages (unsorted) + + + + + + + + pstops: choose parameter + There are many options for &postscript; utilities + pstops and psselect. If you + need a very special one, you can invoke pstops with + an option of your choice. Please read the manual for all possible + options. + + + + psselect: choose parameter + You can invoke psselect with + an option of your choice. Please read the manual for all possible + options. + + + + + + + + Document Statistics + + The statistics dialog gives you an statistical overview for a selection, + a document or an hole project. It includes the number of words, &latex; + commands/environments and also includes the number of characters for each type. + The statistical numbers can be copied as text or as a nice formatted &latex; tabular + to the clipboard. If you want to get statistics for the hole project you can use + FileOpen All Project Files + for an easy and quick way to open all source files of your project. + A note of caution has to be sounded about the accuracy of the numbers. + We have included some logic to get a good estimate, e. g. K\"uhler gives one word and one command, + with six resp. two characters. But there are other combinations in which parts of commands + are counted as words and vice versa. It has also to be beared in mind that the algorithm + was developed and tested for languages similiar to english or german. + So don't take the numbers for granted. If you have to make an report with an + exact numbers of words or characters, make some tests to check whether &kile;'s accuracy satisfies your needs. + + + + + + + Special Tags in &latex; + + + Using the &latex; Tag Library + + &latex; has thousands of tags for symbols and special characters. + The easiest way to insert these tags is to use the sidebar menu, + left of the editor window. + + + The Sidebar Menu + + + + + + The Sidebar Menu + + The Sidebar Menu + + + The following types are avaible: + + + Most Frequently Used + Relation + Operators + Arrows + Miscellaneous Math + Miscellaneous Text + Delimiters + Greek + Special Characters + Cyrillic Characters + User Defined + + The tooltips of the icons show the &latex; commands and additionally needed packages. + Pressing &Shift; and clicking a symbol will result in + $\symbolcmd$ being inserted. Similiar pressing &Ctrl; + inserts it in curly brackets. + If you insert a command which requires a package which is not included in your &latex; document, + you will see a warning message in the logview window. + The first list of symbols holds the Most Frequently Used symbols. Inserted symbols will be + added to this list, for quick and easy reference. The ordering of the symbols will not be changed + upon addition of new symbols, instead a reference counter is incremented. If the number of items + would exceed 30 items, the item wit the lowest count will get removed. + The User Defined symbol list can hold your own symbols. + To create your own symbols you need the program gesymb and the file definitions.tex from the kile source package. + Additionaly you need a &latex; compiler (what a surprise) and + &dvipng; (version 1.7 or later). + The procedure is so that you create a &latex; file with \input{definitions}, + which makes the commands listed below available, and let gesymb mysymbols.tex user + (which calles &latex; and &dvipng;) create the icons. After copying them to + $HOME/.trinity/share/apps/kile/mathsymbols/user/ and restarting kile you can use your own symbols. + + + The following commands are defined in definitions.tex: + + + + \command[\optarg]{\symbol}: Include the symbol \symbol in the + symbol list, the optional argument \optarg specifies the command which kile should insert. + If it is not given the command in the mandatory argument is used. + + + + + \mathcommand[\optarg]{\symbol}: Same as above, except that the command in the mandatory + argument is inserted in math mode. + + + + + \pkgs[arg]{pkg}: Declare that the command given in this line needs the &latex; package + pkg with the optional argument arg. This command has to be in + front of the \command command and overrides any package specification by the neededpkgs + enviroment. + + + + + \begin{neededpkgs}[pkgs-args]{pkgs} ... \end{neededpkgs}: Has the same effect as + above, but for all enclosed commands. + + + + + + An example for completeness is given here: + + \documentclass[a4paper,10pt]{article} + \usepackage{amssymb} + \input{definitions} + % + \begin{document} + \pagestyle{empty} + % + \begin{neededpkgs}{amssymb} + \mathcommand{\surd} + \pkgs{amsmath}\mathcommand[\ddddot{}]{\ddddot{a}} + \mathcommand{\angle} + \end{neededpkgs} + \command{\"A} + \mathcommand{\exists} + \mathcommand[\stackrel{}{}]{\stackrel{abc}{=}} + + %\begin{neededpkgs}[russian,koi8-r,T2C,]{babel,inputenc,fontenc,mathtext} + % + % \end{neededpkgs} + % this would need to include the packages + % \usepackage{mathtext} + % \usepackage[T2C]{fontenc} + % \usepackage[russian]{babel} + % \usepackage[koi8-r]{inputenc} + % just to explain the format + \end{document} + + + + + + + Using Bibitems + + \bibitem is a command used to enter a reference in a + thebibliography environment in your document. The syntax for using + \bibitem is \bibitem[label]{key}. + + The optional [label] is for you to add your own + labeling system for the bibliography entry. If no label is set, the entries + will be set in numerical order: [1], [2], [3], etc. + + The argument {key} is used to reference and link the commands + \bibitem and \cite to + each other and the information they contain. The command \cite contains the + label associated with the intended \bibitem, which is located inside a + thebibliography environment, and contains the reference data. + Both corresponding \bibitem and \cite must + have the same {key}; the easiest way to organize keys is by + the author's last name. The secondary braces in the thebibliography + environment denote the longest bibliography label you expect to have. + So, inserting {foo} means + you can have any label shorter or as large as the expression + foo. Failure to set this parameter correctly + may result in a not so attractive indentation of your bibliography. + + The bibliography is a section apart from your main document, and an example of + code for the bibliography would look like the following: + + + \begin{thebibliography}{50} + \bibitem{Simpson} Homer J. Simpson. \textsl{Mmmmm...donuts}. + Evergreen Terrace Printing Co., Springfield, SomewhereUSA, 1998 + \end{thebibliography) + + Then, your main source code would contain the location of the information relating to + the \bibitem using \cite. That source code would look similar to this: + + + My thesis, about the philosophy of The Simpsons\copyright + comes from my favorite book \cite{Simpson}. + + As it is often difficult to remember the exact citation key once you have many + references, &kile; provides an easy way to insert a citation. On the Edit + toolbar click on the second drop-down box (usually it reads label) and select + cite. A list with all the citation keys pops up: select the correct + reference and a citation will be inserted into your document. To update the list of keys, + either save the file,EditRefresh + Structure or press F12. + + The final product in your document's bibliography would then look like this: + + [1] Homer J. Simpson. Mmmmm...donuts. Evergreen Terrace Printing Co., + Springfield, SomewhereUSA, 1998. + + The easiest way to work with \bibitem and + \cite is to use the toolbar drop-down box marked + cite. When you select a citation to insert, you will be given the list of + bibitems you have created so far, and will be able to select the + reference from the list. &kile; can also work together with &bibtex; editor applications, + such as &kbibtex; to help make citations easier. + + + + + + User-Defined Tags + + &kile; gives you the ability to make your own tags. A tag is similar + to a shortcut that launches some command or writes frequently-used text. + For example, Joe Sixpack uses often the sentences I prefer \LaTeX\ + to \TeX\ and What would I do without Linux?. + To create user-defined tags to write these sentences, he would access + LaTeXUser TagsEdit + User Tags...; this will present him a dialog where he can create + his own user-defined tags. + + The Edit User Tags Dialog + + + + + + The Edit User Tags Dialog + + The Edit User Tags Dialog + + + + + Invoking a User-Defined Tag + + + + + + Invoking a User Defined Tag + + Invoking a User Defined Tag + + + + He would probably give each tag a name that can clearly identify it. The name you give your tag + is entered in the section marked Menu item, and the text of frequently-used command + should be entered into the section labeled Value. Once the commands are entered, + he can use them quickly using the shortcut &Ctrl;&Shift;1 for + the first tag to enter I prefer \LaTeX\ to \TeX\ and &Ctrl;&Shift; + 2 to enter What would I do without Linux?. + + + + Placeholders in User-Defined Tags + + There are some placeholders you can use in user-defined tags: + they are %B, %C, %M and + %S. + + + %B: will be replaced by a bullet. + %C: this is where the cursor will be placed after the insertion of a + user-defined tag. + %M: this stands for marked text; the selected text is + inserted in its place when inserting user-defined tags. + %S: will be replaced by the source file's name without file extension. + + + To show you how this works let's say for example that we have a user-defined tag, + which contains the value \bfseries{%M}%C, and I have a selection of text + highlighted in my document that we want to turn into bold text. So, we highlight the + phrase I love Fridays, apply our user-defined tag by pressing + &Ctrl;&Shift;1, and we get the text + \bfseries{I love Fridays}, with the cursor + placed at the end of the text. + + + + + + + + + + The Build Tools + + + + Compiling, converting and viewing + + To view the result of your work, you first need to compile the source. All the build + tools are grouped closely together in the + BuildCompile, + BuildConvert, + and BuildView + menus. + + To compile your source code for screen viewers like &kdvi;, &kghostview;, &kpdf; or + further conversion, you can use the shortcut &Alt;2. + Then you can view the DVI file using your default viewer with + &Alt;3, convert + the DVI to a PS file with &Alt;4, + and view the PS file with &Alt;5. + + + + &bibtex; + + If you are using &bibtex; + for your bibliography entries, you usually have to follow a special compiling scheme. + This means calling &latex; and then &bibtex; and then &latex; twice again. Fortunately &kile; is clever enough to + detect automatically if it is necessary to call additional tools like &bibtex;, &makeidx; and &asymptote;. + This logic is by default turned on and can be changed in SettingsConfigure + Kile...ToolsBuild in the General tab in the &latex; and &pdflatex; tools. + + + + + + + &makeidx; + + If you are using the &makeidx; + package to make a final, alphabetical index for your document, you have also to follow a certain + compilation pattern or let &kile; do this for you in the same way as with &bibtex; files. + + + + + + MetaPost and Asymptote + + If you want to compile your document with MetaPost or Asymptote, picture drawing programs, you can do it with + BuildCompileMetapost. + or BuildOtherAsymptote. + + + + + + &pdflatex; + + There is also another way to compile your document, if you want a PDF: you can run + &pdflatex;, that will compile the source directly into a PDF file, with + &Alt;6: you can then view the compiled + file pressing &Alt;7. + + Alternatively, you can convert a PS into a PDF with + &Alt;8, or directly a + DVI into a PDF with &Alt;9. + + Using &pdflatex; instead of &latex; may be just a matter of simplicity or habit, + but sometimes the behavior of the two program can differ. + + + + + + &latex; to Web + + Finally, you may want to publish your work on the web and not just on paper. You may + then use the latex2html program, that can be called from &kile;'s menu + BuildConvertLaTeX + to Web. The result will be placed in a subfolder of the work folder, + and you will be able to see the result of the conversion choosing the menu item + BuildViewView + HTML. + + + + + + Passing Command-Line Parameters + + If you want to pass some specific command-line parameters to the compile, convert + or view tools, you can configure their call in Settings + Configure Kile...ToolsBuild. + + + + + + + Quick Preview + + You will always need some time to view the result, when working with &latex;. + &latex; has to compile the source and the viewer has to be called. This can be + annoying if you only changed some letters in an equation difficult to typeset. + &kile; offers a Quick Preview mode, where you can compile + only a part of a document and save a lot of time. It supports four different modes, + which can be combined with seven configurations. + + + Quick Preview + + + + + + Quick Preview + + + + + All settings must be done in + SettingsConfigure Kile... + ToolsPreview. + + + Quick Preview Configuration + + + + + + Quick Preview Configuration + + + + + + + Selection Mode + + The user has to select a part of the document. Menu entry BuildQuickPreviewSelection + or the keyboard shortcut &Ctrl;&Alt;P,S + will start the selected programs. &kile; takes the preamble of the original text, so that + all packages and user defined commands are included. The user can choose one + of seven predefined configurations: + + + LaTeX+DVI (embedded viewer) + LaTeX+DVI (KDVI) + LaTeX+PS (embedded viewer) + LaTeX+PS (KGhostView) + PDFLaTeX+PDF (embedded viewer) + PDFLaTeX+PDF (KGhostView) + PDFLaTeX+PDF (KPDF) + + + This should be sufficient for all situations for which a quick preview is needed. + + + + + + Environment Mode + + Very often you want to preview the current environment, and especially mathematic + environments, which sometimes may be difficult to write. &kile; offers a very fast way + to do this. No selection is needed, only choose + BuildQuickPreviewEnvironment + or the keyboard shortcut &Ctrl;&Alt;P,E + and the current environment will be compiled and shown. + + + + + + Subdocument Mode + + If you have a large project with a lot of documents, compiling the whole + project is not a great idea, if you have made changes only in one single document. + &kile; is able to compile and show a preview of the current subdocument. It + takes the preamble from the master document and only compiles the current part + when you choose BuildQuickPreviewSubdocument + or the keyboard shortcut &Ctrl;&Alt;P,D. + + + + + + Mathgroup Mode + + The mathgroup preview mode allows you to preview the mathgroup you are currently editing. &kile; + takes the preamble from the master document and only compiles the mathgroup the cursor is currently in + when you choose BuildQuickPreviewMathgroup + or the keyboard shortcut &Ctrl;&Alt;P,M. + + + + + + Quick Preview in Bottom Bar + + Instead of showing the preview in a new document &kile; can also be configured to use the bottom bar for preview + compilations. You can activate this feature in the quick preview configuration panel. + + + + + + + + Graphic File Formats + + + + &latex; and &pdflatex; + + &pdflatex;, when used with graphics or + graphicx packages, can compile correctly PNG and JPG files into + DVI or PDF, but is not able to handle EPS files. Conversely, the process of compiling + with &latex; to DVI and converting to PS and eventually PDF does support EPS, but does + not support PNG and JPG. + + A lot of users want to create PDF documents, but also want to use of the excellent + Pstricks package to create &postscript; graphics, or they want + to use the &postscript; output of mathematical and scientific software like + Mathematica, Maple or MuPAD. + These &latex; users have to compile first in &postscript;, even if they want to create + PDF documents, because these programs produce &postscript; code which cannot be managed + by &pdflatex;. However, it is not so hard as it may sound, because &kile; will help. + + + + + + Graphics Conversion + + To overcome this frustrating loop, in case you want to include both &postscript; code and PNG or JPG files, + you have a number of workarounds: + + + If you need a file in PS format, but have JPG or PNG graphics, you can also + simply use &pdflatex; with DVI output first, and then run dvips + to create the PS file. You see that &pdflatex; is a very good choice, if your source contains + no &postscript; code at all. + + You can convert EPS files to PNG or other formats with utilities as the + Gimp or + &imagemagick; + and use &pdflatex;. + + A preferred way + is to convert EPS graphics to PDF graphics with + epstopdf, which comes with every &tex; distribution + distribution and then use &pdflatex;. It produces high quality graphics, + and you can even control the result with some of the following options: + + + -dAutoFilterColorImages=false + -dAutoFilterGrayImages=false + -sColorImageFilter=FlateEncode + -sGrayImageFilter=FlateEncode + -dPDFSETTINGS=/prepress + -dUseFlateCompression=true + + + + Even better: if your system allows shell-escape, conversion + can be done on the fly. All you have to do is to include the epstopdf package, + which is part of all &tex; distributions, with command \usepackage{epstopdf}. + Assuming that your code is + + + \includegraphics[width=5cm]{test.eps} + + + When you call &pdflatex; with option , + graphics test.eps is automatically converted into test.pdf. + + This conversion will take place each time you run &pdflatex;. + If your graphics command is given implicitly: + + + \includegraphics[width=5cm]{test} + + + epstopdf checks whether test.pdf is already + available, so that conversion step can be skipped. + + You can convert the other way around, and use &latex; and PS-PDF conversion. + This is not always a good idea, since EPS encapsulation of JPG or PNG can yield larger + files, that in turn yield unnecessarily large documents. This is however highly + dependent on the graphic utility that you use, since EPS can encapsulate other graphics, + but not all applications support this perfectly. Some might actually try to build your JPG image + with vectors and various scripting, which will result in gigantic files. Conversion of + all graphics formats to EPS can be done by + &imagemagick;. + Another simple program that does this process correctly is + jpg2ps. + + + You can also use an automatic conversion. All graphic files are + converted on the fly to EPS, and inserted into the PS document. This is a comfortable + way, but you have to set up your system properly. This is discussed in the section + EPS Graphics. + + + + + + + + Use the right File for the right Graphic + + + EPS is sort of a graphic vector scripting language, describing + all the lines and dots the graph is made of; it looks good even when magnified beyond its + default size, and suits best diagrams and vectorial graphic natively produced in EPS, + which look very clear and sharp while maintaining a very small byte size. + PNG (or the deprecated GIF) is a non-lossy file format, + with good compression and quality. It is very good for diagrams, scans of drawings, + or anything whose sharpness you do want to retain. It is sometimes overkill + when used for photos. + JPG is a lossy format, that compresses files better than PNG + at the price of some loss in the picture detail. This is usually irrelevant for photos, + but may cause bad quality for diagrams, drawings, and may make some thin lines disappear outright; + in those cases use EPS or PNG. + + + But always remember: garbage in, garbage out! No conversion will make a bad picture good. + + + + + + + + EPS Graphics + + EPS graphics files are the traditional way to insert graphics files into + &latex; documents. As mailing lists are full with questions concerning + EPS graphics, we will discuss some important aspects and + demonstrate how &kile; supports them. + + + + &latex; and EPS Graphics + + If you decided to use the traditional &latex; to produce + PS or PDF output, you will probably run into some problems + with graphics. You have to use EPS graphics (Encapsulated &postscript;), + no JPEG or PNG files. This should be no problem, as there are a lot of + converters like + convert from the excellent + &imagemagick; + package. But, it needs some time of course. + + The EPS files are used by both &latex; and the DVI-PS converter: + + + &latex; scans the EPS file for the bounding box + line, which tells &latex; how much space to reserve for the + graphics. + + The DVI-PS converter then reads the EPS file and + inserts the graphics in the PS file. + + + This has some implications: + + + &latex; never reads the EPS file if the bounding-box + parameters are specified in the graphics-insertion command. + + Since &latex; cannot read non-ASCII files, + it cannot read the bounding-box information from compressed or non-EPS + graphics files. + + The EPS graphics are not included in the DVI file. Since the + EPS files must be present when the DVI file is converted to + PS, the EPS files must accompany DVI files whenever they are + moved. + + + Now you can call &latex;, and a DVI-PS converter like dvips + to create your &postscript; document. If your goal is a PDF document, you should run + dvips with option and then call + ps2pdf. You will find a lot of documents describing this solution. + + + + + + The &postscript; Way of &kile; + + &kile; helps you to get the bounding-box information. If you have installed + &imagemagick; + package, &kile; will extract this information from the EPS file and insert it as an + option. This is done automatically when you select the graphics file. + There are two advantages to proceed like this: + + + The information is already scanned in the dialog, and + need not to be done by &latex; later on. + Even more important is that the width and height of the picture + can be calculated, when the its resolution is known. This information will be shown + near the top of the dialog, and may serve as a clue when you want to scale the + graphics. + &kile; can also support zipped or gzipped EPS files, + which are much smaller than uncompressed EPS files. But, this feature can only be used + with a special system setup and a change of your local graphics configuration, + like it is described in the Bitmap Graphics + section. + + + + + + + The &postscript; Way and Bitmap Graphics + + If your systems allows shell-escape, &kile; + also supports an easy way to include bitmap graphics, if you set up your &tex; + system properly. There is no need to convert JPEG or PNG graphics, + this can be done automatically when the DVI file is converted to PS. + + &latex; needs some information about the file suffixes. The package + graphicx looks for a file graphics.cfg, + which must be somewhere in your search path for &latex; documents. Search for + entries like: + + + \DeclareGraphicsRule{.pz}{eps}{.bb}{}% + \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}% + \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}% + \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}% + \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}% + + + and replace these lines with: + + + \DeclareGraphicsRule{.pz}{eps}{.bb}{}% + \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}% + \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}% + \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}% + % changed or new graphic rules + \DeclareGraphicsRule{.eps.zip}{eps}{.eps.bb}{`unzip -p #1}% zipped EPS + \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{`gunzip -c #1}% gzipped EPS + \DeclareGraphicsRule{.jpg}{eps}{}{`convert #1 eps:-}% JPEG + \DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}% GIF + \DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}% PNG + \DeclareGraphicsRule{.tif}{eps}{.bb}{`convert #1 eps:-}% TIFF + \DeclareGraphicsRule{.pdf}{eps}{.bb}{`convert #1 eps:-}% PDF-graphics + + + You will find this file, for example in Debian, at + /etc/texmf/latex/graphics.cfg. The best way to proceed is to copy this + file to your local texpath and then change this file. See the yours &tex; distribution manual + to learn how to get a list of your &tex; folders. + + With this configuration file you are able to insert bitmap graphics and + zipped or gzipped EPS files in &latex;. The command for conversion + is given by dvips. When you look + at the conversion command you will see that no extra file is created. + The result of the conversion process is directly piped into the PS file. + The only thing &latex; must know is the size of the graphics, and + therefore we need the bounding box, which is provided by &kile;. + + Some say that this way is insecure; you have to decide on how to work. + In any case, you need no bounding box, as &kile; will extract this information + from all types of graphics. + + + + + + &pdflatex; and EPS Graphics + + As already stated, &pdflatex; is not able to handle EPS graphic files, + but converters like epstopdf + will help. The best way is to include package epstopdf, + which must follow the graphicx package. + + + \usepackage[pdftex]{graphicx} + \usepackage{epstopdf} + + + Now you can already include EPS graphics, if you run pdflatex + with option , but we can make it even better + and also handle zipped or gzipped EPS files. Again we have to change + the graphics configuration file graphics.cfg like above. + This time we search for: + + + % pdfTeX is running in pdf mode + \ExecuteOptions{pdftex}% + + + and simply add some lines. + + + % pdfTeX is running in pdf mode + \ExecuteOptions{pdftex}% + \AtEndOfPackage{% + \g@addto@macro\Gin@extensions{.eps.gz,.eps.zip}% + \@namedef{Gin@rule@.eps.gz}#1{{pdf}{.pdf}{`gunzip -c #1 | epstopdf -f >\Gin@base.pdf}}% + \@namedef{Gin@rule@.eps.zip}#1{{pdf}{.pdf}{`unzip -p #1 | epstopdf -f >\Gin@base.pdf}}% + }% + + + With these lines, &pdflatex; is able to handle EPS files, + and hopefully there should be no more issues concerning graphics. + + + + + + + + Master Document + + Defining your document as a master allows you to work with separated files, + which gives you a parent document (or Master document), and child documents that + make up a complete work. After having defined your Master document, with the + corresponding command in the Settings + menu, all the commands of the Tools + menu will apply only to this document, even when you are working on the child + documents. You can even close the Master document. + + + + + Error Handling + + After you have compiled something, &kile; takes a look at the error messages + that were generated. If there are any errors or warnings, they will be briefly reported + in the Log and Messages window. One can take a closer look at the + messages by selecting BuildView Log File, + or by using the keyboard shortcut &Alt;0. + The generated log is then displayed in the Log and Messages view; errors and warnings are highlighted. + + + Viewing the log + + + + + + Viewing the log + + Viewing the log + + + + You can easily jump from one message in the log file to another by using the + BuildNext / Previous + LaTeX Error / Warning menu items, or by using + the corresponding toolbar buttons. + + To jump to the line in the &latex; source where the error or warning occurred, + click on the error or warning in the Log and Messages view. + &kile; will take you automatically to the offending line. + + + + + + The Watch File Mode + + When you launch the Quickbuild command, a viewer of + some sort will normally be called after the compilation. If you are not using an embedded + viewer, a new window will be open every time. + + If you are adjusting the look of your document, you might launch + Quickbuild very often, and have many viewer windows open on + your desktop; to avoid this confusion, you can activate the Watch file + mode, that will prevent Quickbuild from launching a viewer. + + Presently, &kdvi; supports continuous updating of the viewed DVI file, but + &kghostview; is not as perfect: to update the document after compiling, you will have + to change page, and the number of pages will not be changed in &kghostview;'s visualization. + + This mode is of course useless with the embedded viewers, as you have to close them + anyway to get back to editing the document and recompiling. + + + + + + + + Navigating the &latex; Source + + + + Using the Structure View + + The Structure view shows the hierarchy of the document + being created in &kile;, and allows you to quickly navigate it, showing its segmentation. + To navigate around your document, all you need to do is to left click on any label, chapter, + section, subsection, etc., and you will be taken to the beginning of + the corresponding area. + + If you included a separate &latex; file in your source using + the \input or \include tags, these files will + be referred to in the Structure view; double-clicking on their names in + it will make &kile; bring up the included file in the editor window. + + The hierarchy tree has also a separate branch for labels used in the text. + + + Using the Structure View + + + + + + Using the Structure View + + Using the Structure View + + + + + + Updating the Structure View + + To update your structure view you can either go to + EditRefresh + Structure, hit F12, or you can save your document, + which will make &kile; update its Structure view. + + + + + + + + Bookmarks + + Bookmarks are your reference to a segment of text or a line inside the &kile; + environment. To use a bookmark, select a specific line of your document + you would like to return to, then press &Ctrl; + B, and &kile; will add a bookmark to this line. + Alternatively, you can also set a bookmark by highlighting a line and choosing + the menu labeled BookmarkToggle + Bookmark. + + To remove all your bookmarks, select Bookmarks + Clear Bookmarks. + + Please note that currently the bookmarks are not saved after exiting &kile;. + + + + + + + + Projects + + + + Working with Projects + + In &kile; you can create and work with projects. A project is a + group of &latex;, graphic, &bibtex; or other files that contain all the information that is used to build + your complete document. A typical project would be a document consisting of several chapters, + written in different .tex files; all of them could be included in + a project, to make the whole document easier to manage. The specifications of the project are stored in a special file, + with extension .kilepr. + + A Project adds the following functionalities: + + + You need not set a master document, &kile; does this automatically. + Project files can easily be archived together by going to BuildOtherArchive + The Files and Project view shows which files are included + in the project. + After opening a project, any file that was previously opened will be + restored with the original encoding and highlightning. + Code completion works across all project files. + Reference completion works across all project files. + Citation completion works across all project files. + Search in all project files. + Specify custom quickbuild and &makeidx; command. + + + + + + + Creating a Project + + To create a project, select Project + New Project.... You will be + asked to give the following information to create your project: + + Title of your project. + Name of the project file with .kilepr extension. + Filename. + Type of file creating: Empty Document, Article, Book, Letter, Report, .... + + + When you fill out the filename box, you have to include a relative + path from where the .kilepr project file is stored to the file. + + + + + + The File and Project View + + The File and Project view is a button of the sidebar menu. + From this view, you can see the structure of your project, its files, + and the name of the .kilepr file that stores the project information. + Adding, removing, or changing options in your project is done via + the File and Projects view. + + + The File and Project View + + + + + + The File and Project View + + The File and Project View + + + + + + + + Adding and Removing Files + + To add a file to your project, open any &tex; file, right click on its name in the + Files and Project view, and select Add to + Project. If you have multiple projects open, a dialog box will ask + you which project the file has to be added to. + + If you have multiple files to be added to a project, you can select the + project from the Files and Project view and right-click then select + Add Files; you will then be able to select your files in a dialog box. + + You can also right-click on the project's name in the Files and + Project view, and select Add Files... to bring + up a file selection dialog. + + + Adding a file to a project + + + + + + Adding a file to a project + + Adding a file to a project + + + + To remove a file from a project, right-click on it and select Remove File. + This does not delete your file (and also does not close it), but only removes it from the list + of files contained in the .kilepr extension. + + + + + + Project Options + + &kile; has a few options related to your project that can be set. To change them, + right-click on the title of your project and select Project Options, + and you will have the option of changing: + + + The title of your project. + The Master document. + The Quickbuild command. + The &makeidx; options. + + + + + Archiving your Project + + &kile; allows you to easily backup your project by storing all its files + into a single archive (often known as tarball). To archive your project + right-click on its name in the Files and Project view, or select + ProjectArchive. + + By default, all files in a project are added to the archive. If you do not want to include + a certain file in the archive, right-click on it in the Files and Project + view, and uncheck the Include in Archive option. + + Archive commands are simple shell commands that are executed from the project + folder (where the .kilepr file is located). + + + + + + + + + + Closing a Project + + To close a project, select the Files and Project view from + the vertical toolbar, right click on your project title, and then select + Close. This will close your project, all the files associated with your project, + and will also add the name of the project you just closed to Open Recent + Project... in the Project menu. + + + + + + + + Document Encoding + + The &kile; editor allows you to read, convert and set the text to the encoding + your document needs. This allows you to use non-standard letters and symbols; + you can use, for example, accented characters for Italian or French. + Selecting the encoding for your document can be done in three ways: + + + One way to set the encoding is to use the Set encoding combo + box, located at the bottom of the Open File sidebar view. + Another way is using the submenu + SettingsConfigure + Kile...Editor, + where you can set the default character encoding for all files. + + Set the default character encoding + + + + + + Set the default character encoding + + + + + A third way to set the encoding for a document is to set the option + when you use the wizard to create a new document. + + + &latex; itself understands only ASCII, a very limited set of characters, so you could not use + accented or special letters directly. To use accented letters, a special syntax was created: + such as for example \"e for ë. + There is a package to help you with this, called inputenc, and is included + in the preamble using \usepackage[latin1]{inputenc}, where the optional argument + is the encoding you would like to use (nowadays in most cases utf8x). This tells &latex; + to translate all of the ë's you wrote to \"e's before + compiling. Please refer to the inputenc documents directly for more + information on inputenc. Last but not least: remember to make sure that + your file is actually encoded in the same encoding you told + inputenc! + + + Choosing the source file's encoding + + + + + + Choosing the source file's encoding + + Choosing the source file's encoding + + + + This host of different character coding tables has been creating problems on + many applications: for example, you cannot write a course of Turkish in French without + losing one language's special characters. There is general agreement that, sooner or later, + everybody will switch to Unicode. There + are many implementations of Unicode, and UTF-8 is the most + successful in Linux; Windows® relies instead on the more cumbersome and + less flexible UCS-2. Some distributions, as RedHat, have already + begun setting their default encoding to UTF-8, and therefore you + may be very interested in using of the utf8x argument to the + inputenc package. + + + + The &ucs; Package + If you don't have the &ucs; package installed, you can proceed as follows: + + Get the &ucs; package from the home page of + Unicode support for + &latex;, by Dominique Unruh from the University of Karlsruhe. + + To install it, unpack the downloaded file and place it in a directory listed + in your $TEXINPUTS envirnoment variable. This can also be set inside kile. + + + + \usepackage{ucs} + \usepackage[utf8x]{inputenc} + + + + + + &cjk; Support + + Adding support for ideographic languages is quite tricky. However, once + you are done with it, it will work quite well. Other than installing packages, + there is some extra configuration work to do. + + Your Linux distribution might already have a &cjk; (Chinese, Japanese, + Korean) package ready for you, so you might be saved the hassle of manually + installing everything. Do check before going forward! + + There is the possibility of using the &ucs; package in order to write + short snippets of &cjk; text, but that option is seriously limited as it does + not handle, among other things, newlines. We will instead install the complete + &cjk;-&latex; package and make it work for both &latex; and &pdflatex;. A lot + of this material has been inspired by Pai + H. Chou's page + about how to setup &pdflatex;. + + + + Download the &cjk; + package. Copy its unpacked files to an appropriate subfolder of + $TEXMF, just like you did with the &ucs; package + before (see ). The files will be unpacked in a + CJK/X_Y.Z folder, it is not important that you + take them out, though it will probably be tidier for you to + maintain. + + Now you have to download a font that supports all the &cjk; characters + you need. You can choose any *.ttf file that + covers them, but in this walkthrough we will use Cyberbit. + Unzip the file and rename Cyberbit.ttf to + cyberbit.ttf, since uppercase might confuse your system. + Place cyberbit.ttf in a folder together with + Unicode.sfd, + and generate the *.tfm and + *.enc files with the command + $ ttf2tfm cyberbit.ttf -w cyberbit@Unicode@. + For some reasons, sometimes this does not produce the hundreds + of files it should. Should that be your case, you can download both + *.tfm and + *.enc files. + Place the *.tfm files in an + appropriate folder, say $TEXMF/fonts/tfm/bitstream/cyberbit/; + the *.enc files may be installed in + $TEXMF/pdftex/enc/cyberbit/. + + Now we need a map file to connect the *.enc files to the font. Download cyberbit.map + and install it in $TEXMF/pdftex/config/. + + Download another file, c70cyberbit.fd, + and place it in an appropriate folder. You may choose, for example, + $TEXMF/tex/misc/. + + The last file we have to generate is a &postscript; Type 1 + font, necessary to read DVI files generated with &latex;. Run the command + $ ttf2pfb cyberbit.ttf -o cyberbit.pfb, and copy the + resulting cyberbit.pfb in a folder like + $TEXMF/fonts/type1/cyberbit/. + + Let's now place cyberbit.ttf among the fonts + where &latex; can find it. You could place it in a folder named + $TEXMF/fonts/truetype/. + + Check the configuration file you find at + $TEXMF/web2c/texmf.cnf, and make sure that the + line mentioning TTFONTS is uncommented and points to + the folder where you saved cyberbit.ttf. + + To make it possible for &pdflatex; to use your &cjk; + fonts, it is necessary that you add a line in configuration file + $TEXMF/pdftex/config/pdftex.cfg. Add + map +cyberbit.map in the file to complete the + configuration for &pdflatex;. + + To configure &latex; so that you can produce DVI + files with &cjk; characters, you have to add a line in file + ttfonts.map. The file might be in a folder named + $TEXMF/ttf2pk/, but you will probably have to look + for it. Add the line cyberbit@Unicode@ cyberbit.ttf + into it. + + Now, you only have to run texhash + and the system should be ready. + + + + To test whether your configuration is correct, you can try to compile + this test + file. + + + &cjk; Troubleshooting + + There are many things that can go wrong when setting &cjk; + support manually. If something seems not to work, the following + checklist might help you. + + + + Obviously, since you run &latex; as a user and + not as root, you must allow ordinary users + to access the new files. Make sure all folders and files are + accessible using the chmod command. + + If &latex; writes a DVI without problems, but you + cannot view it, it is almost certainly because of some problems in the + automatic generation of *.pk + fonts. They are supposed to be generated on the fly when viewing a + DVI file, but this might fail for a number of reasons: double-check + ttfonts.map for your custom line first. However, + it might happen that your ttf2pk command, which + is usually invoked by the DVI viewer, has been compiled + without support for the + kpathsea libraries. If this is the case, + ttf2pk + will make no mention of kpathsea. As support for + these libraries is necessary, you might have to find a new package, or + recompile FreeType 1 by yourself. + + + + + + + + + How do I input &cjk; in Unicode? + + There are a number of different input engines, and the choice can + depend also on personal preference. The author uses Skim, + a port to &kde; of the Scim + engine. Refer to your distribution's documentation to learn how to + install these programs. Configuration of such programs can be tricky + too, in the case of Skim you will have to + define an environment variable XMODIFIERS="@im=SCIM" + before starting X. + + + + + + + + + + Scripting + + + + Scripting in &kile; + + + &kile;'s scripting feature allows for the execution of ECMAScript code. Scripts can be managed through the + scripting panel in the sidebar. + + + + + + + API Reference + + In this section we describe &kile;'s scripting programming interface. + + + + Please note that the scripting API has not been finalized yet. The API described below might change in + future versions of &kile;. + + + + + First of all, &kile;'s script execution environment provides a global object called "kile", which owns the following + methods: + + + + + (kile).currentTextDocument() + + + Returns a KileTextDocument object which reflects the currently active + text document. Returns null if no text document is active. + + + + + (kile).getInputValue(caption, label) + + + Opens a dialog with the given caption and label. Returns the value that user has entered. + + + + + + + Objects of the type KileTextDocument represent text documents in &kile;. They have the following + properties: + + + + + (KileTextDocument).backspace() + + + Deletes the character that is located immediately before the current cursor position and moves the cursor + one position backward in the text. + + + + + (KileTextDocument).cursorLeft() + + Moves the cursor one position backward in the text. + + + + (KileTextDocument).cursorRight() + + Moves the cursor one position forward in the text. + + + + (KileTextDocument).insertText(text) + + + Inserts the text contained in the variable text into the document at the current + cursor location. + + + + + (KileTextDocument).insertBullet() + + Inserts a bullet into the document at the current cursor position. + + + + (KileTextDocument).nextBullet() + + + Selects the first bullet located in the document immediately after the + current cursor location. + + + + + (KileTextDocument).previousBullet() + + + Selects the first bullet located in the document immediately before the + current cursor location. + + + + + (KileTextDocument).up() + + Moves the cursor one line up in the document. + + + + (KileTextDocument).down() + + Moves the cursor one line down in the document. + + + + (KileTextDocument).cursorLine() + + Returns the line which the cursor is currently located at. + + + + (KileTextDocument).cursorColumn() + + Returns the column which the cursor is currently located at. + + + + (KileTextDocument).setCursorLine(line) + + Moves the cursor to the line denoted by line. + + + + (KileTextDocument).setCursorColumn(column) + + Moves the cursor to the column denoted by line. + + + + + + + + + + + Help + + + + Help Documents + + &latex; is a rather sophisticated system, where the basic features + can be expanded by a great variety of additional packages. + &kile; provides a lot of different help to support the user. + + + + + LaTeX Reference + An alphabetical index of the most + common &latex; commands. + + + + TeX Documentation + &tetex;/&texlive; comes with a huge amount of documents. + This includes a documentation for all included packages and an additional &latex; + reference. + + + + LaTeX + A full reference for &tex; and friends. This is not + only a description of all programs, some important packages are also + mentioned. And it includes a full reference manual of &latex; + commands—ideal for looking up a particular piece of formatting + while writing a document. As this document is really extensive, + &kile; separates it with three important bookmarks. + + + + LaTeX Command + Another alphabetical index of the most common + &latex; commands. + + + + LaTeX Subject + A description of important &latex; + subjects. + + + + LaTeX Env + An alphabetical index of the most common + &latex; environments. + + + + + + + + + Context Sensitive Help + + &kile; also support a context sensitive help, which is called + with &Ctrl;&Alt;H,K. + In SettingsConfigure Kile... + KileHelp + you can choose whether you want to use &kile;'s &latex; reference or the + help system of &tetex;/&texlive;, which is the default setting. + + + Bullets + + + + + + Bullets + + + + + + + + + Searching for Keywords + + It is not always easy to find the right document, as &tetex;/&texlive; + comes with a huge amount of documents. As one possible help, &tetex;/&texlive; + provides a tiny program texdoctk. + It comes with a database of all documents that &kile; uses to offer + an interface to it. + + + Bullets + + + + + + Bullets + + + + + All documents are grouped into some categories, and the main + advantage is that you can search for packages names or keywords. + &kile; will then show only the results. + + + Bullets + + + + + + Bullets + + + + + A mouse double click or the Space key will start the + viewer for this document. This can be a arbitrary document, not only a + DVI, PS, PDF or HTML document. &kile; will take &konqueror; settings to + start a appropriate viewer. + + + + + + + User Defined Help + + Beside this static &tetex;/&texlive; documentation, &kile; supports also + another variable way for user-help documents. In Help + menu &kile; has a special User help + submenu, where the user can add documents of his own choice. + These can be the most important documents of &tetex;/&texlive; documentation, or even + self written documents. It is even possible to choose some Web URLs. + + Go to + SettingsConfigure Kile... + KileHelp + and choose Configure button + to configure this User help menu. You can add, + remove or navigate menu entries, and also insert separators to get + a better structure. + + Pressing the Add button will open + another dialog, where you must edit the name of the menu entry, + and choose the corresponding file or Web &url;. If you choose a Web &url;, + &konqueror; is started and you should copy the final &url;. + + + Bullets + + + + + + Bullets + + + + + + + + + + + Credits and License + + &kile; is an open-source user-friendly &latex; / &tex; source code editor. It will run on systems + with the &kde; Desktop Environment installed. &kde; is available for several architectures + with Linux and other Unix-like systems installed. &kile; is also part of the Fink project, + which means you can run &kile; on a Mac with OS-X. + + Many thanks are owed to those who strive to continue the &kile; project, and the many + hours of contributions made by those who sacrifice their time to develop tools we can all + use under the GNU license. Up-to-date information about contributors can be found in + the About &kile; dialog from the Help menu. + + + Contributions among others from: Rob Lensen, Roland Schulz, Michael Margraf, Holger Danielsson + + Many thanks to all those involved! + + &underFDL; + &underGPL; + + + + +&documentation.index; + +
diff --git a/doc/en/latex_example.png b/doc/en/latex_example.png new file mode 100644 index 0000000..d5c8774 Binary files /dev/null and b/doc/en/latex_example.png differ diff --git a/doc/en/latexhelp.html b/doc/en/latexhelp.html new file mode 100644 index 0000000..18767d1 --- /dev/null +++ b/doc/en/latexhelp.html @@ -0,0 +1,3633 @@ + + + + + +Kile : LaTex Reference + + + + +

LaTeX Reference

+ + + + + + + +
Alphabetical +Index
 #   A  + B   C   D  + E   F   H  + I   K   L  + M   N   O  + P   Q   R  + S   T   U  + V   W 
+
+
+
+ + + + + +
Index by +subject
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CountersInternal counters used by LaTeX.
+ + 
Cross ReferencesAutomatic referencing.
+ + 
DefinitionsDefine your own commands etc.
+ + 
Document ClassesSome of the various classes available.
EnvironmentsSuch as enumerate & itemize.
+ + 
FootnotesHow to produce footnotes.
+ + 
LayoutControlling the page layout.
+ + 
LengthsThe length commands.
+ + 
LettersThe letter class.
+ + 
Line & Page +BreakingHow to insert pagebreaks etc.
+ + 
Making +ParagraphsParagraph commands.
+ + 
Margin NotesPutting remarks in the margin.
Math FormulaeHow to create mathematical formulae.
+ + 
ModesParagraph, Math or LR modes.
Page StylesVarious styles of page layout.
+ + 
SectioningHow to section properly.
Spaces & +BoxesAll the associated commands.
+ + 
Special +CharactersSpecial reserved characters.
Splitting the +InputDealing with big files by splitting.
+ + 
Starting & +EndingThe formal start & end layouts.
Table of +ContentsHow to create a table of contents.
+ + 
Terminal +Input/OutputUser interaction.
+ + 
TypefacesSuch as bold, italics etc.
+ + 
+ +
+ + + + +
Alphabetical index
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 #  + +
 A  + +
 B  + +
 C  + +
 D  + +
 E  + +
 F  + +
 H  + +
 I  + +
 K  + +
 L  + +
 M  + +
 N  + +
 O  + +
 P  + +
 Q  + +
 R  + +
 S  + +
 T  + +
 U  + +
 V  + +
 W  + +
+
+
+
+ + + + + +
 Counters
+

Everything LaTeX numbers for you has a counter associated with +it. The name of the counter is the same as the name of the +environment or command that produces the number, except with no +\. (enumi - enumiv are used for the nested enumerate +environment.) Below is a list of the counters used in LaTeX's +standard document classes to control numbering.

+
+ part            paragraph       figure          enumi
+ chapter         subparagraph    table           enumii
+ section         page            footnote        enumiii
+ subsection      equation        mpfootnote      enumiv
+ subsubsection
+
+ +

\addtocounter

+

\addtocounter{counter}{value}

+

The \addtocounter command increments the +counter by the amount specified by the +value argument. The value argument can be +negative.

+

\alph

+

\alph{counter}

+

This command causes the value of the counter to be +printed in alphabetic characters. The \alph command +uses lower case alphabetic alphabetic characters, i.e., a, b, +c... while the \Alph command uses upper case +alphabetic characters, i.e., A, B, C....

+

\arabic

+

\arabic{counter}

+

The \arabic command causes the value of the +counter to be printed in Arabic numbers, i.e., +3.

+

\fnsymbol

+

\fnsymbol{counter}

+

The \fnsymbol command causes the value of the +counter to be printed in a specific sequence of nine +symbols that can be used for numbering footnotes.

+

eg. From 1-9:

+

NB. counter must have a value between 1 and 9 +inclusive.

+

\newcounter

+

\newcounter{foo}[counter]

+

The \newcounter command defines a new counter named +foo. The counter is initialized to zero.

+

The optional argument [counter] causes the counter +foo to be reset whenever the counter named in the +optional argument is incremented.

+

\refstepcounter

+

\refstepcounter{counter}

+

The \refstepcounter command works like +\stepcounter See section \stepcounter, except it also defines the current +\ref value to be the result of +\thecounter.

+

\roman

+

\roman{counter}

+

This command causes the value of the counter to be +printed in Roman numerals. The \roman command uses +lower case Roman numerals, i.e., i, ii, iii..., while +the \Roman command uses upper case Roman numerals, +i.e., I, II, III....

+

\stepcounter

+

\stepcounter{counter}

+

The \stepcounter command adds one to the +counter and resets all subsidiary counters.

+

\setcounter

+

\setcounter{counter}{value}

+

The \setcounter command sets the value of the +counter to that specified by the value +argument.

+

\usecounter

+

\usecounter{counter}

+

The \usecounter command is used in the second +argument of the list environment to allow the counter +specified to be used to number the list items.

+

\value

+

\value{counter}

+

The \value command produces the value of the +counter named in the mandatory argument. It can be +used where LaTeX expects an integer or number, such as the second +argument of a \setcounter or +\addtocounter command, or in:

+
+        \hspace{\value{foo}\parindent}
+
+

It is useful for doing arithmetic with counters.

+ + + + +
Cross References
+

One reason for numbering things like figures and equations is to +refer the reader to them, as in "See Figure 3 for more +details."

+ +

\label

+

\label{key}

+

A \label command appearing in ordinary text assigns +to the key the number of the current sectional unit; +one appearing inside a numbered environment assigns that number to +the key.

+

A key can consist of any sequence of letters, +digits, or punctuation characters. Upper and lowercase letters are +different.

+

To avoid accidentally creating two labels with the same name, it +is common to use labels consisting of a prefix and a suffix +separated by a colon. The prefixes conventionally used are

+ +

Thus, a label for a figure would look like +fig:bandersnatch.

+

\pageref

+

\pageref{key}

+

The \pageref command produces the page number of +the place in the text where the corresponding \label +command appears. ie. where \label{key} appears.

+

\ref

+

\ref{key}

+

The \ref command produces the number of the +sectional unit, equation number, ... of the corresponding +\label command.

+ + + + +
Definitions
+ +

\newcommand

+
+ \newcommand{cmd}[args]{definition}
+ \newcommand{cmd}[args][default]{definition}
+ \renewcommand{cmd}[args]{definition}
+ \renewcommand{cmd}[args][default]{definition}
+
+

These commands define (or redefine) a command.

+
+
cmd
+
A command name beginning with a \. For +\newcommand it must not be already defined and must +not begin with \end; for \renewcommand it +must already be defined.
+
args
+
An integer from 1 to 9 denoting the number of arguments of the +command being defined. The default is for the command to have no +arguments.
+
def
+
If this optional parameter is present, it means that the +command's first argument is optional. The default value of the +optional argument is def.
+
definition
+
The text to be substituted for every occurrence of +cmd; a parameter of the form #n in +cmd is replaced by the text of the nth argument when +this substitution takes place.
+
+

\newenvironment

+
+ \newenvironment{nam}[args]{begdef}{enddef}
+ \newenvironment{nam}[args][default]{begdef}{enddef}
+ \renewenvironment{nam}[args]{begdef}{enddef}
+
+

These commands define or redefine an environment.

+
+
nam
+
The name of the environment. For \newenvironment +there must be no currently defined environment by that name, and +the command \nam must be undefined. For +\renewenvironment the environment must already be +defined.
+
args
+
An integer from 1 to 9 denoting the number of arguments of the +newly-defined environment. The default is no arguments.
+
default
+
If this is specified, the first argument is optional, and +default gives the default value for that +argument.
+
begdef
+
The text substituted for every occurrence of +\begin{nam}; a parameter of the form #n +in cmd is replaced by the text of the nth argument +when this substitution takes place.
+
enddef
+
The text substituted for every occurrence of +\end{nam}. It may not contain any argument +parameters.
+
+

\newtheorem

+
+ \newtheorem{env_name}{caption}[within]
+ \newtheorem{env_name}[numbered_like]{caption}
+
+

This command defines a theorem-like environment.

+
+
env_name
+
The name of the environment to be defined. A string of letters. +It must not be the name of an existing environment or counter.
+
caption
+
The text printed at the beginning of the environment, right +before the number. This may simply say "Theorem", for example.
+
within
+
The name of an already defined counter, usually of a sectional +unit. Provides a means of resetting the new theorem counter +within the sectional unit.
+
numbered_like
+
The name of an already defined theorem-like environment.
+
+

The \newtheorem command may have at most one +optional argument.

+

\newfont

+

\newfont{cmd}{font_name}

+

Defines the command name cmd, which must not be +currently defined, to be a declaration that selects the font named +font_name to be the current font.

+ + + + +
Document Classes
+

Valid LaTeX document classes include:

+ +

Other document classes are often available. They are selected +with the following command:

+

\documentclass [options] {class}

+

All the standard classes (except slides) accept the following +options for selecting the typeface size (10 pt is default):

+

10pt, 11pt, 12pt

+

All classes accept these options for selecting the paper size +(default is letter):

+

a4paper, a5paper, b5paper, letterpaper, legalpaper, +executivepaper

+

Miscellaneous options:

+ +

These options are not available with the slides class:

+ +

The slides class offers the option clock for +printing the time at the bottom of each note.

+

If you specify more than one option, they must be separated by a +comma.

+

Additional packages are loaded by a

+

\usepackage[options]{pkg}

+

command. If you specify more than one package, they must be +separated by a comma.

+

Any options given in the \documentclass command +that are unknown by the selected document class are passed on to +the packages loaded with \usepackage.

+ + + + +
Layout
+

Miscellaneous commands for controlling the general layout of the +page.

+ +

\flushbottom

+

The \flushbottom declaration makes all text pages +the same height, adding extra vertical space when necessary to fill +out the page.

+

This is the standard if twocolumn mode is selected.

+

\onecolumn

+

The \onecolumn declaration starts a new page and +produces single-column output.

+

\raggedbottom

+

The \raggedbottom declaration makes all pages the +height of the text on that page. No extra vertical space is +added.

+

\twocolumn

+

\twocolumn[text]

+

The \twocolumn declaration starts a new page and +produces two-column output. If the optional text +argument is present, it is typeset in one-column mode.

+ + + + +
Environments
+

LaTeX provides a number of different paragraph-making +environments. Each environment begins and ends in the same +manner.

+
+        \begin{environment-name}
+        .
+        .
+        .
+        \end{environment-name}
+
+ +

array

+
+\begin{array}{col1col2...coln}
+column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+\end{array}
+
+

Math arrays are produced with the array environment. It has a +single mandatory argument describing the number of columns and the +alignment within them. Each column, coln, is specified +by a single letter that tells how items in that row should be +formatted.

+ +

Column entries must be separated by an &. +Column entries may include other LaTeX commands. Each row of the +array must be terminated with the string \\.

+

Note that the array environment can only be used in +math mode, so normally it is used inside an equation +environment.

+

center

+
+ \begin{center}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{center}
+
+

The center environment allows you to create a +paragraph consisting of lines that are centred within the left and +right margins on the current page. Each line must be terminated +with the string \\.

+ +

\centering

+

This declaration corresponds to the center +environment. This declaration can be used inside an environment +such as quote or in a parbox. The text of +a figure or table can be centred on the page by putting a +\centering command at the beginning of the figure or +table environment.

+

Unlike the center environment, the +\centering command does not start a new paragraph; it +simply changes how LaTeX formats paragraph units. To affect a +paragraph unit's format, the scope of the declaration must contain +the blank line or \end command (of an environment like +quote) that ends the paragraph unit.

+

description

+
+ \begin{description}
+ \item [label] First item
+ \item [label] Second item
+ .
+ .
+ .
+ \end{description}
+
+

The description environment is used to make +labelled lists. The label is bold face and flushed +right.

+

enumerate

+

+
+ \begin{enumerate}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{enumerate}
+
+

The enumerate environment produces a numbered list. +Enumerations can be nested within one another, up to four levels +deep. They can also be nested within other paragraph-making +environments.

+

Each item of an enumerated list begins with an +\item command. There must be at least one +\item command within the environment.

+

The enumerate environment uses the +enumi through enumiv counters (see +section Counters). The type of numbering can be +changed by redefining \theenumi etc.

+

eqnarray

+

+
+ \begin{eqnarray}
+ math formula 1 \\
+ math formula 2 \\
+ .
+ .
+ .
+ \end{eqnarray}
+
+

The eqnarray environment is used to display a +sequence of equations or inequalities. It is very much like a +three-column array environment, with consecutive rows +separated by \\ and consecutive items within a row +separated by an &.

+

An equation number is placed on every line unless that line has +a \nonumber command.

+

The command \lefteqn is used +for splitting long formulas across lines. It typesets its argument +in display style flush left in a box of zero width.

+

equation

+

+
+ \begin{equation}
+  math formula
+ \end{equation}
+
+

The equation environment centres your equation on +the page and places the equation number in the right margin.

+

figure

+

+
+ \begin{figure}[placement]
+
+  body of the figure
+
+ \caption{figure title}
+ \end{figure}
+
+

Figures are objects that are not part of the normal text, and +are usually "floated" to a convenient place, like the top of a +page. Figures will not be split between two pages.

+

The optional argument [placement] determines where +LaTeX will try to place your figure. There are four places where +LaTeX can possibly put a float:

+
    +
  1. h (Here) - at the position in the text where the +figure environment appears.
  2. +
  3. t (Top) - at the top of a text page.
  4. +
  5. b (Bottom) - at the bottom of a text page.
  6. +
  7. p (Page of floats) - on a separate float page, +which is a page containing no text, only floats.
  8. +
+

The standard report and article classes use the default +placement tbp.

+

The body of the figure is made up of whatever text, LaTeX +commands, etc. you wish. The \caption command allows +you to title your figure.

+

flushleft

+

+
+ \begin{flushleft}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{flushleft}
+
+

The flushleft environment allows you to create a +paragraph consisting of lines that are flushed left, to the +left-hand margin. Each line must be terminated with the string +\\.

+ +

\raggedright

+

+

+

This declaration corresponds to the flushleft +environment. This declaration can be used inside an environment +such as quote or in a parbox.

+

Unlike the flushleft environment, the +\raggedright command does not start a new paragraph; +it simply changes how LaTeX formats paragraph units. To affect a +paragraph unit's format, the scope of the declaration must contain +the blank line or \end command (of an environment like +quote) that ends the paragraph unit.

+

flushright

+

+
+ \begin{flushright}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{flushright}
+
+

The flushright environment allows you to create a +paragraph consisting of lines that are flushed right, to the +right-hand margin. Each line must be terminated with the string +\\.

+ +

\raggedleft

+

+

+

This declaration corresponds to the flushright +environment. This declaration can be used inside an environment +such as quote or in a parbox.

+

Unlike the flushright environment, the +\raggedleft command does not start a new paragraph; it +simply changes how LaTeX formats paragraph units. To affect a +paragraph unit's format, the scope of the declaration must contain +the blank line or \end command (of an environment like +quote) that ends the paragraph unit.

+

itemize

+

+
+ \begin{itemize}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{itemize}
+
+

The itemize environment produces a "bulleted" list. +Itemizations can be nested within one another, up to four levels +deep. They can also be nested within other paragraph-making +environments.

+

Each item of an itemized list begins with an +\item command. There must be at least one +\item command within the environment.

+

The itemize environment uses the itemi +through itemiv counters (see section Counters). The type of numbering can be changed by +redefining \theitemi etc.

+

letter

+

+

This environment is used for creating letters. See section +Letters.

+

list

+

+

The list environment is a generic environment which +is used for defining many of the more specific environments. It is +seldom used in documents, but often in macros.

+
+ \begin{list}{label}{spacing}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{list}
+
+

The {label} argument specifies how items should be +labelled. This argument is a piece of text that is inserted in a +box to form the label. This argument can and usually does contain +other LaTeX commands.

+

The {spacing} argument contains commands to change +the spacing parameters for the list. This argument will most often +be null, i.e., {}. This will select all default +spacing which should suffice for most cases.

+

minipage

+

+
+ \begin{minipage}[position]{width}
+  text
+ \end{minipage}
+
+

The minipage environment is similar to a +\parbox command. It takes the same optional +position argument and mandatory width +argument. You may use other paragraph-making environments inside a +minipage.

+

Footnotes in a minipage environment are handled in +a way that is particularly useful for putting footnotes in figures +or tables. A \footnote or \footnotetext +command puts the footnote at the bottom of the minipage instead of +at the bottom of the page, and it uses the mpfootnote +counter instead of the ordinary footnote counter See +section Counters.

+

NOTE: Don't put one minipage inside another if you are using +footnotes; they may wind up at the bottom of the wrong +minipage.

+

picture

+

+
+ \begin{picture}(width,height)(x offset,y offset)
+  .
+  .
+  picture commands
+  .
+  .
+ \end{picture}
+
+

The picture environment allows you to create just +about any kind of picture you want containing text, lines, arrows +and circles. You tell LaTeX where to put things in the picture by +specifying their coordinates. A coordinate is a number that may +have a decimal point and a minus sign -- a number like +5, 2.3 or -3.1416. A +coordinate specifies a length in multiples of the unit length +\unitlength, so if \unitlength has been +set to 1cm, then the coordinate 2.54 specifies a +length of 2.54 centimetres. You can change the value of +\unitlength anywhere you want, using the +\setlength command, but strange things will happen if +you try changing it inside the picture environment.

+

A position is a pair of coordinates, such as +(2.4,-5), specifying the point with x-coordinate +2.4 and y-coordinate -5. Coordinates are +specified in the usual way with respect to an origin, which is +normally at the lower-left corner of the picture. Note that when a +position appears as an argument, it is not enclosed in braces; the +parentheses serve to delimit the argument.

+

The picture environment has one mandatory argument, +which is a position. It specifies the size of the +picture. The environment produces a rectangular box with width and +height determined by this argument's x- and y-coordinates.

+

The picture environment also has an optional +position argument, following the size +argument, that can change the origin. (Unlike ordinary optional +arguments, this argument is not contained in square brackets.) The +optional argument gives the coordinates of the point at the +lower-left corner of the picture (thereby determining the origin). +For example, if \unitlength has been set to +1mm, the command

+
+   \begin{picture}(100,200)(10,20)
+
+

produces a picture of width 100 millimeters and height 200 +millimeters, whose lower-left corner is the point (10,20) and whose +upper-right corner is therefore the point (110,220). When you first +draw a picture, you will omit the optional argument, leaving the +origin at the lower-left corner. If you then want to modify your +picture by shifting everything, you just add the appropriate +optional argument.

+

The environment's mandatory argument determines the nominal size +of the picture. This need bear no relation to how large the picture +really is; LaTeX will happily allow you to put things outside the +picture, or even off the page. The picture's nominal size is used +by LaTeX in determining how much room to leave for it.

+

Everything that appears in a picture is drawn by the +\put command. The command

+
+   \put (11.3,-.3){...}
+
+

puts the object specified by ... in the picture, +with its reference point at coordinates (11.3,-.3). The reference +points for various objects will be described below.

+

The \put command creates an LR +box. You can put anything in the text argument of the +\put command that you'd put into the argument of an +\mbox and related commands. When you do this, the +reference point will be the lower left corner of the box.

+

Picture commands:

+ +

\circle

+

+

\circle[*]{diameter}

+

The \circle command produces a circle with a +diameter as close to the specified one as possible. If the +*-form of the command is used, LaTeX draws a solid +circle.

+

Note that only circles up to 40 pt can be drawn.

+

\dashbox

+

+

Draws a box with a dashed line.

+

\dashbox{dash_length}(width,height){...}

+

The \dashbox has an extra argument which specifies +the width of each dash. A dashed box looks best when the +width and height are multiples of the +dash_length.

+

\frame

+

+

\frame{...}

+

The \frame command puts a rectangular frame around +the object specified in the argument. The reference point is the +bottom left corner of the frame. No extra space is put between the +frame and the object.

+

\framebox

+

+

\framebox(width,height)[position]{...}

+

The \framebox command is exactly the same as the +\makebox command, except that it puts a frame around +the outside of the box that it creates.

+

The framebox command produces a rule of thickness +\fboxrule, and leaves a space \fboxsep +between the rule and the contents of the box.

+

\line

+

+

\line(x slope,y slope){length}

+

The \line command draws a line of the specified +length and slope.

+

Note that LaTeX can only draw lines with slope = x/y, where x +and y have integer values from -6 through 6.

+

\linethickness

+

+

\linethickness{dimension}

+

Declares the thickness of horizontal and vertical lines in a +picture environment to be dimension, which must be a +positive length. It does not affect the thickness of slanted lines +and circles, or the quarter circles drawn by \oval to +form the corners of an oval.

+

\makebox

+

+

\makebox(width,height)[position]{...}

+

The \makebox command for the picture environment is +similar to the normal \makebox command except that you +must specify a width and height in +multiples of \unitlength.

+

The optional argument, [position], specifies the +quadrant that your text appears in. You may select up to two of the +following:

+ +

See section \makebox.

+

\multiput

+

+

\multiput(x coord,y coord)(delta x,delta y){number of +copies}{object}

+

The \multiput command can be used when you are +putting the same object in a regular pattern across a picture.

+

\oval

+

+

\oval(width,height)[portion]

+

The \oval command produces a rectangle with rounded +corners. The optional argument, [portion], allows you +to select part of the oval.

+ +

Note that the "corners" of the oval are made with quarter +circles with a maximum radius of 20 pt, so large "ovals" will look +more like boxes with rounded corners.

+

\put

+

+

\put(x coord,y coord){ ... }

+

The \put command places the item specified by the +mandatory argument at the given coordinates.

+

\shortstack

+

+

\shortstack[position]{... \\ ... \\ ...}

+

The \shortstack command produces a stack of +objects. The valid positions are:

+ +

\vector

+

+

\vector(x slope,y slope){length}

+

The \vector command draws a line with an arrow of +the specified length and slope. The x and +y values must lie between -4 and +4, inclusive.

+

quotation

+

+
+ \begin{quotation}
+  text
+ \end{quotation}
+
+

The margins of the quotation environment are +indented on the left and the right. The text is justified at both +margins and there is paragraph indentation. Leaving a blank line +between text produces a new paragraph.

+

quote

+

+
+ \begin{quote}
+  text
+ \end{quote}
+
+

The margins of the quote environment are indented +on the left and the right. The text is justified at both margins. +Leaving a blank line between text produces a new paragraph.

+

tabbing

+

+
+ \begin{tabbing}
+ text \= more text \= still more text \= last text \\
+ second row \>  \> more \\
+ .
+ .
+ .
+ \end{tabbing}
+
+

The tabbing environment provides a way to align +text in columns. It works by setting tab stops and tabbing to them +much the way you do with an ordinary typewriter.

+

It is best suited for cases where the width of each column is +constant and known in advance.

+

This environment can be broken across pages, unlike the +tabular environment.

+

The following commands can be used inside a tabbing +environment:

+
+
\=
+
Sets a tab stop at the current position.
+
\>
+
Advances to the next tab stop.
+
\<
+
This command allows you to put something to the left of the +local margin without changing the margin. Can only be used at the +start of the line.
+
\+
+
Moves the left margin of the next and all the following +commands one tab stop to the right.
+
\-
+
Moves the left margin of the next and all the following +commands one tab stop to the left.
+
\'
+
Moves everything that you have typed so far in the current +column, i.e. everything from the most recent \>, +\<, \', \\, or +\kill command, to the right of the previous column, +flush against the current column's tab stop.
+
\`
+
Allows you to put text flush right against any tab stop, +including tab stop 0. However, it can't move text to the right of +the last column because there's no tab stop there. The +\` command moves all the text that follows it, up to +the \\ or \end{tabbing} command that ends +the line, to the right margin of the tabbing environment. There +must be no \> or \' command between +the \` and the command that ends the line.
+
\kill
+
Sets tab stops without producing text. Works just like +\\ except that it throws away the current line instead +of producing output for it. The effect of any \=, +\+ or \- commands in that line remain in +effect.
+
\pushtabs
+
Saves all current tab stop positions. Useful for temporarily +changing tab stop positions in the middle of a tabbing +environment.
+
\pushtabs
+
Restores the tab stop positions saved by the last +\pushtabs.
+
\a
+
In a tabbing environment, the commands +\=, \' and \` do not produce +accents as normal. Instead, the commands \a=, +\a' and \a` are used.
+
+

This example typesets a Pascal function in a traditional +format:

+
+        \begin{tabbing}
+        function \= fact(n : integer) : integer;\\
+                 \> begin \= \+ \\
+                       \> if \= n $>$ 1 then \+ \\
+                                fact := n * fact(n-1) \- \\
+                          else \+ \\
+                                fact := 1; \-\- \\
+                    end;\\
+        \end{tabbing}
+
+

table

+

+
+ \begin{table}[placement]
+
+  body of the table
+
+ \caption{table title}
+ \end{table}
+
+

Tables are objects that are not part of the normal text, and are +usually "floated" to a convenient place, like the top of a page. +Tables will not be split between two pages.

+

The optional argument [placement] determines where +LaTeX will try to place your table. There are four places where +LaTeX can possibly put a float:

+ +

The standard report and article +classes use the default placement [tbp].

+

The body of the table is made up of whatever text, LaTeX +commands, etc., you wish. The \caption command allows +you to title your table.

+

tabular

+

+
+ \begin{tabular}[pos]{cols}
+ column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+ \end{tabular}
+
+

or

+
+ \begin{tabular*}{width}[pos]{cols}
+ column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+ \end{tabular*}
+
+

These environments produce a box consisting of a sequence of +rows of items, aligned vertically in columns. The mandatory and +optional arguments consist of:

+
+
width
+
Specifies the width of the tabular* environment. +There must be rubber space between columns that can stretch to fill +out the specified width.
+
pos
+
Specifies the vertical position; default is alignment on the +center of the environment. +
    +
  • t - align on top row
  • +
  • b - align on bottom row
  • +
+
+
cols
+
Specifies the column formatting. It consists of a sequence of +the following specifiers, corresponding to the sequence of columns +and intercolumn material. +
    +
  • l - A column of left-aligned items.
  • +
  • r - A column of right-aligned items.
  • +
  • c - A column of centred items.
  • +
  • | - A vertical line the full height and depth of +the environment.
  • +
  • @{text} - This inserts text in every +row. An @-expression suppresses the intercolumn space normally +inserted between columns; any desired space between the inserted +text and the adjacent items must be included in text. An +\extracolsep{wd} command in an @-expression causes an +extra space of width wd to appear to the left of all +subsequent columns, until countermanded by another +\extracolsep command. Unlike ordinary intercolumn +space, this extra space is not suppressed by an @-expression. An +\extracolsep command can be used only in an +@-expression in the cols argument.
  • +
  • p{wd} - Produces a column with each item typeset +in a parbox of width wd, as if it were the argument of +a \parbox[t]{wd} command. However, a \\ +may not appear in the item, except in the following situations: +
      +
    1. inside an environment like minipage, +array, or tabular.
    2. +
    3. inside an explicit \parbox.
    4. +
    5. in the scope of a \centering, +\raggedright, or \raggedleft declaration. +The latter declarations must appear inside braces or an environment +when used in a p-column element.
    6. +
    +
  • +
  • *{num}{cols} - Equivalent to num +copies of cols, where num is any positive +integer and cols is any list of column-specifiers, +which may contain another *-expression.
  • +
+
+
+

These commands can be used inside a tabular +environment:

+ +

\cline

+

+

\cline{i-j}

+

The \cline command draws horizontal lines across +the columns specified, beginning in column i and +ending in column j, which are identified in the +mandatory argument.

+

\hline

+

+

The \hline command will draw a horizontal line the +width of the table. It's most commonly used to draw a line at the +top, bottom, and between the rows of the table.

+

\multicolumn

+

+

\multicolumn{cols}{pos}{text}

+

The \multicolumn is used to make an entry that +spans several columns. The first mandatory argument, +cols, specifies the number of columns to span. The +second mandatory argument, pos, specifies the +formatting of the entry; c for centred, l +for flushleft, r for flushright. The third mandatory +argument, text, specifies what text is to make up the +entry.

+

\vline

+

+

The \vline command will draw a vertical line +extending the full height and depth of its row. An +\hfill command can be used to move the line to the +edge of the column. It can also be used in an @-expression.

+

thebibliography

+

+
+ \begin{thebibliography}{widest-label}
+ \bibitem[label]{cite_key}
+ .
+ .
+ .
+ \end{thebibliography}
+
+

The thebibliography environment produces a +bibliography or reference list. In the article class, +this reference list is labelled "References"; in the +report class, it is labelled "Bibliography".

+ + +

\bibitem

+

+

\bibitem[label]{cite_key}

+

The \bibitem command generates an entry labelled by +label. If the label argument is missing, +a number is generated as the label, using the +enumi counter. The cite_key is any +sequence of letters, numbers, and punctuation symbols not +containing a comma. This command writes an entry on the +`.aux' file containing cite_key and the +item's label. When this `.aux' file is read +by the \begin{document} command, the item's +label is associated with cite_key, +causing the reference to cite_key by a +\cite command to produce the associated +label.

+

\cite

+

+

\cite[text]{key_list}

+

The key_list argument is a list of citation keys. +This command generates an in-text citation to the references +associated with the keys in key_list by entries on the +`.aux' file read by the \begin{document} +command.

+

The optional text argument will appear after the +citation, i.e. \cite[p. 2]{knuth} might produce +`[Knuth, p. 2]'.

+

\nocite

+

+

\nocite{key_list}

+

The \nocite command produces no text, but writes +key_list, which is a list of one or more citation +keys, on the `.aux' file.

+

Using BibTeX

+

+

If you use the BibTeX program by Oren Patashnik (highly +recommended if you need a bibliography of more than a couple of +titles) to maintain your bibliography, you don't use the +thebibliography environment. Instead, you include the +lines

+
+        \bibliographystyle{style}
+        \bibliography{bibfile}
+
+

where style refers to a file +style.bst, which defines how your citations will look. +The standard styles distributed with BibTeX are:

+
+
alpha
+
Sorted alphabetically. Labels are formed from name of author +and year of publication.
+
plain
+
Sorted alphabetically. Labels are numeric.
+
unsrt
+
Like plain, but entries are in order of +citation.
+
abbrv
+
Like plain, but more compact labels.
+
+

In addition, numerous other BibTeX style files exist tailored to +the demands of various publications.

+

The argument to \bibliography refers to the file +bibfile.bib, which should contain your database in +BibTeX format. Only the entries referred to via \cite +and \nocite will be listed in the bibliography.

+

theorem

+

+
+ \begin{theorem}
+  theorem text
+ \end{theorem}
+
+

The theorem environment produces "Theorem x" in +boldface followed by your theorem text.

+

titlepage

+

+
+ \begin{titlepage}
+  text
+ \end{titlepage}
+
+

The titlepage environment creates a title page, +i.e. a page with no printed page number or heading. It also causes +the following page to be numbered page one. Formatting the title +page is left to you. The \today +command comes in handy for title pages.

+

Note that you can use the \maketitle (see section +\maketitle) command to produce a standard +title page.

+

verbatim

+

+
+ \begin{verbatim}
+  text
+ \end{verbatim}
+
+

The verbatim environment is a paragraph-making +environment that gets LaTeX to print exactly what you type in. It +turns LaTeX into a typewriter with carriage returns and blanks +having the same effect that they would on a typewriter.

+ +

\verb

+

+

\verb char literal_text char

+

\verb*char literal_text char

+

Typesets literal_text exactly as typed, including +special characters and spaces, using a typewriter +(\tt) type style. There may be no space between +\verb or \verb* and char +(space is shown here only for clarity). The *-form +differs only in that spaces are printed as `\verb*| |'.

+

verse

+

+
+ \begin{verse}
+  text
+ \end{verse}
+
+

The verse environment is designed for poetry, +though you may find other uses for it.

+

The margins are indented on the left and the right. Separate the +lines of each stanza with \\, and use one or more +blank lines to separate the stanzas.

+ + + + +
Footnotes
+

+

Footnotes can be produced in one of two ways. They can be +produced with one command, the \footnote command. They +can also be produced with two commands, the +\footnotemark and the \footnotetext +commands. See the specific command for information on why you would +use one over the other.

+ +

\footnote

+

+

\footnote[number]{text}

+

The \footnote command places the numbered footnote +text at the bottom of the current page. The optional +argument, number, is used to change the default +footnote number. This command can only be used in outer paragraph +mode; i.e., you cannot use it in sectioning commands like +\chapter, in figures, tables or in a +tabular environment.

+

\footnotemark

+

+

The \footnotemark command puts the footnote +number in the text. This command can be used in inner +paragraph mode. The text of the footnote is supplied by the +\footnotetext command.

+

This command can be used to produce several consecutive footnote +markers referring to the same footnote by using

+

\footnotemark[\value{footnote}]

+

after the first \footnote command.

+

\footnotetext

+

+

\footnotetext[number]{text}

+

The \footnotetext command produces the +text to be placed at the bottom of the page. This +command can come anywhere after the \footnotemark +command. The \footnotetext command must appear in +outer paragraph mode.

+

The optional argument, number, is used to change +the default footnote number.

+ + + + +
Lengths
+

+

A length is a measure of distance. Many LaTeX +commands take a length as an argument.

+ +

\newlength

+

+

\newlength{\gnat}

+

The \newlength command defines the mandatory +argument, \gnat, as a length command with +a value of 0in. An error occurs if a +\gnat command already exists.

+

\setlength

+

+

\setlength{\gnat}{length}

+

The \setlength command is used to set the value of +a length command. The length argument can +be expressed in any terms of length LaTeX understands, i.e., inches +(in), millimeters (mm), points +(pt), etc.

+

\addtolength

+

+

\addtolength{\gnat}{length}

+

The \addtolength command increments a "length +command" by the amount specified in the length +argument. It can be a negative amount.

+

\settodepth

+

+

\settodepth{\gnat}{text}

+

The \settodepth command sets the value of a +length command equal to the depth of the +text argument.

+

\settoheight

+

+

\settoheight{\gnat}{text}

+

The \settoheight command sets the value of a +length command equal to the height of the +text argument.

+

\settowidth

+

+

\settowidth{\gnat}{text}

+

The \settowidth command sets the value of a +length command equal to the width of the +text argument.

+

Predefined lengths

+

+

\width

+

\height

+

\depth

+

\totalheight

+

These length parameters can be used in the arguments of the +box-making commands See section Spaces & +Boxes. They specify the natural width etc. of the text in the +box. \totalheight equals \height + +\depth. To make a box with the text stretched to +double the natural size, e.g., say

+

\makebox[2\width]{Get a stretcher}

+ + + + +
Letters
+

+

You can use LaTeX to typeset letters, both personal and +business. The letter document class is designed to +make a number of letters at once, although you can make just one if +you so desire.

+

Your `.tex' source file has the same minimum commands +as the other document classes, i.e., you must have the following +commands as a minimum:

+
+ \documentclass{letter}
+ \begin{document}
+  ... letters ...
+ \end{document}
+
+

Each letter is a letter environment, whose argument +is the name and address of the recipient. For example, you might +have:

+
+ \begin{letter}{Mr. Joe Smith\\ 2345 Princess St.
+      \\ Edinburgh, EH1 1AA}
+   ...
+ \end{letter}
+
+

The letter itself begins with the \opening command. +The text of the letter follows. It is typed as ordinary LaTeX +input. Commands that make no sense in a letter, like +\chapter, do not work. The letter closes with a +\closing command.

+

After the closing, you can have additional +material. The \cc command produces the usual "cc: +...". There's also a similar \encl command for a list +of enclosures. With both these commands, use \\ to +separate the items.

+

These commands are used with the letter class:

+ +

\address

+

+

\address{Return address}

+

The return address, as it should appear on the letter and the +envelope. Separate lines of the address should be separated by +\\ commands. If you do not make an +\address declaration, then the letter will be +formatted for copying onto your organization's standard letterhead. +If you give an \address declaration, then the letter +will be formatted as a personal letter.

+

\cc

+

+

\cc{Kate Schechter\\Rob McKenna}

+

Generate a list of other persons the letter was sent to. Each +name is printed on a separate line.

+

\closing

+

+

\closing{text}

+

The letter closes with a \closing command, +i.e.,

+
+ \closing{Best Regards,}
+
+

\encl

+

+

\encl{CV\\Certificates}

+

Generate a list of enclosed material.

+

\location

+

+

\location{address}

+

This modifies your organization's standard address. This only +appears if the firstpage pagestyle is selected.

+

\makelabels

+

+

\makelabels{number}

+

If you issue this command in the preamble, LaTeX will create a +sheet of address labels. This sheet will be output before the +letters.

+

\name

+

+

\name{June Davenport}

+

Your name, used for printing on the envelope together with the +return address.

+

\opening

+

+

\opening{text}

+

The letter begins with the \opening command. The +mandatory argument, text, is whatever text you wish to +start your letter, i.e.,

+
+ \opening{Dear Joe,}
+
+

\ps

+

+

\ps

+

Use this command before a postscript.

+

\signature

+

+

\signature{Harvey Swick}

+

Your name, as it should appear at the end of the letter +underneath the space for your signature. Items that should go on +separate lines should be separated by \\ commands.

+

\startbreaks

+

+

\startbreaks

+

Used after a \stopbreaks command to allow page +breaks again.

+

\stopbreaks

+

+

\stopbreaks

+

Inhibit page breaks until a \startbreaks command +occurs.

+

\telephone

+

+

\telephone{number}

+

This is your telephone number. This only appears if the +firstpage pagestyle is selected.

+ + + + +
Line & Page Breaking
+

+

The first thing LaTeX does when processing ordinary text is to +translate your input file into a string of glyphs and spaces. To +produce a printed document, this string must be broken into lines, +and these lines must be broken into pages. In some environments, +you do the line breaking yourself with the \\ command, +but LaTeX usually does it for you.

+ +

\\

+

+

\\[*][extra-space]

+

The \\ command tells LaTeX to start a new line. It +has an optional argument, extra-space, that specifies +how much extra vertical space is to be inserted before the next +line. This can be a negative amount.

+

The \\* command is the same as the ordinary +\\ command except that it tells LaTeX not to start a +new page after the line.

+

\-

+

+

The \- command tells LaTeX that it may hyphenate +the word at that point. LaTeX is very good at hyphenating, and it +will usually find all correct hyphenation points. The +\- command is used for the exceptional cases.

+

Note that when you insert \- commands in a word, +the word will only be hyphenated at those points and not at any of +the hyphenation points that LaTeX might otherwise have chosen.

+

\cleardoublepage

+

+

The \cleardoublepage command ends the current page +and causes all figures and tables that have so far appeared in the +input to be printed. In a two-sided printing style, it also makes +the next page a right-hand (odd-numbered) page, producing a blank +page if necessary.

+

\clearpage

+

+

The \clearpage command ends the current page and +causes all figures and tables that have so far appeared in the +input to be printed.

+

\enlargethispage

+

+

\enlargethispage{size}

+

\enlargethispage*{size}

+

Enlarge the \textheight for the current page by the +specified amount; e.g. \enlargethispage{\baselineskip} +will allow one additional line.

+

The starred form tries to squeeze the material together on the +page as much as possible. This is normally used together with an +explicit \pagebreak.

+

\fussy

+

+

\fussy

+

This declaration (which is the default) makes TeX more fussy +about line breaking. This can avoids too much space between words, +but may produce overfull boxes.

+

This command cancels the effect of a previous +\sloppy command. section \sloppy

+

\hyphenation

+

+

\hyphenation{words}

+

The \hyphenation command declares allowed +hyphenation points, where words is a list of words, +separated by spaces, in which each hyphenation point is indicated +by a - character.

+

\linebreak

+

+

\linebreak[number]

+

The \linebreak command tells LaTeX to break the +current line at the point of the command. With the optional +argument, number, you can convert the +\linebreak command from a demand to a request. The +number must be a number from 0 to 4. The higher the number, the +more insistent the request is.

+

The \linebreak command causes LaTeX to stretch the +line so it extends to the right margin.

+

\newline

+

+

The \newline command breaks the line right where it +is. It can only be used in paragraph mode.

+

\newpage

+

+

The \newpage command ends the current page.

+

\nolinebreak

+

+

\nolinebreak[number]

+

The \nolinebreak command prevents LaTeX from +breaking the current line at the point of the command. With the +optional argument, number, you can convert the +\nolinebreak command from a demand to a request. The +number must be a number from 0 to 4. The higher the number, the +more insistent the request is.

+

\nopagebreak

+

+

\nopagebreak[number]

+

The \nopagebreak command prevents LaTeX from +breaking the current page at the point of the command. With the +optional argument, number, you can convert the +\nopagebreak command from a demand to a request. The +number must be a number from 0 to 4. The higher the number, the +more insistent the request is.

+

\pagebreak

+

+

\pagebreak[number]

+

The \pagebreak command tells LaTeX to break the +current page at the point of the command. With the optional +argument, number, you can convert the +\pagebreak command from a demand to a request. The +number must be a number from 0 to 4. The higher the number, the +more insistent the request is.

+

\sloppy

+

+

\sloppy

+

This declaration makes TeX less fussy about line breaking. This +can prevent overfull boxes, but may leave too much space between +words.

+

Lasts until a \fussy command is issued. section +\fussy.

+ + + + +
Making Paragraphs
+

+

A paragraph is ended by one or more completely blank lines -- +lines not containing even a %. A blank line should not +appear where a new paragraph cannot be started, such as in math +mode or in the argument of a sectioning command.

+ +

\indent

+

+

\indent

+

This produces a horizontal space whose width equals the width of +the paragraph indentation. It is used to add paragraph indentation +where it would otherwise be suppressed.

+

\noindent

+

+

\noindent

+

When used at the beginning of the paragraph, it suppresses the +paragraph indentation. It has no effect when used in the middle of +a paragraph.

+

\par

+

+

Equivalent to a blank line; often used to make command or +environment definitions easier to read.

+ + + + +
Margin Notes
+

+

The command \marginpar[left]{right} creates a note +in the margin. The first line will be at the same height as the +line in the text where the \marginpar occurs.

+

When you only specify the mandatory argument right, +the text will be placed

+ +

By issuing the command \reversemarginpar, you can +force the marginal notes to go into the opposite (inside) +margin.

+

When you specify both arguments, left is used for +the left margin, and right is used for the right +margin.

+

The first word will normally not be hyphenated; you can enable +hyphenation by prefixing the first word with a +\hspace{0pt} command.

+ + + + +
Math Formulae
+

+

There are three environments that put LaTeX in math mode:

+
+
math
+
For Formulae that appear right in the text.
+
displaymath
+
For Formulae that appear on their own line.
+
equation
+
The same as the displaymath environment except that it adds an +equation number in the right margin.
+
+

The math environment can be used in both paragraph +and LR mode, but the displaymath and +equation environments can be used only in paragraph +mode. The math and displaymath +environments are used so often that they have the following short +forms:

+
+    \(...\)     instead of     \begin{math}...\end{math}
+
+    \[...\]     instead of     \begin{displaymath}...\end{displaymath}
+
+

In fact, the math environment is so common that it +has an even shorter form:

+
+    $ ... $     instead of     \(...\)
+
+

+ +

Subscripts & +Superscripts

+

+

To get an expression exp to appear as a subscript, you +just type _{exp}. To get +exp to appear as a superscript, you type +^{exp}. LaTeX handles +superscripted superscripts and all of that stuff in the natural +way. It even does the right thing when something has both a +subscript and a superscript.

+

Math Symbols

+

+

LaTeX provides almost any mathematical symbol you're likely to +need. The commands for generating them can be used only in math +mode. For example, if you include $\pi$ in your +source, you will get the symbol in your output.

+

Spacing in Math Mode

+

+

In a math environment, LaTeX ignores the spaces you +type and puts in the spacing that it thinks is best. LaTeX formats +mathematics the way it's done in mathematics texts. If you want +different spacing, LaTeX provides the following four commands for +use in math mode:

+

+
    +
  1. \; - a thick space
  2. +
  3. \: - a medium space
  4. +
  5. \, - a thin space
  6. +
  7. \! - a negative thin space
  8. +
+

Math Miscellany

+

+
+
\cdots
+
Produces a horizontal ellipsis where the dots are raised to the +center of the line. eg.
+
\ddots
+
Produces a diagonal ellipsis. eg.
+
\frac{num}{den}
+
Produces the fraction num divided by +den. eg.
+
\ldots
+
Produces an ellipsis. This command works in any mode, not just +math mode. eg.
+
\overbrace{text}
+
Generates a brace over text. eg.
+
\overline{text}
+
Causes the argument text to be overlined. eg.
+
\sqrt[root]{arg}
+
Produces the square root of its argument. The optional +argument, root, determines what root to produce, i.e., +the cube root of x+y would be typed as +$\sqrt[3]{x+y}$. eg.
+
\underbrace{text}
+
Generates text with a brace underneath. eg.
+
\underline{text}
+
Causes the argument text to be underlined. This command can +also be used in paragraph and LR modes. eg.
+
\vdots
+
Produces a vertical ellipsis. eg.
+
+ + + + +
Modes
+

+

When LaTeX is processing your input text, it is always in one of +three modes:

+ +

LaTeX changes mode only when it goes up or down a staircase to a +different level, though not all level changes produce mode changes. +Mode changes occur only when entering or leaving an environment, or +when LaTeX is processing the argument of certain text-producing +commands.

+

"Paragraph mode" is the most common; it's the one LaTeX is in +when processing ordinary text. In that mode, LaTeX breaks your text +into lines and breaks the lines into pages. LaTeX is in "math mode" +when it's generating a mathematical formula. In "LR mode", as in +paragraph mode, LaTeX considers the output that it produces to be a +string of words with spaces between them. However, unlike paragraph +mode, LaTeX keeps going from left to right; it never starts a new +line in LR mode. Even if you put a hundred words into an +\mbox, LaTeX would keep typesetting them from left to +right inside a single box, and then complain because the resulting +box was too wide to fit on the line.

+

LaTeX is in LR mode when it starts making a box with an +\mbox command. You can get it to enter a different +mode inside the box - for example, you can make it enter math mode +to put a formula in the box. There are also several text-producing +commands and environments for making a box that put LaTeX in +paragraph mode. The box make by one of these commands or +environments will be called a parbox. When LaTeX is in +paragraph mode while making a box, it is said to be in "inner +paragraph mode". Its normal paragraph mode, which it starts out in, +is called "outer paragraph mode".

+ + + + +
Page Styles
+

+

The \documentclass command determines the size and +position of the page's head and foot. The page style determines +what goes in them.

+ +

\maketitle

+

+

\maketitle

+

The \maketitle command generates a title on a +separate title page - except in the article class, +where the title normally goes at the top of the first page. +Information used to produce the title is obtained from the +following declarations:

+

See section Page Styles for the commands +to give the information.

+ +

\author

+

+

\author{names}

+

The \author command declares the author(s), where +names is a list of authors separated by +\and commands. Use \\ to separate lines +within a single author's entry -- for example, to give the author's +institution or address.

+

\date

+

+

\date{text}

+

The \date command declares text to be the +document's date. With no \date command, the current +date is used.

+

\thanks

+

+

\thanks{text}

+

The \thanks command produces a +\footnote to the title.

+

\title

+

+

\title{text}

+

The \title command declares text to be +the title. Use \\ to tell LaTeX where to start a new +line in a long title.

+

\pagenumbering

+

+

\pagenumbering{num_style}

+

Specifies the style of page numbers. Possible values of +num_style are:

+ +

\pagestyle

+

+

\pagestyle{option}

+

The \pagestyle command changes the style from the +current page on throughout the remainder of your document.

+

The valid options are:

+ + +

\markboth

+

+
+\markboth{left head}{right head}
+
+

The \markboth command is used in conjunction with +the page style myheadings for setting both the left +and the right heading. You should note that a "left-hand heading" +is generated by the last \markboth command before the +end of the page, while a "right-hand heading" is generated by the +first \markboth or \markright that comes +on the page if there is one, otherwise by the last one before the +page.

+

\markright

+

+
+\markright{right head}
+
+

The \markright command is used in conjunction with +the page style myheadings for setting the right +heading, leaving the left heading unchanged. You should note that a +"left-hand heading" is generated by the last \markboth +command before the end of the page, while a "right-hand heading" is +generated by the first \markboth or +\markright that comes on the page if there is one, +otherwise by the last one before the page.

+

\thispagestyle

+

+

\thispagestyle{option}

+

The \thispagestyle command works in the same manner +as the \pagestyle command except that it changes the +style for the current page only.

+ + + + +
Sectioning
+

+

Sectioning commands provide the means to structure your text +into units.

+ +

All sectioning commands take the same general form, i.e.,

+

\chapter[optional]{title}

+

In addition to providing the heading in the text, the mandatory +argument of the sectioning command can appear in two other +places:

+
    +
  1. The table of contents
  2. +
  3. The running head at the top of the page
  4. +
+

You may not want the same thing to appear in these other two +places as appears in the text heading. To handle this situation, +the sectioning commands have an optional argument that +provides the text for these other two purposes.

+

All sectioning commands have *-forms that print a +title, but do not include a number and do not make an entry +in the table of contents.

+

+

\appendix

+

The \appendix command changes the way sectional +units are numbered. The \appendix command generates no +text and does not affect the numbering of parts. The normal use of +this command is something like

+
+\chapter{The First Chapter}
+...
+\appendix
+\chapter{The First Appendix}
+
+ + + + +
Spaces & Boxes
+

+

All the predefined length parameters See section Predefined lengths can be used in the arguments of the +box-making commands.

+ +

\dotfill

+

+

The \dotfill command produces a "rubber length" +that produces dots instead of just spaces.

+

\hfill

+

+

The \hfill fill command produces a "rubber length" +which can stretch or shrink horizontally. It will be filled with +spaces.

+

\hrulefill

+

+

The \hrulefill fill command produces a "rubber +length" which can stretch or shrink horizontally. It will be filled +with a horizontal rule.

+

\hspace

+

+

\hspace[*]{length}

+

The \hspace command adds horizontal space. The +length of the space can be expressed in any terms that LaTeX +understands, i.e., points, inches, etc. You can add negative as +well as positive space with an \hspace command. Adding +negative space is like backspacing.

+

LaTeX removes horizontal space that comes at the end of a line. +If you don't want LaTeX to remove this space, include the optional +* argument. Then the space is never removed.

+

\addvspace

+

+

\addvspace{length}

+

The \addvspace command normally adds a vertical +space of height length. However, if vertical space has already been +added to the same point in the output by a previous +\addvspace command, then this command will not add +more space than needed to make the natural length of the total +vertical space equal to length.

+

\bigskip

+

+

The \bigskip command is equivalent to +\vspace{bigskipamount} where +bigskipamount is determined by the document class.

+

\medskip

+

+

The \medskip command is equivalent to +\vspace{medskipamount} where +medskipamount is determined by the document class.

+

\smallskip

+

+

\smallskip

+

The \smallskip command is equivalent to +\vspace{smallskipamount} where +smallskipamount is determined by the document +class.

+

\vfill

+

+

The \vfill fill command produces a rubber length +which can stretch or shrink vertically.

+

\vspace

+

+

\vspace[*]{length}

+

The \vspace command adds vertical space. The length +of the space can be expressed in any terms that LaTeX understands, +i.e., points, inches, etc. You can add negative as well as positive +space with an \vspace command.

+

LaTeX removes vertical space that comes at the end of a page. If +you don't want LaTeX to remove this space, include the optional +* argument. Then the space is never removed.

+

\fbox

+

+

\fbox{text}

+

The \fbox command is exactly the same as the +\mbox command, except that it puts a frame around the +outside of the box that it creates.

+

\framebox

+

+

\framebox[width][position]{text}

+

The \framebox command is exactly the same as the +\makebox command, except that it puts a frame around +the outside of the box that it creates.

+

The framebox command produces a rule of thickness +\fboxrule, and leaves a space \fboxsep +between the rule and the contents of the box.

+

lrbox

+

+

\begin{lrbox}{cmd} text \end{lrbox}

+

This is the environment form of \sbox.

+

The text inside the environment is saved in the box +cmd, which must have been declared with +\newsavebox.

+

\makebox

+

+

\makebox[width][position]{text}

+

The \makebox command creates a box just wide enough +to contain the text specified. The width of the box is +specified by the optional width argument. The position +of the text within the box is determined by the optional +position argument.

+ +

See section \makebox.

+

\mbox

+

+

\mbox{text}

+

The \mbox command creates a box just wide enough to +hold the text created by its argument.

+

Use this command to prevent text from being split across +lines.

+

\newsavebox

+

+

\newsavebox{cmd}

+

Declares cmd, which must be a command name that is +not already defined, to be a bin for saving boxes.

+

\parbox

+

+

+\parbox[position][height][inner-pos]{width}{text}

+

A parbox is a box whose contents are created in +paragraph mode. The \parbox has two +mandatory arguments:

+ +

LaTeX will position a parbox so its center lines up +with the center of the text line. The optional position +argument allows you to line up either the top or bottom line in the +parbox (default is top).

+

If the height argument is not given, the box will have +the natural height of the text.

+

The inner-pos argument controls the placement of the text +inside the box. If it is not specified, position is +used.

+ +

A \parbox command is used for a parbox containing a +small piece of text, with nothing fancy inside. In particular, you +shouldn't use any of the paragraph-making environments inside a +\parbox argument. For larger pieces of text, including +ones containing a paragraph-making environment, you should use a +minipage environment See section minipage.

+

\raisebox

+

+

+\raisebox{distance}[extend-above][extend-below]{text}

+

The \raisebox command is used to raise or lower +text. The first mandatory argument specifies how high the text is +to be raised (or lowered if it is a negative amount). The text +itself is processed in LR mode.

+

Sometimes it's useful to make LaTeX think something has a +different size than it really does - or a different size than LaTeX +would normally think it has. The \raisebox command +lets you tell LaTeX how tall it is.

+

The first optional argument, extend-above, makes +LaTeX think that the text extends above the line by the amount +specified. The second optional argument, extend-below, +makes LaTeX think that the text extends below the line by the +amount specified.

+

\rule

+

+

\rule[raise-height]{width}{thickness}

+

The \rule command is used to produce horizontal +lines. The arguments are defined as follows:

+ +

\savebox

+

+
+ \savebox{cmd}[width][pos]{text}
+
+

This command typeset text in a box just as for +\makebox. However, instead of printing the resulting +box, it saves it in bin cmd, which must have been +declared with \newsavebox.

+

\sbox

+

+

\sbox{text}

+

This commands typeset text in a box just as for +\mbox. However, instead of printing the resulting box, +it saves it in bin cmd, which must have been declared +with \newsavebox.

+

\usebox

+

+

\usebox{cmd}

+

Prints the box most recently saved in bin cmd by a +\savebox command.

+ + + + +
Special Characters
+

+

The following characters play a special role in LaTeX and are +called "special printing characters", or simply "special +characters".

+
+                       # $ % & ~ _ ^ \ { }
+
+

Whenever you put one of these special characters into your file, +you are doing something special. If you simply want the character +to be printed just as any other letter, include a \ in +front of the character. For example, \$ will produce +$ in your output.

+

One exception to this rule is the \ itself because +\\ has its own special meaning. A \ is +produced by typing $\backslash$ +in your file.

+

Also, \~ means `place a tilde accent over the +following letter', so you will probably want to use +\verb instead.

+

+

In addition, you can access any character of a font once you +know its number by using the \symbol command. For example, the character +used for displaying spaces in the \verb* command has +the code decimal 32, so it can be typed as +\symbol{32}.

+

You can also specify octal numbers with ' or +hexadecimal numbers with ", so the previous example +could also be written as \symbol{'40} or +\symbol{"20}.

+ + + + +
Splitting the Input
+

+

A large document requires a lot of input. Rather than putting +the whole input in a single large file, it's more efficient to +split it into several smaller ones. Regardless of how many separate +files you use, there is one that is the root file; it is the one +whose name you type when you run LaTeX.

+ +

\include

+

+

\include{file}

+

The \include command is used in conjunction with +the \includeonly command for selective inclusion of +files. The file argument is the first name of a file, +denoting `file.tex'. If file is one the file +names in the file list of the \includeonly command or +if there is no \includeonly command, the +\include command is equivalent to

+
+\clearpage \input{file} \clearpage
+
+

except that if the file `file.tex' does not exist, then +a warning message rather than an error is produced. If the file is +not in the file list, the \include command is +equivalent to \clearpage.

+

The \include command may not appear in the preamble +or in a file read by another \include command.

+

\includeonly

+

+

\includeonly{file_list}

+

The \includeonly command controls which files will +be read in by an \include command. file_list +should be a comma-separated list of filenames. Each filename must +match exactly a filename specified in a \include +command. This command can only appear in the preamble.

+

\input

+

+

\input{file}

+

The \input command causes the indicated +file to be read and processed, exactly as if its +contents had been inserted in the current file at that point. The +file name may be a complete file name with extension or just a +first name, in which case the file `file.tex' is used.

+ + + + +
Starting & Ending
+

+

Your input file must contain the following commands as a +minimum:

+
+ \documentclass{class}
+ \begin{document}
+   ... your text goes here ...
+ \end{document}
+
+

where the class selected is one of the valid +classes for LaTeX. See section Document +Classes for details of the various document classes available +locally.

+

You may include other LaTeX commands between the +\documentclass and the \begin{document} +commands (i.e., in the `preamble').

+ + + + +
Table of Contents
+

+

A table of contents is produced with the \tableofcontents command. You put the command +right where you want the table of contents to go; LaTeX does the +rest for you. It produces a heading, but it does not automatically +start a new page. If you want a new page after the table of +contents, include a \newpage command after the +\tableofcontents command.

+

There are similar commands \listoffigures and \listoftables for producing a list of figures +and a list of tables, respectively. Everything works exactly the +same as for the table of contents.

+

NOTE: If you want any of these items to be generated, you cannot +have the \nofiles command in your +document.

+ +

\addcontentsline

+

+

\addcontentsline{file}{sec_unit}{entry}

+

The \addcontentsline command adds an entry to the +specified list or table where:

+ +

\addtocontents

+

+

\addtocontents{file}{text}

+

The \addtocontents command adds text (or formatting +commands) directly to the file that generates the table of contents +or list of figures or tables.

+ + + + + +
Terminal Input/Output
+

+ +

\typein

+

+

\typein[cmd]{msg}

+

Prints msg on the terminal and causes LaTeX to stop +and wait for you to type a line of input, ending with return. If +the cmd argument is missing, the typed input is +processed as if it had been included in the input file in place of +the \typein command. If the cmd argument +is present, it must be a command name. This command name is then +defined or redefined to be the typed input.

+

\typeout

+

+

\typeout{msg}

+

Prints msg on the terminal and in the +log file. Commands in msg that are +defined with \newcommand or \renewcommand +are replaced by their definitions before being printed.

+

LaTeX's usual rules for treating multiple spaces as a single +space and ignoring spaces after a command name apply to +msg. A \space command in msg +causes a single space to be printed. A ^^J in +msg prints a newline.

+ + + + +
Typefaces
+

+

The typeface is specified by giving the "size" and +"style". A typeface is also called a "font".

+ +

\Styles

+

+

The following type style commands are supported by LaTeX.

+

These commands are used like \textit{italics text}. +The corresponding command in parenthesis is the "declaration form", +which takes no arguments. The scope of the declaration form lasts +until the next type style command or the end of the current +group.

+

The declaration forms are cumulative; i.e., you can say +\sffamily\bfseries to get sans serif boldface.

+

You can also use the environment form of the declaration forms; +e.g. \begin{ttfamily}...\end{ttfamily}.

+
+
\textrm (\rmfamily)
+
Roman.
+
\textit (\itshape)
+
+
\emph
+
Emphasis (toggles between \textit and \textrm).
+
\textmd (\mdseries)
+
Medium weight (default). The opposite of +boldface.
+
\textbf (\bfseries)
+
Boldface.
+
\textup (\upshape)
+
Upright (default). The opposite of +slanted.
+
\textsl (\slshape)
+
Slanted.
+
\textsf (\sffamily)
+
Sans serif.
+
\textsc (\scshape)
+
Small caps.
+
\texttt (\ttfamily)
+
Typewriter.
+
\textnormal +(\normalfont)
+
Main document font.
+
\mathrm
+
Roman, for use in math mode.
+
\mathbf
+
Boldface, for use in math mode.
+
\mathsf
+
Sans serif, for use in math mode.
+
\mathtt
+
Typewriter, for use in math mode.
+
\mathit
+
Italics, for use in math mode, e.g. variable names with several +letters.
+
\mathnormal
+
For use in math mode, e.g. inside another type style +declaration.
+
\mathcal
+
`Calligraphic' letters, for use in math mode.
+
+

In addition, the command \mathversion{bold} can be used for switching to +bold letters and symbols in formulas. +\mathversion{normal} restores the default.

+

Sizes

+

+

The following standard type size commands are supported by +LaTeX.

+

The commands as listed here are "declaration forms". The scope +of the declaration form lasts until the next type style command or +the end of the current group.

+

You can also use the environment form of these commands; e.g. +\begin{tiny}...\end{tiny}.

+
+
\tiny
+
\scriptsize
+
\footnotesize
+
\small
+
\normalsize
+
(default)
+
\large
+
\Large
+
\LARGE
+
\huge
+
\Huge
+
+

Low-level font +commands

+

+

These commands are primarily intended for writers of macros and +packages. The commands listed here are only a subset of the +available ones. For full details, you should consult Chapter 7 of +The LaTeX Companion.

+
+
\fontencoding{enc}
+
Select font encoding. Valid encodings include OT1 +and T1.
+
\fontfamily{family}
+
Select font family. Valid families include: +
    +
  • cmr for Computer Modern Roman
  • +
  • cmss for Computer Modern Sans Serif
  • +
  • cmtt for Computer Modern Typewriter
  • +
+and numerous others.
+
\fontseries{series}
+
Select font series. Valid series include: +
    +
  • m Medium (normal)
  • +
  • b Bold
  • +
  • c Condensed
  • +
  • bc Bold condensed
  • +
  • bx Bold extended
  • +
+and various other combinations.
+
\fontshape{shape}
+
Select font shape. Valid shapes are: +
    +
  • n Upright (normal)
  • +
  • it Italic
  • +
  • sl Slanted (oblique)
  • +
  • sc Small caps
  • +
  • ui Upright italics
  • +
  • ol Outline
  • +
+The two last shapes are not available for most font families.
+
\fontsize{size}{skip}
+
Set font size. The first parameter is the font size to switch +to; the second is the \baselineskip to use. The unit +of both parameters defaults to pt. A rule of thumb is that the +baselineskip should be 1.2 times the font size.
+
\selectfont
+
The changes made by calling the four font commands described +above do not come into effect until \selectfont is +called.
+
\usefont{enc}{family}{series}{shape}
+
Equivalent to calling \fontencoding, +\fontfamily, \fontseries and +\fontshape with the given parameters, followed by +\selectfont.
+
+
+
+
+ + + + + + +
LaTeX Reference +
Kile
+
+
+
+ + diff --git a/doc/en/psutils1.png b/doc/en/psutils1.png new file mode 100644 index 0000000..9fd015c Binary files /dev/null and b/doc/en/psutils1.png differ diff --git a/doc/en/psutils15.png b/doc/en/psutils15.png new file mode 100644 index 0000000..3ce1fd7 Binary files /dev/null and b/doc/en/psutils15.png differ diff --git a/doc/en/psutils16.png b/doc/en/psutils16.png new file mode 100644 index 0000000..a7c59bb Binary files /dev/null and b/doc/en/psutils16.png differ diff --git a/doc/en/psutils2.png b/doc/en/psutils2.png new file mode 100644 index 0000000..9a09321 Binary files /dev/null and b/doc/en/psutils2.png differ diff --git a/doc/en/psutils3.png b/doc/en/psutils3.png new file mode 100644 index 0000000..b738969 Binary files /dev/null and b/doc/en/psutils3.png differ diff --git a/doc/en/psutils5.png b/doc/en/psutils5.png new file mode 100644 index 0000000..9b31a89 Binary files /dev/null and b/doc/en/psutils5.png differ diff --git a/doc/en/psutils6.png b/doc/en/psutils6.png new file mode 100644 index 0000000..0ff695f Binary files /dev/null and b/doc/en/psutils6.png differ diff --git a/doc/en/psutils7.png b/doc/en/psutils7.png new file mode 100644 index 0000000..d8ba340 Binary files /dev/null and b/doc/en/psutils7.png differ diff --git a/doc/en/psutils8.png b/doc/en/psutils8.png new file mode 100644 index 0000000..a752a5c Binary files /dev/null and b/doc/en/psutils8.png differ diff --git a/doc/en/quickpreview.png b/doc/en/quickpreview.png new file mode 100644 index 0000000..039f82c Binary files /dev/null and b/doc/en/quickpreview.png differ diff --git a/doc/en/select.png b/doc/en/select.png new file mode 100644 index 0000000..e2f1acc Binary files /dev/null and b/doc/en/select.png differ diff --git a/doc/en/snap_autocomplete.png b/doc/en/snap_autocomplete.png new file mode 100644 index 0000000..fdee5d9 Binary files /dev/null and b/doc/en/snap_autocomplete.png differ diff --git a/doc/en/snap_compile_error.png b/doc/en/snap_compile_error.png new file mode 100644 index 0000000..24001cf Binary files /dev/null and b/doc/en/snap_compile_error.png differ diff --git a/doc/en/snap_editusertag.png b/doc/en/snap_editusertag.png new file mode 100644 index 0000000..f2b4289 Binary files /dev/null and b/doc/en/snap_editusertag.png differ diff --git a/doc/en/snap_encoding.png b/doc/en/snap_encoding.png new file mode 100644 index 0000000..6dbe7af Binary files /dev/null and b/doc/en/snap_encoding.png differ diff --git a/doc/en/snap_kdvi_settings.png b/doc/en/snap_kdvi_settings.png new file mode 100644 index 0000000..77a3ef2 Binary files /dev/null and b/doc/en/snap_kdvi_settings.png differ diff --git a/doc/en/snap_projectview.png b/doc/en/snap_projectview.png new file mode 100644 index 0000000..8b11723 Binary files /dev/null and b/doc/en/snap_projectview.png differ diff --git a/doc/en/snap_projectview_add.png b/doc/en/snap_projectview_add.png new file mode 100644 index 0000000..9c84e71 Binary files /dev/null and b/doc/en/snap_projectview_add.png differ diff --git a/doc/en/snap_ref_choose.png b/doc/en/snap_ref_choose.png new file mode 100644 index 0000000..f4c9a0a Binary files /dev/null and b/doc/en/snap_ref_choose.png differ diff --git a/doc/en/snap_ref_select.png b/doc/en/snap_ref_select.png new file mode 100644 index 0000000..1843630 Binary files /dev/null and b/doc/en/snap_ref_select.png differ diff --git a/doc/en/snap_sidebarmenu.png b/doc/en/snap_sidebarmenu.png new file mode 100644 index 0000000..a7ce8a3 Binary files /dev/null and b/doc/en/snap_sidebarmenu.png differ diff --git a/doc/en/snap_structview_label.png b/doc/en/snap_structview_label.png new file mode 100644 index 0000000..8646059 Binary files /dev/null and b/doc/en/snap_structview_label.png differ diff --git a/doc/en/snap_usertag.png b/doc/en/snap_usertag.png new file mode 100644 index 0000000..818c5fe Binary files /dev/null and b/doc/en/snap_usertag.png differ diff --git a/doc/en/texgroup.png b/doc/en/texgroup.png new file mode 100644 index 0000000..845e82b Binary files /dev/null and b/doc/en/texgroup.png differ diff --git a/doc/environment.png b/doc/environment.png deleted file mode 100644 index 1bb57fb..0000000 Binary files a/doc/environment.png and /dev/null differ diff --git a/doc/includegraphics.png b/doc/includegraphics.png deleted file mode 100644 index ccf9caf..0000000 Binary files a/doc/includegraphics.png and /dev/null differ diff --git a/doc/index.docbook b/doc/index.docbook deleted file mode 100644 index 5ec2f64..0000000 --- a/doc/index.docbook +++ /dev/null @@ -1,3720 +0,0 @@ - -Kile"> - ATEX"> - ATEX"> - EX"> - teTEX"> - TeX Live"> - EX"> - - EX"> - - - ImageMagick"> - KDE"> - KDVI"> - dvipng"> - KGhostView"> - KPDF"> - PostScript"> - makeidx"> - Kate"> - CJK"> - ucs"> - URL"> - - - - -]> - - - - -The &kile; Handbook - - - JonathanPechta - FedericoZenith -
zenith@chemeng.ntnu.no
- HolgerDanielsson -
holger.danielsson@versanet.de
- ThomasBraun - MichelLudwig -
michel.ludwig@kdemail.net
-
- - - - -2003 -Jonathan Pechta - - - -200320052006 -Federico Zenith - - - -20052006 -Holger Danielsson - - - -2007 -Thomas Braun - - - -2007 -Michel Ludwig - - -November 19, 2007 -2.0 - - -&FDLNotice; - - - - -&kile; is a &tex; and &latex; source editor and shell. - - - - -KDE -kdenonbeta -Kile -LaTeX -TeX - - -
- - - -Preface - - - - Requirements - - To Run &kile;, you will be required to have the following components - installed on your system: - - - Trinity Desktop environment (&tde;): - &tde; 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 &texlive; (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 - distribution documentation, or refer to your installation CD or DVD, for adding these - packages to your computer. - - The &kile; project includes several binary packages of &kile; for different distributions that can be easily - installed and run without having to compile; check out the &kile; - homepage. - - - - - - 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. - - Need answers about &kile;? Are you stuck with your compile? Want to see a new - feature? The preferred way to ask technical questions or start a discussion is to - use our mailing list: kile-devel@lists.sourceforge.net. - - - - - - - - Introduction - - - - Basic facts - - - - 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; codecompletion, compiling, postprocessing, - debugging, conversion and viewing tools; you also get very handy wizards, a &latex; - reference and a powerful project management. - - - - - - What is &latex; - - &latex; is a text-processing system derived from &tex;, a program developed originally in - 1977 by Donald Knuth to help him layout his work professionally, obtaining a work similar - to a typesetter's; the typesetter is the professional that styles a document's look according to - specifications for the type of document. - &latex; was created by Leslie Lamport to give authors an automatic typesetter, especially when - it came to the expensive and painstaking typesetting of mathematical formulas and expressions, - that by no chance are enclosed in dollar signs in &latex;. - Today, word-processing programs let any user be the typesetter; but what you often want - is a document that looks good, not one that you spent hours on to make it look good. - &latex; takes that burden, and lets you think of the document, not of the layout. And yes, - it will look good! - - - - - - How do you pronounce it? Why that strange typesetting? - - There is a funny traditions 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 mathematical formulae, then an extremely expensive, time-consuming and - frustrating business. - 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 as an hissing cat; the IPA symbol is /ç/. Many people report the different pronunciation - of ach (IPA symbol /x/), but I have personally asked some Greeks, and can - confirm the first version. You should be aware that a lot of people mispronounce /teks/ or /tek/. - Last, in &latex; the first LA is pronounced as - lay: the idea is that, 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! - - - - - - - - &latex; 101 - - The &latex; typesetting system is similar to other markup languages as XML, used for - many types of documents (including the one you are reading), or HTML, used for web - pages. The general idea is about having specially wrapped keywords, called - tags, that tell a program (a word processor, a web browser, or the &latex; - compiler) how to present text. &kile; offers you a good number of such tags in the - menu LaTeX in the menu bar. - - While we will try to give you a good idea of what &latex; is, this is not The Definitive - Book on &latex;. If you want to learn &latex; well, you may want to loan a book in your - library. The writer has had a good experience with A Guide to &latex; by H. Kopka - and P. W. Daly, and still keeps it on the shelf. - - As other markup languages, &latex; contains a preamble, which - sets global commands, such as paper size, page numbering, dimensions of the text on the page, - and a body, that contains the document text; the preamble contains - at least the \documentclass command, and precedes the body, that - starts with the command \begin{document}, and is quite predictably - concluded by the command \end{document}. - - - - - - &kile;'s Main Features - - - - QuickStart Wizard - - The QuickStart wizard built into &kile; is a useful feature to quickly start creating documents - in &kile;. Choosing the wizard from the menubar gives you several choices - for the creation of your document. - You can also specify some options related to the document right away. - - Class options: - - - Document Class: choose the type of document you want to create: - article, book, letter, report, scrartcl, scrreprt, scrbook, prosper, beamer or other - custom-defined. - Typeface Size: tell &kile; what point size (pt) - you want to use. - Paper Size: choose the size or style of sheets. - Encoding: In general it is a good idea to use your systems standard - encoding. Modern systems now move more and more to UTF-8 as the standard encoding. - If you can, use utf8x (which is indeed the correct spelling for &latex; documents). - - Other options: this allows you to set further options such as printing, - draft, and others. - - - Packages - This lists some of the most common additional packages used in &latex;. Select the checkbox to include it. - - Document Properties - - Author: put your name here. - Title: add the document title here. - Date: specify the date. - - - - - - - Predefined Templates - - The predefined templates in &kile; are: - - - Empty document: real freaks start from scratch! - Article: sets the article format, for a document short enough not to - be broken down to chapters. - Report: sets the report format, for a middle-sized document, with for - example page numbering on the page's outer edge. - Book: sets the book format, a full-fledged flavor, so powerful that - it is used to write many university textbooks. - Letter: sets the letter format, that can automatically do those nasty - indentations that nobody really remembers. - Beamer,HA-Prosper: create nice presentations in PDF with a superior look and all - &latex; power. - Scrartcl,Scrbook,Scrreprt,Scrlttr2: the KOMA-Script document classes, - especially adapted to german typography. Use them whenever you write german - texts. - - - New users need not to worry, this list is just a brief description of features, - and more attention will be paid to complete these tasks in detail later in - . - - - - - - Syntax Highlighting - - &kile; is similar to programs that deal with source code and editing, and will - automatically highlight commands, options and items that are used (and abused). - &kile; makes it possible to spot easily problem areas: for example, if you see major - areas of text turned green, it is likely that you forgot closing a math environment somewhere; - you would have noticed anyway by how crappy the output file would have looked, but - highlighting really saves you time and frustration. - - - - - - Auto-Completion of Environments - - The auto-completion of environments means that, when you begin a new environment by typing - \begin{environment}, &kile; will automatically insert a matching - \end{environment} command, with a line in between them - for your text. You can of course deactivate it if you want in - SettingsConfigure Kile... - LaTeXEnvironments. - - - - - - Jump to Structure Element - - All documents are normally structured in a hierarchy of some type. - &latex; allows you to break up documents into the following hierarchy - (part being highest in the hierarchy, and subparagraph being lowest): - - - \part - \chapter - \section - \subsection - \subsubsection - \paragraph - \subparagraph - - - When viewing a document in the Structure view, you can jump - between elements by clicking on the element you would like to view. - - - - - - Inverse Search - - When creating your own &latex; files, inverse search can be very helpful. Once you - have created a DVI file (DeVice Independent File), you can click the middle- - mouse button in the DVI viewer and &kile; will jump to the corresponding line in the - &latex; source code. - - A DVI is a type of file containing a - description of a formatted document, along with other - information including character font, and is besides PDF the usual output of - &tex; or &latex;. A number of utilities exist to view, convert and print DVI files on - various systems and devices. - - - - - - Forward Search - - When using inverse search, the selection of items in the DVI file is associated with - the editor, so when you click on the DVI file, the main window jumps to the - corresponding section of &latex; code in the editor. Forward search is the exact - opposite of this. Forward search will allow you to click on a specific section of text - in the &latex; code, and jump to the associated position in the DVI viewer window. - - - - - - - - The Toolbar - - - New: begin a new document. - Open: open a new document. - Close: close your document. - Define document as master: this is used when working with multiple files. - Having a master document will let you work more easily with other .tex files included - in your document. If you are using projects, you can also set in Project->Project - Options a project-wide master document. - Quickbuild: compiles your &latex; source code and displays the results - automatically, unless you have code errors. - Watch file mode: this mode will "watch" the DVI file for changes, and - will not launch a new session of &kdvi; after Quickbuild. - View logfile: views the .log file, - so you can spot errors. - Previous error: jumps backward through the - .log file - and highlights errors in source. - Next error: jumps forward through - .log file and - highlights errors in source. - Stop: halts current tool. - LaTeX: runs &latex; on the active document. - View DVI: launches DVI viewer. - DVI to PS: converts a DVI to a &postscript; (PS). - View PS: launches &postscript; (PS) viewer. - PDFLaTeX: runs &pdflatex; on the active document. - View PDF: launches the PDF viewer. - DVI to PDF: converts a DVI to a PDF. - PS to PDF: converts a PS to a PDF. - View HTML: views HTML created. - Kdvi Forward Search: jump to page that corresponds to the current line in the - editor. - - - If you look at the Edit toolbar, you will notice three large - drop-down menus. The drop-down menus were designed for you to be able to quickly add - certain common features into your document. The first drop-down box - is used for quickly dividing your document by parts, chapter, sections and so on; the - available commands to add segments to your &latex; source code are: - - - part: highest level of sectioning for a document. - chapter: starts a new chapter. - section: create a new section. - subsection: create a new subsection. - subsubsection: a secondary section between subsection and - paragraph. - paragraph: create a new paragraph. - subparagraph: create a new subparagraph. - - - The drop-down box named label is used to insert items to your document such as - indexes, footnotes, and references; the available commands are: - - - label: a command that produces a label for a chapter, - a figure or another element. - index: creates an entry for the index. - footnote: creates a footnote in your document. - ref: used to refer to a predefined label, which - you can choose from a drop-down list. - pageref: just like ref, but refers to - a page instead of a structure element. - cite: create a reference with data from a bibliography. - cite from ViewBib: ask the ViewBib tool for all selected references and insert them. - Currently this is only avaible with &kbib; as ViewBib tool. - - - - The Label drop-down menu - - - - - - The Label drop-down menu - - The Label drop-down menu - - - - - Selecting the label for a reference - - - - - - Selecting the label for a reference - - Selecting the label for a reference - - - - When using cite, you are presented with a drop-down - list of bibitems, but if you are using &bibtex; this will only work if the file - belongs to a Project. For editing &bibtex; files the usage of specialised editors is recommened. - The author has made good experience with &kbibtex; and &kbib;. Of course you can also write the &bibtex; files by hand inside &kile;. - - The last drop-down box labeled tiny is used to set the size of the text. You can - set the size of the main text, of footnotes, and so on. The available commands are: - - - tiny: smallest. - scriptsize: very small. - footnotesize: smaller. - small: small. - normalsize: normal. - large: large. - Large: larger. - LARGE: even larger. - huge: still larger. - Huge: largest. - - - - - - - - Quickstart - - - - Writing a &latex; Document with &kile; for Beginners - - Users of &kile; have two choices when starting a new document: they can use the - Wizard to begin a new document, select the type of document they - would like to create and options such as font size, paper size, and so on; otherwise, - they can write the code by hand. - - - \documentclass[12pt]{article} - \begin{document} - Here is a bunch of text coded in \LaTeX. - \end{document} - - Every document in &latex; begins with the command - \documentclass[optional argument]{class}, where class specifies the document type. - - Typing in the code example above from the text box gives you the following output: - - - Compiled text in DVI output - - - - - - Compiled text in DVI output - - Compiled text in DVI output - - - - The brackets that come after the command \documentclass - contain the options for the command. The option [12pt] sets the size - of the font for your article; if you do not set the font size in the beginning, you can set - it later in the text. - - Once you have typed in the code example from the box above, you will need to - compile your &latex; source code. The easiest way for you to compile &latex; is to - use the Build menu, or using the Quickbuild button. - - &Alt;2 - is the keyboard shortcut to compile your source code. - - You have to save your source code before you can compile; &kile; will do this automatically for you. - - If your document did not compile, check the log for errors. When using the Quickbuild - key, the &kdvi; viewer should be launched automatically; if it does not, look at the log. - - - - - Environments - - An environment is a segment of text that is managed differently - than the rest of the document. For example, you create a report with font size 12, - but you need to change your font size for a few sentences. The commands - \begin{environment}, \huge and - \end{environment} will let you temporarily alter the text inside - the environment commands to be size huge. - - Changes are only effective from \begin{environment} to - \end{environment}. There are no limits as how many changes - you can make inside an environment. - - There are many features you can add to your document that will make it more - readable and user-friendly. You can add features such as specific fonts, bold, italics, - underline etc. to your document, and these commands will end with either an - \end command, or at the end of your environment. - - - \begin{emph}: this command makes - text italicized, and is valid until the code comes across a \end{emph}, - \end{emph} or another environment. To italicize one word in a sentence, you - can use the syntax: this is \emph{my} sentence. - \textbf{I am making this text inside the brackets bold}: this - command makes your text bold. - \quote: to create a quote inside your document; begin your quote - with \begin{quote} and end it with \end{quote}. - \center: centers the text. - \verse: creates offset text for poems. - \itemize: makes an itemized list. - - - - - - - Using &kile; - - Now that we have given you some background about how to write code using the - &latex; markup language, we will show you how to create a document - using &kile; step-by-step. - - - Start &kile;. - Select WizardQuick Start, - then choose a format, and set your preferences in the wizard. - Once the wizard has entered text, do some customization to make the - document more readable, add a minimum of one quote, some bold text, - italics, and a verse to see the difference between the commands. - Save your file, and give it the name intro.tex. - Build your document using &Alt;2, or the - button labeled LaTeX. - Select View DVI. - Check out all your new text. - When you are done viewing your document, click the Editor View - button or press &Ctrl;e - to return to the editor if you are using the embedded - viewer, or close the viewer window if you are using a separate viewer. - - - That's it! You have just created your first &latex; document! - - Once you have created your DVI, you will be able to print your document, or change - it into a &postscript; or PDF file if you want. Experiment and have fun! - - - - - - DVI Files - - DVI stands for DeVice Independent file. These files are produced - by &tex; or &latex; to be read by a driver of some sort on your computer. There are many different types of output that - a .dvi can be sent to, such as a printer, &postscript; or PDF file converter, or your computer screen. - - - - Viewing a DVI - - You have already seen how to view a DVI file on the screen by using the View - DVI button in the toolbar. - - - - - - Printing a DVI - - To print a DVI, you can use the same process that you used to create your - document earlier (see ). At step 7, after - clicking View DVI, select - FilePrint - in the viewer, and if you have your printer properly configured, you will be able - to print the DVI. - - - - - - Converting DVI files - - The toolbar gives the options of Converting a DVI to other formats. Once you - have created a DVI from your &latex; source code, you will be able to export it - to a format of your choice using the toolbar buttons. - - - - - - - - Forward Search between &kile; and &kdvi; - - The forward search functions allow you to jump from your - editor directly into the associated position of the &DVI; - file. - &kile; offers a configuration with this option for all &latex; binaries. - Go to SettingsConfigure Kile... - ToolsBuild - and always choose the Modern configuration. - - To execute a forward search, position the cursor on a line of source code, and click - Kdvi Forward Search to jump to the associated position - in the DVI viewer window. - - - - - Inverse Search between &kile; and &kdvi; - - Inverse search is a very useful feature when you are writing - a &latex; document yourself. If everything is set up properly, you can - click into &kdvi;'s window with the &MMB; (on some systems, - when you do not have a three-button mouse, you can simultaneously - use the left and the - right button). After that kile load the &latex; source file and jump to - the proper paragraph. To use inverse search, you have to compile your &latex; file with the Modern configuration. - - Inverse search cannot work unless: - - - The source file has been compiled successfully. - &kdvi; knows which editor you would like to use. - - - With this feature of &kdvi;, a middle mouse click in the DVI document will - result in &kile; opening the corresponding &latex; document and attempt to go to the - corresponding line. Remember to tell &kdvi; to use &kile; as a text editor, in &kdvi;'s - menu item SettingsDVI Options.... - - - Configuring &kdvi; - - - - - - Configuring &kdvi; - - Configuring &kdvi; - - - - - - - Resolving Errors - - If you are trying to use quickbuild, and the DVI viewer does not open, chances are - you have an error. If you have an error, it will be visible in the log file / message area, - and the summary of the error will be given. - - The log file will explain the source of the error in your code. In the - editor, you can use the buttons in the toolbar labeled Previous LaTeX Error - and Next LaTeX Error to jump to and from errors. The log file always states - in which line the error occurred. To view the line where an error occurred, click on the error - in the log window, and &kile; will take you to error's line. - - - - - - - Starting a New Document - - When you click the button in the toolbar to begin a new document a dialog appears, - asking which type of template you would like to use to write your document. The - default choices are: - - - Empty document - Article - Beamer - Book - HA-Prosper - Letter - Report - Scrartcl (from the KOMA-Script package) - Scrbook (from the KOMA-Script package) - Scrlttr2 (from the KOMA-Script package) - Scrreprt (from the KOMA-Script package) - - - If you selected an Empty document, you can either start - writing a document from scratch, or you can use the wizard to quickly start a new - document (see ). - - - - - Templates - - Frequent users of &latex; typically use the same preamble for almost every document they use. - Templates can be created, saved and loaded within &kile; to make it easier to start a new document. - - - - Create a New Template - - To create a new template, you must first either open a &tex; / &latex; file, or create a file - of your own. &kile; can generate a template from an existing document by opening the desired document and selecting - FileCreate Template from Document. - - - - - - Configuring Automatic Substitutions - - When creating a new document by selecting a template from - FileNew, - certain character combinations will be replaced by data such as your name, - or the character encoding your are using. These variables can be configured in - SettingsConfigure Kile... - SettingsGeneral. - - When designing your own template, it is useful to known which character - combinations are replaced by which template variables: - - - $$AUTHOR$$: This string - will be replaced by the author variable. - $$DOCUMENTCLASSOPTIONS$$: This string will be replaced - by the documentclass options variable. Typically this is used as follows: - \documentclass[$$DOCUMENTCLASSOPTIONS$$]{article}. - $$INPUTENCODING$$: If the - inputencoding variable is set to, say, latin1 this string is replaced by - \input[latin1]{inputenc}. - - - - - - - Create a Template from the Wizard - - The easiest way to create a new template is to start the wizard, - and then add commands in the editor. Once you have your - document set up the way you like: - - - Save your file; - Go to File; - Choose Create Template from Document; - Make any corrections necessary to the template; - Enter a name for your new template; - Click OK to add your template to the menu. - - - Next time you start up a new document, you will be able to choose - your customized template instead of the default ones. - - - - - - Creating a Template from any File - - A template can be created from any &latex; file. If you are looking for an easy way to - configure a template, go find one you like on the Internet and follow the same steps - listed in . - - For instance, you may want to create a full-fledged A0 poster. These posters are usually seen - at scientific conferences, and &latex; will help you making an attractive, catchy poster. You can get a - template for A0 posters at Jonathan Marchini's - home page, but many more are available. Remember that you will need the a0poster - package, which is normally not in standard tex distributions included. Download it from - here and place it in the same directory as your &latex; file. - - - - - Removing a Template - - To remove a template from &kile;, do as follows: - - - Go to FileRemove - Template...; - A dialog box will appear with all templates listed: select a template; - Click OK, and your template will be removed. - - - Templates marked with an asterisk (*) cannot be removed without the proper permission. - - - - - - - - - Editing &latex; Documents - - The internal editor that &kile; uses is &kate;. - Kate is a text editor created for programmers, which incorporates the ability to read - and highlight many different types of text files, among which are &latex; and &bibtex;; you can access - many options for &kate; directly from &kile;'s Tools menu. - - To learn more about &kate; and its capabilities, see the Kate Handbook. - &kile; users can start reading from the chapter Working with the Kate Editor. - - - - The &latex; Reference - - &kile; features a very practical &latex; tag reference, which you can access - by choosing HelpLaTeX - Reference. It contains a thorough description - of almost all the commands that you may use in &latex; and their syntax. - - - - - - Cursor Movements - - To select text, you have the following options: - - - Hold left mouse button, and drag mouse to highlight text. - Click once on a word to move the cursor to a new area. - Click twice on a word to select the whole word. - Click twice on a word and pressing &Ctrl; to select the whole tex word. - This means clicking in this way on \par from \par\bigskip only select \par. - Click three times to select the whole sentence. - - - Holding the left mouse button, and dragging the text you want to select, - automatically copies the selected text to the clipboard. - - Holding shift and using the arrow keys allows you to select portions of the source - code in the editor window. - - - - - - Brackets - - Bracket completion is a visual tool that the editor view uses to indicate you - which bracket matches which. If you open any .tex file, - and select any bracket, whether it be a parenthesis (), square brackets [] or braces {}, the - editor will highlight the bracket and its match in yellow (this default color can be changed). - So, for example, if you position the cursor on the braces in - \section{Introduction}, you would see - \section{Introduction} in the default yellow highlight, - showing you the location of the beginning and ending brackets. - - - - - - Highlighting - - &kile; has the ability to look for and highlight different types of code. For example, &latex; commands - are distinguished from normal text, and math formulas are highlighted also in a different color. - - - - - - Bullets - - Many wizards can insert optional bullets, a special kind of bookmarks within the text. The - menu entries EditBullets or - the corresponding keyboards shortcuts will allow you to jump to the next or last bullet. - This will also highlight this bullet so that it will be deleted automatically, - when you enter your first letter. - - - Bullets - - - - - - Bullets - - - - - - - - &Ctrl;&Alt;Right - Next Bullet - Jump to the next bullet in the text if there is one. - - - - &Ctrl;&Alt;Left - Last Bullet - Jump to the previous bullet in the text if there is one. - - - - - - - - - Select - - Editing is of course one of the main aspects when you use a program like &kile;. - Although &kate; already has great capabilities, &kile; adds some important features, - which are especially needed to write &latex; source. &latex; always needs a lot of - environments and groups, so &kile; supports very special commands to select them. - Under EditSelect - you will find the following commands to select text. - - - Edit->Select items - - - - - - Edit->Select items - - - - - - - &Ctrl;&Alt;S - E - Environment (inside) - Select an environment - without the surrounding tags. - - - - &Ctrl;&Alt;S - F - Environment (outside) - Select an environment - including the surrounding tags. - - - - &Ctrl;&Alt;S - T - TeX Group (inside) - Select a TeX group - inside the surrounding braces. - - - - &Ctrl;&Alt;S - U - TeX Group (outside) - Select a TeX group - including the surrounding braces. - - - - &Ctrl;&Alt;S - M - Math Group - Select the current math group including the math commands. - - - - &Ctrl;&Alt;S - P - Paragraph - Select a whole paragraph, - &ie; a group of text lines separated on both sides by empty lines. - A paragraph does not mean just continuous lines of text, as it is - in other text editors. This extended meaning also includes tables, &latex; - commands and all other lines of source. The only important thing for &kile; - is that kind of paragraph is separated by two empty lines. - - - - &Ctrl;&Alt;S - L - Line - Select the text line of the - current cursor position. - - - - &Ctrl;&Alt;S - W - TeX Word - Select the word under - the current cursor position. This selection has also en extended meaning, - because this command can also select &latex; commands, which begin with a - backslash and may also have an optional star at the - end. - - - - - - - - - Delete - - To delete some parts of a document you can of course select them, and then - use the Delete key. Kate also offers the command - &Ctrl;K which deletes the hole line.But &kile; offers a - faster way with its own delete commands. - Under EditDelete - you will find following commands to delete text. - - - Edit->Delete items - - - - - - Edit->Delete items - - - - - - - &Ctrl;&Alt;T - E - Environment (inside) - Delete an environment without the surrounding tags. - - - - &Ctrl;&Alt;T - F - Environment (outside) - Delete an environment including the surrounding tags. - - - - &Ctrl;&Alt;T - T - TeX Group (inside) - Delete a TeX group inside the surrounding braces. - - - - &Ctrl;&Alt;T - U - TeX Group (outside) - Delete a TeX group including the surrounding braces. - - - - &Ctrl;&Alt;T - M - Math Group - Delete the current math group including the math commands. - - - - &Ctrl;&Alt;T - P - Paragraph - Delete a whole paragraph. Look at the - SelectParagraph - command, how a paragraph is - defined in &kile;. - - - - - &Ctrl;&Alt;T - I - To End of Line - Delete the text from the current cursor position to the end of the line. - - - - - &Ctrl;&Alt;T - W - TeX Word - Delete the word or &latex; - command under the current cursor position. - - - - - - - - - Environment - - It was already mentioned that environments are a central point in &latex;. - So &kile; offers five other commands to make the work with &latex; as easy as possible - under submenus EditEnvironment. - - - Edit->Environment items - - - - - - Edit->Environment items - - - - - - - - &Ctrl;&Alt;E - B - Go to Begin - This command will jump to the beginning of the current environment, - wherever your current position is. The cursor will be placed directly - in front of the opening environment tag. - - - - &Ctrl;&Alt;E - E - Go to End - This command will jump to the end of the current environment, - wherever your current position is. The cursor will be placed directly - behind the closing environment tag. - - - - &Ctrl;&Alt;E - M - Match - When your cursor is placed in front of or above the - \begin{environment} tag, it will be moved to the - opposite end of the environment and vice versa. - - - - &Ctrl;&Alt;E - C - Close - Typing a lot of nested environment tags, you may lose - control of all those environments. This command will close the last - opened environment, so that the nested structure of environments - will not be broken. - - - - &Ctrl;&Alt;E - A - Close All - This closes all open environments, not only the last opened environment. - - - - - - - - - &tex; Group - - &kile; also offers some special commands for &latex; groups;, - which are determined by braces {...}. In submenu - EditTeX Group - you will find some important commands, which correspond to those from - EditEnvironment. - - - - Edit->TeX Group - - - - - - Edit->TeX Group - - - - - - - &Ctrl;&Alt;G - B - Go to Begin - This command will jump to the beginning of the current group, - wherever your current position is. The cursor will be placed directly in front - of the opening brace. - - - - &Ctrl;&Alt;G - E - Go to End - This command will jump to the end of the current group, - wherever your current position is. The cursor will be placed directly - behind the closing brace. - - - - &Ctrl;&Alt;G - M - Match - When your cursor is placed in front of or behind an - opening brace of a &tex; group, he will be moved to the opposite end of - the group and vice versa. - - - - &Ctrl;&Alt;G - C - Close - Typing a lot of nested group braces may be hard work. - This command will close the last opened group, so that the nested - structure of &tex; groups will not be broken. - - - - - - - - - Double Quotes - - In &latex;, two single quotes are used as double quotes. To - help you insert these efficiently, &kile; allows you to press - " to insert two opening - single quotes. Furthermore, if you want to close a quotation, you also - have to press ". &kile; will - be smart enough to recognize this case and inserts two closing quotes - for &latex;. - - To get a literal double quote on the other side, press - " twice. - - You can enable or disable this auto insertion of opening and - closing double quotes in section - SettingsConfigure - Kile...LaTeX. - - - Double Quotes - - - - - - Double Quotes - - - - - If you also include language-specific options - like ngerman or french, - you will also be able to use German or French double quotes. Many more languages are available. - - - - - - - Smart Newline - - If you press &Shift;Return, - &kile; inserts an intelligent newline. If your current position - is inside a list environment, like enumerate - or itemize, &kile; will not only insert - a newline, but also add a \item command. - - If you are inside a tabular environment, &kile; will finish the - current line with \\, followed by the newline. - - If you are inside a &latex; comment, &kile; will start the next line with a - %. - - Even better, &kile; is smart enough to support predefined &latex; - and user defined environment, which can be added in section - SettingsConfigure - Kile...LaTeX. - - - - - - Smart Tabulator - - Some users like to arrange columns in tabular environments and - put all ampersand characters & beneath each other. &kile; tries - to support this. If you press &Shift;&Alt;&, - &kile; will look for the next tab in the row above. Although his which may not the - corresponding tab, &kile; will add some spaces to adjust the column position with - the current tab. - - - - - - - - Code Completion - - Although &kate; already offers a good completion mode, &kile; extended - code completion to support some special methods especially for &latex;. Five different - modes are integrated. Three of them work on demand, the other two are autocompletion - modes. All modes can be configured to work very differently at - SettingsConfigure Kile.... - - - - Automatic Environment Completion - - When you begin a new environment, typing \begin{environment}, - &kile; will automatically add an \end{environment} command, with a - line in between for your text. - - Autocompletion can be turned off in the &latex; section of - SettingsConfigure Kile... - LaTeXEnvironments. - - - Completing an Equation Environment - - - - - - Completing an Equation Environment - - Completing an Equation Environment - - - - - - - - &latex; Commands - - When you type some letters, you can activate this completion mode for &latex; commands - and normal words with EditComplete(La)TeX Command or the keyboard shortcut - &Ctrl;Space. - &kile; first reads the letters from the current cursor position to the - left and stops at the first non-letter character or a backslash. If this - pattern begins with a backslash, &kile; will enter completion mode for &tex; or &latex; - commands. Otherwise it enters normal dictionary mode, where you will not find any - &latex; commands. Depending on the chosen mode, a completion box will be opened. - You will see all commands or words whose beginning matches the current pattern. - You can navigate with the cursor keys through this list and select one entry with - &Enter; or a double click with the mouse. - - - Completing a LaTeX Command - - - - - - Completing a LaTeX Command - - - - - When you push the &Backspace; key, the last letter of your - pattern will be deleted, and the completion list may grow. On the other hand, if - you type another letter will expand the pattern and the - visible word list may shrink. - - If you decide not to select any of the suggestions, you can leave this - dialog with &Esc;. - - You will see that all commands are written with a short description of - their parameters. These descriptions are of course stripped when you select a command. - Optionally you can let &kile; insert bullets at these places, so that you can easily - jump to the these positions with EditBulletsNext Bullet - and insert the parameter you want. - - - Completing a LaTeX Command - - - - - - Completing a LaTeX Command - - - - - Go to - SettingsConfigure Kile... - KileComplete - to configure one or more of these lists. You can choose different word lists - for &tex; and &latex; commands and dictionary mode for normal words. - - - - - - Environments - - The command mode is not useful to complete environments. - You always have to type some letters of \begin, and invoking - the completion mode will result in a huge list of environments tags. On the other - hand, environments are so often used that &kile; offers a special mode to complete - environments. Forget the opening tag and write, for example, eq. - - When you call the completion mode with - EditCompleteEnvironment or keyboard shortcut &Alt;Space, - the opening tag is automatically added and you will see \begin{eq}. - After this change, the completion list is much less cluttered. - - - Completing a LaTeX Command - - - - - - Completing a LaTeX Command - - - - - Now select an environment, and you will see that it is also automatically closed. - Even more, if &kile; recognizes it as a list environment, it will also insert a first - \item tag. - - - Completing a LaTeX Command - - - - - - Completing a LaTeX Command - - - - - Go to - SettingsConfigure Kile... - KileComplete - to configure one or more of these lists. This mode uses the same word lists as the - completion mode for &tex; and &latex; commands. - - - - - - Abbreviations - - &kile; supports user defined lists of abbreviations, which are replaced - on demand by longer text strings. Look at - SettingsConfigure Kile... - KileComplete - to configure one or more of theses lists. For the example given here, the - abbreviation list in example.cwl must be chosen. - In this file you will find for example the entry L=\LaTeX for example. - - For example, type only the letter L. Now invoke - the abbreviation mode of word completion with - EditCompleteAbbreviation or keyboard shortcut &Ctrl;&Alt;Space, - and the letter L is replaced by the string - \LaTeX. - - - - - - Autocompletion Modes - - - - &latex; Commands - - You can also enable an autocompletion mode for &latex; commands. - When a given threshold of letters (default: 3) is entered, a popup window opens - with a list of all matching &latex; commands. You can select one of these commands, - or ignore this window and type further letters. The entries of the completion box - will always change and match your currently typed word. - - Go to - SettingsConfigure Kile... - KileComplete - to enable or disable this mode or to change the threshold. - - - Completing an Equation Environment - - - - - - Completing an Equation Environment - - - - - - - - - Document Words - - Large dictionaries are not useful in autocompletion mode. But, we have seen - that a lot of words in a document are typed more than once. So &kile; offers a - completion for all words from the document that the user has already typed before. - - If you want to turn this mode on or off, go to - SettingsConfigure Kile... - KileComplete. - In this configuration dialog you can also change the threshold at which - the completion box pops up. - - - - - - - - Writing Own Completion Files - - The specification of the completion file format can found in the - CWL file format specification. - - - - Completion files can be installed in a user's home directory under the ~/.trinity/share/apps/kile/complete/<mode>/ - subdirectory, where <mode> either stands for abbreviation, dictionary or tex. - - - - - - - - Wizards and Dialogs - - - - Include Graphics - - The Include Graphics dialog makes insertion of - graphics as easy as possible. Please take a look at - and to - get an overview of some basic facts concerning graphic formats. - - - Including a graphics element - - - - - - Including a graphics element - - - - - - Choose a graphics file. This can be a JPEG, PNG, EPS - or even a zipped or gzipped EPS file. If you have installed - &imagemagick; - and also configured &kile; to use it - (SettingsConfigure Kile... - LaTeXGeneral), - the width and the height of the graphic is automatically shown. - If &imagemagick; can determine a resolution, the size of the graphics - is also shown in centimeters. - - Decide whether your image shall be centered on the page. - - Choose either traditional &latex; or &pdflatex;. - Please remember that &pdflatex; can also create DVI output, - not only PDF. - - You can choose whether the filename should be taken - relative. This is the preferred way, when you use the - \graphicspath command. - - By default graphics files have to be in the same - folder than your master document. However - it is possible to put them in other folders to make - things tidier. Without a \graphicspath - command, &kile; would include the path for the graphics file. - But if you use \graphicspath, - like: - - - \graphicspath{{/path/to/my/graphics}{other/path/to/more/graphics}} - - - and check this option, &kile; with only use the - base name of the graphics file. - - Another example: if you set \graphicspath - command like: - - - \graphicspath{{./}{camera/}{images/}} - - - &latex; will search in the current folder, then in - camera and finally in - images to find your graphics file. - - If you choose either a width or a height, the whole graphics - will be proportionally scaled. If you set two values for width and height - at the same time, width and height may be scaled with different factors, - and this could not be what you want. See also the information near the top - of dialog to know the original size of the graphics. - - Insert an angle by which to rotate the graphics counterclockwise. - - The bounding-box information is set automatically - when you choose a graphics file. This information is only needed - when you work with traditional &latex; and bitmapped graphics. - See the discussion of EPS graphics. - - - Your last choice is whether to embed this graphics into a - figure environment. If you decide to do so, you can also insert a - caption and a label. It is a good idea to add a different prefix to - each kind of label. It is common to use the prefix - fig: for images. - - - - - - - Array Wizard - - One of the most boring jobs one can do in &latex; is to write a matrix or a - tabular environment. One has to keep track of all the elements, ensure that the environment - is well formed, and that all things are where they are supposed to be. Good indentation helps, - but there is a simpler way: using &kile;'s Wizard menu. It contains - Tabular and Array (used in math environments). - You will then have a matrix-formed input form that you can easily fill in with your entries. This dialog also - offers some options to typeset the tabular material. - - - Inserting a tabular environment - - - - - - Inserting a tabular environment - - - - - The Tabbing option will display a simpler menu - to set up a tabbing environment. In all these environments, you can easily set the - number of rows and columns, along with other specific options. - - - - - &postscript; Utilities - - PS files are not so popular as PDF files, but are an excellent base - for manipulations and rearrangements of pages. If you need PDF - output, you can rearrange pages with some &postscript; utilities and then - convert it to PDF with ps2pdf. - - The &postscript; Wizard will suggest the most - popular rearrangements, but you are free to do your own choice. Work is done - by the programs pstops and psselect, which - you will find in most distributions in the package psutils. - If one of these programs is not available, the corresponding item will not - be visible. - - - Dialog PSTools - - - - - - Dialog PSTools - - - - - First choose your input file. If &kile; finds a PS file corresponding to your - current master document, it is already filled in as input file, but you are also free - to choose another file. Then choose an output file, and select one of the tasks. - Finally, you have to decide whether you want to do the conversion only, or also invoke - &kghostview; to view the result. - - - - - 1 A5 page + empty page --> A4 - Combine one A5 page together with one empty page - on one A4 page. Whenever two A5 pages are combined together, - they are rotated 90 degrees and will be arranged - on an A4 page in landscape mode. - - A5 + empty page - - - - - - A5 + empty page - - - - - - - - 1 A5 page + duplicate --> A4 - Put one A5 page and a duplicate together - on one A4 page. - - duplicate A5 pages - - - - - - Duplicate an A5 page - - - - - - - - 2 A5 pages --> A4 - Put two consecutive A5 pages together - on one A4 page. - - Combine two A5 pages - - - - - - Combine two A5 pages - - - - - - - - 2 A5L pages --> A4 - Put two consecutive A5 pages in landscape mode together - on one A4 page. - - - - 4 A5 pages --> A4 - Combine four consecutive A5 pages together on one - A4 page. The A5 pages have to be scaled with factor 0.7 to fit - on the page. - - 4 A5 pages --> A4 - - - - - - 4 A5 pages --> A4 - - - - - - - - 1 A4 page + empty page --> A4 - Combine one A4 page together with one empty page - on one A4 page. Whenever two A4 pages are combined together on one - resulting A4 page, they have to be scaled with factor 0.7 and will - be arranged in portrait mode. - - 1 A4 page + empty page --> A4 - - - - - - 1 A4 page + empty page --> A4 - - - - - - - - 1 A4 page + duplicate --> A4 - Put one A4 page and a duplicate together - on one A4 page. - - 1 A4 page + duplicate --> A4 - - - - - - 1 A4 page + duplicate --> A4 - - - - - - - - 2 A4 pages --> A4 - Put two consecutive A4 pages together - on one A4 page. - - Combine two A4 pages - - - - - - Combine two A4 pages - - - - - - - - 2 A4L pages --> A4 - Put two consecutive A4 pages in landscape mode together - on one A4 page. - - - - select even pages - Select all even pages of a document. - - - - select odd pages - Select all odd pages of a document. - - - - select even pages (reverse order) - Select all even pages of a document and reverse the order. - - - - select odd pages (reverse order) - Select all even pages of a document and reverse the order. - - - - reverse all pages - Reverse all pages of a document. - - - - copy all pages (sorted) - Copy all pages of a document. You have to - choose the number of sorted copies. - - Copy all pages (sorted) - - - - - - Copy all pages (sorted) - - - - - - - - copy all pages (unsorted) - Copy all pages of a document. You have to - choose the number of non-sorted copies. - - Copy all pages (unsorted) - - - - - - Copy all pages (unsorted) - - - - - - - - pstops: choose parameter - There are many options for &postscript; utilities - pstops and psselect. If you - need a very special one, you can invoke pstops with - an option of your choice. Please read the manual for all possible - options. - - - - psselect: choose parameter - You can invoke psselect with - an option of your choice. Please read the manual for all possible - options. - - - - - - - - Document Statistics - - The statistics dialog gives you an statistical overview for a selection, - a document or an hole project. It includes the number of words, &latex; - commands/environments and also includes the number of characters for each type. - The statistical numbers can be copied as text or as a nice formatted &latex; tabular - to the clipboard. If you want to get statistics for the hole project you can use - FileOpen All Project Files - for an easy and quick way to open all source files of your project. - A note of caution has to be sounded about the accuracy of the numbers. - We have included some logic to get a good estimate, e. g. K\"uhler gives one word and one command, - with six resp. two characters. But there are other combinations in which parts of commands - are counted as words and vice versa. It has also to be beared in mind that the algorithm - was developed and tested for languages similiar to english or german. - So don't take the numbers for granted. If you have to make an report with an - exact numbers of words or characters, make some tests to check whether &kile;'s accuracy satisfies your needs. - - - - - - - Special Tags in &latex; - - - Using the &latex; Tag Library - - &latex; has thousands of tags for symbols and special characters. - The easiest way to insert these tags is to use the sidebar menu, - left of the editor window. - - - The Sidebar Menu - - - - - - The Sidebar Menu - - The Sidebar Menu - - - The following types are avaible: - - - Most Frequently Used - Relation - Operators - Arrows - Miscellaneous Math - Miscellaneous Text - Delimiters - Greek - Special Characters - Cyrillic Characters - User Defined - - The tooltips of the icons show the &latex; commands and additionally needed packages. - Pressing &Shift; and clicking a symbol will result in - $\symbolcmd$ being inserted. Similiar pressing &Ctrl; - inserts it in curly brackets. - If you insert a command which requires a package which is not included in your &latex; document, - you will see a warning message in the logview window. - The first list of symbols holds the Most Frequently Used symbols. Inserted symbols will be - added to this list, for quick and easy reference. The ordering of the symbols will not be changed - upon addition of new symbols, instead a reference counter is incremented. If the number of items - would exceed 30 items, the item wit the lowest count will get removed. - The User Defined symbol list can hold your own symbols. - To create your own symbols you need the program gesymb and the file definitions.tex from the kile source package. - Additionaly you need a &latex; compiler (what a surprise) and - &dvipng; (version 1.7 or later). - The procedure is so that you create a &latex; file with \input{definitions}, - which makes the commands listed below available, and let gesymb mysymbols.tex user - (which calles &latex; and &dvipng;) create the icons. After copying them to - $HOME/.trinity/share/apps/kile/mathsymbols/user/ and restarting kile you can use your own symbols. - - - The following commands are defined in definitions.tex: - - - - \command[\optarg]{\symbol}: Include the symbol \symbol in the - symbol list, the optional argument \optarg specifies the command which kile should insert. - If it is not given the command in the mandatory argument is used. - - - - - \mathcommand[\optarg]{\symbol}: Same as above, except that the command in the mandatory - argument is inserted in math mode. - - - - - \pkgs[arg]{pkg}: Declare that the command given in this line needs the &latex; package - pkg with the optional argument arg. This command has to be in - front of the \command command and overrides any package specification by the neededpkgs - enviroment. - - - - - \begin{neededpkgs}[pkgs-args]{pkgs} ... \end{neededpkgs}: Has the same effect as - above, but for all enclosed commands. - - - - - - An example for completeness is given here: - - \documentclass[a4paper,10pt]{article} - \usepackage{amssymb} - \input{definitions} - % - \begin{document} - \pagestyle{empty} - % - \begin{neededpkgs}{amssymb} - \mathcommand{\surd} - \pkgs{amsmath}\mathcommand[\ddddot{}]{\ddddot{a}} - \mathcommand{\angle} - \end{neededpkgs} - \command{\"A} - \mathcommand{\exists} - \mathcommand[\stackrel{}{}]{\stackrel{abc}{=}} - - %\begin{neededpkgs}[russian,koi8-r,T2C,]{babel,inputenc,fontenc,mathtext} - % - % \end{neededpkgs} - % this would need to include the packages - % \usepackage{mathtext} - % \usepackage[T2C]{fontenc} - % \usepackage[russian]{babel} - % \usepackage[koi8-r]{inputenc} - % just to explain the format - \end{document} - - - - - - - Using Bibitems - - \bibitem is a command used to enter a reference in a - thebibliography environment in your document. The syntax for using - \bibitem is \bibitem[label]{key}. - - The optional [label] is for you to add your own - labeling system for the bibliography entry. If no label is set, the entries - will be set in numerical order: [1], [2], [3], etc. - - The argument {key} is used to reference and link the commands - \bibitem and \cite to - each other and the information they contain. The command \cite contains the - label associated with the intended \bibitem, which is located inside a - thebibliography environment, and contains the reference data. - Both corresponding \bibitem and \cite must - have the same {key}; the easiest way to organize keys is by - the author's last name. The secondary braces in the thebibliography - environment denote the longest bibliography label you expect to have. - So, inserting {foo} means - you can have any label shorter or as large as the expression - foo. Failure to set this parameter correctly - may result in a not so attractive indentation of your bibliography. - - The bibliography is a section apart from your main document, and an example of - code for the bibliography would look like the following: - - - \begin{thebibliography}{50} - \bibitem{Simpson} Homer J. Simpson. \textsl{Mmmmm...donuts}. - Evergreen Terrace Printing Co., Springfield, SomewhereUSA, 1998 - \end{thebibliography) - - Then, your main source code would contain the location of the information relating to - the \bibitem using \cite. That source code would look similar to this: - - - My thesis, about the philosophy of The Simpsons\copyright - comes from my favorite book \cite{Simpson}. - - As it is often difficult to remember the exact citation key once you have many - references, &kile; provides an easy way to insert a citation. On the Edit - toolbar click on the second drop-down box (usually it reads label) and select - cite. A list with all the citation keys pops up: select the correct - reference and a citation will be inserted into your document. To update the list of keys, - either save the file,EditRefresh - Structure or press F12. - - The final product in your document's bibliography would then look like this: - - [1] Homer J. Simpson. Mmmmm...donuts. Evergreen Terrace Printing Co., - Springfield, SomewhereUSA, 1998. - - The easiest way to work with \bibitem and - \cite is to use the toolbar drop-down box marked - cite. When you select a citation to insert, you will be given the list of - bibitems you have created so far, and will be able to select the - reference from the list. &kile; can also work together with &bibtex; editor applications, - such as &kbibtex; to help make citations easier. - - - - - - User-Defined Tags - - &kile; gives you the ability to make your own tags. A tag is similar - to a shortcut that launches some command or writes frequently-used text. - For example, Joe Sixpack uses often the sentences I prefer \LaTeX\ - to \TeX\ and What would I do without Linux?. - To create user-defined tags to write these sentences, he would access - LaTeXUser TagsEdit - User Tags...; this will present him a dialog where he can create - his own user-defined tags. - - The Edit User Tags Dialog - - - - - - The Edit User Tags Dialog - - The Edit User Tags Dialog - - - - - Invoking a User-Defined Tag - - - - - - Invoking a User Defined Tag - - Invoking a User Defined Tag - - - - He would probably give each tag a name that can clearly identify it. The name you give your tag - is entered in the section marked Menu item, and the text of frequently-used command - should be entered into the section labeled Value. Once the commands are entered, - he can use them quickly using the shortcut &Ctrl;&Shift;1 for - the first tag to enter I prefer \LaTeX\ to \TeX\ and &Ctrl;&Shift; - 2 to enter What would I do without Linux?. - - - - Placeholders in User-Defined Tags - - There are some placeholders you can use in user-defined tags: - they are %B, %C, %M and - %S. - - - %B: will be replaced by a bullet. - %C: this is where the cursor will be placed after the insertion of a - user-defined tag. - %M: this stands for marked text; the selected text is - inserted in its place when inserting user-defined tags. - %S: will be replaced by the source file's name without file extension. - - - To show you how this works let's say for example that we have a user-defined tag, - which contains the value \bfseries{%M}%C, and I have a selection of text - highlighted in my document that we want to turn into bold text. So, we highlight the - phrase I love Fridays, apply our user-defined tag by pressing - &Ctrl;&Shift;1, and we get the text - \bfseries{I love Fridays}, with the cursor - placed at the end of the text. - - - - - - - - - - The Build Tools - - - - Compiling, converting and viewing - - To view the result of your work, you first need to compile the source. All the build - tools are grouped closely together in the - BuildCompile, - BuildConvert, - and BuildView - menus. - - To compile your source code for screen viewers like &kdvi;, &kghostview;, &kpdf; or - further conversion, you can use the shortcut &Alt;2. - Then you can view the DVI file using your default viewer with - &Alt;3, convert - the DVI to a PS file with &Alt;4, - and view the PS file with &Alt;5. - - - - &bibtex; - - If you are using &bibtex; - for your bibliography entries, you usually have to follow a special compiling scheme. - This means calling &latex; and then &bibtex; and then &latex; twice again. Fortunately &kile; is clever enough to - detect automatically if it is necessary to call additional tools like &bibtex;, &makeidx; and &asymptote;. - This logic is by default turned on and can be changed in SettingsConfigure - Kile...ToolsBuild in the General tab in the &latex; and &pdflatex; tools. - - - - - - - &makeidx; - - If you are using the &makeidx; - package to make a final, alphabetical index for your document, you have also to follow a certain - compilation pattern or let &kile; do this for you in the same way as with &bibtex; files. - - - - - - MetaPost and Asymptote - - If you want to compile your document with MetaPost or Asymptote, picture drawing programs, you can do it with - BuildCompileMetapost. - or BuildOtherAsymptote. - - - - - - &pdflatex; - - There is also another way to compile your document, if you want a PDF: you can run - &pdflatex;, that will compile the source directly into a PDF file, with - &Alt;6: you can then view the compiled - file pressing &Alt;7. - - Alternatively, you can convert a PS into a PDF with - &Alt;8, or directly a - DVI into a PDF with &Alt;9. - - Using &pdflatex; instead of &latex; may be just a matter of simplicity or habit, - but sometimes the behavior of the two program can differ. - - - - - - &latex; to Web - - Finally, you may want to publish your work on the web and not just on paper. You may - then use the latex2html program, that can be called from &kile;'s menu - BuildConvertLaTeX - to Web. The result will be placed in a subfolder of the work folder, - and you will be able to see the result of the conversion choosing the menu item - BuildViewView - HTML. - - - - - - Passing Command-Line Parameters - - If you want to pass some specific command-line parameters to the compile, convert - or view tools, you can configure their call in Settings - Configure Kile...ToolsBuild. - - - - - - - Quick Preview - - You will always need some time to view the result, when working with &latex;. - &latex; has to compile the source and the viewer has to be called. This can be - annoying if you only changed some letters in an equation difficult to typeset. - &kile; offers a Quick Preview mode, where you can compile - only a part of a document and save a lot of time. It supports four different modes, - which can be combined with seven configurations. - - - Quick Preview - - - - - - Quick Preview - - - - - All settings must be done in - SettingsConfigure Kile... - ToolsPreview. - - - Quick Preview Configuration - - - - - - Quick Preview Configuration - - - - - - - Selection Mode - - The user has to select a part of the document. Menu entry BuildQuickPreviewSelection - or the keyboard shortcut &Ctrl;&Alt;P,S - will start the selected programs. &kile; takes the preamble of the original text, so that - all packages and user defined commands are included. The user can choose one - of seven predefined configurations: - - - LaTeX+DVI (embedded viewer) - LaTeX+DVI (KDVI) - LaTeX+PS (embedded viewer) - LaTeX+PS (KGhostView) - PDFLaTeX+PDF (embedded viewer) - PDFLaTeX+PDF (KGhostView) - PDFLaTeX+PDF (KPDF) - - - This should be sufficient for all situations for which a quick preview is needed. - - - - - - Environment Mode - - Very often you want to preview the current environment, and especially mathematic - environments, which sometimes may be difficult to write. &kile; offers a very fast way - to do this. No selection is needed, only choose - BuildQuickPreviewEnvironment - or the keyboard shortcut &Ctrl;&Alt;P,E - and the current environment will be compiled and shown. - - - - - - Subdocument Mode - - If you have a large project with a lot of documents, compiling the whole - project is not a great idea, if you have made changes only in one single document. - &kile; is able to compile and show a preview of the current subdocument. It - takes the preamble from the master document and only compiles the current part - when you choose BuildQuickPreviewSubdocument - or the keyboard shortcut &Ctrl;&Alt;P,D. - - - - - - Mathgroup Mode - - The mathgroup preview mode allows you to preview the mathgroup you are currently editing. &kile; - takes the preamble from the master document and only compiles the mathgroup the cursor is currently in - when you choose BuildQuickPreviewMathgroup - or the keyboard shortcut &Ctrl;&Alt;P,M. - - - - - - Quick Preview in Bottom Bar - - Instead of showing the preview in a new document &kile; can also be configured to use the bottom bar for preview - compilations. You can activate this feature in the quick preview configuration panel. - - - - - - - - Graphic File Formats - - - - &latex; and &pdflatex; - - &pdflatex;, when used with graphics or - graphicx packages, can compile correctly PNG and JPG files into - DVI or PDF, but is not able to handle EPS files. Conversely, the process of compiling - with &latex; to DVI and converting to PS and eventually PDF does support EPS, but does - not support PNG and JPG. - - A lot of users want to create PDF documents, but also want to use of the excellent - Pstricks package to create &postscript; graphics, or they want - to use the &postscript; output of mathematical and scientific software like - Mathematica, Maple or MuPAD. - These &latex; users have to compile first in &postscript;, even if they want to create - PDF documents, because these programs produce &postscript; code which cannot be managed - by &pdflatex;. However, it is not so hard as it may sound, because &kile; will help. - - - - - - Graphics Conversion - - To overcome this frustrating loop, in case you want to include both &postscript; code and PNG or JPG files, - you have a number of workarounds: - - - If you need a file in PS format, but have JPG or PNG graphics, you can also - simply use &pdflatex; with DVI output first, and then run dvips - to create the PS file. You see that &pdflatex; is a very good choice, if your source contains - no &postscript; code at all. - - You can convert EPS files to PNG or other formats with utilities as the - Gimp or - &imagemagick; - and use &pdflatex;. - - A preferred way - is to convert EPS graphics to PDF graphics with - epstopdf, which comes with every &tex; distribution - distribution and then use &pdflatex;. It produces high quality graphics, - and you can even control the result with some of the following options: - - - -dAutoFilterColorImages=false - -dAutoFilterGrayImages=false - -sColorImageFilter=FlateEncode - -sGrayImageFilter=FlateEncode - -dPDFSETTINGS=/prepress - -dUseFlateCompression=true - - - - Even better: if your system allows shell-escape, conversion - can be done on the fly. All you have to do is to include the epstopdf package, - which is part of all &tex; distributions, with command \usepackage{epstopdf}. - Assuming that your code is - - - \includegraphics[width=5cm]{test.eps} - - - When you call &pdflatex; with option , - graphics test.eps is automatically converted into test.pdf. - - This conversion will take place each time you run &pdflatex;. - If your graphics command is given implicitly: - - - \includegraphics[width=5cm]{test} - - - epstopdf checks whether test.pdf is already - available, so that conversion step can be skipped. - - You can convert the other way around, and use &latex; and PS-PDF conversion. - This is not always a good idea, since EPS encapsulation of JPG or PNG can yield larger - files, that in turn yield unnecessarily large documents. This is however highly - dependent on the graphic utility that you use, since EPS can encapsulate other graphics, - but not all applications support this perfectly. Some might actually try to build your JPG image - with vectors and various scripting, which will result in gigantic files. Conversion of - all graphics formats to EPS can be done by - &imagemagick;. - Another simple program that does this process correctly is - jpg2ps. - - - You can also use an automatic conversion. All graphic files are - converted on the fly to EPS, and inserted into the PS document. This is a comfortable - way, but you have to set up your system properly. This is discussed in the section - EPS Graphics. - - - - - - - - Use the right File for the right Graphic - - - EPS is sort of a graphic vector scripting language, describing - all the lines and dots the graph is made of; it looks good even when magnified beyond its - default size, and suits best diagrams and vectorial graphic natively produced in EPS, - which look very clear and sharp while maintaining a very small byte size. - PNG (or the deprecated GIF) is a non-lossy file format, - with good compression and quality. It is very good for diagrams, scans of drawings, - or anything whose sharpness you do want to retain. It is sometimes overkill - when used for photos. - JPG is a lossy format, that compresses files better than PNG - at the price of some loss in the picture detail. This is usually irrelevant for photos, - but may cause bad quality for diagrams, drawings, and may make some thin lines disappear outright; - in those cases use EPS or PNG. - - - But always remember: garbage in, garbage out! No conversion will make a bad picture good. - - - - - - - - EPS Graphics - - EPS graphics files are the traditional way to insert graphics files into - &latex; documents. As mailing lists are full with questions concerning - EPS graphics, we will discuss some important aspects and - demonstrate how &kile; supports them. - - - - &latex; and EPS Graphics - - If you decided to use the traditional &latex; to produce - PS or PDF output, you will probably run into some problems - with graphics. You have to use EPS graphics (Encapsulated &postscript;), - no JPEG or PNG files. This should be no problem, as there are a lot of - converters like - convert from the excellent - &imagemagick; - package. But, it needs some time of course. - - The EPS files are used by both &latex; and the DVI-PS converter: - - - &latex; scans the EPS file for the bounding box - line, which tells &latex; how much space to reserve for the - graphics. - - The DVI-PS converter then reads the EPS file and - inserts the graphics in the PS file. - - - This has some implications: - - - &latex; never reads the EPS file if the bounding-box - parameters are specified in the graphics-insertion command. - - Since &latex; cannot read non-ASCII files, - it cannot read the bounding-box information from compressed or non-EPS - graphics files. - - The EPS graphics are not included in the DVI file. Since the - EPS files must be present when the DVI file is converted to - PS, the EPS files must accompany DVI files whenever they are - moved. - - - Now you can call &latex;, and a DVI-PS converter like dvips - to create your &postscript; document. If your goal is a PDF document, you should run - dvips with option and then call - ps2pdf. You will find a lot of documents describing this solution. - - - - - - The &postscript; Way of &kile; - - &kile; helps you to get the bounding-box information. If you have installed - &imagemagick; - package, &kile; will extract this information from the EPS file and insert it as an - option. This is done automatically when you select the graphics file. - There are two advantages to proceed like this: - - - The information is already scanned in the dialog, and - need not to be done by &latex; later on. - Even more important is that the width and height of the picture - can be calculated, when the its resolution is known. This information will be shown - near the top of the dialog, and may serve as a clue when you want to scale the - graphics. - &kile; can also support zipped or gzipped EPS files, - which are much smaller than uncompressed EPS files. But, this feature can only be used - with a special system setup and a change of your local graphics configuration, - like it is described in the Bitmap Graphics - section. - - - - - - - The &postscript; Way and Bitmap Graphics - - If your systems allows shell-escape, &kile; - also supports an easy way to include bitmap graphics, if you set up your &tex; - system properly. There is no need to convert JPEG or PNG graphics, - this can be done automatically when the DVI file is converted to PS. - - &latex; needs some information about the file suffixes. The package - graphicx looks for a file graphics.cfg, - which must be somewhere in your search path for &latex; documents. Search for - entries like: - - - \DeclareGraphicsRule{.pz}{eps}{.bb}{}% - \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}% - \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}% - \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}% - \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}% - - - and replace these lines with: - - - \DeclareGraphicsRule{.pz}{eps}{.bb}{}% - \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}% - \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}% - \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}% - % changed or new graphic rules - \DeclareGraphicsRule{.eps.zip}{eps}{.eps.bb}{`unzip -p #1}% zipped EPS - \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{`gunzip -c #1}% gzipped EPS - \DeclareGraphicsRule{.jpg}{eps}{}{`convert #1 eps:-}% JPEG - \DeclareGraphicsRule{.gif}{eps}{.bb}{`convert #1 eps:-}% GIF - \DeclareGraphicsRule{.png}{eps}{.bb}{`convert #1 eps:-}% PNG - \DeclareGraphicsRule{.tif}{eps}{.bb}{`convert #1 eps:-}% TIFF - \DeclareGraphicsRule{.pdf}{eps}{.bb}{`convert #1 eps:-}% PDF-graphics - - - You will find this file, for example in Debian, at - /etc/texmf/latex/graphics.cfg. The best way to proceed is to copy this - file to your local texpath and then change this file. See the yours &tex; distribution manual - to learn how to get a list of your &tex; folders. - - With this configuration file you are able to insert bitmap graphics and - zipped or gzipped EPS files in &latex;. The command for conversion - is given by dvips. When you look - at the conversion command you will see that no extra file is created. - The result of the conversion process is directly piped into the PS file. - The only thing &latex; must know is the size of the graphics, and - therefore we need the bounding box, which is provided by &kile;. - - Some say that this way is insecure; you have to decide on how to work. - In any case, you need no bounding box, as &kile; will extract this information - from all types of graphics. - - - - - - &pdflatex; and EPS Graphics - - As already stated, &pdflatex; is not able to handle EPS graphic files, - but converters like epstopdf - will help. The best way is to include package epstopdf, - which must follow the graphicx package. - - - \usepackage[pdftex]{graphicx} - \usepackage{epstopdf} - - - Now you can already include EPS graphics, if you run pdflatex - with option , but we can make it even better - and also handle zipped or gzipped EPS files. Again we have to change - the graphics configuration file graphics.cfg like above. - This time we search for: - - - % pdfTeX is running in pdf mode - \ExecuteOptions{pdftex}% - - - and simply add some lines. - - - % pdfTeX is running in pdf mode - \ExecuteOptions{pdftex}% - \AtEndOfPackage{% - \g@addto@macro\Gin@extensions{.eps.gz,.eps.zip}% - \@namedef{Gin@rule@.eps.gz}#1{{pdf}{.pdf}{`gunzip -c #1 | epstopdf -f >\Gin@base.pdf}}% - \@namedef{Gin@rule@.eps.zip}#1{{pdf}{.pdf}{`unzip -p #1 | epstopdf -f >\Gin@base.pdf}}% - }% - - - With these lines, &pdflatex; is able to handle EPS files, - and hopefully there should be no more issues concerning graphics. - - - - - - - - Master Document - - Defining your document as a master allows you to work with separated files, - which gives you a parent document (or Master document), and child documents that - make up a complete work. After having defined your Master document, with the - corresponding command in the Settings - menu, all the commands of the Tools - menu will apply only to this document, even when you are working on the child - documents. You can even close the Master document. - - - - - Error Handling - - After you have compiled something, &kile; takes a look at the error messages - that were generated. If there are any errors or warnings, they will be briefly reported - in the Log and Messages window. One can take a closer look at the - messages by selecting BuildView Log File, - or by using the keyboard shortcut &Alt;0. - The generated log is then displayed in the Log and Messages view; errors and warnings are highlighted. - - - Viewing the log - - - - - - Viewing the log - - Viewing the log - - - - You can easily jump from one message in the log file to another by using the - BuildNext / Previous - LaTeX Error / Warning menu items, or by using - the corresponding toolbar buttons. - - To jump to the line in the &latex; source where the error or warning occurred, - click on the error or warning in the Log and Messages view. - &kile; will take you automatically to the offending line. - - - - - - The Watch File Mode - - When you launch the Quickbuild command, a viewer of - some sort will normally be called after the compilation. If you are not using an embedded - viewer, a new window will be open every time. - - If you are adjusting the look of your document, you might launch - Quickbuild very often, and have many viewer windows open on - your desktop; to avoid this confusion, you can activate the Watch file - mode, that will prevent Quickbuild from launching a viewer. - - Presently, &kdvi; supports continuous updating of the viewed DVI file, but - &kghostview; is not as perfect: to update the document after compiling, you will have - to change page, and the number of pages will not be changed in &kghostview;'s visualization. - - This mode is of course useless with the embedded viewers, as you have to close them - anyway to get back to editing the document and recompiling. - - - - - - - - Navigating the &latex; Source - - - - Using the Structure View - - The Structure view shows the hierarchy of the document - being created in &kile;, and allows you to quickly navigate it, showing its segmentation. - To navigate around your document, all you need to do is to left click on any label, chapter, - section, subsection, etc., and you will be taken to the beginning of - the corresponding area. - - If you included a separate &latex; file in your source using - the \input or \include tags, these files will - be referred to in the Structure view; double-clicking on their names in - it will make &kile; bring up the included file in the editor window. - - The hierarchy tree has also a separate branch for labels used in the text. - - - Using the Structure View - - - - - - Using the Structure View - - Using the Structure View - - - - - - Updating the Structure View - - To update your structure view you can either go to - EditRefresh - Structure, hit F12, or you can save your document, - which will make &kile; update its Structure view. - - - - - - - - Bookmarks - - Bookmarks are your reference to a segment of text or a line inside the &kile; - environment. To use a bookmark, select a specific line of your document - you would like to return to, then press &Ctrl; - B, and &kile; will add a bookmark to this line. - Alternatively, you can also set a bookmark by highlighting a line and choosing - the menu labeled BookmarkToggle - Bookmark. - - To remove all your bookmarks, select Bookmarks - Clear Bookmarks. - - Please note that currently the bookmarks are not saved after exiting &kile;. - - - - - - - - Projects - - - - Working with Projects - - In &kile; you can create and work with projects. A project is a - group of &latex;, graphic, &bibtex; or other files that contain all the information that is used to build - your complete document. A typical project would be a document consisting of several chapters, - written in different .tex files; all of them could be included in - a project, to make the whole document easier to manage. The specifications of the project are stored in a special file, - with extension .kilepr. - - A Project adds the following functionalities: - - - You need not set a master document, &kile; does this automatically. - Project files can easily be archived together by going to BuildOtherArchive - The Files and Project view shows which files are included - in the project. - After opening a project, any file that was previously opened will be - restored with the original encoding and highlightning. - Code completion works across all project files. - Reference completion works across all project files. - Citation completion works across all project files. - Search in all project files. - Specify custom quickbuild and &makeidx; command. - - - - - - - Creating a Project - - To create a project, select Project - New Project.... You will be - asked to give the following information to create your project: - - Title of your project. - Name of the project file with .kilepr extension. - Filename. - Type of file creating: Empty Document, Article, Book, Letter, Report, .... - - - When you fill out the filename box, you have to include a relative - path from where the .kilepr project file is stored to the file. - - - - - - The File and Project View - - The File and Project view is a button of the sidebar menu. - From this view, you can see the structure of your project, its files, - and the name of the .kilepr file that stores the project information. - Adding, removing, or changing options in your project is done via - the File and Projects view. - - - The File and Project View - - - - - - The File and Project View - - The File and Project View - - - - - - - - Adding and Removing Files - - To add a file to your project, open any &tex; file, right click on its name in the - Files and Project view, and select Add to - Project. If you have multiple projects open, a dialog box will ask - you which project the file has to be added to. - - If you have multiple files to be added to a project, you can select the - project from the Files and Project view and right-click then select - Add Files; you will then be able to select your files in a dialog box. - - You can also right-click on the project's name in the Files and - Project view, and select Add Files... to bring - up a file selection dialog. - - - Adding a file to a project - - - - - - Adding a file to a project - - Adding a file to a project - - - - To remove a file from a project, right-click on it and select Remove File. - This does not delete your file (and also does not close it), but only removes it from the list - of files contained in the .kilepr extension. - - - - - - Project Options - - &kile; has a few options related to your project that can be set. To change them, - right-click on the title of your project and select Project Options, - and you will have the option of changing: - - - The title of your project. - The Master document. - The Quickbuild command. - The &makeidx; options. - - - - - Archiving your Project - - &kile; allows you to easily backup your project by storing all its files - into a single archive (often known as tarball). To archive your project - right-click on its name in the Files and Project view, or select - ProjectArchive. - - By default, all files in a project are added to the archive. If you do not want to include - a certain file in the archive, right-click on it in the Files and Project - view, and uncheck the Include in Archive option. - - Archive commands are simple shell commands that are executed from the project - folder (where the .kilepr file is located). - - - - - - - - - - Closing a Project - - To close a project, select the Files and Project view from - the vertical toolbar, right click on your project title, and then select - Close. This will close your project, all the files associated with your project, - and will also add the name of the project you just closed to Open Recent - Project... in the Project menu. - - - - - - - - Document Encoding - - The &kile; editor allows you to read, convert and set the text to the encoding - your document needs. This allows you to use non-standard letters and symbols; - you can use, for example, accented characters for Italian or French. - Selecting the encoding for your document can be done in three ways: - - - One way to set the encoding is to use the Set encoding combo - box, located at the bottom of the Open File sidebar view. - Another way is using the submenu - SettingsConfigure - Kile...Editor, - where you can set the default character encoding for all files. - - Set the default character encoding - - - - - - Set the default character encoding - - - - - A third way to set the encoding for a document is to set the option - when you use the wizard to create a new document. - - - &latex; itself understands only ASCII, a very limited set of characters, so you could not use - accented or special letters directly. To use accented letters, a special syntax was created: - such as for example \"e for ë. - There is a package to help you with this, called inputenc, and is included - in the preamble using \usepackage[latin1]{inputenc}, where the optional argument - is the encoding you would like to use (nowadays in most cases utf8x). This tells &latex; - to translate all of the ë's you wrote to \"e's before - compiling. Please refer to the inputenc documents directly for more - information on inputenc. Last but not least: remember to make sure that - your file is actually encoded in the same encoding you told - inputenc! - - - Choosing the source file's encoding - - - - - - Choosing the source file's encoding - - Choosing the source file's encoding - - - - This host of different character coding tables has been creating problems on - many applications: for example, you cannot write a course of Turkish in French without - losing one language's special characters. There is general agreement that, sooner or later, - everybody will switch to Unicode. There - are many implementations of Unicode, and UTF-8 is the most - successful in Linux; Windows® relies instead on the more cumbersome and - less flexible UCS-2. Some distributions, as RedHat, have already - begun setting their default encoding to UTF-8, and therefore you - may be very interested in using of the utf8x argument to the - inputenc package. - - - - The &ucs; Package - If you don't have the &ucs; package installed, you can proceed as follows: - - Get the &ucs; package from the home page of - Unicode support for - &latex;, by Dominique Unruh from the University of Karlsruhe. - - To install it, unpack the downloaded file and place it in a directory listed - in your $TEXINPUTS envirnoment variable. This can also be set inside kile. - - - - \usepackage{ucs} - \usepackage[utf8x]{inputenc} - - - - - - &cjk; Support - - Adding support for ideographic languages is quite tricky. However, once - you are done with it, it will work quite well. Other than installing packages, - there is some extra configuration work to do. - - Your Linux distribution might already have a &cjk; (Chinese, Japanese, - Korean) package ready for you, so you might be saved the hassle of manually - installing everything. Do check before going forward! - - There is the possibility of using the &ucs; package in order to write - short snippets of &cjk; text, but that option is seriously limited as it does - not handle, among other things, newlines. We will instead install the complete - &cjk;-&latex; package and make it work for both &latex; and &pdflatex;. A lot - of this material has been inspired by Pai - H. Chou's page - about how to setup &pdflatex;. - - - - Download the &cjk; - package. Copy its unpacked files to an appropriate subfolder of - $TEXMF, just like you did with the &ucs; package - before (see ). The files will be unpacked in a - CJK/X_Y.Z folder, it is not important that you - take them out, though it will probably be tidier for you to - maintain. - - Now you have to download a font that supports all the &cjk; characters - you need. You can choose any *.ttf file that - covers them, but in this walkthrough we will use Cyberbit. - Unzip the file and rename Cyberbit.ttf to - cyberbit.ttf, since uppercase might confuse your system. - Place cyberbit.ttf in a folder together with - Unicode.sfd, - and generate the *.tfm and - *.enc files with the command - $ ttf2tfm cyberbit.ttf -w cyberbit@Unicode@. - For some reasons, sometimes this does not produce the hundreds - of files it should. Should that be your case, you can download both - *.tfm and - *.enc files. - Place the *.tfm files in an - appropriate folder, say $TEXMF/fonts/tfm/bitstream/cyberbit/; - the *.enc files may be installed in - $TEXMF/pdftex/enc/cyberbit/. - - Now we need a map file to connect the *.enc files to the font. Download cyberbit.map - and install it in $TEXMF/pdftex/config/. - - Download another file, c70cyberbit.fd, - and place it in an appropriate folder. You may choose, for example, - $TEXMF/tex/misc/. - - The last file we have to generate is a &postscript; Type 1 - font, necessary to read DVI files generated with &latex;. Run the command - $ ttf2pfb cyberbit.ttf -o cyberbit.pfb, and copy the - resulting cyberbit.pfb in a folder like - $TEXMF/fonts/type1/cyberbit/. - - Let's now place cyberbit.ttf among the fonts - where &latex; can find it. You could place it in a folder named - $TEXMF/fonts/truetype/. - - Check the configuration file you find at - $TEXMF/web2c/texmf.cnf, and make sure that the - line mentioning TTFONTS is uncommented and points to - the folder where you saved cyberbit.ttf. - - To make it possible for &pdflatex; to use your &cjk; - fonts, it is necessary that you add a line in configuration file - $TEXMF/pdftex/config/pdftex.cfg. Add - map +cyberbit.map in the file to complete the - configuration for &pdflatex;. - - To configure &latex; so that you can produce DVI - files with &cjk; characters, you have to add a line in file - ttfonts.map. The file might be in a folder named - $TEXMF/ttf2pk/, but you will probably have to look - for it. Add the line cyberbit@Unicode@ cyberbit.ttf - into it. - - Now, you only have to run texhash - and the system should be ready. - - - - To test whether your configuration is correct, you can try to compile - this test - file. - - - &cjk; Troubleshooting - - There are many things that can go wrong when setting &cjk; - support manually. If something seems not to work, the following - checklist might help you. - - - - Obviously, since you run &latex; as a user and - not as root, you must allow ordinary users - to access the new files. Make sure all folders and files are - accessible using the chmod command. - - If &latex; writes a DVI without problems, but you - cannot view it, it is almost certainly because of some problems in the - automatic generation of *.pk - fonts. They are supposed to be generated on the fly when viewing a - DVI file, but this might fail for a number of reasons: double-check - ttfonts.map for your custom line first. However, - it might happen that your ttf2pk command, which - is usually invoked by the DVI viewer, has been compiled - without support for the - kpathsea libraries. If this is the case, - ttf2pk - will make no mention of kpathsea. As support for - these libraries is necessary, you might have to find a new package, or - recompile FreeType 1 by yourself. - - - - - - - - - How do I input &cjk; in Unicode? - - There are a number of different input engines, and the choice can - depend also on personal preference. The author uses Skim, - a port to &kde; of the Scim - engine. Refer to your distribution's documentation to learn how to - install these programs. Configuration of such programs can be tricky - too, in the case of Skim you will have to - define an environment variable XMODIFIERS="@im=SCIM" - before starting X. - - - - - - - - - - Scripting - - - - Scripting in &kile; - - - &kile;'s scripting feature allows for the execution of ECMAScript code. Scripts can be managed through the - scripting panel in the sidebar. - - - - - - - API Reference - - In this section we describe &kile;'s scripting programming interface. - - - - Please note that the scripting API has not been finalized yet. The API described below might change in - future versions of &kile;. - - - - - First of all, &kile;'s script execution environment provides a global object called "kile", which owns the following - methods: - - - - - (kile).currentTextDocument() - - - Returns a KileTextDocument object which reflects the currently active - text document. Returns null if no text document is active. - - - - - (kile).getInputValue(caption, label) - - - Opens a dialog with the given caption and label. Returns the value that user has entered. - - - - - - - Objects of the type KileTextDocument represent text documents in &kile;. They have the following - properties: - - - - - (KileTextDocument).backspace() - - - Deletes the character that is located immediately before the current cursor position and moves the cursor - one position backward in the text. - - - - - (KileTextDocument).cursorLeft() - - Moves the cursor one position backward in the text. - - - - (KileTextDocument).cursorRight() - - Moves the cursor one position forward in the text. - - - - (KileTextDocument).insertText(text) - - - Inserts the text contained in the variable text into the document at the current - cursor location. - - - - - (KileTextDocument).insertBullet() - - Inserts a bullet into the document at the current cursor position. - - - - (KileTextDocument).nextBullet() - - - Selects the first bullet located in the document immediately after the - current cursor location. - - - - - (KileTextDocument).previousBullet() - - - Selects the first bullet located in the document immediately before the - current cursor location. - - - - - (KileTextDocument).up() - - Moves the cursor one line up in the document. - - - - (KileTextDocument).down() - - Moves the cursor one line down in the document. - - - - (KileTextDocument).cursorLine() - - Returns the line which the cursor is currently located at. - - - - (KileTextDocument).cursorColumn() - - Returns the column which the cursor is currently located at. - - - - (KileTextDocument).setCursorLine(line) - - Moves the cursor to the line denoted by line. - - - - (KileTextDocument).setCursorColumn(column) - - Moves the cursor to the column denoted by line. - - - - - - - - - - - Help - - - - Help Documents - - &latex; is a rather sophisticated system, where the basic features - can be expanded by a great variety of additional packages. - &kile; provides a lot of different help to support the user. - - - - - LaTeX Reference - An alphabetical index of the most - common &latex; commands. - - - - TeX Documentation - &tetex;/&texlive; comes with a huge amount of documents. - This includes a documentation for all included packages and an additional &latex; - reference. - - - - LaTeX - A full reference for &tex; and friends. This is not - only a description of all programs, some important packages are also - mentioned. And it includes a full reference manual of &latex; - commands—ideal for looking up a particular piece of formatting - while writing a document. As this document is really extensive, - &kile; separates it with three important bookmarks. - - - - LaTeX Command - Another alphabetical index of the most common - &latex; commands. - - - - LaTeX Subject - A description of important &latex; - subjects. - - - - LaTeX Env - An alphabetical index of the most common - &latex; environments. - - - - - - - - - Context Sensitive Help - - &kile; also support a context sensitive help, which is called - with &Ctrl;&Alt;H,K. - In SettingsConfigure Kile... - KileHelp - you can choose whether you want to use &kile;'s &latex; reference or the - help system of &tetex;/&texlive;, which is the default setting. - - - Bullets - - - - - - Bullets - - - - - - - - - Searching for Keywords - - It is not always easy to find the right document, as &tetex;/&texlive; - comes with a huge amount of documents. As one possible help, &tetex;/&texlive; - provides a tiny program texdoctk. - It comes with a database of all documents that &kile; uses to offer - an interface to it. - - - Bullets - - - - - - Bullets - - - - - All documents are grouped into some categories, and the main - advantage is that you can search for packages names or keywords. - &kile; will then show only the results. - - - Bullets - - - - - - Bullets - - - - - A mouse double click or the Space key will start the - viewer for this document. This can be a arbitrary document, not only a - DVI, PS, PDF or HTML document. &kile; will take &konqueror; settings to - start a appropriate viewer. - - - - - - - User Defined Help - - Beside this static &tetex;/&texlive; documentation, &kile; supports also - another variable way for user-help documents. In Help - menu &kile; has a special User help - submenu, where the user can add documents of his own choice. - These can be the most important documents of &tetex;/&texlive; documentation, or even - self written documents. It is even possible to choose some Web URLs. - - Go to - SettingsConfigure Kile... - KileHelp - and choose Configure button - to configure this User help menu. You can add, - remove or navigate menu entries, and also insert separators to get - a better structure. - - Pressing the Add button will open - another dialog, where you must edit the name of the menu entry, - and choose the corresponding file or Web &url;. If you choose a Web &url;, - &konqueror; is started and you should copy the final &url;. - - - Bullets - - - - - - Bullets - - - - - - - - - - - Credits and License - - &kile; is an open-source user-friendly &latex; / &tex; source code editor. It will run on systems - with the &kde; Desktop Environment installed. &kde; is available for several architectures - with Linux and other Unix-like systems installed. &kile; is also part of the Fink project, - which means you can run &kile; on a Mac with OS-X. - - Many thanks are owed to those who strive to continue the &kile; project, and the many - hours of contributions made by those who sacrifice their time to develop tools we can all - use under the GNU license. Up-to-date information about contributors can be found in - the About &kile; dialog from the Help menu. - - - Contributions among others from: Rob Lensen, Roland Schulz, Michael Margraf, Holger Danielsson - - Many thanks to all those involved! - - &underFDL; - &underGPL; - - - - -&documentation.index; - -
diff --git a/doc/latex_example.png b/doc/latex_example.png deleted file mode 100644 index d5c8774..0000000 Binary files a/doc/latex_example.png and /dev/null differ diff --git a/doc/latexhelp.html b/doc/latexhelp.html deleted file mode 100644 index 18767d1..0000000 --- a/doc/latexhelp.html +++ /dev/null @@ -1,3633 +0,0 @@ - - - - - -Kile : LaTex Reference - - - - -

LaTeX Reference

- - - - - - - -
Alphabetical -Index
 #   A  - B   C   D  - E   F   H  - I   K   L  - M   N   O  - P   Q   R  - S   T   U  - V   W 
-
-
-
- - - - - -
Index by -subject
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CountersInternal counters used by LaTeX.
- - 
Cross ReferencesAutomatic referencing.
- - 
DefinitionsDefine your own commands etc.
- - 
Document ClassesSome of the various classes available.
EnvironmentsSuch as enumerate & itemize.
- - 
FootnotesHow to produce footnotes.
- - 
LayoutControlling the page layout.
- - 
LengthsThe length commands.
- - 
LettersThe letter class.
- - 
Line & Page -BreakingHow to insert pagebreaks etc.
- - 
Making -ParagraphsParagraph commands.
- - 
Margin NotesPutting remarks in the margin.
Math FormulaeHow to create mathematical formulae.
- - 
ModesParagraph, Math or LR modes.
Page StylesVarious styles of page layout.
- - 
SectioningHow to section properly.
Spaces & -BoxesAll the associated commands.
- - 
Special -CharactersSpecial reserved characters.
Splitting the -InputDealing with big files by splitting.
- - 
Starting & -EndingThe formal start & end layouts.
Table of -ContentsHow to create a table of contents.
- - 
Terminal -Input/OutputUser interaction.
- - 
TypefacesSuch as bold, italics etc.
- - 
- -
- - - - -
Alphabetical index
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #  - -
 A  - -
 B  - -
 C  - -
 D  - -
 E  - -
 F  - -
 H  - -
 I  - -
 K  - -
 L  - -
 M  - -
 N  - -
 O  - -
 P  - -
 Q  - -
 R  - -
 S  - -
 T  - -
 U  - -
 V  - -
 W  - -
-
-
-
- - - - - -
 Counters
-

Everything LaTeX numbers for you has a counter associated with -it. The name of the counter is the same as the name of the -environment or command that produces the number, except with no -\. (enumi - enumiv are used for the nested enumerate -environment.) Below is a list of the counters used in LaTeX's -standard document classes to control numbering.

-
- part            paragraph       figure          enumi
- chapter         subparagraph    table           enumii
- section         page            footnote        enumiii
- subsection      equation        mpfootnote      enumiv
- subsubsection
-
- -

\addtocounter

-

\addtocounter{counter}{value}

-

The \addtocounter command increments the -counter by the amount specified by the -value argument. The value argument can be -negative.

-

\alph

-

\alph{counter}

-

This command causes the value of the counter to be -printed in alphabetic characters. The \alph command -uses lower case alphabetic alphabetic characters, i.e., a, b, -c... while the \Alph command uses upper case -alphabetic characters, i.e., A, B, C....

-

\arabic

-

\arabic{counter}

-

The \arabic command causes the value of the -counter to be printed in Arabic numbers, i.e., -3.

-

\fnsymbol

-

\fnsymbol{counter}

-

The \fnsymbol command causes the value of the -counter to be printed in a specific sequence of nine -symbols that can be used for numbering footnotes.

-

eg. From 1-9:

-

NB. counter must have a value between 1 and 9 -inclusive.

-

\newcounter

-

\newcounter{foo}[counter]

-

The \newcounter command defines a new counter named -foo. The counter is initialized to zero.

-

The optional argument [counter] causes the counter -foo to be reset whenever the counter named in the -optional argument is incremented.

-

\refstepcounter

-

\refstepcounter{counter}

-

The \refstepcounter command works like -\stepcounter See section \stepcounter, except it also defines the current -\ref value to be the result of -\thecounter.

-

\roman

-

\roman{counter}

-

This command causes the value of the counter to be -printed in Roman numerals. The \roman command uses -lower case Roman numerals, i.e., i, ii, iii..., while -the \Roman command uses upper case Roman numerals, -i.e., I, II, III....

-

\stepcounter

-

\stepcounter{counter}

-

The \stepcounter command adds one to the -counter and resets all subsidiary counters.

-

\setcounter

-

\setcounter{counter}{value}

-

The \setcounter command sets the value of the -counter to that specified by the value -argument.

-

\usecounter

-

\usecounter{counter}

-

The \usecounter command is used in the second -argument of the list environment to allow the counter -specified to be used to number the list items.

-

\value

-

\value{counter}

-

The \value command produces the value of the -counter named in the mandatory argument. It can be -used where LaTeX expects an integer or number, such as the second -argument of a \setcounter or -\addtocounter command, or in:

-
-        \hspace{\value{foo}\parindent}
-
-

It is useful for doing arithmetic with counters.

- - - - -
Cross References
-

One reason for numbering things like figures and equations is to -refer the reader to them, as in "See Figure 3 for more -details."

- -

\label

-

\label{key}

-

A \label command appearing in ordinary text assigns -to the key the number of the current sectional unit; -one appearing inside a numbered environment assigns that number to -the key.

-

A key can consist of any sequence of letters, -digits, or punctuation characters. Upper and lowercase letters are -different.

-

To avoid accidentally creating two labels with the same name, it -is common to use labels consisting of a prefix and a suffix -separated by a colon. The prefixes conventionally used are

- -

Thus, a label for a figure would look like -fig:bandersnatch.

-

\pageref

-

\pageref{key}

-

The \pageref command produces the page number of -the place in the text where the corresponding \label -command appears. ie. where \label{key} appears.

-

\ref

-

\ref{key}

-

The \ref command produces the number of the -sectional unit, equation number, ... of the corresponding -\label command.

- - - - -
Definitions
- -

\newcommand

-
- \newcommand{cmd}[args]{definition}
- \newcommand{cmd}[args][default]{definition}
- \renewcommand{cmd}[args]{definition}
- \renewcommand{cmd}[args][default]{definition}
-
-

These commands define (or redefine) a command.

-
-
cmd
-
A command name beginning with a \. For -\newcommand it must not be already defined and must -not begin with \end; for \renewcommand it -must already be defined.
-
args
-
An integer from 1 to 9 denoting the number of arguments of the -command being defined. The default is for the command to have no -arguments.
-
def
-
If this optional parameter is present, it means that the -command's first argument is optional. The default value of the -optional argument is def.
-
definition
-
The text to be substituted for every occurrence of -cmd; a parameter of the form #n in -cmd is replaced by the text of the nth argument when -this substitution takes place.
-
-

\newenvironment

-
- \newenvironment{nam}[args]{begdef}{enddef}
- \newenvironment{nam}[args][default]{begdef}{enddef}
- \renewenvironment{nam}[args]{begdef}{enddef}
-
-

These commands define or redefine an environment.

-
-
nam
-
The name of the environment. For \newenvironment -there must be no currently defined environment by that name, and -the command \nam must be undefined. For -\renewenvironment the environment must already be -defined.
-
args
-
An integer from 1 to 9 denoting the number of arguments of the -newly-defined environment. The default is no arguments.
-
default
-
If this is specified, the first argument is optional, and -default gives the default value for that -argument.
-
begdef
-
The text substituted for every occurrence of -\begin{nam}; a parameter of the form #n -in cmd is replaced by the text of the nth argument -when this substitution takes place.
-
enddef
-
The text substituted for every occurrence of -\end{nam}. It may not contain any argument -parameters.
-
-

\newtheorem

-
- \newtheorem{env_name}{caption}[within]
- \newtheorem{env_name}[numbered_like]{caption}
-
-

This command defines a theorem-like environment.

-
-
env_name
-
The name of the environment to be defined. A string of letters. -It must not be the name of an existing environment or counter.
-
caption
-
The text printed at the beginning of the environment, right -before the number. This may simply say "Theorem", for example.
-
within
-
The name of an already defined counter, usually of a sectional -unit. Provides a means of resetting the new theorem counter -within the sectional unit.
-
numbered_like
-
The name of an already defined theorem-like environment.
-
-

The \newtheorem command may have at most one -optional argument.

-

\newfont

-

\newfont{cmd}{font_name}

-

Defines the command name cmd, which must not be -currently defined, to be a declaration that selects the font named -font_name to be the current font.

- - - - -
Document Classes
-

Valid LaTeX document classes include:

- -

Other document classes are often available. They are selected -with the following command:

-

\documentclass [options] {class}

-

All the standard classes (except slides) accept the following -options for selecting the typeface size (10 pt is default):

-

10pt, 11pt, 12pt

-

All classes accept these options for selecting the paper size -(default is letter):

-

a4paper, a5paper, b5paper, letterpaper, legalpaper, -executivepaper

-

Miscellaneous options:

- -

These options are not available with the slides class:

- -

The slides class offers the option clock for -printing the time at the bottom of each note.

-

If you specify more than one option, they must be separated by a -comma.

-

Additional packages are loaded by a

-

\usepackage[options]{pkg}

-

command. If you specify more than one package, they must be -separated by a comma.

-

Any options given in the \documentclass command -that are unknown by the selected document class are passed on to -the packages loaded with \usepackage.

- - - - -
Layout
-

Miscellaneous commands for controlling the general layout of the -page.

- -

\flushbottom

-

The \flushbottom declaration makes all text pages -the same height, adding extra vertical space when necessary to fill -out the page.

-

This is the standard if twocolumn mode is selected.

-

\onecolumn

-

The \onecolumn declaration starts a new page and -produces single-column output.

-

\raggedbottom

-

The \raggedbottom declaration makes all pages the -height of the text on that page. No extra vertical space is -added.

-

\twocolumn

-

\twocolumn[text]

-

The \twocolumn declaration starts a new page and -produces two-column output. If the optional text -argument is present, it is typeset in one-column mode.

- - - - -
Environments
-

LaTeX provides a number of different paragraph-making -environments. Each environment begins and ends in the same -manner.

-
-        \begin{environment-name}
-        .
-        .
-        .
-        \end{environment-name}
-
- -

array

-
-\begin{array}{col1col2...coln}
-column 1 entry & column 2 entry ... & column n entry \\
- .
- .
- .
-\end{array}
-
-

Math arrays are produced with the array environment. It has a -single mandatory argument describing the number of columns and the -alignment within them. Each column, coln, is specified -by a single letter that tells how items in that row should be -formatted.

- -

Column entries must be separated by an &. -Column entries may include other LaTeX commands. Each row of the -array must be terminated with the string \\.

-

Note that the array environment can only be used in -math mode, so normally it is used inside an equation -environment.

-

center

-
- \begin{center}
- Text on line 1 \\
- Text on line 2 \\
- .
- .
- .
- \end{center}
-
-

The center environment allows you to create a -paragraph consisting of lines that are centred within the left and -right margins on the current page. Each line must be terminated -with the string \\.

- -

\centering

-

This declaration corresponds to the center -environment. This declaration can be used inside an environment -such as quote or in a parbox. The text of -a figure or table can be centred on the page by putting a -\centering command at the beginning of the figure or -table environment.

-

Unlike the center environment, the -\centering command does not start a new paragraph; it -simply changes how LaTeX formats paragraph units. To affect a -paragraph unit's format, the scope of the declaration must contain -the blank line or \end command (of an environment like -quote) that ends the paragraph unit.

-

description

-
- \begin{description}
- \item [label] First item
- \item [label] Second item
- .
- .
- .
- \end{description}
-
-

The description environment is used to make -labelled lists. The label is bold face and flushed -right.

-

enumerate

-

-
- \begin{enumerate}
- \item First item
- \item Second item
- .
- .
- .
- \end{enumerate}
-
-

The enumerate environment produces a numbered list. -Enumerations can be nested within one another, up to four levels -deep. They can also be nested within other paragraph-making -environments.

-

Each item of an enumerated list begins with an -\item command. There must be at least one -\item command within the environment.

-

The enumerate environment uses the -enumi through enumiv counters (see -section Counters). The type of numbering can be -changed by redefining \theenumi etc.

-

eqnarray

-

-
- \begin{eqnarray}
- math formula 1 \\
- math formula 2 \\
- .
- .
- .
- \end{eqnarray}
-
-

The eqnarray environment is used to display a -sequence of equations or inequalities. It is very much like a -three-column array environment, with consecutive rows -separated by \\ and consecutive items within a row -separated by an &.

-

An equation number is placed on every line unless that line has -a \nonumber command.

-

The command \lefteqn is used -for splitting long formulas across lines. It typesets its argument -in display style flush left in a box of zero width.

-

equation

-

-
- \begin{equation}
-  math formula
- \end{equation}
-
-

The equation environment centres your equation on -the page and places the equation number in the right margin.

-

figure

-

-
- \begin{figure}[placement]
-
-  body of the figure
-
- \caption{figure title}
- \end{figure}
-
-

Figures are objects that are not part of the normal text, and -are usually "floated" to a convenient place, like the top of a -page. Figures will not be split between two pages.

-

The optional argument [placement] determines where -LaTeX will try to place your figure. There are four places where -LaTeX can possibly put a float:

-
    -
  1. h (Here) - at the position in the text where the -figure environment appears.
  2. -
  3. t (Top) - at the top of a text page.
  4. -
  5. b (Bottom) - at the bottom of a text page.
  6. -
  7. p (Page of floats) - on a separate float page, -which is a page containing no text, only floats.
  8. -
-

The standard report and article classes use the default -placement tbp.

-

The body of the figure is made up of whatever text, LaTeX -commands, etc. you wish. The \caption command allows -you to title your figure.

-

flushleft

-

-
- \begin{flushleft}
- Text on line 1 \\
- Text on line 2 \\
- .
- .
- .
- \end{flushleft}
-
-

The flushleft environment allows you to create a -paragraph consisting of lines that are flushed left, to the -left-hand margin. Each line must be terminated with the string -\\.

- -

\raggedright

-

-

-

This declaration corresponds to the flushleft -environment. This declaration can be used inside an environment -such as quote or in a parbox.

-

Unlike the flushleft environment, the -\raggedright command does not start a new paragraph; -it simply changes how LaTeX formats paragraph units. To affect a -paragraph unit's format, the scope of the declaration must contain -the blank line or \end command (of an environment like -quote) that ends the paragraph unit.

-

flushright

-

-
- \begin{flushright}
- Text on line 1 \\
- Text on line 2 \\
- .
- .
- .
- \end{flushright}
-
-

The flushright environment allows you to create a -paragraph consisting of lines that are flushed right, to the -right-hand margin. Each line must be terminated with the string -\\.

- -

\raggedleft

-

-

-

This declaration corresponds to the flushright -environment. This declaration can be used inside an environment -such as quote or in a parbox.

-

Unlike the flushright environment, the -\raggedleft command does not start a new paragraph; it -simply changes how LaTeX formats paragraph units. To affect a -paragraph unit's format, the scope of the declaration must contain -the blank line or \end command (of an environment like -quote) that ends the paragraph unit.

-

itemize

-

-
- \begin{itemize}
- \item First item
- \item Second item
- .
- .
- .
- \end{itemize}
-
-

The itemize environment produces a "bulleted" list. -Itemizations can be nested within one another, up to four levels -deep. They can also be nested within other paragraph-making -environments.

-

Each item of an itemized list begins with an -\item command. There must be at least one -\item command within the environment.

-

The itemize environment uses the itemi -through itemiv counters (see section Counters). The type of numbering can be changed by -redefining \theitemi etc.

-

letter

-

-

This environment is used for creating letters. See section -Letters.

-

list

-

-

The list environment is a generic environment which -is used for defining many of the more specific environments. It is -seldom used in documents, but often in macros.

-
- \begin{list}{label}{spacing}
- \item First item
- \item Second item
- .
- .
- .
- \end{list}
-
-

The {label} argument specifies how items should be -labelled. This argument is a piece of text that is inserted in a -box to form the label. This argument can and usually does contain -other LaTeX commands.

-

The {spacing} argument contains commands to change -the spacing parameters for the list. This argument will most often -be null, i.e., {}. This will select all default -spacing which should suffice for most cases.

-

minipage

-

-
- \begin{minipage}[position]{width}
-  text
- \end{minipage}
-
-

The minipage environment is similar to a -\parbox command. It takes the same optional -position argument and mandatory width -argument. You may use other paragraph-making environments inside a -minipage.

-

Footnotes in a minipage environment are handled in -a way that is particularly useful for putting footnotes in figures -or tables. A \footnote or \footnotetext -command puts the footnote at the bottom of the minipage instead of -at the bottom of the page, and it uses the mpfootnote -counter instead of the ordinary footnote counter See -section Counters.

-

NOTE: Don't put one minipage inside another if you are using -footnotes; they may wind up at the bottom of the wrong -minipage.

-

picture

-

-
- \begin{picture}(width,height)(x offset,y offset)
-  .
-  .
-  picture commands
-  .
-  .
- \end{picture}
-
-

The picture environment allows you to create just -about any kind of picture you want containing text, lines, arrows -and circles. You tell LaTeX where to put things in the picture by -specifying their coordinates. A coordinate is a number that may -have a decimal point and a minus sign -- a number like -5, 2.3 or -3.1416. A -coordinate specifies a length in multiples of the unit length -\unitlength, so if \unitlength has been -set to 1cm, then the coordinate 2.54 specifies a -length of 2.54 centimetres. You can change the value of -\unitlength anywhere you want, using the -\setlength command, but strange things will happen if -you try changing it inside the picture environment.

-

A position is a pair of coordinates, such as -(2.4,-5), specifying the point with x-coordinate -2.4 and y-coordinate -5. Coordinates are -specified in the usual way with respect to an origin, which is -normally at the lower-left corner of the picture. Note that when a -position appears as an argument, it is not enclosed in braces; the -parentheses serve to delimit the argument.

-

The picture environment has one mandatory argument, -which is a position. It specifies the size of the -picture. The environment produces a rectangular box with width and -height determined by this argument's x- and y-coordinates.

-

The picture environment also has an optional -position argument, following the size -argument, that can change the origin. (Unlike ordinary optional -arguments, this argument is not contained in square brackets.) The -optional argument gives the coordinates of the point at the -lower-left corner of the picture (thereby determining the origin). -For example, if \unitlength has been set to -1mm, the command

-
-   \begin{picture}(100,200)(10,20)
-
-

produces a picture of width 100 millimeters and height 200 -millimeters, whose lower-left corner is the point (10,20) and whose -upper-right corner is therefore the point (110,220). When you first -draw a picture, you will omit the optional argument, leaving the -origin at the lower-left corner. If you then want to modify your -picture by shifting everything, you just add the appropriate -optional argument.

-

The environment's mandatory argument determines the nominal size -of the picture. This need bear no relation to how large the picture -really is; LaTeX will happily allow you to put things outside the -picture, or even off the page. The picture's nominal size is used -by LaTeX in determining how much room to leave for it.

-

Everything that appears in a picture is drawn by the -\put command. The command

-
-   \put (11.3,-.3){...}
-
-

puts the object specified by ... in the picture, -with its reference point at coordinates (11.3,-.3). The reference -points for various objects will be described below.

-

The \put command creates an LR -box. You can put anything in the text argument of the -\put command that you'd put into the argument of an -\mbox and related commands. When you do this, the -reference point will be the lower left corner of the box.

-

Picture commands:

- -

\circle

-

-

\circle[*]{diameter}

-

The \circle command produces a circle with a -diameter as close to the specified one as possible. If the -*-form of the command is used, LaTeX draws a solid -circle.

-

Note that only circles up to 40 pt can be drawn.

-

\dashbox

-

-

Draws a box with a dashed line.

-

\dashbox{dash_length}(width,height){...}

-

The \dashbox has an extra argument which specifies -the width of each dash. A dashed box looks best when the -width and height are multiples of the -dash_length.

-

\frame

-

-

\frame{...}

-

The \frame command puts a rectangular frame around -the object specified in the argument. The reference point is the -bottom left corner of the frame. No extra space is put between the -frame and the object.

-

\framebox

-

-

\framebox(width,height)[position]{...}

-

The \framebox command is exactly the same as the -\makebox command, except that it puts a frame around -the outside of the box that it creates.

-

The framebox command produces a rule of thickness -\fboxrule, and leaves a space \fboxsep -between the rule and the contents of the box.

-

\line

-

-

\line(x slope,y slope){length}

-

The \line command draws a line of the specified -length and slope.

-

Note that LaTeX can only draw lines with slope = x/y, where x -and y have integer values from -6 through 6.

-

\linethickness

-

-

\linethickness{dimension}

-

Declares the thickness of horizontal and vertical lines in a -picture environment to be dimension, which must be a -positive length. It does not affect the thickness of slanted lines -and circles, or the quarter circles drawn by \oval to -form the corners of an oval.

-

\makebox

-

-

\makebox(width,height)[position]{...}

-

The \makebox command for the picture environment is -similar to the normal \makebox command except that you -must specify a width and height in -multiples of \unitlength.

-

The optional argument, [position], specifies the -quadrant that your text appears in. You may select up to two of the -following:

- -

See section \makebox.

-

\multiput

-

-

\multiput(x coord,y coord)(delta x,delta y){number of -copies}{object}

-

The \multiput command can be used when you are -putting the same object in a regular pattern across a picture.

-

\oval

-

-

\oval(width,height)[portion]

-

The \oval command produces a rectangle with rounded -corners. The optional argument, [portion], allows you -to select part of the oval.

- -

Note that the "corners" of the oval are made with quarter -circles with a maximum radius of 20 pt, so large "ovals" will look -more like boxes with rounded corners.

-

\put

-

-

\put(x coord,y coord){ ... }

-

The \put command places the item specified by the -mandatory argument at the given coordinates.

-

\shortstack

-

-

\shortstack[position]{... \\ ... \\ ...}

-

The \shortstack command produces a stack of -objects. The valid positions are:

- -

\vector

-

-

\vector(x slope,y slope){length}

-

The \vector command draws a line with an arrow of -the specified length and slope. The x and -y values must lie between -4 and +4, inclusive.

-

quotation

-

-
- \begin{quotation}
-  text
- \end{quotation}
-
-

The margins of the quotation environment are -indented on the left and the right. The text is justified at both -margins and there is paragraph indentation. Leaving a blank line -between text produces a new paragraph.

-

quote

-

-
- \begin{quote}
-  text
- \end{quote}
-
-

The margins of the quote environment are indented -on the left and the right. The text is justified at both margins. -Leaving a blank line between text produces a new paragraph.

-

tabbing

-

-
- \begin{tabbing}
- text \= more text \= still more text \= last text \\
- second row \>  \> more \\
- .
- .
- .
- \end{tabbing}
-
-

The tabbing environment provides a way to align -text in columns. It works by setting tab stops and tabbing to them -much the way you do with an ordinary typewriter.

-

It is best suited for cases where the width of each column is -constant and known in advance.

-

This environment can be broken across pages, unlike the -tabular environment.

-

The following commands can be used inside a tabbing -environment:

-
-
\=
-
Sets a tab stop at the current position.
-
\>
-
Advances to the next tab stop.
-
\<
-
This command allows you to put something to the left of the -local margin without changing the margin. Can only be used at the -start of the line.
-
\+
-
Moves the left margin of the next and all the following -commands one tab stop to the right.
-
\-
-
Moves the left margin of the next and all the following -commands one tab stop to the left.
-
\'
-
Moves everything that you have typed so far in the current -column, i.e. everything from the most recent \>, -\<, \', \\, or -\kill command, to the right of the previous column, -flush against the current column's tab stop.
-
\`
-
Allows you to put text flush right against any tab stop, -including tab stop 0. However, it can't move text to the right of -the last column because there's no tab stop there. The -\` command moves all the text that follows it, up to -the \\ or \end{tabbing} command that ends -the line, to the right margin of the tabbing environment. There -must be no \> or \' command between -the \` and the command that ends the line.
-
\kill
-
Sets tab stops without producing text. Works just like -\\ except that it throws away the current line instead -of producing output for it. The effect of any \=, -\+ or \- commands in that line remain in -effect.
-
\pushtabs
-
Saves all current tab stop positions. Useful for temporarily -changing tab stop positions in the middle of a tabbing -environment.
-
\pushtabs
-
Restores the tab stop positions saved by the last -\pushtabs.
-
\a
-
In a tabbing environment, the commands -\=, \' and \` do not produce -accents as normal. Instead, the commands \a=, -\a' and \a` are used.
-
-

This example typesets a Pascal function in a traditional -format:

-
-        \begin{tabbing}
-        function \= fact(n : integer) : integer;\\
-                 \> begin \= \+ \\
-                       \> if \= n $>$ 1 then \+ \\
-                                fact := n * fact(n-1) \- \\
-                          else \+ \\
-                                fact := 1; \-\- \\
-                    end;\\
-        \end{tabbing}
-
-

table

-

-
- \begin{table}[placement]
-
-  body of the table
-
- \caption{table title}
- \end{table}
-
-

Tables are objects that are not part of the normal text, and are -usually "floated" to a convenient place, like the top of a page. -Tables will not be split between two pages.

-

The optional argument [placement] determines where -LaTeX will try to place your table. There are four places where -LaTeX can possibly put a float:

- -

The standard report and article -classes use the default placement [tbp].

-

The body of the table is made up of whatever text, LaTeX -commands, etc., you wish. The \caption command allows -you to title your table.

-

tabular

-

-
- \begin{tabular}[pos]{cols}
- column 1 entry & column 2 entry ... & column n entry \\
- .
- .
- .
- \end{tabular}
-
-

or

-
- \begin{tabular*}{width}[pos]{cols}
- column 1 entry & column 2 entry ... & column n entry \\
- .
- .
- .
- \end{tabular*}
-
-

These environments produce a box consisting of a sequence of -rows of items, aligned vertically in columns. The mandatory and -optional arguments consist of:

-
-
width
-
Specifies the width of the tabular* environment. -There must be rubber space between columns that can stretch to fill -out the specified width.
-
pos
-
Specifies the vertical position; default is alignment on the -center of the environment. -
    -
  • t - align on top row
  • -
  • b - align on bottom row
  • -
-
-
cols
-
Specifies the column formatting. It consists of a sequence of -the following specifiers, corresponding to the sequence of columns -and intercolumn material. -
    -
  • l - A column of left-aligned items.
  • -
  • r - A column of right-aligned items.
  • -
  • c - A column of centred items.
  • -
  • | - A vertical line the full height and depth of -the environment.
  • -
  • @{text} - This inserts text in every -row. An @-expression suppresses the intercolumn space normally -inserted between columns; any desired space between the inserted -text and the adjacent items must be included in text. An -\extracolsep{wd} command in an @-expression causes an -extra space of width wd to appear to the left of all -subsequent columns, until countermanded by another -\extracolsep command. Unlike ordinary intercolumn -space, this extra space is not suppressed by an @-expression. An -\extracolsep command can be used only in an -@-expression in the cols argument.
  • -
  • p{wd} - Produces a column with each item typeset -in a parbox of width wd, as if it were the argument of -a \parbox[t]{wd} command. However, a \\ -may not appear in the item, except in the following situations: -
      -
    1. inside an environment like minipage, -array, or tabular.
    2. -
    3. inside an explicit \parbox.
    4. -
    5. in the scope of a \centering, -\raggedright, or \raggedleft declaration. -The latter declarations must appear inside braces or an environment -when used in a p-column element.
    6. -
    -
  • -
  • *{num}{cols} - Equivalent to num -copies of cols, where num is any positive -integer and cols is any list of column-specifiers, -which may contain another *-expression.
  • -
-
-
-

These commands can be used inside a tabular -environment:

- -

\cline

-

-

\cline{i-j}

-

The \cline command draws horizontal lines across -the columns specified, beginning in column i and -ending in column j, which are identified in the -mandatory argument.

-

\hline

-

-

The \hline command will draw a horizontal line the -width of the table. It's most commonly used to draw a line at the -top, bottom, and between the rows of the table.

-

\multicolumn

-

-

\multicolumn{cols}{pos}{text}

-

The \multicolumn is used to make an entry that -spans several columns. The first mandatory argument, -cols, specifies the number of columns to span. The -second mandatory argument, pos, specifies the -formatting of the entry; c for centred, l -for flushleft, r for flushright. The third mandatory -argument, text, specifies what text is to make up the -entry.

-

\vline

-

-

The \vline command will draw a vertical line -extending the full height and depth of its row. An -\hfill command can be used to move the line to the -edge of the column. It can also be used in an @-expression.

-

thebibliography

-

-
- \begin{thebibliography}{widest-label}
- \bibitem[label]{cite_key}
- .
- .
- .
- \end{thebibliography}
-
-

The thebibliography environment produces a -bibliography or reference list. In the article class, -this reference list is labelled "References"; in the -report class, it is labelled "Bibliography".

- - -

\bibitem

-

-

\bibitem[label]{cite_key}

-

The \bibitem command generates an entry labelled by -label. If the label argument is missing, -a number is generated as the label, using the -enumi counter. The cite_key is any -sequence of letters, numbers, and punctuation symbols not -containing a comma. This command writes an entry on the -`.aux' file containing cite_key and the -item's label. When this `.aux' file is read -by the \begin{document} command, the item's -label is associated with cite_key, -causing the reference to cite_key by a -\cite command to produce the associated -label.

-

\cite

-

-

\cite[text]{key_list}

-

The key_list argument is a list of citation keys. -This command generates an in-text citation to the references -associated with the keys in key_list by entries on the -`.aux' file read by the \begin{document} -command.

-

The optional text argument will appear after the -citation, i.e. \cite[p. 2]{knuth} might produce -`[Knuth, p. 2]'.

-

\nocite

-

-

\nocite{key_list}

-

The \nocite command produces no text, but writes -key_list, which is a list of one or more citation -keys, on the `.aux' file.

-

Using BibTeX

-

-

If you use the BibTeX program by Oren Patashnik (highly -recommended if you need a bibliography of more than a couple of -titles) to maintain your bibliography, you don't use the -thebibliography environment. Instead, you include the -lines

-
-        \bibliographystyle{style}
-        \bibliography{bibfile}
-
-

where style refers to a file -style.bst, which defines how your citations will look. -The standard styles distributed with BibTeX are:

-
-
alpha
-
Sorted alphabetically. Labels are formed from name of author -and year of publication.
-
plain
-
Sorted alphabetically. Labels are numeric.
-
unsrt
-
Like plain, but entries are in order of -citation.
-
abbrv
-
Like plain, but more compact labels.
-
-

In addition, numerous other BibTeX style files exist tailored to -the demands of various publications.

-

The argument to \bibliography refers to the file -bibfile.bib, which should contain your database in -BibTeX format. Only the entries referred to via \cite -and \nocite will be listed in the bibliography.

-

theorem

-

-
- \begin{theorem}
-  theorem text
- \end{theorem}
-
-

The theorem environment produces "Theorem x" in -boldface followed by your theorem text.

-

titlepage

-

-
- \begin{titlepage}
-  text
- \end{titlepage}
-
-

The titlepage environment creates a title page, -i.e. a page with no printed page number or heading. It also causes -the following page to be numbered page one. Formatting the title -page is left to you. The \today -command comes in handy for title pages.

-

Note that you can use the \maketitle (see section -\maketitle) command to produce a standard -title page.

-

verbatim

-

-
- \begin{verbatim}
-  text
- \end{verbatim}
-
-

The verbatim environment is a paragraph-making -environment that gets LaTeX to print exactly what you type in. It -turns LaTeX into a typewriter with carriage returns and blanks -having the same effect that they would on a typewriter.

- -

\verb

-

-

\verb char literal_text char

-

\verb*char literal_text char

-

Typesets literal_text exactly as typed, including -special characters and spaces, using a typewriter -(\tt) type style. There may be no space between -\verb or \verb* and char -(space is shown here only for clarity). The *-form -differs only in that spaces are printed as `\verb*| |'.

-

verse

-

-
- \begin{verse}
-  text
- \end{verse}
-
-

The verse environment is designed for poetry, -though you may find other uses for it.

-

The margins are indented on the left and the right. Separate the -lines of each stanza with \\, and use one or more -blank lines to separate the stanzas.

- - - - -
Footnotes
-

-

Footnotes can be produced in one of two ways. They can be -produced with one command, the \footnote command. They -can also be produced with two commands, the -\footnotemark and the \footnotetext -commands. See the specific command for information on why you would -use one over the other.

- -

\footnote

-

-

\footnote[number]{text}

-

The \footnote command places the numbered footnote -text at the bottom of the current page. The optional -argument, number, is used to change the default -footnote number. This command can only be used in outer paragraph -mode; i.e., you cannot use it in sectioning commands like -\chapter, in figures, tables or in a -tabular environment.

-

\footnotemark

-

-

The \footnotemark command puts the footnote -number in the text. This command can be used in inner -paragraph mode. The text of the footnote is supplied by the -\footnotetext command.

-

This command can be used to produce several consecutive footnote -markers referring to the same footnote by using

-

\footnotemark[\value{footnote}]

-

after the first \footnote command.

-

\footnotetext

-

-

\footnotetext[number]{text}

-

The \footnotetext command produces the -text to be placed at the bottom of the page. This -command can come anywhere after the \footnotemark -command. The \footnotetext command must appear in -outer paragraph mode.

-

The optional argument, number, is used to change -the default footnote number.

- - - - -
Lengths
-

-

A length is a measure of distance. Many LaTeX -commands take a length as an argument.

- -

\newlength

-

-

\newlength{\gnat}

-

The \newlength command defines the mandatory -argument, \gnat, as a length command with -a value of 0in. An error occurs if a -\gnat command already exists.

-

\setlength

-

-

\setlength{\gnat}{length}

-

The \setlength command is used to set the value of -a length command. The length argument can -be expressed in any terms of length LaTeX understands, i.e., inches -(in), millimeters (mm), points -(pt), etc.

-

\addtolength

-

-

\addtolength{\gnat}{length}

-

The \addtolength command increments a "length -command" by the amount specified in the length -argument. It can be a negative amount.

-

\settodepth

-

-

\settodepth{\gnat}{text}

-

The \settodepth command sets the value of a -length command equal to the depth of the -text argument.

-

\settoheight

-

-

\settoheight{\gnat}{text}

-

The \settoheight command sets the value of a -length command equal to the height of the -text argument.

-

\settowidth

-

-

\settowidth{\gnat}{text}

-

The \settowidth command sets the value of a -length command equal to the width of the -text argument.

-

Predefined lengths

-

-

\width

-

\height

-

\depth

-

\totalheight

-

These length parameters can be used in the arguments of the -box-making commands See section Spaces & -Boxes. They specify the natural width etc. of the text in the -box. \totalheight equals \height + -\depth. To make a box with the text stretched to -double the natural size, e.g., say

-

\makebox[2\width]{Get a stretcher}

- - - - -
Letters
-

-

You can use LaTeX to typeset letters, both personal and -business. The letter document class is designed to -make a number of letters at once, although you can make just one if -you so desire.

-

Your `.tex' source file has the same minimum commands -as the other document classes, i.e., you must have the following -commands as a minimum:

-
- \documentclass{letter}
- \begin{document}
-  ... letters ...
- \end{document}
-
-

Each letter is a letter environment, whose argument -is the name and address of the recipient. For example, you might -have:

-
- \begin{letter}{Mr. Joe Smith\\ 2345 Princess St.
-      \\ Edinburgh, EH1 1AA}
-   ...
- \end{letter}
-
-

The letter itself begins with the \opening command. -The text of the letter follows. It is typed as ordinary LaTeX -input. Commands that make no sense in a letter, like -\chapter, do not work. The letter closes with a -\closing command.

-

After the closing, you can have additional -material. The \cc command produces the usual "cc: -...". There's also a similar \encl command for a list -of enclosures. With both these commands, use \\ to -separate the items.

-

These commands are used with the letter class:

- -

\address

-

-

\address{Return address}

-

The return address, as it should appear on the letter and the -envelope. Separate lines of the address should be separated by -\\ commands. If you do not make an -\address declaration, then the letter will be -formatted for copying onto your organization's standard letterhead. -If you give an \address declaration, then the letter -will be formatted as a personal letter.

-

\cc

-

-

\cc{Kate Schechter\\Rob McKenna}

-

Generate a list of other persons the letter was sent to. Each -name is printed on a separate line.

-

\closing

-

-

\closing{text}

-

The letter closes with a \closing command, -i.e.,

-
- \closing{Best Regards,}
-
-

\encl

-

-

\encl{CV\\Certificates}

-

Generate a list of enclosed material.

-

\location

-

-

\location{address}

-

This modifies your organization's standard address. This only -appears if the firstpage pagestyle is selected.

-

\makelabels

-

-

\makelabels{number}

-

If you issue this command in the preamble, LaTeX will create a -sheet of address labels. This sheet will be output before the -letters.

-

\name

-

-

\name{June Davenport}

-

Your name, used for printing on the envelope together with the -return address.

-

\opening

-

-

\opening{text}

-

The letter begins with the \opening command. The -mandatory argument, text, is whatever text you wish to -start your letter, i.e.,

-
- \opening{Dear Joe,}
-
-

\ps

-

-

\ps

-

Use this command before a postscript.

-

\signature

-

-

\signature{Harvey Swick}

-

Your name, as it should appear at the end of the letter -underneath the space for your signature. Items that should go on -separate lines should be separated by \\ commands.

-

\startbreaks

-

-

\startbreaks

-

Used after a \stopbreaks command to allow page -breaks again.

-

\stopbreaks

-

-

\stopbreaks

-

Inhibit page breaks until a \startbreaks command -occurs.

-

\telephone

-

-

\telephone{number}

-

This is your telephone number. This only appears if the -firstpage pagestyle is selected.

- - - - -
Line & Page Breaking
-

-

The first thing LaTeX does when processing ordinary text is to -translate your input file into a string of glyphs and spaces. To -produce a printed document, this string must be broken into lines, -and these lines must be broken into pages. In some environments, -you do the line breaking yourself with the \\ command, -but LaTeX usually does it for you.

- -

\\

-

-

\\[*][extra-space]

-

The \\ command tells LaTeX to start a new line. It -has an optional argument, extra-space, that specifies -how much extra vertical space is to be inserted before the next -line. This can be a negative amount.

-

The \\* command is the same as the ordinary -\\ command except that it tells LaTeX not to start a -new page after the line.

-

\-

-

-

The \- command tells LaTeX that it may hyphenate -the word at that point. LaTeX is very good at hyphenating, and it -will usually find all correct hyphenation points. The -\- command is used for the exceptional cases.

-

Note that when you insert \- commands in a word, -the word will only be hyphenated at those points and not at any of -the hyphenation points that LaTeX might otherwise have chosen.

-

\cleardoublepage

-

-

The \cleardoublepage command ends the current page -and causes all figures and tables that have so far appeared in the -input to be printed. In a two-sided printing style, it also makes -the next page a right-hand (odd-numbered) page, producing a blank -page if necessary.

-

\clearpage

-

-

The \clearpage command ends the current page and -causes all figures and tables that have so far appeared in the -input to be printed.

-

\enlargethispage

-

-

\enlargethispage{size}

-

\enlargethispage*{size}

-

Enlarge the \textheight for the current page by the -specified amount; e.g. \enlargethispage{\baselineskip} -will allow one additional line.

-

The starred form tries to squeeze the material together on the -page as much as possible. This is normally used together with an -explicit \pagebreak.

-

\fussy

-

-

\fussy

-

This declaration (which is the default) makes TeX more fussy -about line breaking. This can avoids too much space between words, -but may produce overfull boxes.

-

This command cancels the effect of a previous -\sloppy command. section \sloppy

-

\hyphenation

-

-

\hyphenation{words}

-

The \hyphenation command declares allowed -hyphenation points, where words is a list of words, -separated by spaces, in which each hyphenation point is indicated -by a - character.

-

\linebreak

-

-

\linebreak[number]

-

The \linebreak command tells LaTeX to break the -current line at the point of the command. With the optional -argument, number, you can convert the -\linebreak command from a demand to a request. The -number must be a number from 0 to 4. The higher the number, the -more insistent the request is.

-

The \linebreak command causes LaTeX to stretch the -line so it extends to the right margin.

-

\newline

-

-

The \newline command breaks the line right where it -is. It can only be used in paragraph mode.

-

\newpage

-

-

The \newpage command ends the current page.

-

\nolinebreak

-

-

\nolinebreak[number]

-

The \nolinebreak command prevents LaTeX from -breaking the current line at the point of the command. With the -optional argument, number, you can convert the -\nolinebreak command from a demand to a request. The -number must be a number from 0 to 4. The higher the number, the -more insistent the request is.

-

\nopagebreak

-

-

\nopagebreak[number]

-

The \nopagebreak command prevents LaTeX from -breaking the current page at the point of the command. With the -optional argument, number, you can convert the -\nopagebreak command from a demand to a request. The -number must be a number from 0 to 4. The higher the number, the -more insistent the request is.

-

\pagebreak

-

-

\pagebreak[number]

-

The \pagebreak command tells LaTeX to break the -current page at the point of the command. With the optional -argument, number, you can convert the -\pagebreak command from a demand to a request. The -number must be a number from 0 to 4. The higher the number, the -more insistent the request is.

-

\sloppy

-

-

\sloppy

-

This declaration makes TeX less fussy about line breaking. This -can prevent overfull boxes, but may leave too much space between -words.

-

Lasts until a \fussy command is issued. section -\fussy.

- - - - -
Making Paragraphs
-

-

A paragraph is ended by one or more completely blank lines -- -lines not containing even a %. A blank line should not -appear where a new paragraph cannot be started, such as in math -mode or in the argument of a sectioning command.

- -

\indent

-

-

\indent

-

This produces a horizontal space whose width equals the width of -the paragraph indentation. It is used to add paragraph indentation -where it would otherwise be suppressed.

-

\noindent

-

-

\noindent

-

When used at the beginning of the paragraph, it suppresses the -paragraph indentation. It has no effect when used in the middle of -a paragraph.

-

\par

-

-

Equivalent to a blank line; often used to make command or -environment definitions easier to read.

- - - - -
Margin Notes
-

-

The command \marginpar[left]{right} creates a note -in the margin. The first line will be at the same height as the -line in the text where the \marginpar occurs.

-

When you only specify the mandatory argument right, -the text will be placed

- -

By issuing the command \reversemarginpar, you can -force the marginal notes to go into the opposite (inside) -margin.

-

When you specify both arguments, left is used for -the left margin, and right is used for the right -margin.

-

The first word will normally not be hyphenated; you can enable -hyphenation by prefixing the first word with a -\hspace{0pt} command.

- - - - -
Math Formulae
-

-

There are three environments that put LaTeX in math mode:

-
-
math
-
For Formulae that appear right in the text.
-
displaymath
-
For Formulae that appear on their own line.
-
equation
-
The same as the displaymath environment except that it adds an -equation number in the right margin.
-
-

The math environment can be used in both paragraph -and LR mode, but the displaymath and -equation environments can be used only in paragraph -mode. The math and displaymath -environments are used so often that they have the following short -forms:

-
-    \(...\)     instead of     \begin{math}...\end{math}
-
-    \[...\]     instead of     \begin{displaymath}...\end{displaymath}
-
-

In fact, the math environment is so common that it -has an even shorter form:

-
-    $ ... $     instead of     \(...\)
-
-

- -

Subscripts & -Superscripts

-

-

To get an expression exp to appear as a subscript, you -just type _{exp}. To get -exp to appear as a superscript, you type -^{exp}. LaTeX handles -superscripted superscripts and all of that stuff in the natural -way. It even does the right thing when something has both a -subscript and a superscript.

-

Math Symbols

-

-

LaTeX provides almost any mathematical symbol you're likely to -need. The commands for generating them can be used only in math -mode. For example, if you include $\pi$ in your -source, you will get the symbol in your output.

-

Spacing in Math Mode

-

-

In a math environment, LaTeX ignores the spaces you -type and puts in the spacing that it thinks is best. LaTeX formats -mathematics the way it's done in mathematics texts. If you want -different spacing, LaTeX provides the following four commands for -use in math mode:

-

-
    -
  1. \; - a thick space
  2. -
  3. \: - a medium space
  4. -
  5. \, - a thin space
  6. -
  7. \! - a negative thin space
  8. -
-

Math Miscellany

-

-
-
\cdots
-
Produces a horizontal ellipsis where the dots are raised to the -center of the line. eg.
-
\ddots
-
Produces a diagonal ellipsis. eg.
-
\frac{num}{den}
-
Produces the fraction num divided by -den. eg.
-
\ldots
-
Produces an ellipsis. This command works in any mode, not just -math mode. eg.
-
\overbrace{text}
-
Generates a brace over text. eg.
-
\overline{text}
-
Causes the argument text to be overlined. eg.
-
\sqrt[root]{arg}
-
Produces the square root of its argument. The optional -argument, root, determines what root to produce, i.e., -the cube root of x+y would be typed as -$\sqrt[3]{x+y}$. eg.
-
\underbrace{text}
-
Generates text with a brace underneath. eg.
-
\underline{text}
-
Causes the argument text to be underlined. This command can -also be used in paragraph and LR modes. eg.
-
\vdots
-
Produces a vertical ellipsis. eg.
-
- - - - -
Modes
-

-

When LaTeX is processing your input text, it is always in one of -three modes:

- -

LaTeX changes mode only when it goes up or down a staircase to a -different level, though not all level changes produce mode changes. -Mode changes occur only when entering or leaving an environment, or -when LaTeX is processing the argument of certain text-producing -commands.

-

"Paragraph mode" is the most common; it's the one LaTeX is in -when processing ordinary text. In that mode, LaTeX breaks your text -into lines and breaks the lines into pages. LaTeX is in "math mode" -when it's generating a mathematical formula. In "LR mode", as in -paragraph mode, LaTeX considers the output that it produces to be a -string of words with spaces between them. However, unlike paragraph -mode, LaTeX keeps going from left to right; it never starts a new -line in LR mode. Even if you put a hundred words into an -\mbox, LaTeX would keep typesetting them from left to -right inside a single box, and then complain because the resulting -box was too wide to fit on the line.

-

LaTeX is in LR mode when it starts making a box with an -\mbox command. You can get it to enter a different -mode inside the box - for example, you can make it enter math mode -to put a formula in the box. There are also several text-producing -commands and environments for making a box that put LaTeX in -paragraph mode. The box make by one of these commands or -environments will be called a parbox. When LaTeX is in -paragraph mode while making a box, it is said to be in "inner -paragraph mode". Its normal paragraph mode, which it starts out in, -is called "outer paragraph mode".

- - - - -
Page Styles
-

-

The \documentclass command determines the size and -position of the page's head and foot. The page style determines -what goes in them.

- -

\maketitle

-

-

\maketitle

-

The \maketitle command generates a title on a -separate title page - except in the article class, -where the title normally goes at the top of the first page. -Information used to produce the title is obtained from the -following declarations:

-

See section Page Styles for the commands -to give the information.

- -

\author

-

-

\author{names}

-

The \author command declares the author(s), where -names is a list of authors separated by -\and commands. Use \\ to separate lines -within a single author's entry -- for example, to give the author's -institution or address.

-

\date

-

-

\date{text}

-

The \date command declares text to be the -document's date. With no \date command, the current -date is used.

-

\thanks

-

-

\thanks{text}

-

The \thanks command produces a -\footnote to the title.

-

\title

-

-

\title{text}

-

The \title command declares text to be -the title. Use \\ to tell LaTeX where to start a new -line in a long title.

-

\pagenumbering

-

-

\pagenumbering{num_style}

-

Specifies the style of page numbers. Possible values of -num_style are:

- -

\pagestyle

-

-

\pagestyle{option}

-

The \pagestyle command changes the style from the -current page on throughout the remainder of your document.

-

The valid options are:

- - -

\markboth

-

-
-\markboth{left head}{right head}
-
-

The \markboth command is used in conjunction with -the page style myheadings for setting both the left -and the right heading. You should note that a "left-hand heading" -is generated by the last \markboth command before the -end of the page, while a "right-hand heading" is generated by the -first \markboth or \markright that comes -on the page if there is one, otherwise by the last one before the -page.

-

\markright

-

-
-\markright{right head}
-
-

The \markright command is used in conjunction with -the page style myheadings for setting the right -heading, leaving the left heading unchanged. You should note that a -"left-hand heading" is generated by the last \markboth -command before the end of the page, while a "right-hand heading" is -generated by the first \markboth or -\markright that comes on the page if there is one, -otherwise by the last one before the page.

-

\thispagestyle

-

-

\thispagestyle{option}

-

The \thispagestyle command works in the same manner -as the \pagestyle command except that it changes the -style for the current page only.

- - - - -
Sectioning
-

-

Sectioning commands provide the means to structure your text -into units.

- -

All sectioning commands take the same general form, i.e.,

-

\chapter[optional]{title}

-

In addition to providing the heading in the text, the mandatory -argument of the sectioning command can appear in two other -places:

-
    -
  1. The table of contents
  2. -
  3. The running head at the top of the page
  4. -
-

You may not want the same thing to appear in these other two -places as appears in the text heading. To handle this situation, -the sectioning commands have an optional argument that -provides the text for these other two purposes.

-

All sectioning commands have *-forms that print a -title, but do not include a number and do not make an entry -in the table of contents.

-

-

\appendix

-

The \appendix command changes the way sectional -units are numbered. The \appendix command generates no -text and does not affect the numbering of parts. The normal use of -this command is something like

-
-\chapter{The First Chapter}
-...
-\appendix
-\chapter{The First Appendix}
-
- - - - -
Spaces & Boxes
-

-

All the predefined length parameters See section Predefined lengths can be used in the arguments of the -box-making commands.

- -

\dotfill

-

-

The \dotfill command produces a "rubber length" -that produces dots instead of just spaces.

-

\hfill

-

-

The \hfill fill command produces a "rubber length" -which can stretch or shrink horizontally. It will be filled with -spaces.

-

\hrulefill

-

-

The \hrulefill fill command produces a "rubber -length" which can stretch or shrink horizontally. It will be filled -with a horizontal rule.

-

\hspace

-

-

\hspace[*]{length}

-

The \hspace command adds horizontal space. The -length of the space can be expressed in any terms that LaTeX -understands, i.e., points, inches, etc. You can add negative as -well as positive space with an \hspace command. Adding -negative space is like backspacing.

-

LaTeX removes horizontal space that comes at the end of a line. -If you don't want LaTeX to remove this space, include the optional -* argument. Then the space is never removed.

-

\addvspace

-

-

\addvspace{length}

-

The \addvspace command normally adds a vertical -space of height length. However, if vertical space has already been -added to the same point in the output by a previous -\addvspace command, then this command will not add -more space than needed to make the natural length of the total -vertical space equal to length.

-

\bigskip

-

-

The \bigskip command is equivalent to -\vspace{bigskipamount} where -bigskipamount is determined by the document class.

-

\medskip

-

-

The \medskip command is equivalent to -\vspace{medskipamount} where -medskipamount is determined by the document class.

-

\smallskip

-

-

\smallskip

-

The \smallskip command is equivalent to -\vspace{smallskipamount} where -smallskipamount is determined by the document -class.

-

\vfill

-

-

The \vfill fill command produces a rubber length -which can stretch or shrink vertically.

-

\vspace

-

-

\vspace[*]{length}

-

The \vspace command adds vertical space. The length -of the space can be expressed in any terms that LaTeX understands, -i.e., points, inches, etc. You can add negative as well as positive -space with an \vspace command.

-

LaTeX removes vertical space that comes at the end of a page. If -you don't want LaTeX to remove this space, include the optional -* argument. Then the space is never removed.

-

\fbox

-

-

\fbox{text}

-

The \fbox command is exactly the same as the -\mbox command, except that it puts a frame around the -outside of the box that it creates.

-

\framebox

-

-

\framebox[width][position]{text}

-

The \framebox command is exactly the same as the -\makebox command, except that it puts a frame around -the outside of the box that it creates.

-

The framebox command produces a rule of thickness -\fboxrule, and leaves a space \fboxsep -between the rule and the contents of the box.

-

lrbox

-

-

\begin{lrbox}{cmd} text \end{lrbox}

-

This is the environment form of \sbox.

-

The text inside the environment is saved in the box -cmd, which must have been declared with -\newsavebox.

-

\makebox

-

-

\makebox[width][position]{text}

-

The \makebox command creates a box just wide enough -to contain the text specified. The width of the box is -specified by the optional width argument. The position -of the text within the box is determined by the optional -position argument.

- -

See section \makebox.

-

\mbox

-

-

\mbox{text}

-

The \mbox command creates a box just wide enough to -hold the text created by its argument.

-

Use this command to prevent text from being split across -lines.

-

\newsavebox

-

-

\newsavebox{cmd}

-

Declares cmd, which must be a command name that is -not already defined, to be a bin for saving boxes.

-

\parbox

-

-

-\parbox[position][height][inner-pos]{width}{text}

-

A parbox is a box whose contents are created in -paragraph mode. The \parbox has two -mandatory arguments:

- -

LaTeX will position a parbox so its center lines up -with the center of the text line. The optional position -argument allows you to line up either the top or bottom line in the -parbox (default is top).

-

If the height argument is not given, the box will have -the natural height of the text.

-

The inner-pos argument controls the placement of the text -inside the box. If it is not specified, position is -used.

- -

A \parbox command is used for a parbox containing a -small piece of text, with nothing fancy inside. In particular, you -shouldn't use any of the paragraph-making environments inside a -\parbox argument. For larger pieces of text, including -ones containing a paragraph-making environment, you should use a -minipage environment See section minipage.

-

\raisebox

-

-

-\raisebox{distance}[extend-above][extend-below]{text}

-

The \raisebox command is used to raise or lower -text. The first mandatory argument specifies how high the text is -to be raised (or lowered if it is a negative amount). The text -itself is processed in LR mode.

-

Sometimes it's useful to make LaTeX think something has a -different size than it really does - or a different size than LaTeX -would normally think it has. The \raisebox command -lets you tell LaTeX how tall it is.

-

The first optional argument, extend-above, makes -LaTeX think that the text extends above the line by the amount -specified. The second optional argument, extend-below, -makes LaTeX think that the text extends below the line by the -amount specified.

-

\rule

-

-

\rule[raise-height]{width}{thickness}

-

The \rule command is used to produce horizontal -lines. The arguments are defined as follows:

- -

\savebox

-

-
- \savebox{cmd}[width][pos]{text}
-
-

This command typeset text in a box just as for -\makebox. However, instead of printing the resulting -box, it saves it in bin cmd, which must have been -declared with \newsavebox.

-

\sbox

-

-

\sbox{text}

-

This commands typeset text in a box just as for -\mbox. However, instead of printing the resulting box, -it saves it in bin cmd, which must have been declared -with \newsavebox.

-

\usebox

-

-

\usebox{cmd}

-

Prints the box most recently saved in bin cmd by a -\savebox command.

- - - - -
Special Characters
-

-

The following characters play a special role in LaTeX and are -called "special printing characters", or simply "special -characters".

-
-                       # $ % & ~ _ ^ \ { }
-
-

Whenever you put one of these special characters into your file, -you are doing something special. If you simply want the character -to be printed just as any other letter, include a \ in -front of the character. For example, \$ will produce -$ in your output.

-

One exception to this rule is the \ itself because -\\ has its own special meaning. A \ is -produced by typing $\backslash$ -in your file.

-

Also, \~ means `place a tilde accent over the -following letter', so you will probably want to use -\verb instead.

-

-

In addition, you can access any character of a font once you -know its number by using the \symbol command. For example, the character -used for displaying spaces in the \verb* command has -the code decimal 32, so it can be typed as -\symbol{32}.

-

You can also specify octal numbers with ' or -hexadecimal numbers with ", so the previous example -could also be written as \symbol{'40} or -\symbol{"20}.

- - - - -
Splitting the Input
-

-

A large document requires a lot of input. Rather than putting -the whole input in a single large file, it's more efficient to -split it into several smaller ones. Regardless of how many separate -files you use, there is one that is the root file; it is the one -whose name you type when you run LaTeX.

- -

\include

-

-

\include{file}

-

The \include command is used in conjunction with -the \includeonly command for selective inclusion of -files. The file argument is the first name of a file, -denoting `file.tex'. If file is one the file -names in the file list of the \includeonly command or -if there is no \includeonly command, the -\include command is equivalent to

-
-\clearpage \input{file} \clearpage
-
-

except that if the file `file.tex' does not exist, then -a warning message rather than an error is produced. If the file is -not in the file list, the \include command is -equivalent to \clearpage.

-

The \include command may not appear in the preamble -or in a file read by another \include command.

-

\includeonly

-

-

\includeonly{file_list}

-

The \includeonly command controls which files will -be read in by an \include command. file_list -should be a comma-separated list of filenames. Each filename must -match exactly a filename specified in a \include -command. This command can only appear in the preamble.

-

\input

-

-

\input{file}

-

The \input command causes the indicated -file to be read and processed, exactly as if its -contents had been inserted in the current file at that point. The -file name may be a complete file name with extension or just a -first name, in which case the file `file.tex' is used.

- - - - -
Starting & Ending
-

-

Your input file must contain the following commands as a -minimum:

-
- \documentclass{class}
- \begin{document}
-   ... your text goes here ...
- \end{document}
-
-

where the class selected is one of the valid -classes for LaTeX. See section Document -Classes for details of the various document classes available -locally.

-

You may include other LaTeX commands between the -\documentclass and the \begin{document} -commands (i.e., in the `preamble').

- - - - -
Table of Contents
-

-

A table of contents is produced with the \tableofcontents command. You put the command -right where you want the table of contents to go; LaTeX does the -rest for you. It produces a heading, but it does not automatically -start a new page. If you want a new page after the table of -contents, include a \newpage command after the -\tableofcontents command.

-

There are similar commands \listoffigures and \listoftables for producing a list of figures -and a list of tables, respectively. Everything works exactly the -same as for the table of contents.

-

NOTE: If you want any of these items to be generated, you cannot -have the \nofiles command in your -document.

- -

\addcontentsline

-

-

\addcontentsline{file}{sec_unit}{entry}

-

The \addcontentsline command adds an entry to the -specified list or table where:

- -

\addtocontents

-

-

\addtocontents{file}{text}

-

The \addtocontents command adds text (or formatting -commands) directly to the file that generates the table of contents -or list of figures or tables.

- - - - - -
Terminal Input/Output
-

- -

\typein

-

-

\typein[cmd]{msg}

-

Prints msg on the terminal and causes LaTeX to stop -and wait for you to type a line of input, ending with return. If -the cmd argument is missing, the typed input is -processed as if it had been included in the input file in place of -the \typein command. If the cmd argument -is present, it must be a command name. This command name is then -defined or redefined to be the typed input.

-

\typeout

-

-

\typeout{msg}

-

Prints msg on the terminal and in the -log file. Commands in msg that are -defined with \newcommand or \renewcommand -are replaced by their definitions before being printed.

-

LaTeX's usual rules for treating multiple spaces as a single -space and ignoring spaces after a command name apply to -msg. A \space command in msg -causes a single space to be printed. A ^^J in -msg prints a newline.

- - - - -
Typefaces
-

-

The typeface is specified by giving the "size" and -"style". A typeface is also called a "font".

- -

\Styles

-

-

The following type style commands are supported by LaTeX.

-

These commands are used like \textit{italics text}. -The corresponding command in parenthesis is the "declaration form", -which takes no arguments. The scope of the declaration form lasts -until the next type style command or the end of the current -group.

-

The declaration forms are cumulative; i.e., you can say -\sffamily\bfseries to get sans serif boldface.

-

You can also use the environment form of the declaration forms; -e.g. \begin{ttfamily}...\end{ttfamily}.

-
-
\textrm (\rmfamily)
-
Roman.
-
\textit (\itshape)
-
-
\emph
-
Emphasis (toggles between \textit and \textrm).
-
\textmd (\mdseries)
-
Medium weight (default). The opposite of -boldface.
-
\textbf (\bfseries)
-
Boldface.
-
\textup (\upshape)
-
Upright (default). The opposite of -slanted.
-
\textsl (\slshape)
-
Slanted.
-
\textsf (\sffamily)
-
Sans serif.
-
\textsc (\scshape)
-
Small caps.
-
\texttt (\ttfamily)
-
Typewriter.
-
\textnormal -(\normalfont)
-
Main document font.
-
\mathrm
-
Roman, for use in math mode.
-
\mathbf
-
Boldface, for use in math mode.
-
\mathsf
-
Sans serif, for use in math mode.
-
\mathtt
-
Typewriter, for use in math mode.
-
\mathit
-
Italics, for use in math mode, e.g. variable names with several -letters.
-
\mathnormal
-
For use in math mode, e.g. inside another type style -declaration.
-
\mathcal
-
`Calligraphic' letters, for use in math mode.
-
-

In addition, the command \mathversion{bold} can be used for switching to -bold letters and symbols in formulas. -\mathversion{normal} restores the default.

-

Sizes

-

-

The following standard type size commands are supported by -LaTeX.

-

The commands as listed here are "declaration forms". The scope -of the declaration form lasts until the next type style command or -the end of the current group.

-

You can also use the environment form of these commands; e.g. -\begin{tiny}...\end{tiny}.

-
-
\tiny
-
\scriptsize
-
\footnotesize
-
\small
-
\normalsize
-
(default)
-
\large
-
\Large
-
\LARGE
-
\huge
-
\Huge
-
-

Low-level font -commands

-

-

These commands are primarily intended for writers of macros and -packages. The commands listed here are only a subset of the -available ones. For full details, you should consult Chapter 7 of -The LaTeX Companion.

-
-
\fontencoding{enc}
-
Select font encoding. Valid encodings include OT1 -and T1.
-
\fontfamily{family}
-
Select font family. Valid families include: -
    -
  • cmr for Computer Modern Roman
  • -
  • cmss for Computer Modern Sans Serif
  • -
  • cmtt for Computer Modern Typewriter
  • -
-and numerous others.
-
\fontseries{series}
-
Select font series. Valid series include: -
    -
  • m Medium (normal)
  • -
  • b Bold
  • -
  • c Condensed
  • -
  • bc Bold condensed
  • -
  • bx Bold extended
  • -
-and various other combinations.
-
\fontshape{shape}
-
Select font shape. Valid shapes are: -
    -
  • n Upright (normal)
  • -
  • it Italic
  • -
  • sl Slanted (oblique)
  • -
  • sc Small caps
  • -
  • ui Upright italics
  • -
  • ol Outline
  • -
-The two last shapes are not available for most font families.
-
\fontsize{size}{skip}
-
Set font size. The first parameter is the font size to switch -to; the second is the \baselineskip to use. The unit -of both parameters defaults to pt. A rule of thumb is that the -baselineskip should be 1.2 times the font size.
-
\selectfont
-
The changes made by calling the four font commands described -above do not come into effect until \selectfont is -called.
-
\usefont{enc}{family}{series}{shape}
-
Equivalent to calling \fontencoding, -\fontfamily, \fontseries and -\fontshape with the given parameters, followed by -\selectfont.
-
-
-
-
- - - - - - -
LaTeX Reference -
Kile
-
-
-
- - diff --git a/doc/psutils1.png b/doc/psutils1.png deleted file mode 100644 index 9fd015c..0000000 Binary files a/doc/psutils1.png and /dev/null differ diff --git a/doc/psutils15.png b/doc/psutils15.png deleted file mode 100644 index 3ce1fd7..0000000 Binary files a/doc/psutils15.png and /dev/null differ diff --git a/doc/psutils16.png b/doc/psutils16.png deleted file mode 100644 index a7c59bb..0000000 Binary files a/doc/psutils16.png and /dev/null differ diff --git a/doc/psutils2.png b/doc/psutils2.png deleted file mode 100644 index 9a09321..0000000 Binary files a/doc/psutils2.png and /dev/null differ diff --git a/doc/psutils3.png b/doc/psutils3.png deleted file mode 100644 index b738969..0000000 Binary files a/doc/psutils3.png and /dev/null differ diff --git a/doc/psutils5.png b/doc/psutils5.png deleted file mode 100644 index 9b31a89..0000000 Binary files a/doc/psutils5.png and /dev/null differ diff --git a/doc/psutils6.png b/doc/psutils6.png deleted file mode 100644 index 0ff695f..0000000 Binary files a/doc/psutils6.png and /dev/null differ diff --git a/doc/psutils7.png b/doc/psutils7.png deleted file mode 100644 index d8ba340..0000000 Binary files a/doc/psutils7.png and /dev/null differ diff --git a/doc/psutils8.png b/doc/psutils8.png deleted file mode 100644 index a752a5c..0000000 Binary files a/doc/psutils8.png and /dev/null differ diff --git a/doc/quickpreview.png b/doc/quickpreview.png deleted file mode 100644 index 039f82c..0000000 Binary files a/doc/quickpreview.png and /dev/null differ diff --git a/doc/select.png b/doc/select.png deleted file mode 100644 index e2f1acc..0000000 Binary files a/doc/select.png and /dev/null differ diff --git a/doc/snap_autocomplete.png b/doc/snap_autocomplete.png deleted file mode 100644 index fdee5d9..0000000 Binary files a/doc/snap_autocomplete.png and /dev/null differ diff --git a/doc/snap_compile_error.png b/doc/snap_compile_error.png deleted file mode 100644 index 24001cf..0000000 Binary files a/doc/snap_compile_error.png and /dev/null differ diff --git a/doc/snap_editusertag.png b/doc/snap_editusertag.png deleted file mode 100644 index f2b4289..0000000 Binary files a/doc/snap_editusertag.png and /dev/null differ diff --git a/doc/snap_encoding.png b/doc/snap_encoding.png deleted file mode 100644 index 6dbe7af..0000000 Binary files a/doc/snap_encoding.png and /dev/null differ diff --git a/doc/snap_kdvi_settings.png b/doc/snap_kdvi_settings.png deleted file mode 100644 index 77a3ef2..0000000 Binary files a/doc/snap_kdvi_settings.png and /dev/null differ diff --git a/doc/snap_projectview.png b/doc/snap_projectview.png deleted file mode 100644 index 8b11723..0000000 Binary files a/doc/snap_projectview.png and /dev/null differ diff --git a/doc/snap_projectview_add.png b/doc/snap_projectview_add.png deleted file mode 100644 index 9c84e71..0000000 Binary files a/doc/snap_projectview_add.png and /dev/null differ diff --git a/doc/snap_ref_choose.png b/doc/snap_ref_choose.png deleted file mode 100644 index f4c9a0a..0000000 Binary files a/doc/snap_ref_choose.png and /dev/null differ diff --git a/doc/snap_ref_select.png b/doc/snap_ref_select.png deleted file mode 100644 index 1843630..0000000 Binary files a/doc/snap_ref_select.png and /dev/null differ diff --git a/doc/snap_sidebarmenu.png b/doc/snap_sidebarmenu.png deleted file mode 100644 index a7ce8a3..0000000 Binary files a/doc/snap_sidebarmenu.png and /dev/null differ diff --git a/doc/snap_structview_label.png b/doc/snap_structview_label.png deleted file mode 100644 index 8646059..0000000 Binary files a/doc/snap_structview_label.png and /dev/null differ diff --git a/doc/snap_usertag.png b/doc/snap_usertag.png deleted file mode 100644 index 818c5fe..0000000 Binary files a/doc/snap_usertag.png and /dev/null differ diff --git a/doc/texgroup.png b/doc/texgroup.png deleted file mode 100644 index 845e82b..0000000 Binary files a/doc/texgroup.png and /dev/null differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6d0794..65b1c1b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,139 +1,22 @@ -PROJECT( kile ) -CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) +add_subdirectory( kile ) -SET( KILE_VERSION CACHE STRING "Kile's version; can be used to install special documentation files in share/doc/kile-$KILE_VERSION/" ) +##### other data -SET( kile_PO_FILE "kile.po" ) -SET( kile_DOCBOOK "index.docbook" ) +tde_create_translated_desktop( + SOURCE x-kilepr.desktop + DESTINATION ${MIME_INSTALL_DIR}/text +) -MACRO( KILE_ADD_DOCBOOK_DIRECTORY _sources _relative_dir _docbook _language ) - # only depend on images - FILE( GLOB_RECURSE _dependencies ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/*.[pP][nN][gG] ) - FILE( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} ) - - SET( _source_docbook ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/${_docbook} ) - SET( _compiled_docbook ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}/index.cache.bz2 ) - - ADD_CUSTOM_COMMAND(OUTPUT ${_compiled_docbook} - COMMAND ${KILE_MEINPROC} --check --cache index.cache.bz2 ${_source_docbook} - DEPENDS ${_dependencies} ${_source_docbook} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} - COMMENT "Compiling ${_language} docbook in ${_relative_dir}/${_docbook}" ) - - INSTALL( FILES ${_compiled_docbook} ${_dependencies} DESTINATION share/doc/tde/HTML/${_language}) - SET( ${_sources} ${${_sources}} ${_compiled_docbook} ) -ENDMACRO( KILE_ADD_DOCBOOK_DIRECTORY _sources _docbook _language ) - -MACRO( KILE_ADD_TRANSLATION_DIRECTORY _sources _relative_dir _file _language ) - FILE( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} ) - - GET_FILENAME_COMPONENT(_base_name ${_file} NAME_WE) - SET( _source_file ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/${_file} ) - SET( _base_compiled_file ${_base_name}.mo) - SET( _compiled_file ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}/${_base_compiled_file} ) - - ADD_CUSTOM_COMMAND(OUTPUT ${_compiled_file} - COMMAND ${KILE_MSGFMT} -o ${_compiled_file} ${_source_file} - DEPENDS ${_source_file} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} - COMMENT "Compiling ${_language} translation file" ) - - INSTALL( FILES ${_compiled_file} DESTINATION share/locale/${_language}/LC_MESSAGES ) - SET( ${_sources} ${${_sources}} ${_compiled_file} ) -ENDMACRO( KILE_ADD_TRANSLATION_DIRECTORY _sources _relative_dir _file _language ) - -MACRO( KILE_ADD_TRANSLATION_DIRECTORIES _documentation_sources _translation_sources _dir ) - FILE( GLOB _subdirectories ${_dir}/* ) - - FOREACH( _entry ${_subdirectories} ) - IF( IS_DIRECTORY ${_entry} ) - GET_FILENAME_COMPONENT( _language ${_entry} NAME ) - IF( KILE_MSGFMT AND EXISTS ${_entry}/messages ) - KILE_ADD_TRANSLATION_DIRECTORY( ${_translation_sources} translations/${_language}/messages ${kile_PO_FILE} ${_language} ) - SET(_translations_built ${_translations_built} ${_language} ) - ENDIF( KILE_MSGFMT AND EXISTS ${_entry}/messages ) - IF( KILE_MEINPROC AND EXISTS ${_entry}/doc ) - KILE_ADD_DOCBOOK_DIRECTORY( ${_documentation_sources} translations/${_language}/doc ${kile_DOCBOOK} ${_language} ) - SET(_docbooks_built ${_docbooks_built} ${_language} ) - ENDIF( KILE_MEINPROC AND EXISTS ${_entry}/doc ) - ENDIF( IS_DIRECTORY ${_entry} ) - ENDFOREACH( _entry ${_subdirectories} ) - - IF( _translations_built ) - MESSAGE( STATUS "Building translations for ${_translations_built}" ) - ELSE( _translations_built ) - MESSAGE( STATUS "Not building translations" ) - ENDIF( _translations_built ) - - IF( _docbooks_built ) - MESSAGE( STATUS "Building documentation for ${_docbooks_built}" ) - ELSE( _docbooks_built ) - MESSAGE( STATUS "Not building additional documentation" ) - ENDIF( _docbooks_built ) -ENDMACRO( KILE_ADD_TRANSLATION_DIRECTORIES _documentation_sources _translation_sources _dir ) - -MACRO( KILE_FIND_DOC_TOOLS ) - FIND_PROGRAM( KILE_MEINPROC "meinproc" DOC "path of the meinproc executable") - IF( KILE_MEINPROC ) - MESSAGE( STATUS "Found meinproc executable: ${KILE_MEINPROC}" ) - ELSE( KILE_MEINPROC ) - MESSAGE( STATUS "meinproc executable not found" ) - ENDIF( KILE_MEINPROC ) - FIND_PROGRAM( KILE_MSGFMT "msgfmt" DOC "path of the msgfmt executable") - IF( KILE_MEINPROC ) - MESSAGE( STATUS "Found msgfmt executable: ${KILE_MSGFMT}" ) - ELSE( KILE_MEINPROC ) - MESSAGE( STATUS "msgfmt executable not found" ) - ENDIF( KILE_MEINPROC ) - IF( KILE_MEINPROC AND KILE_MSGFMT ) - SET( KILE_DOC_TOOLS_FOUND true ) - ENDIF( KILE_MEINPROC AND KILE_MSGFMT ) -ENDMACRO( KILE_FIND_DOC_TOOLS ) - -IF( EXISTS ${kile_SOURCE_DIR}/doc OR EXISTS ${kile_SOURCE_DIR}/translations ) - KILE_FIND_DOC_TOOLS( ) -ENDIF( EXISTS ${kile_SOURCE_DIR}/doc OR EXISTS ${kile_SOURCE_DIR}/translations ) - -IF( EXISTS ${kile_SOURCE_DIR}/doc ) - IF( KILE_MEINPROC ) - MESSAGE( STATUS "Building standard documentation") - KILE_ADD_DOCBOOK_DIRECTORY( kile_DOCUMENTATION_SOURCES doc index.docbook en ) - ENDIF( KILE_MEINPROC ) -ELSE( EXISTS ${kile_SOURCE_DIR}/doc ) - MESSAGE( STATUS "Not building standard documentation") -ENDIF( EXISTS ${kile_SOURCE_DIR}/doc ) - -IF( EXISTS ${kile_SOURCE_DIR}/translations ) - IF( KILE_MEINPROC OR KILE_MSGFMT ) - KILE_ADD_TRANSLATION_DIRECTORIES( kile_DOCUMENTATION_SOURCES kile_TRANSLATION_SOURCES ${kile_SOURCE_DIR}/translations ) - ENDIF( KILE_MEINPROC OR KILE_MSGFMT ) -ELSE( EXISTS ${kile_SOURCE_DIR}/translations ) - MESSAGE( STATUS "Not building translations") -ENDIF( EXISTS ${kile_SOURCE_DIR}/translations ) - -IF( kile_DOCUMENTATION_SOURCES ) - ADD_CUSTOM_TARGET(docbooks ALL DEPENDS ${kile_DOCUMENTATION_SOURCES}) -ENDIF( kile_DOCUMENTATION_SOURCES ) - -IF( kile_TRANSLATION_SOURCES ) - ADD_CUSTOM_TARGET(translations ALL DEPENDS ${kile_TRANSLATION_SOURCES}) -ENDIF( kile_TRANSLATION_SOURCES) - -ADD_SUBDIRECTORY( kile ) - -########### install files ############### - -INSTALL( FILES x-kilepr.desktop DESTINATION share/mimelink/text ) - -INSTALL( FILES kile.upd kile1.6_upd.pl kile1.7_upd.pl kile1.9_upd.pl kile1.9-1_upd.pl kile2.0-1_upd.pl kile2.0-2_upd.pl kile2.0-3_upd.pl kile2.0-4_upd.pl kile2.0-5_upd.pl DESTINATION share/apps/tdeconf_update ) - -IF( KILE_VERSION ) - SET(_KILE_SPECIAL_DOC_DIR "share/doc/kile-${KILE_VERSION}") -ELSE( KILE_VERSION ) - SET(_KILE_SPECIAL_DOC_DIR "share/doc/kile") -ENDIF( KILE_VERSION ) - -INSTALL( FILES AUTHORS ChangeLog README README.cwl kile-remote-control.txt README.MacOSX TODO DESTINATION ${_KILE_SPECIAL_DOC_DIR}) +install( + FILES kile.upd + DESTINATION ${KCONF_UPDATE_INSTALL_DIR} +) +install( + PROGRAMS + kile1.6_upd.pl kile1.7_upd.pl kile1.9_upd.pl kile1.9-1_upd.pl + kile2.0-1_upd.pl kile2.0-2_upd.pl kile2.0-3_upd.pl kile2.0-4_upd.pl kile2.0-5_upd.pl + DESTINATION ${KCONF_UPDATE_INSTALL_DIR} +) diff --git a/src/dist/build_tarball.sh b/src/dist/build_tarball.sh deleted file mode 100755 index f1ef637..0000000 --- a/src/dist/build_tarball.sh +++ /dev/null @@ -1,2 +0,0 @@ -export UNSERMAKE=no -./createPackage.sh -ab trunk/extragear/office -a kile --i18n-sub extragear-office --admin branches/KDE/3.5/kde-common/admin -av 1.9 --package diff --git a/src/dist/createPackage.sh b/src/dist/createPackage.sh deleted file mode 100755 index 3b97a15..0000000 --- a/src/dist/createPackage.sh +++ /dev/null @@ -1,874 +0,0 @@ -#!/bin/bash -# -# Extract an application from KDE svn, including documentation and translations. -# -# Authors: Michael Buesch -# Jeroen Wijnhout -# Sebastian Trueg -# Aurelien Gateau -# Klas Kalass -# License: GPL (http://www.gnu.org/) -# -# -# Directory lay-out of packages -# Application: -# + name-version -# + admin -# + src -# + doc -# + translations -# + nl -# + messages -# + doc -# + de (etc.) -# -# If the --notoplevel parameter is used everything under src is put into the root dir -# -# Translations: -# + nl -# + messages -# + doc -# + de (etc.) - -COPYRIGHT="2005 Michael Buesch - 2004-2005 Jeroen Wijnhout - 2003-2004 Sebastian Trueg - 2002 Aurelien Gateau - 2002-2004 Klas Kalass" -LICENSE="GNU General Public License v2 or later" - -SCRIPTNAME="createPackage.sh" -SCRIPTVERSION='$Revision$' -SCRIPTVERSION="`echo $SCRIPTVERSION | cut -d ' ' -f2`" - - -function showVersion -{ - echo "$SCRIPTNAME revision $SCRIPTVERSION" -} - -function showHelp -{ - showVersion - echo -e " -Extract an application from KDE svn, including documentation and translations. - -Copyright $COPYRIGHT -License: $LICENSE - -usage: - $0 -ab -a [OPTIONS] - -These parameters are mandatory: - - -ab|--app-base Relative (to svnroot) path to the KDE or extragear module. - Example: - trunk/extragear/utils - If you want to checkout from a branch, you might use: - branches/foobar/1.2 - - -a|--app Name of the application to checkout. - This is the subdir you want to checkout in --app-base. - -The following options are available: - - -d|--svnroot Base URL of the svn repository. - svn://anonsvn.kde.org/home/kde is the default. - - -ib|--i18n-base Path to the i18n translations base. - Default: - trunk/l10n - - -is|--i18n-sub Path to the i18n files under the - \$i18n-base/\$LANGUAGE/messages - directories. Example: - extragear-office - - -ids|--i18n-docsub Path to the i18n docbook files under the - \$i18n-base/\$LANGUAGE/docs - directories. Example: - kdeextragear-2 - Default: - path of --i18n-sub - - --admin Path to the /admin/ directory. - Default: - trunk/KDE/kde-common/admin - - -b|--builddir Name of the temporary working directory where - all files will be put. Default is \"./build\" - - -av|--appversion Version of the application (only for correct - naming of the tar archives). - - --nodoc Do not try to get any documentation. - - --noi18n Do not search for any translations. - - --split Make separate packages for the application and translations. - - --package [TYPE] Create tarballs (.tar.gz and/or .tar.bz2). - You can specify an optional package type: \"gzip\" or \"bzip2\" - If no type is given, both types will be generated. - - --packagedir Place a copy of the packages into TARBALLDIR. - - --postprocess