Added abandoned KDE3 version of Kile
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kile@1088055 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
2c945cd914
@ -0,0 +1,5 @@
|
||||
Pascal Brachet <pascal.brachet{at}club-internet.fr>
|
||||
Thomas Braun <braun{at}physik.fu-berlin.de>
|
||||
Holger Danielsson <holger.danielsson{at}versanet.de>
|
||||
Michel Ludwig <michel.ludwig{at}kdemail.net>
|
||||
Jeroen Wijnhout <Jeroen.Wijnhout{at}kdemail.net>
|
@ -0,0 +1,51 @@
|
||||
CMake 2.4.4 (or later) is required to build Kile.
|
||||
|
||||
Building Kile
|
||||
=============
|
||||
|
||||
1. Get the Kile directory from trunk (there is no need to get the whole office
|
||||
module anymore).
|
||||
|
||||
2. Create a "kile-build" directory somewhere for an out-of-source build.
|
||||
|
||||
3. Enter the "kile-build" directory and call cmake with:
|
||||
|
||||
cmake <path to the kile directory> -DCMAKE_INSTALL_PREFIX=$HOME/.kde
|
||||
|
||||
to install Kile later on in the current user's home directory.
|
||||
|
||||
4. In the "kile-build" directory, issue "make" to start the build process.
|
||||
Issuing "make install" will start the installation process, for which the DESTDIR
|
||||
option can be used to specify the base directory of the installed files.
|
||||
|
||||
|
||||
Building Documentation
|
||||
======================
|
||||
|
||||
The documentation will automatically be built provided that the documentation files
|
||||
are located in the following directories:
|
||||
<kile-root>
|
||||
/doc for the standard documentation and
|
||||
accompanying image files
|
||||
|
||||
/translations
|
||||
/<language>
|
||||
/doc for the translated documentation and
|
||||
images in language <language>
|
||||
|
||||
/messages for the translated message catalogs
|
||||
in language <language>
|
||||
|
||||
Please note that every docbook must be called "index.docbook" and that only PNG image
|
||||
files can be used. Furthermore, message catalogs must be called "kile.po".
|
||||
|
||||
When the "doc" and "translations" directories are found, the build targets "docbooks"
|
||||
and "translations" will be generated for the compiling of the documentation.
|
||||
|
||||
|
||||
Special Flags
|
||||
=============
|
||||
|
||||
The flag "KILE_VERSION" can be set in the CMake cache to specify the installation
|
||||
directory of basic documentation files (README, AUTHORS, ChangeLog,...), i.e. they
|
||||
will be installed in "share/doc/kile-${KILE_VERSION}/" instead of "share/doc/kile/".
|
@ -0,0 +1,351 @@
|
||||
version 2.0 -> 2.0.1
|
||||
|
||||
Fixes:
|
||||
- Do all section actions on the whole section (#154272)
|
||||
- Fix possible crash due to unchecked index bounds
|
||||
- Some i18n fixes (#153371)
|
||||
- cwl files: fix wrong commands with \left and \right and make them more complete
|
||||
- Typos in symbols (#158749)
|
||||
- Sync kile project on disk before archiving
|
||||
- Add figure* to the structure view also (#151743)
|
||||
- Fix completion for multiple citations/references (#152766)
|
||||
- Fix crash at template handling, reported and fixed by Vincenzo Di Massa
|
||||
- Rename some cwl files so that they not only differ by case (#158600)
|
||||
- Search also in $BIBINPUTS and $TEXINPUTS paths if opening files from the
|
||||
structure view
|
||||
- Add missing package definitions to some symbols from the misc-text pane
|
||||
- Allow spaces in the name of images in the includegraphics dialog (#161101)
|
||||
- Don't recompile forever if some file timestamps are in the future (#121956)
|
||||
|
||||
Features:
|
||||
- Add \newlength as a variation of newcommand
|
||||
- Add url.cwl, svninfo.cwl, svn-multi.cwl, yfonts.cwl, virginialake.cwl
|
||||
- Allow ":" and "-" in citation keys, important for codecompletion
|
||||
|
||||
Syntax:
|
||||
- Highlight & and @{} in tabular like environments
|
||||
- Ignore Noweb blocks
|
||||
|
||||
version 2.0beta2 -> 2.0
|
||||
|
||||
Fixes:
|
||||
- Added some new logic to really disable all debug output if --disable-debug
|
||||
is given to configure, should make kile faster
|
||||
|
||||
Features:
|
||||
- New documentation kile-remote-control.txt
|
||||
- Added new DVItoPDF config Modern which calls dvipdfmx instead of dvipdfm,
|
||||
set Modern as default
|
||||
|
||||
version 2.0beta1 -> 2.0beta2
|
||||
|
||||
Fixes:
|
||||
- Polishing Quickdocumentdialog
|
||||
- More agressive recompiling
|
||||
- Cwl fixes
|
||||
- Mathsymbol commands were biased with one, some symbol cleanups (#148855)
|
||||
- Don't make system check if the user has defined a master document (#148800)
|
||||
- Don't offer eqnarray in the latex menu (but we still support it for math environment completion etc.) (#101583)
|
||||
- Consider also files located in $TEXINPUTS and $BIBINPUTS paths for codecompletion. (#149652)
|
||||
|
||||
Features:
|
||||
- Call asymptote if needed on latex run
|
||||
|
||||
version 1.9.3 -> 2.0beta1
|
||||
|
||||
Fixes:
|
||||
- More than 50 bugs have been closed
|
||||
- Symlinked files and directories in combination with inverse search
|
||||
- Autosave fix: If a file is two autosave cycles not writable we will skip the file until it is writeable again.
|
||||
- Fix starting directory for add Files. Take the project's basedir
|
||||
- Fix bug in tabular wizard, when breaking some multicolumn cells
|
||||
- Remove selected text in any case if the user insert "
|
||||
- Fix bug where environments were completed which should not have been completed.
|
||||
- Textcolor bug in tabular wizard
|
||||
- Only use special quotes if we have a tex file
|
||||
- Fix bug in lyxserver when the filesystem in the users home directory does not support FIFOS
|
||||
- Use the $PATH variable to search for the tools
|
||||
- Remove our own "not perfectly" working spellchecker implementation, now the katepart spellchecker is always in charge
|
||||
- Call "Refresh Strcuture" after changing the encoding
|
||||
- Grep for \newenvironment and add them to the completion lists
|
||||
- Smart newline now also recognizes comment lines
|
||||
|
||||
Bigger Features:
|
||||
- Add auto completion in abbreviation mode:
|
||||
a) All abbreviations can be shown in the sidebar (configurable)
|
||||
b) All abbreviations from a local abbreviations list 'kile-abbrevs.cwl' are
|
||||
editable. This file can be found in the local application path of Kile.
|
||||
c) Editable abbreviations are marked with a star.
|
||||
d) It is possible to add new abbreviations or delete existing ones.
|
||||
e) A new auto mode to expand abbreviations was added (configurable
|
||||
of course). If an abbreviation is followed by a space or a punctuation
|
||||
symbol, it is immediately expanded without further user commands.
|
||||
- Added a set of commands to work directly with sectioning on the structure view:
|
||||
copy, cut, paste, select, delete, comment, quick preview
|
||||
- New Symbolview which contains:
|
||||
- Most frequently used symbol list
|
||||
- Complete revamped symbol list with more items (nearly 1000) and more
|
||||
categories
|
||||
- Show command and depending packages in the tooltip
|
||||
- Send a warning in the logwidget if a package is not included
|
||||
- By pressing CTRL and SHIFT while inserting an item one gets {} or $$
|
||||
around the inserted command
|
||||
- Added a scripting interface to kile
|
||||
- A big bunch of new cwl files, mostly from kile users , so kile has now more
|
||||
than 80 :)
|
||||
- Add support for TexLive 2005/2007
|
||||
- Preview of mathgroups from Mathias Soeken (with some additions and
|
||||
extensions by Holger Danielsson)
|
||||
|
||||
Smaller Features:
|
||||
- New tool entries for:
|
||||
- Asymptote
|
||||
- PDFLaTeX draftmode (available in PDFTeX from TeXLive 2007)
|
||||
- Bibtex 8bit Version
|
||||
- Added Lilypond tool (4 variants), icon will follow
|
||||
- Renamed LaTeXtoDocBook to DBLaTeX , use
|
||||
programm dblatex for that and also introduced 4 variants of it.
|
||||
- Renamed LaTeXtoHTML to LaTeX to Web and added tex4ht variants (to XML, to HTML
|
||||
and to MathML), but keeping the latex2html tool also
|
||||
- Added a variant of quickbuild , do only LaTeX
|
||||
- Added DVItoPDF variant, Landscape and "Black and White"
|
||||
- Moved Archive tool from type none to Archive and also added much more
|
||||
configs, now users can also alter them
|
||||
- Changed default bibtex viewer for new kile users to kbibtex
|
||||
- added gbib, jabref, kbib to bibtexviewers
|
||||
- Recursive parsing of footnote command
|
||||
- New citeViewBib action, which asks the bibtex viewer (currently only
|
||||
kbib) to send marked references. Thanks to Thach Nguyen for the
|
||||
initial patch
|
||||
- New function "Save Copy as..."
|
||||
- Revamped the new-file dialog.
|
||||
- Add support for templates types other than LaTeX.
|
||||
- Use the extension ".kileicon" for template icon files.
|
||||
- Added lyx:paste command in kile's lyxserver
|
||||
- Add Readme, Readme.cwl and Building-with-cmake.txt
|
||||
- Show todo/fixme tasks in structure view
|
||||
- Enhance completion configuration dialog usability and support local directories for completion files
|
||||
- Merge labels and sections in document structure view as user configurable option
|
||||
- First preliminary support for the beamer package
|
||||
- Select a single LaTeX command with CTRL+MouseDblClick-left
|
||||
- Autocomplete $ to $$
|
||||
- Move cursor out of braces after selecting from a keylist
|
||||
- Make include commands configurable through our nice latexcommand menu
|
||||
- Assign the keyboard focus to the active text view after Kile has started up
|
||||
- FindInFiles dialog can be moved into the background
|
||||
- Add additional double quotes for babel supported languages (czech, icelandic)
|
||||
- Highlighting of Section Titles as bold
|
||||
- Add emacs-like delete-to-end-of-line command
|
||||
- Removed metapost view in the sidebar, the commands can be accessed via
|
||||
kile's dictionary mode
|
||||
- Sort items in references list box
|
||||
- Some new toolbar icons
|
||||
- Added more optional fields in the predefined bibtex entries, patch from
|
||||
Martin Weis <martin.weis.newsadress (a) gmx.de>
|
||||
- Added CMake build support.
|
||||
- Add scripting support.
|
||||
- We always remember now the current most top item of the structure view and restore it after an update.
|
||||
- Add new actions gotoNextSection() and gotoPrevSection()
|
||||
- Quote replacement should not happen inside verbatim/verb environment
|
||||
- Add new actions gotoNextParagraph() and gotoPrevParagraph()
|
||||
- Fix rebuild structureview if changing the expansion level
|
||||
- Add mathgroup preview to the popup menu (right mouse button), where either a selection or a mathgroup is shown
|
||||
- More tools in kile's system check
|
||||
- Add drag-and-drop functionality
|
||||
- Remember MakeIndex checkbox settings in kileprojectdlg
|
||||
- Add autoref command to std. ref. commands
|
||||
|
||||
version 1.9.2-> 1.9.3
|
||||
Fixes:
|
||||
- Recognize escaped chars in \newcommand. (#132899)
|
||||
- Use KPDF as embedded viewer for quick preview, because KPDF can remember current settings. (#129177)
|
||||
- Bugs in tabular wizard, when merging, breaking and merging again some cells
|
||||
- Quote replacement should not happen inside verbatim/verb environment (#133112)
|
||||
- Fix bug in tabular wizard, when breaking some multicolumn cells
|
||||
- Don't use default permissions for backup file (CVE CAN-2005-1920 also applies to kile)
|
||||
- Fix bug in syntax highlighting: mathmode in optional parameter (#134146)
|
||||
- Allow tools with brackets in the configuration string also in sequence tools, fixed also the crash which hid the bug. (#134605)
|
||||
- One fix in latex-document-cwl and color.cwl
|
||||
- Fix crash when adding a file to a project (with no open documents) which contains an undefined reference (#135575)
|
||||
- Improve the logic for closing environments (#134793)
|
||||
- Don't treat \\[foo] as a math environment (#137131)
|
||||
- Remove selected text also if we insert a " (#137272)
|
||||
|
||||
Feature:
|
||||
- Prepared the latex syntax file for beamer commands
|
||||
|
||||
version 1.9.1 -> 1.9.2
|
||||
Fixes:
|
||||
- Add autoref command to standard reference commands (#130037)
|
||||
- Remember the setting of MakeIndexOptions checkbox in the project settings
|
||||
dialog. (debian #337550)
|
||||
- Added utf-8 and other encodings to the quickdocument dialog. (#131402)
|
||||
- Make the "New Tool" dialog box big enough. (#132425)
|
||||
- Check if masterdocs in kilepr files exist, should fix some problems with upgrades from kile 1.8.
|
||||
- Searching for environments in Edit functions improved.
|
||||
- Take array as math environment instead of tabular in Configure->Latex Environments.
|
||||
- Don't crash if a user changes the icon of a toolbar item. (debian #382317)
|
||||
- Allow a few more punctuation in codecompletion of citation keys. (#130148)
|
||||
- Remember last working directory in 'find in files' dialog. (debian #359932)
|
||||
- Tabular wizard should insert all entered elements. (#132736)
|
||||
- Only autosave files which have been modified.
|
||||
- Delete comma of last bibtex entry if Bibliographie->Clean is called. (#129499)
|
||||
- Quick Preview fails if graphics are included in selection (#126019)
|
||||
|
||||
version 1.9.0 -> 1.9.1
|
||||
Fixes:
|
||||
- Restore support for KDE 3.2.x.
|
||||
- tex files starting with numbers can now also used for "Forward DVI". (#124613)
|
||||
- now we respect the default project location set by the user also in projectOpen(). (#124099)
|
||||
- don't restore the line position if the file is already open. (#125175)
|
||||
- honor users who want to cancel the close request to embedded parts. (namely kbibtex)
|
||||
- fix ViewBib, if we support $BIBINPUTS for compilation we should also do it for viewing. We now also check in all paths in BIBINPUTS for an bib file. (#125133)
|
||||
- if "show labels" is disabled in structureview, we should nevertheless gather them for codecompl. and undefined ref.
|
||||
- don't fake pressed buttons, now the log message button does not looked pressed when you start kile. (#124098)
|
||||
- only add an trailing slash to the default project location if we need one.
|
||||
- hide the latex menu when we don't have docs open.
|
||||
- don't see unstarred env. as closing for starred. (#120509)
|
||||
- we are now much more carefully if the autosaving has succeded. We now warn if we can't autosave and don't overwrite backups with empty backups. (#125975)
|
||||
- only use special double quotes if no slash is in front of the cursor. (#127813)
|
||||
|
||||
Features:
|
||||
- Add the possibility to use bullets in user tags via a new placeholder %B.
|
||||
- Colour bullets so that they can be spotted easily.
|
||||
- new cwl file for the textcomp and import package.
|
||||
- we now highlight TODO, FIXME in comments. (only if they are not in normal text)
|
||||
- added Readme.MacOSX
|
||||
|
||||
[...]
|
||||
|
||||
version 1.6.3 -> 1.7a3
|
||||
major:
|
||||
- smart LaTeX: rerun automatically when needed, runs BibTeX and/or MakeIndex if required
|
||||
- a more flexible and powerful tool system
|
||||
- automatic completion of LaTeX commands
|
||||
- access to teTeX help system
|
||||
- system configuration checker (Settings->System Check), detects installation errors, missing apps and wrong Kile settings
|
||||
|
||||
minor:
|
||||
- BibTeX files are now parsed as well, references in a BibTeX file can be used in \cite autocompletion now as well
|
||||
- user defined commands (using \newcommand) are added to the autocompletion list
|
||||
- improved structure view, remembers its state, it doesn't collapse anymore after a save
|
||||
- find in files dialog
|
||||
- several LaTeX specific editing options (close environment for example)
|
||||
- convert accented letters (like Ë) to ASCII TeX commands (like \"E) and vice versa
|
||||
- new side and bottom bars
|
||||
|
||||
version 1.6.2 -> 1.6.3
|
||||
- fix a crash when opening/closing projects with common files
|
||||
- warn if user tries to overwrite an existing file in the "New Project" dialog
|
||||
- make usertags/tools shortcuts configurable
|
||||
- place cursor after a bracket when inserting a usertag
|
||||
- polished up the "New File" wizard, the size and selected template are now remembered, an option to start the Quick Start wizard after selecting an empty template is also added
|
||||
- double clicking on a non-existent file results in a dialog requesting the creating of this file, instead of just an error
|
||||
|
||||
version 1.6.1 -> 1.6.2
|
||||
- bugfixes
|
||||
|
||||
version 1.6 ->1.6.1
|
||||
- bugfixes
|
||||
|
||||
version 1.5.2 -> 1.6
|
||||
major:
|
||||
- new editor (katepart)
|
||||
- project management
|
||||
minor:
|
||||
- auto-complete environments
|
||||
- statistics dialog for document (word count)
|
||||
- can open multiple files in one go (using the open file dialog or the sidebar)
|
||||
- launch you favorite BibTeX editor using the bilbiographies found in your document
|
||||
- interaction with gBib and pyBliographer
|
||||
- restore files and projects on start up (optional)
|
||||
- checking whether or not the document is a LaTeX root before compile is optional now
|
||||
- structure view: jump to line AND column, allow multiple labels on one line, allow space between \struct and { }, don't parse
|
||||
structure elemented that are out-commented
|
||||
- configurable shortcuts to focus log/messages, output, konsole, editor views (resp. ctrl+alt+m,o,k,e)
|
||||
- more advanced \includegraphics dialog (thx Michael Margraf)
|
||||
- check for modified on disc
|
||||
- highligthing inside math environments
|
||||
- allow user to set PS-PDF, DVI-PS, PDF-PS, BibTeX, makeindex commands
|
||||
|
||||
version 1.5 -> 1.5.2 :
|
||||
- prompt user when trying to run LaTeX on a document which isn't a document root
|
||||
- better syntax highlighting (deals with \verb and verbatim environment)
|
||||
- summary of compilation results after running LaTeX
|
||||
- improved "clicking on errors in the log file jumps to corresponding line"
|
||||
- user can define an arbitrary number of user tools/tags.
|
||||
- autosave
|
||||
- added an Output view, the Output view is the location for the raw
|
||||
output of the shell processes (latex,dvips, etc.)
|
||||
- more error messages/warnings when the user tries to do compile/view
|
||||
non-existing/untitled documents
|
||||
- added templates support (user can select a template when creating a new
|
||||
file, user can create templates from existing documents).
|
||||
- added a stop button, (La)TeX can now be stopped while compiling
|
||||
- added a Toolbars submenu, toolbars can be hidden now
|
||||
- output of compilations remains visible, log file can be shown
|
||||
on request
|
||||
- inverse search now also works for documents whos name starts with a number
|
||||
- more flexible command syntax, instead of having latex and pdflatex as
|
||||
commands, one can use
|
||||
latex %S.tex or make %S.dvi
|
||||
now
|
||||
|
||||
version 1.4 -> 1.5 :
|
||||
- added metapost support
|
||||
- added "user commands" menu
|
||||
- added ability to change or add gnuplot commands before plotting with the Gnuplot frontend
|
||||
- fixed the bug for files with accents in the Kite file selector
|
||||
- added the ability to show the line numbers and to choose the colors for the editor
|
||||
|
||||
version 1.32 -> 1.4 :
|
||||
- added dvi and postcript embedded viewers (based on kdvi and kghostview kparts)
|
||||
- spell checking is now possible for the selected paragraphs and not only for all the document
|
||||
- overwrite an existing file must now be confirmed
|
||||
- the bug about the "report" document class in the "quick document dialog" has been fixed
|
||||
|
||||
version 1.31 -> 1.32 :
|
||||
- the user can set the encoding character of the file with a combo box included in the Kite file selector.
|
||||
- two color schemes are available for the editor (Black on White/White on Black)
|
||||
- improved the "Multiple Function" dialog of the "Gnuplot frontend"
|
||||
|
||||
version 1.3 -> 1.31 :
|
||||
- new dialog box for the "ref" and "pageref" tags (the user can select one of the existing labels)
|
||||
- the "--unique" option is now used for the "Kdvi Forward Search" command
|
||||
- the bug about the "report" class in the "Quick Start" wizard has been fixed
|
||||
- the GnuPlot front end code has been cleaned (only QString are used instead of string)
|
||||
|
||||
version 1.3beta -> 1.3 :
|
||||
- fixed some minor bugs
|
||||
- new user manual
|
||||
- added more options for the "Quick Start" wizard
|
||||
|
||||
version 1.2 -> 1.3beta :
|
||||
- the "label" tags written on the same line than a "section" tag are now detected
|
||||
- added a "find next" command
|
||||
- improved the "replace" command
|
||||
- improved the "edit user menu" command (ability to insert several lines)
|
||||
- added more options for the "quick start", "tabular" and "array" wizards
|
||||
- added new LaTeX tags (maketitle, footnote, tableofcontents, ref, pageref)
|
||||
- added DCOP support (no new instance when kile is already running - Kdvi "inverse search" should work better)
|
||||
|
||||
version 1.1 -> 1.2 :
|
||||
- new panel (file selector, structure view, mathematical symbols and the greek letters)
|
||||
- no more embedded viewers
|
||||
- classical order for the "recent files" list
|
||||
- added shortcuts for the "item" tag and icons for the "enumerate" and "itemize" environments
|
||||
- added info about the size of the .eps file while using \includegraphics{}
|
||||
- the Konsole is now synchronized with the current document
|
||||
- added ability to remove the optional fields of a .bib file. ("Clean" command)
|
||||
- added "watch file" mode for the "quick build" command (the viewers are not launched)
|
||||
|
||||
version 1.0 -> 1.1 :
|
||||
- added toolbars configuration
|
||||
- added new modes for the 'Quick build' command
|
||||
- user can now print the ps/pdf file directly with kite
|
||||
- added a wizard for the 'Tabbing' environment
|
||||
- by typing %myenvironment in the 'LaTeX content' field of an 'user menu', Kite inserts directly this code :
|
||||
\begin{myenvironment}
|
||||
|
||||
\end{myenvironment}
|
||||
- fixed some minor bugs
|
@ -0,0 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.5
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
||||
SUBDIRS=$(TOPSUBDIRS)
|
@ -0,0 +1,4 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.5
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
@ -0,0 +1,54 @@
|
||||
Dear User/Packager,
|
||||
|
||||
this Readme is targeted towards people who want to build Kile from source or plan to create binary packages.
|
||||
If you have created a package, please drop us a note ( kile-devel@lists.sourceforge.net ) so that we can promote your package.
|
||||
All specified versions are minimum versions except for KDE and QT.
|
||||
|
||||
1.) Checking dependencies
|
||||
|
||||
- kdelibs 3.2 - 3.5 and according QT development packages
|
||||
- autoconf 2.53, automake and make (alternatively cmake 2.4.4, see also Building-with-cmake.txt)
|
||||
- gcc 3.x/4.x
|
||||
|
||||
2.) Building Kile from source
|
||||
|
||||
- Extract the source code with `tar xjf kile-2.0.x.tar.bz2`
|
||||
- `cd kile-2.0.x`
|
||||
- ./configure --prefix=path_to_KDE3 (/usr or /opt/kde3 generally) --with-qt-dir=path_to_QT3 library (/usr/lib/qt3 generally)
|
||||
-- If you don't know what the path to KDE3 on your system is, you can use output of `kde-config --prefix`.
|
||||
-- Or you can choose `--prefix=$HOME/.kde` to not mess up with your distribution's package management system.
|
||||
- Type `make` to compile the package.
|
||||
- Type `make install` to install the programs, data files and documentation.
|
||||
- Type `kile` and enjoy the power of LaTeX together with the joy of using Kile :)
|
||||
|
||||
3.) Using Kile
|
||||
|
||||
To use Kile you (obviously) need some external programs.
|
||||
The following list is divided into basic, advanced and additional usage.
|
||||
|
||||
Basic:
|
||||
|
||||
- TeTeX 2.0/3.0 or TeXLive 2005/2007 (Including "AMS"-Packages and the documentation)
|
||||
- KDVI
|
||||
|
||||
Advanced:
|
||||
|
||||
- KPDF, KGhostView (Viewing PS and PDF)
|
||||
- Acroread (Viewing PDF)
|
||||
- Imagemagick, DVIPNG 1.7 (Bottom bar preview)
|
||||
|
||||
By default there are also tools for the following programs defined:
|
||||
|
||||
- Tar/zip/gzip/bzip2 (Archive)
|
||||
- DBlatex (Docbook to LaTeX)
|
||||
- Metapost and Asymptote
|
||||
- Latex2html (LaTeX to Web)
|
||||
- Tex4ht (LaTeX to Web)
|
||||
- Lilypond (Music Typesetting)
|
||||
- Konqueror/Mozilla/Firefox (Viewing HTML)
|
||||
- Kbibtex, KBib, JabRef, pybliographer, gbib (View Bibtex files)
|
||||
|
||||
If you have any questions or corrections, please don't hesitate to contact us via kile-devel@lists.sourceforge.net.
|
||||
|
||||
The Kile dev team
|
||||
|
@ -0,0 +1,49 @@
|
||||
In order to install Kile on MacOS X, you need the following things:
|
||||
- a working X11 installation
|
||||
- a working LaTeX distribution
|
||||
- the KDE libraries
|
||||
- and Kile itself, of course
|
||||
|
||||
Once everything is in place, Kile needs X11 to run, so make sure you launch X11 before Kile.
|
||||
|
||||
|
||||
Installing X11
|
||||
--------------
|
||||
|
||||
Apple provides its own X11 installation for MacOS X 10.3 (downloadable from Apple's web site) and 10.4 (available directly on the Tiger DVD). If you install by hand, make sure to install the X11User.pkg package.
|
||||
|
||||
Apple's documentation on X11: http://developer.apple.com/opensource/tools/X11.html
|
||||
|
||||
You should install Apple's X11. But if you have a good reason not to, Fink (see below) provides the latest X.org distribution. Refer to Fink documentation for details. MAKE SURE YOU NEVER MIX TWO X11 VERSIONS ON THE SAME SYSTEM.
|
||||
|
||||
|
||||
Installing all the rest through Fink
|
||||
------------------------------------
|
||||
|
||||
Fink is the packaging system from Debian ported to MacOS X. Installing Fink itself is very straightforward, so only two things will be mentioned here:
|
||||
- you must download and install the latest Xcode version from Apple (free download, just requires registration),
|
||||
- make sure Fink uses the package repository compatible with your system (specifically, if you have MacOS X 10.4, use the 10.4 branch and *not* the 10.4-transitional branch).
|
||||
|
||||
Fink lets you choose between precompiled, ready-to-use, packages, and compiling them yourself. Practically speaking, the Fink project provides few up-to-date precompiled packages, so compilation is often necessary. But don't worry, the procedure is automatic in any case.
|
||||
|
||||
After that, installing the rest is very straightforward:
|
||||
|
||||
- LaTeX distribution: install packages "tetex" and "tetex-base".
|
||||
- KDE libraries: the bare minimum would be package "kdebase3-unified", but you should also install packages like "kpdf", "kdvi" and "kghostview" to make best use of Kile. Installing a localisation package to have dialogs in your language would also be nice ; for example, the French package is called "kde-i18n-french".
|
||||
- Kile: its package is called "kile".
|
||||
- Other useful packages, depending on your habits: "bibview", "gnuplot", "xfig", "beamer", "texpower"... Just go shopping with Fink.
|
||||
|
||||
Have fun!
|
||||
|
||||
Fink project: http://fink.sourceforge.net
|
||||
|
||||
|
||||
Other installation methods
|
||||
--------------------------
|
||||
|
||||
There is no easy way, other than Fink, to install the KDE libraries and Kile. But if you want, there is another popular way to install LaTeX: the i-Installer.
|
||||
|
||||
i-Installer web site: http://ii2.sourceforge.net
|
||||
|
||||
|
||||
[This Readme was contributed by Thibaut Cousin (cousin@kde.org)]
|
@ -0,0 +1,66 @@
|
||||
CWL File Specification 0.1:
|
||||
|
||||
Completion modes:
|
||||
Kile supports three completion modes, which use their own cwl files:
|
||||
- (La)TeX mode
|
||||
- Dictionary mode
|
||||
- Abbreviation mode
|
||||
|
||||
Call of completion:
|
||||
When completion is called with a shortcut or in auto mode, Kile must separate words, so that some restriction had to be made about the already typed prefix. If the prefix is to be analyzed as valid, the completion box will open, otherwise not.
|
||||
- (La)TeX mode: all prefixes must start with a backslash, followed by letters, possibly with a trailing star
|
||||
- Dictionary mode: letters, digits and underscore are valid characters
|
||||
- Abbreviation mode: letters, digits and underscore are valid characters
|
||||
Once the completion box is opened, there are no further restrictions. All characters are valid from this moment on.
|
||||
|
||||
Naming scheme of the cwl file:
|
||||
- If the commands in the file belong to a class the name is class-foo.cwl, if they belong to different classes the name is class-foo,bar.cwl.
|
||||
- In any other case it belongs to a package and should therefore have the same name than the package (package foo -> foo.cwl)
|
||||
|
||||
File syntax:
|
||||
- There are only two types of content, comments and text.
|
||||
- Comments start with a #, everything after # is ignored till the end of the line.
|
||||
- Everything else is text.
|
||||
|
||||
File content:
|
||||
- The files should have a small header including your name (email address is not needed), the date, and a link where the package or the class file can be downloaded.
|
||||
For example the header of textcomp.cwl:
|
||||
# textcomp package
|
||||
# tbraun 04/27/2006
|
||||
# URL: http://www.ctan.org/tex-archive/help/Catalogue/entries/textcomp.html
|
||||
- All commands given must have a description what to insert in the empty brackets:
|
||||
-- \label{key} and not \label{}
|
||||
-- \includegraphics[options]{name}
|
||||
-- \footnotetext[number]{text} and so on
|
||||
- All commands means all commands. So please add all possible combinations, including mandatory options and all optional options in all possible combinations.
|
||||
This list can be quite long but all users will appreciate the completeness.
|
||||
For example (taken from class-beamer.cwl):
|
||||
\begin{frame}
|
||||
\begin{frame}<overlay specification>
|
||||
\begin{frame}<overlay specification>[<default overlay specification>]
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]{title}
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[<default overlay specification>]
|
||||
\begin{frame}[<default overlay specification>][options]
|
||||
\begin{frame}[<default overlay specification>][options]{title}
|
||||
\begin{frame}[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[options]
|
||||
\begin{frame}[options]{title}
|
||||
\begin{frame}[options]{title}{subtitle}
|
||||
\begin{frame}[options]{title}{subtitle}
|
||||
\begin{frame}{title}
|
||||
\begin{frame}{subtitle}
|
||||
\end{frame}
|
||||
- Only include the \end{env} command once, but all combinations with \begin{env}{}[]<>...
|
||||
- If you declare an environment in which the \item command is valid you have to suffix the \begin{...} declaration with \item, like in latex-document.cwl \begin{itemize}\item.
|
||||
- A starred version of a command must also be added
|
||||
\circle{diameter}
|
||||
\circle*{diameter}
|
||||
|
||||
Getting assistance:
|
||||
- You can see some examples at http://websvn.kde.org/trunk/extragear/office/kile/kile/complete/tex
|
||||
- If in doubt don't hesitate to mail to kile-devel@lists.sourceforge.net and ask, we will be glad to help you :)
|
||||
|
||||
The Kile development team
|
@ -0,0 +1,22 @@
|
||||
TODO
|
||||
- allow users to set a preferred shell
|
||||
|
||||
- improving template support
|
||||
|
||||
- create a plain text importer (one that would convert % to \%, $ to \$ etc.)
|
||||
|
||||
- create a fast powerful (La)TeX parser
|
||||
|
||||
- recursive sectioning: also parse sections that were inserted with
|
||||
\input or \include (optional)
|
||||
|
||||
- file_selector could use a configurable filter. Now only *.tex files are
|
||||
shown, some people might use a .ltx extension for their LaTeX files (or
|
||||
something completely different).
|
||||
|
||||
- #142987 project load crash
|
||||
|
||||
- strange ref error see http://sourceforge.net/forum/forum.php?thread_id=1746112&forum_id=292014 and BTS
|
||||
|
||||
docu:
|
||||
- explain tool stuff and the magic %... abbreviations
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,910 @@
|
||||
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(AC_AUTOCONF_VERSION, [2.61],,
|
||||
[m4_warning([this file was generated for autoconf 2.61.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.10'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.10.1], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.10.1])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 13
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([acinclude.m4])
|
@ -0,0 +1,240 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
|
||||
#undef HAVE_CARBON_CARBON_H
|
||||
|
||||
/* Define if you have the CoreAudio API */
|
||||
#undef HAVE_COREAUDIO
|
||||
|
||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||
#undef HAVE_CRT_EXTERNS_H
|
||||
|
||||
/* Defines if your system has the crypt function */
|
||||
#undef HAVE_CRYPT
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have libjpeg */
|
||||
#undef HAVE_LIBJPEG
|
||||
|
||||
/* Define if you have libpng */
|
||||
#undef HAVE_LIBPNG
|
||||
|
||||
/* Define if you have a working libpthread (will enable threaded code) */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
/* Define if you have libz */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||
#undef HAVE_NSGETENVIRON
|
||||
|
||||
/* Define if you have res_init */
|
||||
#undef HAVE_RES_INIT
|
||||
|
||||
/* Define if you have the res_init prototype */
|
||||
#undef HAVE_RES_INIT_PROTO
|
||||
|
||||
/* Define if you have a STL implementation by SGI */
|
||||
#undef HAVE_SGI_STL
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have strlcat */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have the strlcat prototype */
|
||||
#undef HAVE_STRLCAT_PROTO
|
||||
|
||||
/* Define if you have strlcpy */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have the strlcpy prototype */
|
||||
#undef HAVE_STRLCPY_PROTO
|
||||
|
||||
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||
#undef HAVE_SYS_BITYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Suffix for lib directories */
|
||||
#undef KDELIBSUFF
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `char *', as computed by sizeof. */
|
||||
#undef SIZEOF_CHAR_P
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* The size of `unsigned long', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* If we use arts volume */
|
||||
#undef USE_ARTS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Defined if compiling without arts */
|
||||
#undef WITHOUT_ARTS
|
||||
|
||||
/*
|
||||
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
|
||||
* headers and I'm too lazy to write a configure test as long as only
|
||||
* unixware is related
|
||||
*/
|
||||
#ifdef _UNIXWARE
|
||||
#define HAVE_BOOLEAN
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
|
||||
* that defines bzero.
|
||||
*/
|
||||
|
||||
#if defined(_AIX)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
|
||||
# include <sys/time.h>
|
||||
# include <crt_externs.h>
|
||||
# define environ (*_NSGetEnviron())
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_RES_INIT_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int res_init(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_STRLCAT_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
unsigned long strlcat(char*, const char*, unsigned long);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_STRLCPY_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
unsigned long strlcpy(char*, const char*, unsigned long);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* On HP-UX, the declaration of vsnprintf() is needed every time !
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
|
||||
#if __STDC__
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int snprintf(char *str, size_t n, char const *fmt, ...);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(__SVR4) && !defined(__svr4__)
|
||||
#define __svr4__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#undef kde_socklen_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined (deprecated, use
|
||||
kde_socklen_t) */
|
||||
#undef ksize_t
|
@ -0,0 +1,3 @@
|
||||
./admin/configure.in.min
|
||||
configure.in.in
|
||||
configure.in.bot
|
@ -0,0 +1,256 @@
|
||||
dnl =======================================================
|
||||
dnl FILE: ./admin/configure.in.min
|
||||
dnl =======================================================
|
||||
|
||||
dnl This file is part of the KDE libraries/packages
|
||||
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||
|
||||
dnl This file is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Library General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Library General Public License for more details.
|
||||
|
||||
dnl You should have received a copy of the GNU Library General Public License
|
||||
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
dnl Boston, MA 02110-1301, USA.
|
||||
|
||||
# Original Author was Kalle@kde.org
|
||||
# I lifted it in some mater. (Stephan Kulow)
|
||||
# I used much code from Janos Farkas
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||
|
||||
dnl This is so we can use kde-common
|
||||
AC_CONFIG_AUX_DIR(admin)
|
||||
|
||||
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||
unset CDPATH
|
||||
|
||||
dnl Checking host/target/build systems, for make, install etc.
|
||||
AC_CANONICAL_SYSTEM
|
||||
dnl Perform program name transformation
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
dnl Automake doc recommends to do this only here. (Janos)
|
||||
AM_INIT_AUTOMAKE(kile-2.0.1, "3.5.9") dnl searches for some needed programs
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
KDE_SET_PREFIX
|
||||
|
||||
dnl generate the config header
|
||||
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_CHECK_COMPILERS
|
||||
AC_ENABLE_SHARED(yes)
|
||||
AC_ENABLE_STATIC(no)
|
||||
KDE_PROG_LIBTOOL
|
||||
|
||||
dnl for NLS support. Call them in this order!
|
||||
dnl WITH_NLS is for the po files
|
||||
AM_KDE_WITH_NLS
|
||||
|
||||
KDE_USE_QT(3.2)
|
||||
AC_PATH_KDE
|
||||
dnl =======================================================
|
||||
dnl FILE: configure.in.in
|
||||
dnl =======================================================
|
||||
|
||||
#MIN_CONFIG(3.2)
|
||||
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||
|
||||
if test "$build_arts" = "yes"; then
|
||||
AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
|
||||
LIB_ARTS="-lartskde"
|
||||
AC_SUBST(LIB_ARTS)
|
||||
fi
|
||||
|
||||
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
|
||||
|
||||
KDE_CREATE_SUBDIRSLIST
|
||||
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
|
||||
AM_CONDITIONAL(src_SUBDIR_included, test "x$src_SUBDIR_included" = xyes)
|
||||
AM_CONDITIONAL(translations_SUBDIR_included, test "x$translations_SUBDIR_included" = xyes)
|
||||
AC_CONFIG_FILES([ Makefile ])
|
||||
AC_CONFIG_FILES([ doc/Makefile ])
|
||||
AC_CONFIG_FILES([ src/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/complete/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/complete/abbreviation/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/complete/dictionary/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/complete/tex/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/encodings/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/help/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/icons/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/icons/actions/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/pics/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/arrows/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/cyrillic/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/delimiters/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/greek/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/misc-math/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/misc-text/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/operators/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/relation/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/symbols/special/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/syntax/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/templates/Makefile ])
|
||||
AC_CONFIG_FILES([ src/kile/test/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ar/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ar/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/bg/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/bg/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/br/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/br/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ca/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ca/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/cs/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/cs/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/cy/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/cy/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/da/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/da/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/da/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/de/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/de/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/el/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/el/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/en_GB/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/en_GB/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/es/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/es/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/es/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/et/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/et/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/et/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/eu/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/eu/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/fi/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/fi/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/fr/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/fr/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ga/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ga/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/gl/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/gl/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/hi/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/hi/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/hu/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/hu/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/is/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/is/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/it/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/it/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/it/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ja/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ja/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/lt/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/lt/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ms/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ms/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/mt/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/mt/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nb/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nb/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nds/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nds/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nl/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nl/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nl/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nn/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/nn/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pa/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pa/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pl/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pl/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pt/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pt/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pt/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pt_BR/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/pt_BR/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ro/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ro/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ru/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ru/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/rw/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/rw/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sk/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sk/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sr/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sr/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sr@Latn/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sr@Latn/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sv/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sv/doc/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/sv/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ta/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/ta/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/th/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/th/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/tr/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/tr/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/uk/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/uk/messages/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/zh_CN/Makefile ])
|
||||
AC_CONFIG_FILES([ translations/zh_CN/messages/Makefile ])
|
||||
AC_OUTPUT
|
||||
dnl Put here things to be done at the very end - telling users
|
||||
dnl about additional packages to install. Better yet is giving
|
||||
dnl each project / subdr its own configure.in.bot.
|
||||
|
||||
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||
# And if so, warn when they don't match
|
||||
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||
# And if kde doesn't know about the prefix yet
|
||||
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||
if test $? -ne 0; then
|
||||
echo ""
|
||||
echo "Warning: you chose to install this package in $given_prefix,"
|
||||
echo "but KDE was found in $kde_libs_prefix."
|
||||
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||
echo "Then restart KDE."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
|
||||
echo ""
|
||||
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
|
||||
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
|
||||
echo ""
|
||||
echo "For better performance, consider including the Qt visibility supporting patch"
|
||||
echo "located at:"
|
||||
echo ""
|
||||
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
|
||||
echo ""
|
||||
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
|
||||
echo "everything will continue to work just fine without it."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if test "$all_tests" = "bad"; then
|
||||
if test ! "$cache_file" = "/dev/null"; then
|
||||
echo ""
|
||||
echo "Please remove the file $cache_file after changing your setup"
|
||||
echo "so that configure will find the changes next time."
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "Good - your configure finished. Start make now"
|
||||
echo ""
|
||||
fi
|
@ -0,0 +1,4 @@
|
||||
dnl Put here things to be done at the very end - telling users
|
||||
dnl about additional packages to install. Better yet is giving
|
||||
dnl each project / subdr its own configure.in.bot.
|
||||
|
@ -0,0 +1,11 @@
|
||||
#MIN_CONFIG(3.2)
|
||||
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||
|
||||
if test "$build_arts" = "yes"; then
|
||||
AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
|
||||
LIB_ARTS="-lartskde"
|
||||
AC_SUBST(LIB_ARTS)
|
||||
fi
|
||||
|
||||
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
|
||||
|
@ -0,0 +1,2 @@
|
||||
KDE_LANG = en
|
||||
KDE_DOCS = kile
|
@ -0,0 +1 @@
|
||||
- add section on how to use character encodings in Kile
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,57 @@
|
||||
This document describes Kile's DCOP interface, the parts of the Lyx protocol known by Kile and
|
||||
the services Kile can use from other KDE apps.
|
||||
|
||||
1. Kile's DCOP interface
|
||||
|
||||
Open a file either by absolute or relative path:
|
||||
virtual void openDocument(const QString &);
|
||||
|
||||
Insert text at the cursor position in the current document; this can be used to replace Lyx's pipe mechanism:
|
||||
virtual void insertText(const QString &);
|
||||
|
||||
Same effect as openDocument; kept for backward compatibility:
|
||||
virtual void fileSelected(const QString &);
|
||||
|
||||
Close the current document:
|
||||
virtual void closeDocument();
|
||||
|
||||
Open a Kile project file, either by absolute or relative path:
|
||||
virtual void openProject(const QString &);
|
||||
|
||||
Jump to the given line in the current document; please note that the parameter is not of the type 'int' but of 'QString' instead:
|
||||
virtual void setLine(const QString &);
|
||||
|
||||
Raise Kile's main window; does not steal the focus:
|
||||
virtual void setActive();
|
||||
|
||||
Run the given tool; the return values are { Running = 0, ConfigureFailed, NoLauncherInstalled, NoValidTarget, NoValidSource, TargetHasWrongPermissions, NoValidPrereqs, CouldNotLaunch, SelfCheckFailed}:
|
||||
virtual int run(const QString &);
|
||||
|
||||
Run the given tool with a specific configuration as second parameter; returns the same values as the function above:
|
||||
virtual int runWith(const QString &, const QString &);
|
||||
|
||||
|
||||
2. Kile's Lyx Pipe emulation
|
||||
|
||||
The following Lyx commands are understood by Kile.
|
||||
|
||||
Insert the citations $Name1, Name2, ... at the current cursor postion; the citation command is hard coded to '\cite':
|
||||
:citation-insert:$Name1,$Name2
|
||||
|
||||
Insert the command \bibliography with the files named $myBib1, $myBib2, ... at the current cursor position:
|
||||
:bibtex-database-add:$myBib
|
||||
|
||||
Insert the string $text at the current cursor position:
|
||||
:paste:$text
|
||||
|
||||
|
||||
3. Services usable Kile
|
||||
|
||||
Kile can ask a BibTeX manager to insert all marked citations; for example, via the menu item "LaTeX->References->cite from viewBib".
|
||||
Currently only KBib (http://user.digisurf.com.au/~thachly/kbib) is supported. If you want to get your application added, please contact us
|
||||
at kile-devel _ aht_ lists.sourceforge.net.
|
||||
|
||||
Valid for Kile 2.0, written at 10/08/2007
|
||||
|
||||
The Kile Development Team
|
||||
|
@ -0,0 +1,139 @@
|
||||
PROJECT( kile )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.4.4 FATAL_ERROR )
|
||||
|
||||
|
||||
SET( KILE_VERSION CACHE STRING "Kile's version; can be used to install special documentation files in share/doc/kile-$KILE_VERSION/" )
|
||||
|
||||
SET( kile_PO_FILE "kile.po" )
|
||||
SET( kile_DOCBOOK "index.docbook" )
|
||||
|
||||
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/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/kconf_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})
|
||||
|
@ -0,0 +1,397 @@
|
||||
GNU Free Documentation License
|
||||
Version 1.2, November 2002
|
||||
|
||||
|
||||
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
0. PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document "free" in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
|
||||
1. APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The "Document", below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as "you". You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A "Secondary Section" is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (Thus, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The "Cover Texts" are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not "Transparent" is called "Opaque".
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML, PostScript or PDF designed for human modification. Examples of
|
||||
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||
include proprietary formats that can be read and edited only by
|
||||
proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
|
||||
The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, "Title Page" means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as "Acknowledgements",
|
||||
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section "Entitled XYZ" according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
|
||||
2. VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
|
||||
3. COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
|
||||
4. MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
D. Preserve all the copyright notices of the Document.
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
H. Include an unaltered copy of this License.
|
||||
I. Preserve the section Entitled "History", Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled "History" in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the "History" section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
K. For any section Entitled "Acknowledgements" or "Dedications",
|
||||
Preserve the Title of the section, and preserve in the section all
|
||||
the substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
M. Delete any section Entitled "Endorsements". Such a section
|
||||
may not be included in the Modified Version.
|
||||
N. Do not retitle any existing section to be Entitled "Endorsements"
|
||||
or to conflict in title with any Invariant Section.
|
||||
O. Preserve any Warranty Disclaimers.
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
|
||||
5. COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled "History"
|
||||
in the various original documents, forming one section Entitled
|
||||
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||
and any sections Entitled "Dedications". You must delete all sections
|
||||
Entitled "Endorsements".
|
||||
|
||||
|
||||
6. COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
|
||||
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an "aggregate" if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
|
||||
8. TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled "Acknowledgements",
|
||||
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
|
||||
9. TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
|
||||
10. FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
|
||||
ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
Copyright (c) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the "with...Texts." line with this:
|
||||
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
@ -0,0 +1,222 @@
|
||||
<!DOCTYPE kdevelop>
|
||||
<kdevelop>
|
||||
<general>
|
||||
<author>Jeroen Wijnhout</author>
|
||||
<email>Jeroen.Wijnhout@kdemail.net</email>
|
||||
<version>$VERSION$</version>
|
||||
<projectmanagement>KDevKDEAutoProject</projectmanagement>
|
||||
<primarylanguage>C++</primarylanguage>
|
||||
<keywords>
|
||||
<keyword>Qt</keyword>
|
||||
<keyword>KDE</keyword>
|
||||
</keywords>
|
||||
<projectdirectory>.</projectdirectory>
|
||||
<absoluteprojectpath>false</absoluteprojectpath>
|
||||
<description/>
|
||||
<ignoreparts/>
|
||||
<secondaryLanguages/>
|
||||
</general>
|
||||
<kdevfileview>
|
||||
<groups>
|
||||
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
|
||||
<group pattern="*.ui" name="User Interface" />
|
||||
<group pattern="*.png" name="Icons" />
|
||||
<group pattern="*.po;*.ts" name="Translations" />
|
||||
<group pattern="*" name="Others" />
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
<hidenonlocation>false</hidenonlocation>
|
||||
</groups>
|
||||
<tree>
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
<hidepatterns></hidepatterns>
|
||||
<showvcsfields>true</showvcsfields>
|
||||
</tree>
|
||||
</kdevfileview>
|
||||
<kdevdoctreeview>
|
||||
<ignoretocs>
|
||||
<toc>gtk</toc>
|
||||
<toc>gnustep</toc>
|
||||
<toc>python</toc>
|
||||
<toc>php</toc>
|
||||
<toc>perl</toc>
|
||||
<toc>gnome1</toc>
|
||||
<toc>w3c-svg</toc>
|
||||
<toc>w3c-uaag10</toc>
|
||||
<toc>w3c-dom-level2-html</toc>
|
||||
<toc>sw</toc>
|
||||
<toc>ruby</toc>
|
||||
<toc>haskell</toc>
|
||||
<toc>kdev3api</toc>
|
||||
<toc>opengl</toc>
|
||||
<toc>ada</toc>
|
||||
<toc>clanlib</toc>
|
||||
<toc>wxwindows_bugs</toc>
|
||||
<toc>sdl</toc>
|
||||
<toc>ruby_bugs</toc>
|
||||
<toc>php_bugs</toc>
|
||||
<toc>perl_bugs</toc>
|
||||
<toc>python_bugs</toc>
|
||||
<toc>pascal_bugs_fp</toc>
|
||||
<toc>java_bugs_sun</toc>
|
||||
<toc>haskell_bugs_ghc</toc>
|
||||
<toc>java_bugs_gcc</toc>
|
||||
<toc>gtk_bugs</toc>
|
||||
<toc>fortran_bugs_gcc</toc>
|
||||
<toc>ada_bugs_gcc</toc>
|
||||
</ignoretocs>
|
||||
<projectdoc>
|
||||
<userdocDir>/home/kde-dev/kde/src/kile/head/kdeextragear-2/doc/kile/</userdocDir>
|
||||
<apidocDir>/home/kde-dev/kde/build/kile/head/kdeextragear-2/kile/html/</apidocDir>
|
||||
</projectdoc>
|
||||
<ignoreqt_xml>
|
||||
<toc>qmake User Guide</toc>
|
||||
<toc>Guide to the Qt Translation Tools</toc>
|
||||
<toc>Qt Assistant Manual</toc>
|
||||
<toc>Qt Designer Manual</toc>
|
||||
</ignoreqt_xml>
|
||||
<ignoredoxygen/>
|
||||
<ignorekdocs/>
|
||||
<ignoredevhelp>
|
||||
<toc>gdk-pixbuf</toc>
|
||||
<toc>libbonoboui</toc>
|
||||
<toc>libbonobo</toc>
|
||||
<toc>gtk</toc>
|
||||
<toc>gobject</toc>
|
||||
<toc>glib</toc>
|
||||
<toc>gdk</toc>
|
||||
<toc>bonobo-activation</toc>
|
||||
</ignoredevhelp>
|
||||
</kdevdoctreeview>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<dbgshell>libtool</dbgshell>
|
||||
<programargs/>
|
||||
<gdbpath/>
|
||||
<breakonloadinglibs>true</breakonloadinglibs>
|
||||
<separatetty>false</separatetty>
|
||||
<floatingtoolbar>false</floatingtoolbar>
|
||||
<runappinappdirectory>true</runappinappdirectory>
|
||||
<configGdbScript/>
|
||||
<runShellScript/>
|
||||
<runGdbScript/>
|
||||
</general>
|
||||
<display>
|
||||
<staticmembers>false</staticmembers>
|
||||
<demanglenames>true</demanglenames>
|
||||
<outputradix>10</outputradix>
|
||||
</display>
|
||||
</kdevdebugger>
|
||||
<kdevfilecreate>
|
||||
<filetypes/>
|
||||
<useglobaltypes>
|
||||
<type ext="ui" />
|
||||
<type ext="cpp" />
|
||||
<type ext="h" />
|
||||
</useglobaltypes>
|
||||
</kdevfilecreate>
|
||||
<kdevautoproject>
|
||||
<make>
|
||||
<envvars>
|
||||
<envvar value="1" name="WANT_AUTOCONF_2_5" />
|
||||
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
|
||||
</envvars>
|
||||
<abortonerror>false</abortonerror>
|
||||
<numberofjobs>1</numberofjobs>
|
||||
<dontact>false</dontact>
|
||||
<makebin>unsermake</makebin>
|
||||
<prio>0</prio>
|
||||
</make>
|
||||
<general>
|
||||
<useconfiguration>default</useconfiguration>
|
||||
</general>
|
||||
<run>
|
||||
<mainprogram>kile/kile/kile</mainprogram>
|
||||
<programargs/>
|
||||
<terminal>false</terminal>
|
||||
<autocompile>true</autocompile>
|
||||
<envvars/>
|
||||
<directoryradio>build</directoryradio>
|
||||
<customdirectory>/home/wijnhout/Devel/KDE/bin/</customdirectory>
|
||||
</run>
|
||||
<configurations>
|
||||
<default>
|
||||
<configargs>--enable-debug=full --prefix=/opt/kde3</configargs>
|
||||
<builddir>build-kde-3.4</builddir>
|
||||
<topsourcedir>..</topsourcedir>
|
||||
<cppflags/>
|
||||
<ldflags/>
|
||||
<ccompiler>kdevgccoptions</ccompiler>
|
||||
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||
<f77compiler>kdevpgf77options</f77compiler>
|
||||
<ccompilerbinary/>
|
||||
<cxxcompilerbinary/>
|
||||
<f77compilerbinary/>
|
||||
<cflags/>
|
||||
<cxxflags>-pg</cxxflags>
|
||||
<f77flags/>
|
||||
<envvars/>
|
||||
</default>
|
||||
</configurations>
|
||||
</kdevautoproject>
|
||||
<cppsupportpart>
|
||||
<codecompletion/>
|
||||
<filetemplates>
|
||||
<choosefiles>false</choosefiles>
|
||||
<interfaceURL/>
|
||||
<implementationURL/>
|
||||
<interfacesuffix>.h</interfacesuffix>
|
||||
<implementationsuffix>.cpp</implementationsuffix>
|
||||
<lowercasefilenames>true</lowercasefilenames>
|
||||
</filetemplates>
|
||||
</cppsupportpart>
|
||||
<kdevclassview>
|
||||
<folderhierarchy>true</folderhierarchy>
|
||||
<depthoffolders>2</depthoffolders>
|
||||
</kdevclassview>
|
||||
<kdevcvs>
|
||||
<cvsoptions>-f</cvsoptions>
|
||||
<commitoptions/>
|
||||
<addoptions/>
|
||||
<logoptions/>
|
||||
<updateoptions>-dP</updateoptions>
|
||||
<removeoptions>-f</removeoptions>
|
||||
<revertoptions>-C -d -P</revertoptions>
|
||||
<diffoptions>-u3 -p</diffoptions>
|
||||
<rshoptions/>
|
||||
</kdevcvs>
|
||||
<kdevcppsupport>
|
||||
<codecompletion>
|
||||
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||
<includeTypes>true</includeTypes>
|
||||
<includeEnums>true</includeEnums>
|
||||
<includeTypedefs>false</includeTypedefs>
|
||||
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||
<codeCompletionDelay>250</codeCompletionDelay>
|
||||
<argumentsHintDelay>400</argumentsHintDelay>
|
||||
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||
<headerCompletionDelay>250</headerCompletionDelay>
|
||||
</codecompletion>
|
||||
<references/>
|
||||
<qt>
|
||||
<used>true</used>
|
||||
<version>3</version>
|
||||
<root>/usr/lib/qt3</root>
|
||||
</qt>
|
||||
<creategettersetter>
|
||||
<prefixGet/>
|
||||
<prefixSet>set</prefixSet>
|
||||
<prefixVariable>m_,_</prefixVariable>
|
||||
<parameterName>theValue</parameterName>
|
||||
<inlineGet>true</inlineGet>
|
||||
<inlineSet>true</inlineSet>
|
||||
</creategettersetter>
|
||||
</kdevcppsupport>
|
||||
<kdevcvsservice>
|
||||
<recursivewhenupdate>true</recursivewhenupdate>
|
||||
<prunedirswhenupdate>true</prunedirswhenupdate>
|
||||
<createdirswhenupdate>true</createdirswhenupdate>
|
||||
<recursivewhencommitremove>true</recursivewhencommitremove>
|
||||
<revertoptions>-C</revertoptions>
|
||||
</kdevcvsservice>
|
||||
</kdevelop>
|
@ -0,0 +1,15 @@
|
||||
####### kdevelop will overwrite this part!!! (begin)##########
|
||||
SUBDIRS = kile
|
||||
|
||||
mimetypetextdata_DATA = x-kilepr.desktop
|
||||
mimetypetextdatadir = $(kde_mimedir)/text
|
||||
|
||||
update_DATA = kile.upd
|
||||
update_SCRIPTS = kile1.6_upd.pl kile1.7_upd.pl kile1.9-1_upd.pl kile1.9_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
|
||||
updatedir = $(kde_datadir)/kconf_update
|
||||
|
||||
EXTRA_DIST = kile.kdevprj admin AUTHORS COPYING ChangeLog kile-remote-control.txt README README.cwl README.MacOSX kile.lsm $(mimetypetextdata_DATA)
|
||||
|
||||
|
||||
|
@ -0,0 +1,532 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Kile Bug Hunting Protocol</title><style type="text/css">
|
||||
body { background-color:white; color:black }
|
||||
td { text-align:center; background-color:#eee }
|
||||
th { text-align:center; background-color:#228; color:white }
|
||||
td.sum { text-align:left }
|
||||
td.sumdone { text-align:left; background-color:#ccc }
|
||||
td.done { background-color:#ccc }
|
||||
td.subhead { text-align:center; background-color:#ccf }
|
||||
td.datehead { text-align:center; background-color:#ccf }
|
||||
td.space { background-color:white }
|
||||
td.date { text-align:left }
|
||||
td.dateholiday { text-align:left; color:red }
|
||||
</style>
|
||||
</head><body>
|
||||
<h1>Kile Bug Hunting Protocol</h1>
|
||||
<table border="0" cellpadding="3" cellspacing="3">
|
||||
<tr>
|
||||
<th class="sum">Task</th>
|
||||
<th>Priority</th>
|
||||
<th>Completed</th>
|
||||
<th>Due Date</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-439576309.563"></a>
|
||||
<b>Bug Hunting</b>
|
||||
<div align="right"><a href="#sublibkcal-439576309.563">Sub-Tasks</a></div>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" colspan="4"><a name="sublibkcal-439576309.563"></a>Sub-Tasks of: <a href="#libkcal-439576309.563"><b>Bug Hunting</b></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-984451268.463"></a>
|
||||
<b>Session Management</b>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-553179975.872"></a>
|
||||
<b>Templates</b>
|
||||
<p>- create<br />- remove<br />- icons<br />- same name<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-756448440.281"></a>
|
||||
<b>Convert</b>
|
||||
<p>- check encoding<br />- go over all examples<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1233439575.576"></a>
|
||||
<b>Statistics</b>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1523220832.882"></a>
|
||||
<b>Advanced Editing</b>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-666792863.127"></a>
|
||||
<b>Structure View</b>
|
||||
<p>- content<br />
|
||||
- updating
|
||||
<br /> - close<br /> - open<br /> - switch<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1956520011.991"></a>
|
||||
<b>Tools</b>
|
||||
<p>- create new tools<br />- create new configs <br />- remove tools<br />- remove default config<br />- put tools on toolbar<br /><br />- watch file<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-270596009.732"></a>
|
||||
<b>Log Parsing</b>
|
||||
<p>- go over testcases<br />- check error browsing (using both ways)<br />- view log file<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-571614760.948"></a>
|
||||
<b>Cleaning</b>
|
||||
<p>- modify the extension list<br />- check if auto-clean works<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-432339186.181"></a>
|
||||
<b>Projects</b>
|
||||
<div align="right"><a href="#sublibkcal-432339186.181">Sub-Tasks</a></div>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-965801818.761"></a>
|
||||
<b>User Tags</b>
|
||||
<p>- add<br />- edit<br />- remove<br />- test %C %M %<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-101464808.391"></a>
|
||||
<b>Shortcuts</b>
|
||||
<p>test all shortcuts<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-419506450.331"></a>
|
||||
<b>Tags</b>
|
||||
<p>- test _all_ tags<br />- check the tips given in the Log/Message view<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-2024654010.663"></a>
|
||||
<b>Wizards</b>
|
||||
<p>- try out all wizards<br />- no document open<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-601018983.329"></a>
|
||||
<b>Spell checking</b>
|
||||
<p>- LaTeX commands should be ignored<br />- random replace/ignore etc.<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-2064369941.864"></a>
|
||||
<b>Master Document</b>
|
||||
<p>play with:<br />- setting master document explicitly<br />- automatic detection in projects<br />- override in project settings dialog<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1902481457.645"></a>
|
||||
<b>Watch File</b>
|
||||
<p>- also test with QuickBuild<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-830301444.587"></a>
|
||||
<b>System Check</b>
|
||||
<p>- make each tool unavailable or not working<br />- also test using a Kile installed in $HOME dir<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1370349546.711"></a>
|
||||
<b>GUI</b>
|
||||
<p>- hide/show side/bottom bar (pay attention to the minimal size)<br />- check if toolbars are restored correctly<br /> - hidden/shown<br /> - icon size<br /> - text?<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-309067887.612"></a>
|
||||
<b>Settings</b>
|
||||
<div align="right"><a href="#sublibkcal-309067887.612">Sub-Tasks</a></div>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-201152747.1056"></a>
|
||||
<b>Help</b>
|
||||
<p>- LaTeX reference<br />- Handbook<br />- Context sensitive help<br />- teTeX docs (what happens if not installed?)<br />- about Kile<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" colspan="4"><a name="sublibkcal-432339186.181"></a>Sub-Tasks of: <a href="#libkcal-432339186.181"><b>Projects</b></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-2090044041.879"></a>
|
||||
<b>New Projects</b>
|
||||
<p>- try to use invalid names<br />- try to create already existing project or file<br />- monkey test<br /><br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1923455343.572"></a>
|
||||
<b>Project Options</b>
|
||||
<p>check whether or not all project options are respected<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-191369577.684"></a>
|
||||
<b>Archive</b>
|
||||
<p>- in/exclude files<br />- stress test: how many files can we handle?<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-931760223.707"></a>
|
||||
<b>Sharing files</b>
|
||||
<p>- open/close projects that share files (make sure we cover all possibilities, file open in one project not in the other, ...)<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" colspan="4"><a name="sublibkcal-309067887.612"></a>Sub-Tasks of: <a href="#libkcal-309067887.612"><b>Settings</b></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1637132949.758"></a>
|
||||
<b>General</b>
|
||||
<p>- check all options<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-584767411.506"></a>
|
||||
<b>Build</b>
|
||||
<p>- check default size of the widget (tends to be too small)<br />- create/remove tools<br />- change type/class of tools, check if all tabs are changed accordingly<br />- pay special attention to the QuickBuild configuration<br />- default settings<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1303619548.1088"></a>
|
||||
<b>LaTeX</b>
|
||||
<p>- check all options<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-1413628404.454"></a>
|
||||
<b>Complete</b>
|
||||
<p>- check all options<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sum">
|
||||
<a name="libkcal-2129115244.1001"></a>
|
||||
<b>Help</b>
|
||||
<p>- check all options<br /></p>
|
||||
</td>
|
||||
<td>
|
||||
3
|
||||
</td>
|
||||
<td>
|
||||
0 %
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>This page was created by <a href="mailto:Jeroen.Wijnhout@kdemail.net">Jeroen Wijnhout</a> with <a href="http://korganizer.kde.org">KOrganizer</a></p>
|
||||
</body></html>
|
@ -0,0 +1,2 @@
|
||||
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
|
@ -0,0 +1,876 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Extract an application from KDE svn, including documentation and translations.
|
||||
#
|
||||
# Authors: Michael Buesch <mbuesch@freenet.de>
|
||||
# Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
|
||||
# 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 <mbuesch@freenet.de>
|
||||
2004-2005 Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
|
||||
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 <PATH> -a <NAME> [OPTIONS]
|
||||
|
||||
These parameters are mandatory:
|
||||
|
||||
-ab|--app-base <PATH> 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> Name of the application to checkout.
|
||||
This is the subdir you want to checkout in --app-base.
|
||||
|
||||
The following options are available:
|
||||
|
||||
-d|--svnroot <URL> Base URL of the svn repository.
|
||||
svn://anonsvn.kde.org/home/kde is the default.
|
||||
|
||||
-ib|--i18n-base <PATH> Path to the i18n translations base.
|
||||
Default:
|
||||
trunk/l10n
|
||||
|
||||
-is|--i18n-sub <PATH> Path to the i18n files under the
|
||||
\$i18n-base/\$LANGUAGE/messages
|
||||
directories. Example:
|
||||
extragear-office
|
||||
|
||||
-ids|--i18n-docsub <PATH> Path to the i18n docbook files under the
|
||||
\$i18n-base/\$LANGUAGE/docs
|
||||
directories. Example:
|
||||
kdeextragear-2
|
||||
Default:
|
||||
path of --i18n-sub
|
||||
|
||||
--admin <PATH> Path to the /admin/ directory.
|
||||
Default:
|
||||
trunk/KDE/kde-common/admin
|
||||
|
||||
-b|--builddir <DIRNAME> Name of the temporary working directory where
|
||||
all files will be put. Default is \"./build\"
|
||||
|
||||
-av|--appversion <VERSION> 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 <TARBALLDIR> Place a copy of the packages into TARBALLDIR.
|
||||
|
||||
--postprocess <SCRIPT> Runs SCRIPT on the package, after all data is gathered, but before
|
||||
the tarball is generated. This allows packagers to give the
|
||||
\"final touch\" to the package.
|
||||
|
||||
--pofiles <POFILES> Space seperated list of pofiles this application uses without the extension.
|
||||
Defaults to the name of the application.
|
||||
|
||||
-l|--languages <LANGUAGES> Space seperated list of languages to search for
|
||||
translations. If no languages are specified, all
|
||||
available languages will be included.
|
||||
|
||||
-el|--exclude-languages <LANGUAGES> Space seperated list of languages not to include
|
||||
in the package.
|
||||
|
||||
--logfile <FILE> Write all logging information to FILE.
|
||||
If FILE is \"no\", no logfile will be created.
|
||||
|
||||
--notoplevel Do not create an additional src directory. Do not checkout the top level files.
|
||||
Use configure.in.in and Makefile.am from the application's root directory.
|
||||
|
||||
-v|--version Version of this script
|
||||
-h|--help This Help"
|
||||
}
|
||||
|
||||
#
|
||||
# Some simple helper functions.
|
||||
#
|
||||
|
||||
function printlog
|
||||
{
|
||||
if [ -n "$LOGFILE" ]; then
|
||||
echo -e "$SCRIPTNAME: $*" >> $LOGFILE
|
||||
fi
|
||||
}
|
||||
|
||||
function printnlog
|
||||
{
|
||||
if [ -n "$LOGFILE" ]; then
|
||||
echo -n -e "$SCRIPTNAME: $*" >> $LOGFILE
|
||||
fi
|
||||
}
|
||||
|
||||
function print
|
||||
{
|
||||
echo -e "$SCRIPTNAME: $*"
|
||||
printlog $*
|
||||
}
|
||||
|
||||
function printn
|
||||
{
|
||||
echo -n -e "$SCRIPTNAME: $*"
|
||||
printnlog $*
|
||||
}
|
||||
|
||||
function runCommand
|
||||
{
|
||||
stdoutlog="$LOGFILE"
|
||||
if [ -z "$stdoutlog" ]; then
|
||||
stdoutlog="/dev/null"
|
||||
fi
|
||||
$* >> $stdoutlog 2>&1
|
||||
LASTRESULT=$?
|
||||
print " [$1 returned $LASTRESULT]"
|
||||
}
|
||||
|
||||
function runCommandRedirect
|
||||
{
|
||||
destinationfile=$1
|
||||
shift
|
||||
|
||||
stdoutlog="$LOGFILE"
|
||||
if [ -z "$stdoutlog" ]; then
|
||||
stdoutlog="/dev/null"
|
||||
fi
|
||||
$* > $destinationfile 2>>$stdoutlog
|
||||
LASTRESULT=$?
|
||||
if [ $LASTRESULT -ne 0 ]; then
|
||||
rm $destinationfile
|
||||
fi
|
||||
print " [$1 returned $LASTRESULT]"
|
||||
}
|
||||
|
||||
function testParameter
|
||||
{
|
||||
if [ -z "$2" ]; then
|
||||
echo "Please give a value to parameter $1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function makeDir
|
||||
{
|
||||
cd $BUILDDIR
|
||||
print " Creating directory $*"
|
||||
runCommand mkdir $*
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Removes the .svn directories
|
||||
#
|
||||
function removeVCDirs
|
||||
{
|
||||
if ! [ -d "$BUILDDIR/$*" ]; then
|
||||
return
|
||||
fi
|
||||
print " Removing VCDirs $*"
|
||||
cd $BUILDDIR/$*
|
||||
find . -type d -a -name '.svn' | xargs rm -rf
|
||||
}
|
||||
|
||||
#
|
||||
# This is our work-horse. getResource retrieves all
|
||||
# data needed to assemble a working package.
|
||||
# Available resources:
|
||||
# topleveldir, admindir, source, documentation,
|
||||
# languagelist, guitranslation, doctranslation
|
||||
#
|
||||
function getResource
|
||||
{
|
||||
DESTINATION=$2
|
||||
SINGLEFILEHACK="no"
|
||||
case $1 in
|
||||
topleveldir)
|
||||
COMMAND="svn export -N $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE $DESTINATION"
|
||||
;;
|
||||
admindir)
|
||||
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$ADMINDIR $DESTINATION"
|
||||
;;
|
||||
source)
|
||||
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE/$APPNAME $DESTINATION"
|
||||
;;
|
||||
documentation)
|
||||
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE/doc/$APPNAME $DESTINATION"
|
||||
;;
|
||||
languagelist)
|
||||
SINGLEFILEHACK="yes"
|
||||
COMMAND="svn cat $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/subdirs"
|
||||
;;
|
||||
guitranslation)
|
||||
DESTINATION=$3/$4.po
|
||||
SINGLEFILEHACK="yes"
|
||||
COMMAND="svn cat $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/$2/messages/$I18NSUB/$4.po"
|
||||
;;
|
||||
doctranslation)
|
||||
DESTINATION=$3
|
||||
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/$2/docs/$I18NDOCSUB/$APPNAME $DESTINATION"
|
||||
;;
|
||||
*)
|
||||
print "ERROR: Unknown resource $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
print " Retrieving resource: $1"
|
||||
printlog " getResource $1: $COMMAND"
|
||||
|
||||
cd $BUILDDIR
|
||||
|
||||
if [ $SINGLEFILEHACK = "yes" ]; then
|
||||
runCommandRedirect $DESTINATION $COMMAND
|
||||
else
|
||||
runCommand $COMMAND
|
||||
fi
|
||||
|
||||
if [ $LASTRESULT != "0" ]; then
|
||||
print "Warning: Resource \"$1\" is not available."
|
||||
fi
|
||||
return $LASTRESULT
|
||||
}
|
||||
|
||||
#
|
||||
# Creates the build dir, the dir where the packages
|
||||
# are assembled.
|
||||
#
|
||||
function setupBuildDir
|
||||
{
|
||||
print "Creating the build directory..."
|
||||
print " ($BUILDDIR)"
|
||||
|
||||
# clean up first
|
||||
if [ -d $BUILDDIR ]; then
|
||||
print " Removing the old build directory"
|
||||
rm -rf $BUILDDIR
|
||||
fi
|
||||
|
||||
mkdir $BUILDDIR
|
||||
}
|
||||
|
||||
#
|
||||
# Gather all data in the build dir needed to build
|
||||
# the application (without translations).
|
||||
#
|
||||
function assembleApplicationData
|
||||
{
|
||||
print "Assembling the source code..."
|
||||
APPDIR=$APPNAME-$APPVERSION
|
||||
print " ($APPDIR)"
|
||||
|
||||
if [ $TOPLEVEL = "yes" ]; then
|
||||
getResource "topleveldir" $APPDIR
|
||||
fi
|
||||
|
||||
getResource "admindir" $APPDIR/admin
|
||||
|
||||
if [ $TOPLEVEL = "yes" ]; then
|
||||
getResource "source" $APPDIR/src
|
||||
else
|
||||
getResource "source" $APPDIR
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Copies the GNU (README, TODO, Changelog, etc.) files.
|
||||
#
|
||||
function moveGNUFiles
|
||||
{
|
||||
print " Moving the standard GNU files"
|
||||
for file in $GNUFiles
|
||||
do
|
||||
if [ -f $BUILDDIR/$APPDIR/src/$file ]; then
|
||||
mv $BUILDDIR/$APPDIR/src/$file $BUILDDIR/$1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Cleanup the application or i18n directory by removing
|
||||
# unneccessary files and directories.
|
||||
#
|
||||
function cleanupDirectory
|
||||
{
|
||||
dir="$1"
|
||||
print "Removing unneccessary files and directories"
|
||||
for file in $CLEANUPFILES
|
||||
do
|
||||
path="$dir/$file"
|
||||
if [ -f "$path" ]; then
|
||||
rm -f $path
|
||||
printlog " Removed file: $path"
|
||||
elif [ -d "$path" ]; then
|
||||
rm -Rf $path
|
||||
printlog " Removed directory: $path"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# After all data for the app is gathered, some files
|
||||
# still need to be shuffled around.
|
||||
#
|
||||
function postProcessApplicationDir
|
||||
{
|
||||
print "Post-processing the application directory..."
|
||||
if [ $TOPLEVEL = "yes" ]; then
|
||||
moveGNUFiles $APPDIR
|
||||
fi
|
||||
|
||||
if [ ! -z "$POSTPROCESSSCRIPT" ]; then
|
||||
print "Running post-processing script..."
|
||||
cd $BUILDDIR/$APPDIR
|
||||
$POSTPROCESSSCRIPT
|
||||
err="$?"
|
||||
if [ $err -ne 0 ]; then
|
||||
print "ERROR: Post-processing script failed (return status: $err)"
|
||||
exit $err
|
||||
fi
|
||||
print "Post-processing script finished."
|
||||
fi
|
||||
}
|
||||
|
||||
function retrieveDocumentation
|
||||
{
|
||||
if [ $GETDOC = "no" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
print "Retrieving the documentation..."
|
||||
DOCDIR=$APPDIR/doc
|
||||
print " ($DOCDIR)"
|
||||
|
||||
getResource "documentation" $DOCDIR
|
||||
}
|
||||
|
||||
#
|
||||
# Determines what languages need to be retrieved.
|
||||
# If LANGUAGES was not set using the -l switch,
|
||||
# the kde-i18n/subdirs file is used.
|
||||
#
|
||||
function getLanguageList
|
||||
{
|
||||
print " Determining which languages to include..."
|
||||
if [ -z "$LANGUAGES" ]; then
|
||||
getResource "languagelist" languagelist
|
||||
if [ -e $BUILDDIR/languagelist ]; then
|
||||
LANGUAGES=`cat $BUILDDIR/languagelist`
|
||||
rm $BUILDDIR/languagelist
|
||||
else
|
||||
print "ERROR:"
|
||||
print "ERROR: Failed to automatically detect which languages to include."
|
||||
print "ERROR:"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove the excluded languages from the list
|
||||
LANGLIST=""
|
||||
for language in $LANGUAGES ; do
|
||||
EXCLUDE="false"
|
||||
for exclang in $EXCLUDELANGUAGES ; do
|
||||
if [ "$exclang" = "$language" ]; then
|
||||
EXCLUDE="true"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $EXCLUDE = "false" ]; then
|
||||
LANGLIST="$LANGLIST $language"
|
||||
fi
|
||||
done
|
||||
LANGUAGES=$LANGLIST
|
||||
print "Language list: $LANGUAGES"
|
||||
}
|
||||
|
||||
#
|
||||
# Creates the dir that holds the translations. This is either
|
||||
# a "translations" dir in the application build dir, or, if the
|
||||
# --split switch is used, the root dir of a separate i18n package.
|
||||
#
|
||||
function setupI18NDir
|
||||
{
|
||||
if [ $SPLIT = "yes" ]; then
|
||||
I18NDIR="$APPNAME-i18n-$APPVERSION"
|
||||
|
||||
getResource "topleveldir" $I18NDIR
|
||||
getResource "admindir" $I18NDIR/admin
|
||||
moveGNUFiles $I18NDIR
|
||||
|
||||
TRANSDIR=$I18NDIR
|
||||
else
|
||||
I18NDIR=$APPDIR
|
||||
TRANSDIR="$I18NDIR/translations"
|
||||
makeDir $TRANSDIR
|
||||
fi
|
||||
}
|
||||
|
||||
function createTranslationDirMakefile
|
||||
{
|
||||
if [ $GETI18N = "no" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
print " Creating Makefile.am in $1."
|
||||
CONTENTS="SUBDIRS=$INCLUDED_LANGUAGES"
|
||||
echo $CONTENTS > $1/Makefile.am
|
||||
}
|
||||
|
||||
function createTranslationMakefile
|
||||
{
|
||||
print " Creating Makefile.am in $1."
|
||||
CONTENTS="SUBDIRS="
|
||||
if [ -d "$1/messages" ]; then
|
||||
CONTENTS="$CONTENTS messages"
|
||||
fi
|
||||
if [ -d "$1/doc" ]; then
|
||||
CONTENTS="$CONTENTS doc";
|
||||
fi
|
||||
echo $CONTENTS > $1/Makefile.am
|
||||
}
|
||||
|
||||
function createTranslationMakefiles
|
||||
{
|
||||
if [ $GETI18N = "no" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
for language in $INCLUDED_LANGUAGES ; do
|
||||
createTranslationMakefile $BUILDDIR/$TRANSDIR/$language
|
||||
done
|
||||
}
|
||||
|
||||
function createGUITranslationMakefile
|
||||
{
|
||||
print " Creating Makefile.am in $2."
|
||||
echo "KDE_LANG = $1
|
||||
SUBDIRS = \$(AUTODIRS)
|
||||
POFILES = AUTO" > $2/Makefile.am
|
||||
}
|
||||
|
||||
function createDocTranslationMakefile
|
||||
{
|
||||
print " Creating Makefile.am in $2."
|
||||
echo "KDE_LANG = $1
|
||||
KDE_DOCS=$APPNAME" > $2/Makefile.am
|
||||
}
|
||||
|
||||
#
|
||||
# Get the .po files and put them in xx/messages
|
||||
# subdirectories, where xx is the language ISO code.
|
||||
#
|
||||
function retrieveGUITranslations
|
||||
{
|
||||
if [ $GETI18N = "no" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
print "Retrieving GUI translations..."
|
||||
setupI18NDir
|
||||
print " ($TRANSDIR)"
|
||||
|
||||
# determine which languages to get
|
||||
getLanguageList
|
||||
|
||||
# then get them (its really simple actually)
|
||||
INCLUDED_LANGUAGES=""
|
||||
for language in $LANGUAGES
|
||||
do
|
||||
print " Including language $language"
|
||||
makeDir $TRANSDIR/$language
|
||||
makeDir $TRANSDIR/$language/messages
|
||||
INCLUDE_THIS_LANG="yes"
|
||||
for pofile in $APP_POFILES; do
|
||||
getResource "guitranslation" $language $TRANSDIR/$language/messages $pofile
|
||||
if [ ! -e $BUILDDIR/$TRANSDIR/$language/messages/$pofile.po ]; then
|
||||
INCLUDE_THIS_LANG="no"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $INCLUDE_THIS_LANG = "yes" ]; then
|
||||
createGUITranslationMakefile $language $BUILDDIR/$TRANSDIR/$language/messages
|
||||
INCLUDED_LANGUAGES="$INCLUDED_LANGUAGES $language"
|
||||
else
|
||||
rm -rf $TRANSDIR/$language
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function retrieveDocTranslations
|
||||
{
|
||||
if [ $GETI18N = "no" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
print "Retrieving documentation translations..."
|
||||
|
||||
for language in $INCLUDED_LANGUAGES ; do
|
||||
print " Including documentation for language $language"
|
||||
getResource "doctranslation" $language $TRANSDIR/$language/doc
|
||||
if [ -e $BUILDDIR/$TRANSDIR/$language/doc/index.docbook ]
|
||||
then
|
||||
createDocTranslationMakefile $language $BUILDDIR/$TRANSDIR/$language/doc
|
||||
else
|
||||
print " No translations for $language docs available."
|
||||
rm -rf $TRANSDIR/$language/doc
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Create the configure script and Makefile.in's.
|
||||
#
|
||||
function packageApplication
|
||||
{
|
||||
cd $BUILDDIR
|
||||
|
||||
print "Creating configure script and Makefile.in files"
|
||||
(cd $APPDIR; runCommand make -f admin/Makefile.common cvs)
|
||||
|
||||
cleanupDirectory $APPDIR
|
||||
|
||||
TARNAME="$APPNAME-$APPVERSION.tar"
|
||||
if [ $PACKAGE = "gzip" ] || [ $PACKAGE = "yes" ]; then
|
||||
print "Packaging application ($TARNAME.gz)..."
|
||||
$GZIP $TARNAME.gz $APPDIR
|
||||
if [ $BUILDDIR != $TARBALLDIR ]; then
|
||||
cp $TARNAME.gz $TARBALLDIR
|
||||
fi
|
||||
fi
|
||||
if [ $PACKAGE = "bzip2" ] || [ $PACKAGE = "yes" ]; then
|
||||
print "Packaging application ($TARNAME.bz2)..."
|
||||
$BZIP2 $TARNAME.bz2 $APPDIR
|
||||
if [ $BUILDDIR != $TARBALLDIR ]; then
|
||||
cp $TARNAME.bz2 $TARBALLDIR
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Create the configure script and Makefile.in's.
|
||||
#
|
||||
function packageTranslations
|
||||
{
|
||||
if [ $SPLIT != "yes" ] || [ $GETI18N != "yes" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
cd $BUILDDIR
|
||||
|
||||
print "Creating translations configure script and Makefile.in files"
|
||||
(cd $I18NDIR; runCommand make -f admin/Makefile.common cvs)
|
||||
|
||||
cleanupDirectory $I18NDIR
|
||||
|
||||
TARNAME="$APPNAME-i18n-$APPVERSION.tar"
|
||||
if [ $PACKAGE = "gzip" ] || [ $PACKAGE = "yes" ]; then
|
||||
print "Packaging translations ($TARNAME.gz)..."
|
||||
$GZIP $TARNAME.gz $I18NDIR
|
||||
if [ $BUILDDIR != $TARBALLDIR ]; then
|
||||
cp $TARNAME.gz $TARBALLDIR
|
||||
fi
|
||||
fi
|
||||
if [ $PACKAGE = "bzip2" ] || [ $PACKAGE = "yes" ]; then
|
||||
print "Packaging translations ($TARNAME.bz2)..."
|
||||
$BZIP2 $TARNAME.bz2 $I18NDIR
|
||||
if [ $BUILDDIR != $TARBALLDIR ]; then
|
||||
cp $TARNAME.bz2 $TARBALLDIR
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Force the script to quit
|
||||
#
|
||||
function cancelScript
|
||||
{
|
||||
errorcode="$1"
|
||||
if [ -z "$errorcode" ]
|
||||
then
|
||||
errorcode="1"
|
||||
fi
|
||||
print "Script canceled ($errorcode)"
|
||||
exit $errorcode
|
||||
}
|
||||
|
||||
#
|
||||
# Do basic parameter checks, print some basic stuff
|
||||
# and initialize basic things.
|
||||
#
|
||||
function initBasic
|
||||
{
|
||||
trap "cancelScript" SIGINT SIGTERM
|
||||
|
||||
if [ -n "$LOGFILE" ]; then
|
||||
echo "$SCRIPTNAME revision $SCRIPTVERSION `date`" > $LOGFILE
|
||||
fi
|
||||
|
||||
if [ -z "$APPBASE" ]; then
|
||||
print "You need to specify an application base path (--app-base). See $SCRIPTNAME --help for more info."
|
||||
exit 1
|
||||
fi
|
||||
if [ -t "$APPNAME" ]; then
|
||||
print "You need to specify an application name (--app). See $SCRIPTNAME --help for more info."
|
||||
exit 1
|
||||
fi
|
||||
if [ "$GETI18N" = "yes" ] && [ -z "$I18NSUB" ]; then
|
||||
print "You need to specify the i18n subdir or disable i18n checkout (--i18n-sub or --noi18n). See $SCRIPTNAME --help for more info."
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$I18NDOCSUB" ]; then
|
||||
I18NDOCSUB="$I18NSUB"
|
||||
fi
|
||||
|
||||
if [ -z "$APP_POFILES" ]; then
|
||||
APP_POFILES="$APPNAME"
|
||||
fi
|
||||
|
||||
print "Using svn-root: $SVNROOT"
|
||||
}
|
||||
|
||||
function initVars
|
||||
{
|
||||
LOGFILE="$PWD/$SCRIPTNAME.log"
|
||||
|
||||
APPBASE=""
|
||||
APPNAME=""
|
||||
SVNROOT="svn://anonsvn.kde.org/home/kde"
|
||||
I18NBASE="trunk/l10n"
|
||||
I18NSUB=""
|
||||
I18NDOCSUB=""
|
||||
APP_POFILES=""
|
||||
ADMINDIR="trunk/KDE/kde-common/admin"
|
||||
|
||||
LASTRESULT="0"
|
||||
BUILDDIR="$PWD/build"
|
||||
TARBALLDIR=$BUILDDIR
|
||||
APPVERSION="`date +%d.%m.%y`"
|
||||
GETDOC="yes"
|
||||
GETI18N="yes"
|
||||
SPLIT="no"
|
||||
TOPLEVEL="yes"
|
||||
PLAINCONFIGURE="no"
|
||||
LISTTAGS="no"
|
||||
PACKAGE="no"
|
||||
LANGUAGES=""
|
||||
EXCLUDELANGUAGES="xx"
|
||||
GNUFiles="AUTHORS COPYING ChangeLog INSTALL TODO README README.MacOSX README.cwl kile-remote-control.txt Building-with-cmake.txt"
|
||||
CLEANUPFILES="autom4te.cache Makefile.cvs"
|
||||
POSTPROCESSSCRIPT=""
|
||||
|
||||
SVN_CHECKOUT_OPTIONS=""
|
||||
|
||||
BZIP2="tar jcf"
|
||||
GZIP="tar zcf"
|
||||
}
|
||||
|
||||
####################################################################
|
||||
## ##
|
||||
## Here we start: ##
|
||||
## ##
|
||||
####################################################################
|
||||
|
||||
# Set the default values for options.
|
||||
initVars
|
||||
|
||||
# Process the options given on the command-line.
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-ab|--app-base)
|
||||
testParameter $1 $2
|
||||
APPBASE="$2"
|
||||
shift
|
||||
;;
|
||||
-a|--app)
|
||||
testParameter $1 $2
|
||||
APPNAME="$2"
|
||||
shift
|
||||
;;
|
||||
-d|--svnroot)
|
||||
testParameter $1 $2
|
||||
SVNROOT="$2"
|
||||
shift
|
||||
;;
|
||||
-ib|--i18n-base)
|
||||
testParameter $1 $2
|
||||
I18NBASE="$2"
|
||||
shift
|
||||
;;
|
||||
-is|--i18n-sub)
|
||||
testParameter $1 $2
|
||||
I18NSUB="$2"
|
||||
shift
|
||||
;;
|
||||
-ids|--i18n-docsub)
|
||||
testParameter $1 $2
|
||||
I18NDOCSUB="$2"
|
||||
shift
|
||||
;;
|
||||
--admin)
|
||||
testParameter $1 $2
|
||||
ADMINDIR="$2"
|
||||
shift
|
||||
;;
|
||||
-b|--builddir)
|
||||
testParameter $1 $2
|
||||
BUILDDIR="$2"
|
||||
shift
|
||||
;;
|
||||
-av|--appversion)
|
||||
testParameter $1 $2
|
||||
APPVERSION="$2"
|
||||
shift
|
||||
;;
|
||||
--pofiles)
|
||||
testParameter $1 $2
|
||||
APP_POFILES="$APP_POFILES $2"
|
||||
shift
|
||||
;;
|
||||
--nodoc)
|
||||
GETDOC="no"
|
||||
;;
|
||||
--noi18n)
|
||||
GETI18N="no"
|
||||
;;
|
||||
--split)
|
||||
SPLIT="yes"
|
||||
;;
|
||||
--notoplevel)
|
||||
TOPLEVEL="no"
|
||||
;;
|
||||
--package)
|
||||
PKGTYPE="$2"
|
||||
if [ "$PKGTYPE" = "gzip" ] || [ "$PKGTYPE" = "bzip2" ]
|
||||
then
|
||||
shift
|
||||
PACKAGE="$PKGTYPE"
|
||||
else
|
||||
PACKAGE="yes"
|
||||
fi
|
||||
;;
|
||||
--packagedir)
|
||||
testParameter $1 $2
|
||||
TARBALLDIR=$2
|
||||
shift
|
||||
;;
|
||||
--postprocess)
|
||||
testParameter $1 $2
|
||||
POSTPROCESSSCRIPT=$2
|
||||
shift
|
||||
;;
|
||||
-l|--languages)
|
||||
testParameter $1 $2
|
||||
LANGUAGES="$LANGUAGES $2"
|
||||
shift
|
||||
;;
|
||||
-el|--exclude-languages)
|
||||
testParameter $1 $2
|
||||
EXCLUDELANGUAGES="$EXCLUDELANGUAGES $2"
|
||||
shift
|
||||
;;
|
||||
--logfile)
|
||||
testParameter $1 $2
|
||||
if [ "$2" = "no" ]
|
||||
then
|
||||
LOGFILE=""
|
||||
else
|
||||
if [ "`echo $2 | cut -c1`" = "/" ]
|
||||
then
|
||||
LOGFILE=$2
|
||||
else
|
||||
LOGFILE=$PWD/$2
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
showHelp
|
||||
exit 0
|
||||
;;
|
||||
-v|--version)
|
||||
showVersion
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid parameter $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# process the next parameter
|
||||
shift
|
||||
done
|
||||
|
||||
initBasic
|
||||
|
||||
# Create the builddir, the place where the package will be assembled.
|
||||
# If no builddir is specified is specified "./$APPNAME-build" is used.
|
||||
setupBuildDir
|
||||
|
||||
assembleApplicationData
|
||||
retrieveDocumentation
|
||||
|
||||
retrieveGUITranslations
|
||||
retrieveDocTranslations
|
||||
createTranslationMakefiles
|
||||
createTranslationDirMakefile $BUILDDIR/$TRANSDIR
|
||||
|
||||
postProcessApplicationDir
|
||||
|
||||
packageApplication
|
||||
packageTranslations
|
||||
|
||||
# vim: set et ts=4 sts=4:
|
@ -0,0 +1,2 @@
|
||||
export UNSERMAKE=no
|
||||
./createPackage.sh -ab trunk/extragear/office -a kile --noi18n --admin branches/KDE/3.5/kde-common/admin -av 1.9 --package
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,17 @@
|
||||
Begin3
|
||||
Title: Kile
|
||||
Version: 2.0
|
||||
Description: LaTeX editor for KDE
|
||||
Keywords:
|
||||
Author: Thomas Braun
|
||||
Michel Ludwig
|
||||
Holger Danielsson
|
||||
Jeroen Wijnhout
|
||||
Pascal Brachet
|
||||
Maintained-by: Michel Ludwig <michel.ludwig{at}kdemail.net>
|
||||
Primary-site: http://kile.sourceforge.net/download.php
|
||||
Home-page: http://kile.sourceforge.net
|
||||
Original-site:
|
||||
Platforms: Linux and other Unices
|
||||
Copying-policy: GNU Public License
|
||||
End
|
@ -0,0 +1,97 @@
|
||||
#Configuration Update for Kile
|
||||
#
|
||||
# Kile-1.5
|
||||
#
|
||||
Id=Kile1.5v1
|
||||
File=kilerc
|
||||
RemoveGroup=Structure
|
||||
RemoveGroup=Editor
|
||||
RemoveGroup=Files
|
||||
#
|
||||
# Kile-1.6
|
||||
#
|
||||
Id=Kile1.6v1
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Script=kile1.6_upd.pl,perl
|
||||
#
|
||||
Group=User
|
||||
Key=Template Encoding,TemplateEncoding
|
||||
#
|
||||
Group=Editor Ext
|
||||
Key=Complete Environment,CompleteEnvironment
|
||||
#
|
||||
Group=Complete
|
||||
Key=enabled,CompleteEnabled
|
||||
Key=cursor,CompleteCursor
|
||||
Key=bullets,CompleteBullets
|
||||
Key=closeenv,CompleteCloseEnv
|
||||
Key=autocomplete,CompleteAuto
|
||||
Key=changedlists,CompleteChangedLists
|
||||
Key=tex,CompleteTex
|
||||
Key=dict,CompleteDict
|
||||
Key=abbrev,CompleteAbbrev
|
||||
#
|
||||
Group=Environments
|
||||
Key=list,EnvList
|
||||
Key=math,EnvMath
|
||||
Key=tabular,EnvTabular
|
||||
#
|
||||
Group=Files
|
||||
Key=Last Document,LastDocument
|
||||
Key=Input Encoding,InputEncoding
|
||||
#
|
||||
Group=Quick
|
||||
Key=Class,QuickClass
|
||||
Key=Typeface,QuickTypeface
|
||||
Key=Papersize,QuickPapersize
|
||||
Key=Document Classes,QuickDocumentClasses
|
||||
Key=Papersizes,QuickPapersizes
|
||||
Key=Encodings,QuickEncodings
|
||||
#
|
||||
# Kile-1.7
|
||||
#
|
||||
Id=Kile1.7v1
|
||||
File=kilerc
|
||||
Script=kile1.7_upd.pl,perl
|
||||
#
|
||||
# Kile-1.9
|
||||
#
|
||||
Id=Kile1.9v1
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Script=kile1.9_upd.pl,perl
|
||||
#
|
||||
Id=Kile1.9v2
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Group=Complete
|
||||
Script=kile1.9-1_upd.pl,perl
|
||||
#
|
||||
# Kile-2.0
|
||||
#
|
||||
Id=Kile2.0v1
|
||||
File=kilerc
|
||||
Script=kile2.0-1_upd.pl,perl
|
||||
#
|
||||
Id=Kile2.0v2
|
||||
File=kilerc
|
||||
Script=kile2.0-2_upd.pl,perl
|
||||
#
|
||||
Id=Kile2.0v3
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Group=Complete
|
||||
Script=kile2.0-3_upd.pl,perl
|
||||
#
|
||||
Id=Kile2.0v4
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Group=Complete
|
||||
Script=kile2.0-4_upd.pl,perl
|
||||
#
|
||||
Id=Kile2.0v5
|
||||
File=kilerc
|
||||
Options=overwrite
|
||||
Group=Complete
|
||||
Script=kile2.0-5_upd.pl,perl
|
@ -0,0 +1,162 @@
|
||||
ADD_SUBDIRECTORY( icons )
|
||||
ADD_SUBDIRECTORY( pics )
|
||||
ADD_SUBDIRECTORY( symbols )
|
||||
ADD_SUBDIRECTORY( templates )
|
||||
ADD_SUBDIRECTORY( syntax )
|
||||
ADD_SUBDIRECTORY( complete )
|
||||
ADD_SUBDIRECTORY( help )
|
||||
ADD_SUBDIRECTORY( encodings )
|
||||
ADD_SUBDIRECTORY( test )
|
||||
|
||||
INCLUDE( KDE3Macros )
|
||||
INCLUDE( FindPerl )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
|
||||
|
||||
########### next target ###############
|
||||
|
||||
|
||||
# taken from KDE4's KJS CMakeLists.txt file
|
||||
|
||||
SET(CREATE_HASH_TABLE ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table )
|
||||
|
||||
MACRO(CREATE_LUT _srcs_LIST _in_FILE _out_FILE _dep_FILE)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_out_FILE}
|
||||
COMMAND ${PERL_EXECUTABLE} ${CREATE_HASH_TABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_in_FILE} > ${CMAKE_CURRENT_BINARY_DIR}/${_out_FILE}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_in_FILE} )
|
||||
SET( ${_srcs_LIST} ${${_srcs_LIST}} ${CMAKE_CURRENT_BINARY_DIR}/${_out_FILE})
|
||||
ENDMACRO(CREATE_LUT)
|
||||
|
||||
CREATE_LUT(kile_SRCS kilejscript.cpp kilejscript.lut.h kilejscript.cpp)
|
||||
|
||||
SET(kile_SRCS
|
||||
${kile_SRCS}
|
||||
latexcmd.cpp
|
||||
latexcmddialog.cpp
|
||||
texdocdialog.cpp
|
||||
userhelp.cpp
|
||||
userhelpdialog.cpp
|
||||
floatdialog.cpp
|
||||
mathenvdialog.cpp
|
||||
tabulardialog.cpp
|
||||
postscriptdialog.cpp
|
||||
previewconfigwidget.cpp
|
||||
quickpreview.cpp
|
||||
includegraphicsdialog.cpp
|
||||
newfilewizard.cpp
|
||||
managetemplatesdialog.cpp
|
||||
templates.cpp
|
||||
usermenudialog.cpp
|
||||
kileconfigdialog.cpp
|
||||
tabbingdialog.cpp
|
||||
symbolview.cpp
|
||||
quickdocumentdialog.cpp
|
||||
kilefileselect.cpp
|
||||
kileapplication.cpp
|
||||
docpart.cpp
|
||||
kile.cpp
|
||||
main.cpp
|
||||
kileactions.cpp
|
||||
kilestdactions.cpp
|
||||
kileinfo.cpp
|
||||
kiledocumentinfo.cpp
|
||||
kileproject.cpp
|
||||
kileprojectdlgs.cpp
|
||||
kileprojectview.cpp
|
||||
kilelistselector.cpp
|
||||
kilelyxserver.cpp
|
||||
latexoutputfilter.cpp
|
||||
outputinfo.cpp
|
||||
latexoutputinfo.cpp
|
||||
outputfilter.cpp
|
||||
kilegrepdialog.cpp
|
||||
kiletool.cpp
|
||||
kilelauncher.cpp
|
||||
kiletoolmanager.cpp
|
||||
kilestdtools.cpp
|
||||
kilelogwidget.cpp
|
||||
kileoutputwidget.cpp
|
||||
kilekonsolewidget.cpp
|
||||
kilewizard.cpp
|
||||
kilestructurewidget.cpp
|
||||
codecompletion.cpp
|
||||
configcodecompletion.cpp
|
||||
kiletoolconfigwidget.cpp
|
||||
kileedit.cpp
|
||||
cleandialog.cpp
|
||||
kilehelp.cpp
|
||||
configstructure.cpp
|
||||
convert.cpp
|
||||
kiledocmanager.cpp
|
||||
kileviewmanager.cpp
|
||||
kileeventfilter.cpp
|
||||
kileerrorhandler.cpp
|
||||
configcheckerdlg.cpp
|
||||
configtester.cpp
|
||||
kilesidebar.cpp
|
||||
plaintolatexconverter.cpp
|
||||
kileuntitled.cpp
|
||||
kilestatsdlg.cpp
|
||||
kilestatswidget.cpp
|
||||
previewwidget.cpp
|
||||
kilejscript.h
|
||||
kilejscript.cpp
|
||||
scriptsmanagementwidget.h
|
||||
scriptsmanagementwidget.cpp
|
||||
editorkeysequencemanager.h
|
||||
editorkeysequencemanager.cpp
|
||||
kileversion.cpp
|
||||
kileabbrevview.cpp
|
||||
kileextensions.cpp
|
||||
kilemultitabbar.cpp
|
||||
)
|
||||
|
||||
KDE3_AUTOMOC(${kile_SRCS})
|
||||
|
||||
SET( kile_UI
|
||||
helpconfigwidget.ui
|
||||
latexconfigwidget.ui
|
||||
generalconfigwidget.ui
|
||||
configcheckerwidget.ui
|
||||
toolconfigwidget.ui
|
||||
librarytoolconfigwidget.ui
|
||||
processtoolconfigwidget.ui
|
||||
quicktoolconfigwidget.ui
|
||||
latextoolconfigwidget.ui
|
||||
newtoolwizard.ui
|
||||
envconfigwidget.ui
|
||||
structureconfigwidget.ui
|
||||
symbolviewconfig.ui
|
||||
scriptingconfigwidget.ui
|
||||
graphicsconfigwidget.ui
|
||||
newdocumentwidget.ui
|
||||
)
|
||||
|
||||
KDE3_ADD_UI_FILES(kile_SRCS ${kile_UI} )
|
||||
|
||||
SET( kile_DCOP_SKEL_SRCS
|
||||
kileappIface.h
|
||||
)
|
||||
|
||||
KDE3_ADD_DCOP_SKELS(kile_SRCS ${kile_DCOP_SKEL_SRCS})
|
||||
|
||||
SET( kile_KCFG_SRCS
|
||||
kileconfig.kcfgc
|
||||
)
|
||||
|
||||
KDE3_ADD_KCFG_FILES(kile_SRCS ${kile_KCFG_SRCS})
|
||||
|
||||
KDE3_ADD_EXECUTABLE(kile ${kile_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(kile ${QT_AND_KDECORE_LIBS} kjs kdeprint ktexteditor katepartinterfaces khtml )
|
||||
|
||||
INSTALL( TARGETS kile DESTINATION bin )
|
||||
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES kile.desktop DESTINATION share/applications/kde )
|
||||
INSTALL( FILES kile.kcfg DESTINATION share/config.kcfg )
|
||||
INSTALL( FILES kileui.rc docpartui.rc kilestdtools.rc tips DESTINATION share/apps/kile )
|
||||
|
||||
KDE3_INSTALL_ICONS( hicolor )
|
@ -0,0 +1,116 @@
|
||||
####### kdevelop will overwrite this part!!! (begin)##########
|
||||
bin_PROGRAMS = kile
|
||||
|
||||
## INCLUDES were found outside kdevelop specific part
|
||||
|
||||
|
||||
kile_SOURCES = latexcmd.cpp latexcmddialog.cpp texdocdialog.cpp userhelp.cpp \
|
||||
userhelpdialog.cpp floatdialog.cpp mathenvdialog.cpp tabulardialog.cpp \
|
||||
postscriptdialog.cpp previewconfigwidget.cpp quickpreview.cpp includegraphicsdialog.cpp \
|
||||
newfilewizard.cpp managetemplatesdialog.cpp templates.cpp usermenudialog.cpp \
|
||||
kileconfigdialog.cpp tabbingdialog.cpp symbolview.cpp quickdocumentdialog.cpp \
|
||||
kilefileselect.cpp kileapplication.cpp docpart.cpp kile.cpp main.cpp kileactions.cpp \
|
||||
kilestdactions.cpp kileinfo.cpp kiledocumentinfo.cpp kileproject.cpp kileprojectdlgs.cpp \
|
||||
kileprojectview.cpp kilelistselector.cpp kilelyxserver.cpp latexoutputfilter.cpp \
|
||||
outputinfo.cpp latexoutputinfo.cpp outputfilter.cpp kilegrepdialog.cpp kiletool.cpp \
|
||||
kilelauncher.cpp kiletoolmanager.cpp kilestdtools.cpp kilelogwidget.cpp \
|
||||
kileoutputwidget.cpp kilekonsolewidget.cpp kilewizard.cpp kilestructurewidget.cpp \
|
||||
codecompletion.cpp configcodecompletion.cpp kiletoolconfigwidget.cpp kileedit.cpp \
|
||||
cleandialog.cpp kilehelp.cpp configstructure.cpp kileappIface.skel convert.cpp \
|
||||
helpconfigwidget.ui kiledocmanager.cpp kileviewmanager.cpp kileeventfilter.cpp \
|
||||
latexconfigwidget.ui kileconfig.kcfgc generalconfigwidget.ui kileerrorhandler.cpp \
|
||||
configcheckerdlg.cpp configcheckerwidget.ui configtester.cpp kilesidebar.cpp \
|
||||
toolconfigwidget.ui librarytoolconfigwidget.ui processtoolconfigwidget.ui \
|
||||
quicktoolconfigwidget.ui plaintolatexconverter.cpp latextoolconfigwidget.ui newtoolwizard.ui \
|
||||
kileuntitled.cpp kilestatsdlg.cpp kilestatswidget.cpp envconfigwidget.ui \
|
||||
structureconfigwidget.ui previewwidget.cpp kilejscript.h kilejscript.cpp \
|
||||
scriptsmanagementwidget.h scriptsmanagementwidget.cpp editorkeysequencemanager.h \
|
||||
editorkeysequencemanager.cpp scriptingconfigwidget.ui kileabbrevview.cpp kileextensions.cpp \
|
||||
kileversion.cpp graphicsconfigwidget.ui kilemultitabbar.cpp newdocumentwidget.ui\
|
||||
symbolviewconfig.ui
|
||||
|
||||
kile_LDADD = -lkjs -lkdeprint -lktexteditor -lkatepartinterfaces $(LIB_KSPELL) $(LIB_KHTML)
|
||||
|
||||
SUBDIRS = icons pics symbols templates syntax complete help encodings test
|
||||
|
||||
EXTRA_DIST = main.cpp kile.cpp kile.h \
|
||||
docpart.cpp docpart.h kileappIface.h kileapplication.cpp kileapplication.h kile.desktop kilefileselect.cpp kilefileselect.h kileui.rc docpartui.rc kmultiverttabbar.cpp kmultiverttabbar.h letterdialog.cpp letterdialog.h quickdocumentdialog.cpp quickdocumentdialog.h symbolview.cpp symbolview.h tabbingdialog.cpp tabbingdialog.h \
|
||||
kileconfigdialog.cpp kileconfigdialog.h usermenudialog.cpp \
|
||||
usermenudialog.h kileabbrevview.cpp kileabbrevview.h \
|
||||
newfilewizard.cpp newfilewizard.h templates.cpp templates.h managetemplatesdialog.cpp \
|
||||
managetemplatesdialog.h kileinfo.h kileinfo.cpp kilestdactions.cpp \
|
||||
kilestdactions.h kileproject.h kileproject.cpp kileprojectdlgs.cpp \
|
||||
kileprojectdlgs.h kileprojectview.cpp kileprojectview.h \
|
||||
kilelistselector.cpp kilelistselector.h kilelyxserver.cpp kilelyxserver.h \
|
||||
latexoutputfilter.cpp outputinfo.cpp latexoutputinfo.cpp \
|
||||
outputfilter.cpp latexoutputfilter.h outputinfo.h latexoutputinfo.h \
|
||||
includegraphicsdialog.h includegraphicsdialog.cpp kiletoolconfigwidget.cpp kiletoolconfigwidget.h outputfilter.h kilegrepdialog.cpp kilegrepdialog.h codecompletion.h codecompletion.cpp configcodecompletion.cpp configcodecompletion.h kileedit.cpp cleandialog.cpp kileedit.h cleandialog.h kilehelp.cpp kilehelp.h configstructure.cpp configstructure.h configenvironment.h convert.h convert.cpp \
|
||||
kileconstants.h kilejscript.h kilejscript.cpp scriptsmanagementwidget.h scriptsmanagementwidget.cpp editorkeysequencemanager.h editorkeysequencemanager.cpp kilemultitabbar.cpp kilemultitabbar.h kilemultitabbar_p.h
|
||||
|
||||
xdg_apps_DATA = kile.desktop
|
||||
|
||||
kde_kcfg_DATA = kile.kcfg
|
||||
|
||||
KDE_ICON = AUTO
|
||||
|
||||
####### kdevelop will overwrite this part!!! (end)############
|
||||
# These paths are KDE specific. Use them:
|
||||
# kde_appsdir Where your application's menu entry (.desktop) should go to.
|
||||
# kde_icondir Where your icon should go to - better use KDE_ICON.
|
||||
# kde_sounddir Where your sounds should go to.
|
||||
# kde_htmldir Where your docs should go to. (contains lang subdirs)
|
||||
# kde_datadir Where you install application data. (Use a subdir)
|
||||
# kde_locale Where translation files should go to. (contains lang subdirs)
|
||||
# kde_cgidir Where cgi-bin executables should go to.
|
||||
# kde_confdir Where config files should go to (system-wide ones with default values).
|
||||
# kde_mimedir Where mimetypes .desktop files should go to.
|
||||
# kde_servicesdir Where services .desktop files should go to.
|
||||
# kde_servicetypesdir Where servicetypes .desktop files should go to.
|
||||
# kde_toolbardir Where general toolbar icons should go to (deprecated, use KDE_ICON).
|
||||
# kde_wallpaperdir Where general wallpapers should go to.
|
||||
# kde_templatesdir Where templates for the "New" menu (Konqueror/KDesktop) should go to.
|
||||
# kde_bindir Where executables should go to. Use bin_PROGRAMS or bin_SCRIPTS.
|
||||
# kde_libdir Where shared libraries should go to. Use lib_LTLIBRARIES.
|
||||
# kde_moduledir Where modules (e.g. parts) should go to. Use kde_module_LTLIBRARIES.
|
||||
# kde_styledir Where Qt/KDE widget styles should go to (new in KDE 3).
|
||||
# kde_designerdir Where Qt Designer plugins should go to (new in KDE 3).
|
||||
|
||||
# set the include path for X, qt and KDE
|
||||
INCLUDES = $(all_includes)
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
# the library search path.
|
||||
kile_LDFLAGS = $(all_libraries) $(KDE_RPATH)
|
||||
|
||||
rcdir = $(kde_datadir)/kile
|
||||
rc_DATA = kileui.rc docpartui.rc kilestdtools.rc tips
|
||||
|
||||
messages: rc.cpp
|
||||
$(PREPARETIPS) > tips.txt
|
||||
LIST=`find . -name \*.h -o -name \*.txt -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
|
||||
if test -n "$$LIST"; then \
|
||||
$(XGETTEXT) $$LIST -o $(podir)/kile.pot; \
|
||||
fi
|
||||
rm -f tips.txt
|
||||
|
||||
syntaxdir = $(kde_appsdir)/katepart/syntax
|
||||
noinst_HEADERS = kilestatsdlg.h configcheckerdlg.h configtester.h convert.h \
|
||||
envconfigwidget.h kileconstants.h kiledebug.h kiledocmanager.h kileerrorhandler.h \
|
||||
kileeventfilter.h kilekonsolewidget.h kilelauncher.h kilelogwidget.h kilemultitabbar.h \
|
||||
kilemultitabbar_p.h kileoutputwidget.h kilesidebar.h kilestatswidget.h kilestdtools.h \
|
||||
kilestructurewidget.h kiletool.h kiletool_enums.h kiletoolmanager.h kileuntitled.h \
|
||||
kileversion.h kileviewmanager.h kilewizard.h latexconfigwidget.h \
|
||||
plaintolatexconverter.h structureconfigwidget.h
|
||||
|
||||
CREATE_HASH_TABLE = $(srcdir)/create_hash_table
|
||||
|
||||
kilejscript.lut.h : $(srcdir)/kilejscript.cpp $(CREATE_HASH_TABLE)
|
||||
$(PERL) $(CREATE_HASH_TABLE) $(srcdir)/kilejscript.cpp > $@
|
||||
kilejscript.lo: kilejscript.lut.h
|
||||
|
||||
kilejscript.o: kilejscript.lut.h
|
||||
|
||||
LUT_FILES = kilejscript.lut.h
|
||||
|
||||
CLEANFILES = $(LUT_FILES)
|
@ -0,0 +1,96 @@
|
||||
/***************************************************************************
|
||||
date : Jan 22 2004
|
||||
version : 0.10
|
||||
copyright : (C) 2004 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "cleandialog.h"
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kpushbutton.h>
|
||||
#include <klistview.h>
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
Clean::Clean(QWidget *parent, const QString & filename, const QStringList & extlist) :
|
||||
KDialogBase( KDialogBase::Plain, i18n("Delete Files"), Ok | Cancel, Ok, parent, 0, true, true),
|
||||
m_extlist(extlist)
|
||||
{
|
||||
// Layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout(plainPage(), 6,6 );
|
||||
|
||||
// label widgets
|
||||
QWidget *labelwidget = new QWidget(plainPage());
|
||||
QHBoxLayout *labellayout = new QHBoxLayout(labelwidget);
|
||||
|
||||
// line 1: picture and label
|
||||
QLabel *picture = new QLabel("", labelwidget);
|
||||
picture->setPixmap( KGlobal::instance()->iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium) );
|
||||
QLabel *label = new QLabel(i18n( "Do you really want to delete these files?" ), labelwidget);
|
||||
labellayout->addWidget(picture);
|
||||
labellayout->addSpacing(20);
|
||||
labellayout->addWidget(label);
|
||||
|
||||
// line 2: listview
|
||||
listview = new KListView(plainPage());
|
||||
listview->addColumn(i18n("Files"));
|
||||
listview->setSorting(-1);
|
||||
|
||||
// insert items into listview
|
||||
QString base = QFileInfo(filename).baseName(true);
|
||||
for (uint i=0; i < m_extlist.count(); ++i)
|
||||
{
|
||||
QCheckListItem *item = new QCheckListItem(listview, base + m_extlist[i], QCheckListItem::CheckBox);
|
||||
item->setOn(true);
|
||||
listview->insertItem(item);
|
||||
}
|
||||
|
||||
vbox->addWidget(labelwidget,0,Qt::AlignHCenter);
|
||||
vbox->addWidget(listview);
|
||||
}
|
||||
|
||||
Clean::~Clean()
|
||||
{}
|
||||
|
||||
// get all selected items
|
||||
|
||||
const QStringList & Clean::getCleanlist()
|
||||
{
|
||||
QStringList templist;
|
||||
|
||||
QCheckListItem *item = (QCheckListItem *)listview->firstChild();
|
||||
int i = m_extlist.count() - 1;
|
||||
while ( item )
|
||||
{
|
||||
if ( item->isOn() && item->text(0).endsWith(m_extlist[i]) )
|
||||
templist.append(m_extlist[i]);
|
||||
|
||||
item = (QCheckListItem *)item->nextSibling();
|
||||
--i;
|
||||
}
|
||||
|
||||
m_extlist = templist;
|
||||
return m_extlist;
|
||||
}
|
||||
}
|
||||
|
||||
#include "cleandialog.moc"
|
||||
|
@ -0,0 +1,46 @@
|
||||
/***************************************************************************
|
||||
date : Jan 22 2004
|
||||
version : 0.10
|
||||
copyright : (C) 2004 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CLEANDIALOG_H
|
||||
#define CLEANDIALOG_H
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
class KListView;
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
class Clean : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Clean(QWidget *parent, const QString & filename, const QStringList &extlist);
|
||||
~Clean();
|
||||
const QStringList & getCleanlist();
|
||||
|
||||
private:
|
||||
KListView *listview;
|
||||
QStringList m_extlist;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,211 @@
|
||||
/***************************************************************************
|
||||
date : Mar 21 2007
|
||||
version : 0.40
|
||||
copyright : (C) 2004-2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CODECOMPLETION_H
|
||||
#define CODECOMPLETION_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include <kate/view.h>
|
||||
#include <kate/document.h>
|
||||
#include <ktexteditor/codecompletioninterface.h>
|
||||
#include <kconfig.h>
|
||||
|
||||
#include "latexcmd.h"
|
||||
#include "kileabbrevview.h"
|
||||
|
||||
//default bullet char (a cross)
|
||||
static const QChar s_bullet_char = QChar(0xd7);
|
||||
static const QString s_bullet = QString(&s_bullet_char, 1);
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
class QTimer;
|
||||
|
||||
class KileInfo;
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
//FIXME fix the way the Kate::View is passed, I'm not 100% confident m_view doesn't turn into a wild pointer
|
||||
//FIXME refactor the complete class, it's pretty ugly, there are too many methods with similar names suggesting that the code could be more efficient
|
||||
class CodeCompletion : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CodeCompletion(KileInfo *ki);
|
||||
~CodeCompletion();
|
||||
|
||||
enum Mode
|
||||
{
|
||||
cmLatex,
|
||||
cmEnvironment,
|
||||
cmDictionary,
|
||||
cmAbbreviation,
|
||||
cmLabel,
|
||||
cmDocumentWord
|
||||
};
|
||||
|
||||
enum Type
|
||||
{
|
||||
ctNone,
|
||||
ctReference,
|
||||
ctCitation
|
||||
};
|
||||
|
||||
enum KateConfigFlags
|
||||
{
|
||||
cfAutoIndent= 0x1,
|
||||
cfAutoBrackets= 0x40
|
||||
};
|
||||
|
||||
bool isActive();
|
||||
bool inProgress();
|
||||
bool autoComplete();
|
||||
CodeCompletion::Mode getMode();
|
||||
CodeCompletion::Type getType();
|
||||
CodeCompletion::Type getType(const QString &text);
|
||||
|
||||
KileInfo* info() const { return m_ki;}
|
||||
|
||||
void readConfig(KConfig *config);
|
||||
void readKateConfigFlags(KConfig *config);
|
||||
void saveLocalChanges();
|
||||
|
||||
void setAbbreviationListview(KileAbbrevView *listview);
|
||||
|
||||
public slots:
|
||||
//in these two methods we should set m_view
|
||||
void slotCharactersInserted(int, int, const QString&);
|
||||
void editComplete(Kate::View *view, KileDocument::CodeCompletion::Mode mode);
|
||||
|
||||
void slotCompletionDone(KTextEditor::CompletionEntry);
|
||||
void slotCompleteValueList();
|
||||
void slotCompletionAborted();
|
||||
|
||||
void slotFilterCompletion(KTextEditor::CompletionEntry* c,QString *s);
|
||||
|
||||
// a abbreviation was modified ind the abbreviation view (add, edit or delete)
|
||||
// so the abbreviation list was must also be updated
|
||||
void slotUpdateAbbrevList(const QString &ds, const QString &as);
|
||||
|
||||
private:
|
||||
void completeWord(const QString &text, CodeCompletion::Mode mode);
|
||||
QString filterCompletionText(const QString &text, const QString &type);
|
||||
|
||||
void CompletionDone(KTextEditor::CompletionEntry);
|
||||
void CompletionAborted();
|
||||
|
||||
void completeFromList(const QStringList *list,const QString &pattern=QString::null);
|
||||
void editCompleteList(KileDocument::CodeCompletion::Type type,const QString &pattern=QString::null);
|
||||
bool getCompleteWord(bool latexmode, QString &text, KileDocument::CodeCompletion::Type &type);
|
||||
bool getReferenceWord(QString &text);
|
||||
bool oddBackslashes(const QString& text, int index);
|
||||
|
||||
void appendNewCommands(QValueList<KTextEditor::CompletionEntry> & list);
|
||||
void getDocumentWords(const QString &text,QValueList<KTextEditor::CompletionEntry> &list);
|
||||
|
||||
bool completeAutoAbbreviation(const QString &text);
|
||||
QString getAbbreviationWord(uint row, uint col);
|
||||
|
||||
CodeCompletion::Type insideReference(QString &startpattern);
|
||||
|
||||
private:
|
||||
// wordlists
|
||||
QValueList<KTextEditor::CompletionEntry> m_texlist;
|
||||
QValueList<KTextEditor::CompletionEntry> m_dictlist;
|
||||
QValueList<KTextEditor::CompletionEntry> m_abbrevlist;
|
||||
QValueList<KTextEditor::CompletionEntry> m_labellist;
|
||||
|
||||
KileInfo *m_ki;
|
||||
QTimer *m_completeTimer;
|
||||
|
||||
// some flags
|
||||
bool m_isenabled;
|
||||
bool m_setcursor;
|
||||
bool m_setbullets;
|
||||
bool m_closeenv;
|
||||
bool m_autocomplete;
|
||||
bool m_autocompletetext;
|
||||
bool m_autocompleteabbrev;
|
||||
bool m_citationMove;
|
||||
bool m_autoDollar;
|
||||
int m_latexthreshold;
|
||||
int m_textthreshold;
|
||||
|
||||
// flags from Kate configuration
|
||||
bool m_autobrackets;
|
||||
bool m_autoindent;
|
||||
|
||||
// state of complete: some flags
|
||||
bool m_firstconfig;
|
||||
bool m_inprogress;
|
||||
bool m_ref;
|
||||
bool m_kilecompletion;
|
||||
|
||||
// undo text
|
||||
bool m_undo;
|
||||
|
||||
// special types: ref, bib
|
||||
CodeCompletion::Type m_type;
|
||||
CodeCompletion::Type m_keylistType;
|
||||
|
||||
// local abbreviation
|
||||
QString m_localAbbrevFile;
|
||||
KileAbbrevView *m_abbrevListview;
|
||||
|
||||
// internal parameter
|
||||
Kate::View *m_view; // View
|
||||
QString m_text; // current pattern
|
||||
uint m_textlen; // length of current pattern
|
||||
CodeCompletion::Mode m_mode; // completion mode
|
||||
uint m_ycursor,m_xcursor,m_xstart; // current cursor position
|
||||
uint m_yoffset,m_xoffset; // offset of the new cursor position
|
||||
|
||||
QString buildLatexText(const QString &text, uint &ypos, uint &xpos);
|
||||
QString buildEnvironmentText(const QString &text, const QString &type, const QString &prefix, uint &ypos, uint &xpos);
|
||||
QString getWhiteSpace(const QString &s);
|
||||
QString buildAbbreviationText(const QString &text);
|
||||
QString buildLabelText(const QString &text);
|
||||
|
||||
QString parseText(const QString &text, uint &ypos, uint &xpos, bool checkgroup);
|
||||
QString stripParameter(const QString &text);
|
||||
|
||||
void setWordlist(const QStringList &files,const QString &dir, QValueList<KTextEditor::CompletionEntry> *entrylist);
|
||||
void readWordlist(QStringList &wordlist, const QString &filename, bool global);
|
||||
void addCommandsToTexlist(QStringList &wordlist);
|
||||
|
||||
void setReferences();
|
||||
QString getCommandList(KileDocument::CmdAttribute attrtype);
|
||||
|
||||
void setCompletionEntries(QValueList<KTextEditor::CompletionEntry> *list, const QStringList &wordlist);
|
||||
void setCompletionEntriesTexmode(QValueList<KTextEditor::CompletionEntry> *list, const QStringList &wordlist);
|
||||
|
||||
uint countEntries(const QString &pattern, QValueList<KTextEditor::CompletionEntry> *list, QString *entry, QString *type);
|
||||
|
||||
void addAbbreviationEntry( const QString &entry );
|
||||
void deleteAbbreviationEntry( const QString &entry );
|
||||
QString findExpansion(const QString &abbrev);
|
||||
|
||||
void autoInsertDollar();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,3 @@
|
||||
ADD_SUBDIRECTORY( abbreviation )
|
||||
ADD_SUBDIRECTORY( tex )
|
||||
ADD_SUBDIRECTORY( dictionary )
|
@ -0,0 +1 @@
|
||||
SUBDIRS=abbreviation tex dictionary
|
@ -0,0 +1,4 @@
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES example.cwl DESTINATION share/apps/kile/complete/abbreviation )
|
@ -0,0 +1,2 @@
|
||||
abbcompletedir = $(kde_datadir)/kile/complete/abbreviation
|
||||
abbcomplete_DATA = example.cwl
|
@ -0,0 +1,14 @@
|
||||
# abbreviation mode: example
|
||||
# dani/8.1.2004
|
||||
ba=baseline
|
||||
bab=babel package
|
||||
bar=baselineskip rubber length
|
||||
bdc=book document class
|
||||
bi=bibliography styles
|
||||
bip=bibliography style parameters
|
||||
bs=\backslash
|
||||
cc=\textsc{CodeCompletion}
|
||||
kile=KDE integrated LaTeX editor
|
||||
x=\
|
||||
T=\TeX
|
||||
L=\LaTeX
|
@ -0,0 +1,4 @@
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES example.cwl metapost.cwl DESTINATION share/apps/kile/complete/dictionary )
|
@ -0,0 +1,2 @@
|
||||
dictcompletedir = $(kde_datadir)/kile/complete/dictionary
|
||||
dictcomplete_DATA = example.cwl metapost.cwl
|
@ -0,0 +1,12 @@
|
||||
# dictionary mode: example
|
||||
# dani/8.1.2004
|
||||
afterpage
|
||||
align environment
|
||||
aligned environment
|
||||
alltt
|
||||
amsbook
|
||||
amsfonts
|
||||
annotate
|
||||
annotation
|
||||
arabic
|
||||
array environment
|
@ -0,0 +1,307 @@
|
||||
# replacement for the removed metapost view
|
||||
# 11.02.2007 tbraun
|
||||
|
||||
beginfig();
|
||||
endfig;
|
||||
extra_beginfig()
|
||||
extra_endfig
|
||||
begingraph()
|
||||
endgraph
|
||||
begingroup
|
||||
endgroup
|
||||
for upto
|
||||
forever:
|
||||
forsuffixes :
|
||||
endfor
|
||||
if :
|
||||
else :
|
||||
fi
|
||||
abs
|
||||
addto also
|
||||
addto contour
|
||||
addto doublepath
|
||||
ahangle
|
||||
ahlength
|
||||
and
|
||||
angle
|
||||
arclength
|
||||
arctime of
|
||||
augment.
|
||||
auto.
|
||||
Autoform
|
||||
autogrid()
|
||||
background
|
||||
bbox
|
||||
bboxmargin
|
||||
beveled
|
||||
black
|
||||
blue
|
||||
bluepart
|
||||
boolean
|
||||
bot
|
||||
boxit
|
||||
boxjoin()
|
||||
bp
|
||||
bpath
|
||||
btex etex
|
||||
buildcycle()
|
||||
butt
|
||||
ceiling
|
||||
char
|
||||
charcode
|
||||
circleit
|
||||
circmargin
|
||||
clip
|
||||
color
|
||||
controls
|
||||
cosd
|
||||
curl
|
||||
currentpen
|
||||
currentpicture
|
||||
cutafter
|
||||
cutbefore
|
||||
cutdraw
|
||||
cycle
|
||||
dashed
|
||||
dashpattern
|
||||
day
|
||||
dd
|
||||
decimal
|
||||
decr
|
||||
defaultdx:=
|
||||
defaultdy:=
|
||||
defaultfont:=
|
||||
defaultpen:=
|
||||
defaultscale:=
|
||||
def enddef
|
||||
direction of
|
||||
directionpoint of
|
||||
directiontime of
|
||||
ditto
|
||||
div
|
||||
dotlabel.
|
||||
dotlabels.
|
||||
dotprod
|
||||
down
|
||||
downto
|
||||
draw
|
||||
draw_mark()
|
||||
draw_marked()
|
||||
drawarrow
|
||||
drawblarrow
|
||||
drawboxed()
|
||||
drawboxes()
|
||||
drawoptions()
|
||||
drawshadowed()
|
||||
drawunboxed()
|
||||
epsilon
|
||||
evenly
|
||||
exitif
|
||||
exitunless
|
||||
expr
|
||||
Fe_base
|
||||
Fe_plus
|
||||
fill
|
||||
filldraw
|
||||
fixpos()
|
||||
fixsize()
|
||||
floor
|
||||
fontsize
|
||||
format()
|
||||
frame.
|
||||
fullcircle
|
||||
gdata()
|
||||
gdotlabel.
|
||||
gdraw
|
||||
gdrawarrow
|
||||
gdrawdblarrow
|
||||
getmid
|
||||
gfill
|
||||
glabel.
|
||||
Gmarks
|
||||
Gminlog
|
||||
Gpaths
|
||||
green
|
||||
greenpart
|
||||
grid.
|
||||
halfcircle
|
||||
hex
|
||||
hide()
|
||||
identity
|
||||
image()
|
||||
in
|
||||
incr()
|
||||
infinity
|
||||
infont
|
||||
init_numbers()
|
||||
input
|
||||
interim
|
||||
intersectionpoint
|
||||
intersectiontimes
|
||||
inverse
|
||||
itick.
|
||||
joinup()
|
||||
known
|
||||
label.
|
||||
labeloffset
|
||||
labels.
|
||||
left
|
||||
length
|
||||
let
|
||||
lft
|
||||
linear
|
||||
linecap:=
|
||||
linejoin:=
|
||||
llcorner
|
||||
llft
|
||||
log
|
||||
loggingall
|
||||
lrcorner
|
||||
lrt
|
||||
makepath
|
||||
makepen
|
||||
mark_angle()
|
||||
mark_rt_angle()
|
||||
max
|
||||
mexp
|
||||
mfplain
|
||||
middlepoint()
|
||||
midpoint()
|
||||
min
|
||||
mitered
|
||||
miterlimit:=
|
||||
Mlog
|
||||
mlog
|
||||
mm
|
||||
mod
|
||||
month
|
||||
mp
|
||||
mpxbreak
|
||||
Mreadpath()
|
||||
Mten
|
||||
newinternal
|
||||
normaldeviate
|
||||
not
|
||||
nullpicture
|
||||
numeric
|
||||
oct
|
||||
odd
|
||||
or
|
||||
origin
|
||||
otick.
|
||||
OUT
|
||||
pair
|
||||
path
|
||||
pausing
|
||||
pc
|
||||
pen
|
||||
pencircle
|
||||
penoffset
|
||||
pensquare
|
||||
pic
|
||||
pickup
|
||||
picture
|
||||
plot
|
||||
point of
|
||||
postcontrol
|
||||
precontrol
|
||||
primarydef enddef
|
||||
pt
|
||||
quartecircle
|
||||
readfrom
|
||||
red
|
||||
redpart
|
||||
reflectedabout()
|
||||
reverse
|
||||
right
|
||||
rotated
|
||||
rotatedaround()
|
||||
round
|
||||
rounded
|
||||
rt
|
||||
Sabs
|
||||
Sadd
|
||||
sarith
|
||||
save
|
||||
scaled
|
||||
Scvnum
|
||||
Sdiv
|
||||
secondarydef enddef
|
||||
self
|
||||
setbounds to
|
||||
setcoords()
|
||||
setrange()
|
||||
shifted
|
||||
shipout
|
||||
show
|
||||
showdependencies
|
||||
showstopping
|
||||
showtoken
|
||||
showvariable
|
||||
sind
|
||||
slanted
|
||||
Sleq
|
||||
Smul
|
||||
Sneq
|
||||
special
|
||||
sqrt
|
||||
squared
|
||||
Ssub
|
||||
step
|
||||
str
|
||||
string
|
||||
stroked
|
||||
subpath
|
||||
substring
|
||||
tertiarydef enddef
|
||||
text
|
||||
thelabel.
|
||||
time
|
||||
top
|
||||
tracingall
|
||||
tracingcapsules
|
||||
tracingchoices
|
||||
tracingcommands
|
||||
tracingequations
|
||||
tracinglostchars
|
||||
tracingmacros
|
||||
tracingnone
|
||||
tracingonline
|
||||
tracingoutput
|
||||
tracingrestores
|
||||
tracingspecs
|
||||
tracingstats
|
||||
tracingtitles
|
||||
transform
|
||||
transformed
|
||||
true
|
||||
truecorners:=
|
||||
ulcorner
|
||||
ulft
|
||||
undraw
|
||||
unfill
|
||||
unfilldraw
|
||||
uniformdeviate
|
||||
unitsquare
|
||||
unitvector
|
||||
unknown
|
||||
until
|
||||
up
|
||||
urcorner
|
||||
urt
|
||||
vardef enddef
|
||||
whatever[]
|
||||
white
|
||||
withcolor
|
||||
withdots
|
||||
withpen
|
||||
write to
|
||||
xpart
|
||||
xscaled
|
||||
xxpart
|
||||
xypart
|
||||
year
|
||||
yscaled
|
||||
yxpart
|
||||
yypart
|
||||
zscaled
|
@ -0,0 +1,100 @@
|
||||
|
||||
########### install files ###############
|
||||
# get this cwl list with "for i in `ls *.cwl -1`; do echo "$i"; done"
|
||||
SET(kile_texCompleteFiles
|
||||
acronym.cwl
|
||||
amsopn.cwl
|
||||
afterpage.cwl
|
||||
amsbsy.cwl
|
||||
amsfonts.cwl
|
||||
amsmath.cwl
|
||||
amssymb.cwl
|
||||
amsthm.cwl
|
||||
array.cwl
|
||||
attachfile.cwl
|
||||
beamerfoils.cwl
|
||||
beamerprosper.cwl
|
||||
beamerseminar.cwl
|
||||
beamertexpower.cwl
|
||||
booktabs.cwl
|
||||
braket.cwl
|
||||
calc.cwl
|
||||
class-beamer.cwl
|
||||
class-letter.cwl
|
||||
class-scrartcl,scrreprt,scrbook.cwl
|
||||
class-scrlttr2.cwl
|
||||
color.cwl
|
||||
colortbl.cwl
|
||||
coordsys.cwl
|
||||
currvita.cwl
|
||||
cyrillic.cwl
|
||||
diagxy.cwl
|
||||
doi.cwl
|
||||
enumerate.cwl
|
||||
fancybox.cwl
|
||||
fancyhdr.cwl
|
||||
fancyunits-base.cwl
|
||||
fancyunits_big-fractions.cwl
|
||||
fancyunits_medium-fractions.cwl
|
||||
fancyunits-np.cwl
|
||||
fancyunits-per.cwl
|
||||
fancyunits_small-fractions.cwl
|
||||
fancyvrb.cwl
|
||||
fontspec.cwl
|
||||
graphicx.cwl
|
||||
hyperref.cwl
|
||||
ifthen.cwl
|
||||
import.cwl
|
||||
jurabib.cwl
|
||||
latex-209.cwl
|
||||
latex-dev.cwl
|
||||
latex-document.cwl
|
||||
latex-l2tabu.cwl
|
||||
latex-mathsymbols.cwl
|
||||
layout.cwl
|
||||
listings.cwl
|
||||
logsys.cwl
|
||||
longtable.cwl
|
||||
lscape.cwl
|
||||
manyfoot.cwl
|
||||
mdwlist.cwl
|
||||
multicol.cwl
|
||||
multido.cwl
|
||||
pdfpages.cwl
|
||||
psfrag.cwl
|
||||
pst-3d.cwl
|
||||
pst-blur.cwl
|
||||
pst-char.cwl
|
||||
pst-coil.cwl
|
||||
pst-eps.cwl
|
||||
pst-fill.cwl
|
||||
pst-node.cwl
|
||||
pst-plot.cwl
|
||||
pstricks.cwl
|
||||
pst-text.cwl
|
||||
pst-tree.cwl
|
||||
rotating.cwl
|
||||
scraddr.cwl
|
||||
scrdate.cwl
|
||||
scrlfile.cwl
|
||||
scrpage2.cwl
|
||||
scrtime.cwl
|
||||
setspace.cwl
|
||||
subfig.cwl
|
||||
supertabular.cwl
|
||||
svninfo.cwl
|
||||
svn-multi.cwl
|
||||
tabularx.cwl
|
||||
tex.cwl
|
||||
textcomp.cwl
|
||||
url.cwl
|
||||
varioref.cwl
|
||||
verse.cwl
|
||||
virginialake.cwl
|
||||
xifthen.cwl
|
||||
xltxtra.cwl
|
||||
xtab.cwl
|
||||
yfonts.cwl
|
||||
)
|
||||
|
||||
INSTALL( FILES ${kile_texCompleteFiles} DESTINATION share/apps/kile/complete/tex )
|
@ -0,0 +1,95 @@
|
||||
texcompletedir = $(kde_datadir)/kile/complete/tex
|
||||
texcomplete_DATA = \
|
||||
acronym.cwl \
|
||||
afterpage.cwl \
|
||||
amsbsy.cwl \
|
||||
amsfonts.cwl \
|
||||
amsmath.cwl \
|
||||
amsopn.cwl \
|
||||
amssymb.cwl \
|
||||
amsthm.cwl \
|
||||
array.cwl \
|
||||
attachfile.cwl \
|
||||
beamerfoils.cwl \
|
||||
beamerprosper.cwl \
|
||||
beamerseminar.cwl \
|
||||
beamertexpower.cwl \
|
||||
booktabs.cwl \
|
||||
braket.cwl \
|
||||
calc.cwl \
|
||||
class-beamer.cwl \
|
||||
class-letter.cwl \
|
||||
class-scrartcl,scrreprt,scrbook.cwl \
|
||||
class-scrlttr2.cwl \
|
||||
color.cwl \
|
||||
colortbl.cwl \
|
||||
coordsys.cwl \
|
||||
currvita.cwl \
|
||||
cyrillic.cwl \
|
||||
diagxy.cwl \
|
||||
doi.cwl \
|
||||
enumerate.cwl \
|
||||
fancybox.cwl \
|
||||
fancyhdr.cwl \
|
||||
fancyunits-base.cwl \
|
||||
fancyunits_big-fractions.cwl \
|
||||
fancyunits_medium-fractions.cwl \
|
||||
fancyunits-np.cwl \
|
||||
fancyunits-per.cwl \
|
||||
fancyunits_small-fractions.cwl \
|
||||
fancyvrb.cwl \
|
||||
fontspec.cwl \
|
||||
graphicx.cwl \
|
||||
hyperref.cwl \
|
||||
ifthen.cwl \
|
||||
import.cwl \
|
||||
jurabib.cwl \
|
||||
latex-209.cwl \
|
||||
latex-dev.cwl \
|
||||
latex-document.cwl \
|
||||
latex-l2tabu.cwl \
|
||||
latex-mathsymbols.cwl \
|
||||
layout.cwl \
|
||||
listings.cwl \
|
||||
logsys.cwl \
|
||||
longtable.cwl \
|
||||
lscape.cwl \
|
||||
manyfoot.cwl \
|
||||
mdwlist.cwl \
|
||||
multicol.cwl \
|
||||
multido.cwl \
|
||||
pdfpages.cwl \
|
||||
psfrag.cwl \
|
||||
pst-3d.cwl \
|
||||
pst-blur.cwl \
|
||||
pst-char.cwl \
|
||||
pst-coil.cwl \
|
||||
pst-eps.cwl \
|
||||
pst-fill.cwl \
|
||||
pst-node.cwl \
|
||||
pst-plot.cwl \
|
||||
pstricks.cwl \
|
||||
pst-text.cwl \
|
||||
pst-tree.cwl \
|
||||
rotating.cwl \
|
||||
scraddr.cwl \
|
||||
scrdate.cwl \
|
||||
scrlfile.cwl \
|
||||
scrpage2.cwl \
|
||||
scrtime.cwl \
|
||||
setspace.cwl \
|
||||
subfig.cwl \
|
||||
supertabular.cwl \
|
||||
svninfo.cwl \
|
||||
svn-multi.cwl \
|
||||
tabularx.cwl \
|
||||
tex.cwl \
|
||||
textcomp.cwl \
|
||||
url.cwl \
|
||||
varioref.cwl \
|
||||
verse.cwl \
|
||||
virginialake.cwl \
|
||||
xifthen.cwl \
|
||||
xltxtra.cwl \
|
||||
xtab.cwl \
|
||||
yfonts.cwl
|
@ -0,0 +1,38 @@
|
||||
# acronym package
|
||||
# ygrange 04/16/2007
|
||||
# URL: http://www.ctan.org/tex-archive/help/Catalogue/entries/acronym.html
|
||||
|
||||
\begin{acronym}
|
||||
\begin{acronym}[longest]
|
||||
\acro{acronym}{full name}
|
||||
\acro{acronym}[short name]{full name}
|
||||
\acroextra{additional info}
|
||||
\end{acronym}
|
||||
\acresetall
|
||||
\ac{acronym}
|
||||
\ac*{acronym}
|
||||
\acf{acronym}
|
||||
\acf*{acronym}
|
||||
\acs{acronym}
|
||||
\acs*{acronym}
|
||||
\acl{acronym}
|
||||
\acl*{acronym}
|
||||
\acp{acronym}
|
||||
\acp*{acronym}
|
||||
\acfp{acronym}
|
||||
\acfp*{acronym}
|
||||
\acsp{acronym}
|
||||
\acsp*{acronym}
|
||||
\aclp{acronym}
|
||||
\aclp*{acronym}
|
||||
\acfi{acronym}
|
||||
\acfi*{acronym}
|
||||
\acsu{acronym}
|
||||
\acsu*{acronym}
|
||||
\aclu{acronym}
|
||||
\aclu*{acronym}
|
||||
\acused{acronym}
|
||||
\acsfont
|
||||
\acffont
|
||||
\acfsfont
|
||||
|
@ -0,0 +1,3 @@
|
||||
# tex/latex mode: Tex commands
|
||||
# neeraavi 20 Mar 2007
|
||||
\afterpage{command}
|
@ -0,0 +1,4 @@
|
||||
# Commands from AMSBSY package
|
||||
# neeraavi 22 Mar 2007
|
||||
\boldsymbol{symbol}
|
||||
\pmb{symbol}
|
@ -0,0 +1,33 @@
|
||||
# tbraun
|
||||
# ctan: amsfonts package
|
||||
# 07/13/2007
|
||||
|
||||
\ulcorner
|
||||
\urcorner
|
||||
\llcorner
|
||||
\lrcorner
|
||||
\dashrightarrow
|
||||
\dashleftarrow
|
||||
\rightleftharpoons
|
||||
\angle
|
||||
\hbar
|
||||
\sqsubset
|
||||
\sqsupset
|
||||
\mho
|
||||
\mathfrak
|
||||
\square
|
||||
\lozenge
|
||||
\mathbb{text}
|
||||
\mathfrak{text}
|
||||
\mathbf{text}
|
||||
\vartriangleright
|
||||
\vartriangleleft
|
||||
\trianglerighteq
|
||||
\trianglelefteq
|
||||
\rightsquigarrow
|
||||
\lhd
|
||||
\unlhd
|
||||
\rhd
|
||||
\unrhd
|
||||
\widehat{letter}
|
||||
\widetilde{letter}
|
@ -0,0 +1,142 @@
|
||||
# mode: amsmath.sty
|
||||
# dani/2006-02-19
|
||||
\AmS
|
||||
\AmSfont
|
||||
\begin{align}
|
||||
\begin{align*}
|
||||
\begin{alignat}[alignment]{n}
|
||||
\begin{alignat*}[alignment]{n}
|
||||
\begin{alignat}{n}
|
||||
\begin{alignat*}{n}
|
||||
\begin{aligned}
|
||||
\begin{aligned}[alignment]
|
||||
\begin{alignedat}
|
||||
\begin{bmatrix}
|
||||
\begin{Bmatrix}
|
||||
\begin{cases}
|
||||
\begin{equation*}
|
||||
\begin{flalign}
|
||||
\begin{flalign*}
|
||||
\begin{gather}
|
||||
\begin{gather*}
|
||||
\begin{gathered}
|
||||
\begin{gathered}[alignment]
|
||||
\begin{matrix}
|
||||
\begin{multline}
|
||||
\begin{multline*}
|
||||
\begin{pmatrix}
|
||||
\begin{smallmatrix}
|
||||
\begin{split}
|
||||
\begin{subarray}
|
||||
\begin{subarray}[align]
|
||||
\begin{subequations}
|
||||
\begin{vmatrix}
|
||||
\begin{Vmatrix}
|
||||
\begin{xalignat}
|
||||
\begin{xalignat*}
|
||||
\begin{xxalignat}
|
||||
\binom{above}{below}
|
||||
\boxed{argument}
|
||||
\cfrac[align]{numerator}{denominator}
|
||||
\cfrac{numerator}{denominator}
|
||||
\dbinom{above}{below}
|
||||
\ddddot{text}
|
||||
\dddot{text}
|
||||
\DeclareMathOperator{command}{text}
|
||||
\DeclareMathOperator*{command}{text}
|
||||
\dfrac{numerator}{denominator}
|
||||
\displaybreak
|
||||
\displaybreak[value]
|
||||
\dotsb
|
||||
\dotsc
|
||||
\dotsi
|
||||
\dotsm
|
||||
\dotso
|
||||
\end{align}
|
||||
\end{align*}
|
||||
\end{alignat}
|
||||
\end{alignat*}
|
||||
\end{aligned}
|
||||
\end{alignedat}
|
||||
\end{bmatrix}
|
||||
\end{Bmatrix}
|
||||
\end{cases}
|
||||
\end{equation*}
|
||||
\end{flalign}
|
||||
\end{flalign*}
|
||||
\end{gather}
|
||||
\end{gather*}
|
||||
\end{gathered}
|
||||
\end{matrix}
|
||||
\end{multline}
|
||||
\end{multline*}
|
||||
\end{pmatrix}
|
||||
\end{smallmatrix}
|
||||
\end{split}
|
||||
\end{subarray}
|
||||
\end{subequations}
|
||||
\end{vmatrix}
|
||||
\end{Vmatrix}
|
||||
\end{xalignat}
|
||||
\end{xalignat*}
|
||||
\end{xxalignat}
|
||||
\eqref{label}
|
||||
\hdotsfor{columns}
|
||||
\hdotsfor[multiplier]{columns}
|
||||
\idotsint
|
||||
\iiiint
|
||||
\iiint
|
||||
\iint
|
||||
\impliedby
|
||||
\implies
|
||||
\intertext{word or phrase}
|
||||
\leftroot{argument}
|
||||
\lvert
|
||||
\lVert
|
||||
\medspace
|
||||
\mod{value}
|
||||
\mspace{dimen}
|
||||
\negmedspace
|
||||
\negthickspace
|
||||
\negthinspace
|
||||
\nobreakdash
|
||||
\notag
|
||||
\operatorname{name}
|
||||
\operatornamewithlimits{name}
|
||||
\overleftrightarrow{argument}
|
||||
\overset{superscript}{argument}
|
||||
\pod{value}
|
||||
\raisetag{dimen}
|
||||
\rvert
|
||||
\rVert
|
||||
\sideset{left}{right}{symbol}
|
||||
\smash{argument}
|
||||
\smash[valign]{argument}
|
||||
\substack{argument}
|
||||
\tag{label}
|
||||
\tag*{label}
|
||||
\tbinom{above}{below}
|
||||
\text{word or phrase}
|
||||
\tfrac{numerator}{denominator}
|
||||
\thickspace
|
||||
\thinspace
|
||||
\underleftarrow{argument}
|
||||
\underleftrightarrow{argument}
|
||||
\underrightarrow{argument}
|
||||
\underset{subscript}{argument}
|
||||
\uproot{argument}
|
||||
\varDelta
|
||||
\varGamma
|
||||
\varLambda
|
||||
\varOmega
|
||||
\varPhi
|
||||
\varPi
|
||||
\varPsi
|
||||
\varSigma
|
||||
\varTheta
|
||||
\varUpsilon
|
||||
\varXi
|
||||
\xleftarrow[subscript]{superscript}
|
||||
\xleftarrow{superscript}
|
||||
\xrightarrow[subscript]{superscript}
|
||||
\xrightarrow{superscript}
|
@ -0,0 +1,42 @@
|
||||
# amsopn package
|
||||
# tbraun 4/09/2007
|
||||
\nolimits
|
||||
\arccos
|
||||
\arcsin
|
||||
\arctan
|
||||
\arg
|
||||
\cos
|
||||
\cosh
|
||||
\cot
|
||||
\coth
|
||||
\csc
|
||||
\deg
|
||||
\det
|
||||
\dim
|
||||
\exp
|
||||
\gcd
|
||||
\hom
|
||||
\inf
|
||||
\injlim
|
||||
\ker
|
||||
\lg
|
||||
\lim
|
||||
\liminf
|
||||
\limsup
|
||||
\ln
|
||||
\log
|
||||
\max
|
||||
\min
|
||||
\Pr
|
||||
\projlim
|
||||
\sec
|
||||
\sin
|
||||
\sinh
|
||||
\sup
|
||||
\tan
|
||||
\tanh
|
||||
\operatornamewithlimits
|
||||
\varinjlim
|
||||
\varprojlim
|
||||
\varliminf
|
||||
\varlimsup
|
@ -0,0 +1,207 @@
|
||||
# amssymb package
|
||||
# tbraun 01.06.2007
|
||||
\approxeq
|
||||
\backepsilon
|
||||
\backprime
|
||||
\backsim
|
||||
\backsimeq
|
||||
\barwedge
|
||||
\Bbbk
|
||||
\because
|
||||
\beth
|
||||
\between
|
||||
\bigstar
|
||||
\blacklozenge
|
||||
\blacksquare
|
||||
\blacktriangle
|
||||
\blacktriangledown
|
||||
\blacktriangleleft
|
||||
\blacktriangleright
|
||||
\boxdot
|
||||
\boxminus
|
||||
\boxplus
|
||||
\boxtimes
|
||||
\bumpeq
|
||||
\Bumpeq
|
||||
\Cap
|
||||
\centerdot
|
||||
\circeq
|
||||
\circlearrowleft
|
||||
\circlearrowright
|
||||
\circledast
|
||||
\circledcirc
|
||||
\circleddash
|
||||
\circledS
|
||||
\complement
|
||||
\Cup
|
||||
\curlyeqprec
|
||||
\curlyeqsucc
|
||||
\curlyvee
|
||||
\curlywedge
|
||||
\curvearrowleft
|
||||
\curvearrowright
|
||||
\daleth
|
||||
\diagdown
|
||||
\diagup
|
||||
\digamma
|
||||
\divideontimes
|
||||
\doteqdot
|
||||
\dotplus
|
||||
\doublebarwedge
|
||||
\downdownarrows
|
||||
\downharpoonleft
|
||||
\downharpoonright
|
||||
\eqcirc
|
||||
\eqsim
|
||||
\eqslantgtr
|
||||
\eqslantless
|
||||
\eth
|
||||
\fallingdotseq
|
||||
\Finv
|
||||
\Game
|
||||
\geqq
|
||||
\geqslant
|
||||
\ggg
|
||||
\gimel
|
||||
\gnapprox
|
||||
\gneq
|
||||
\gneqq
|
||||
\gnsim
|
||||
\gtrapprox
|
||||
\gtrdot
|
||||
\gtreqless
|
||||
\gtreqqless
|
||||
\gtrless
|
||||
\gtrsim
|
||||
\gvertneqq
|
||||
\hslash
|
||||
\intercal
|
||||
\leftarrowtail
|
||||
\leftleftarrows
|
||||
\leftrightarrows
|
||||
\leftrightharpoons
|
||||
\leftrightsquigarrow
|
||||
\leftthreetimes
|
||||
\leqq
|
||||
\leqslant
|
||||
\lessapprox
|
||||
\lessdot
|
||||
\lesseqgtr
|
||||
\lesseqqgtr
|
||||
\lessgtr
|
||||
\lesssim
|
||||
\Lleftarrow
|
||||
\lll
|
||||
\lnapprox
|
||||
\lneq
|
||||
\lneqq
|
||||
\lnsim
|
||||
\looparrowleft
|
||||
\looparrowright
|
||||
\lozenge
|
||||
\Lsh
|
||||
\ltimes
|
||||
\lvertneqq
|
||||
\measuredangle
|
||||
\multimap
|
||||
\ncong
|
||||
\nexists
|
||||
\ngeq
|
||||
\ngeqq
|
||||
\ngeqslant
|
||||
\ngtr
|
||||
\nleftarrow
|
||||
\nLeftarrow
|
||||
\nleftrightarrow
|
||||
\nLeftrightarrow
|
||||
\nleq
|
||||
\nleqq
|
||||
\nleqslant
|
||||
\nless
|
||||
\nmid
|
||||
\nparallel
|
||||
\nprec
|
||||
\npreceq
|
||||
\nrightarrow
|
||||
\nRightarrow
|
||||
\nshortmid
|
||||
\nshortparallel
|
||||
\nsim
|
||||
\nsubseteq
|
||||
\nsubseteqq
|
||||
\nsucc
|
||||
\nsucceq
|
||||
\nsupseteq
|
||||
\nsupseteqq
|
||||
\ntriangleleft
|
||||
\ntrianglelefteq
|
||||
\ntriangleright
|
||||
\ntrianglerighteq
|
||||
\nvdash
|
||||
\nvDash
|
||||
\nVdash
|
||||
\nVDash
|
||||
\pitchfork
|
||||
\precapprox
|
||||
\preccurlyeq
|
||||
\precnapprox
|
||||
\precneqq
|
||||
\precnsim
|
||||
\precsim
|
||||
psamsfonts
|
||||
\rightarrowtail
|
||||
\rightleftarrows
|
||||
\rightrightarrows
|
||||
\rightsquigarrow
|
||||
\rightthreetimes
|
||||
\risingdotseq
|
||||
\Rrightarrow
|
||||
\Rsh
|
||||
\rtimes
|
||||
\shortmid
|
||||
\shortparallel
|
||||
\smallfrown
|
||||
\smallsetminus
|
||||
\smallsmile
|
||||
\sphericalangle
|
||||
\square
|
||||
\Subset
|
||||
\subseteqq
|
||||
\subsetneq
|
||||
\subsetneqq
|
||||
\succapprox
|
||||
\succcurlyeq
|
||||
\succnapprox
|
||||
\succneqq
|
||||
\succnsim
|
||||
\succsim
|
||||
\Supset
|
||||
\supseteqq
|
||||
\supsetneq
|
||||
\supsetneqq
|
||||
\therefore
|
||||
\thickapprox
|
||||
\thicksim
|
||||
\triangledown
|
||||
\trianglelefteq
|
||||
\triangleq
|
||||
\trianglerighteq
|
||||
\twoheadleftarrow
|
||||
\twoheadrightarrow
|
||||
\upharpoonleft
|
||||
\upharpoonright
|
||||
\upuparrows
|
||||
\varkappa
|
||||
\varnothing
|
||||
\varpropto
|
||||
\varsubsetneq
|
||||
\varsubsetneqq
|
||||
\varsupsetneq
|
||||
\varsupsetneqq
|
||||
\vartriangle
|
||||
\vartriangleleft
|
||||
\vartriangleright
|
||||
\vDash
|
||||
\Vdash
|
||||
\veebar
|
||||
\Vvdash
|
@ -0,0 +1,18 @@
|
||||
# amsthm
|
||||
# Ryan Reich/2007-11-03
|
||||
# http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=amsthm
|
||||
\newtheorem{envname}{caption}
|
||||
\newtheorem{envname}{caption}[within]
|
||||
\newtheorem{envname}[numberedlike]{caption}
|
||||
\newtheorem*{envname}{caption}
|
||||
\newtheorem*{envname}{caption}[within]
|
||||
\newtheorem*{envname}[numberedlike]{caption}
|
||||
\theoremstyle{style}
|
||||
\swapnumbers
|
||||
\newtheoremstyle{stylename}{spaceabove}{spacebelow}{bodyfont}{indentamt}{headfont}{headpunct}{headspace}{headspec}
|
||||
\begin{proof}
|
||||
\begin{proof}[caption]
|
||||
\end{proof}
|
||||
\qedsymbol
|
||||
\qedhere
|
||||
\qed
|
@ -0,0 +1,8 @@
|
||||
# mode: array.sty
|
||||
# dani/2006-02-18
|
||||
\extrarowheight
|
||||
\extratabsurround
|
||||
\firsthline
|
||||
\lasthline
|
||||
\newcolumntype{name}{argument}
|
||||
\showcols
|
@ -0,0 +1,12 @@
|
||||
# attachfile package
|
||||
# mario 09/06/2007
|
||||
# URL: http://tug.ctan.org/tex-archive/macros/latex/contrib/attachfile/
|
||||
\attachfile[options]{filename}
|
||||
\attachfile{filename}
|
||||
\attachfilesetup{options}
|
||||
\noattachfile[options]
|
||||
\notextattachfile[options]{text}
|
||||
\notextattachfile{text}
|
||||
\textattachfile[options]{filename}{text}
|
||||
\textattachfile{filename}{text}
|
||||
|
@ -0,0 +1,17 @@
|
||||
# tbraun 11/5/2006
|
||||
# added commands for beamer emulation package
|
||||
\begin{boldequation}*
|
||||
\begin{boldequation}
|
||||
\end{boldequation}
|
||||
\MyLogo{logo text}
|
||||
\LogoOn
|
||||
\LogoOff
|
||||
\foilhead[dimension]{frame title}
|
||||
\foilhead{frame title}
|
||||
\rotatefoilhead[dimension]{frame title}
|
||||
\rotatefoilhead{frame title}
|
||||
\endfoil
|
||||
\FoilTeX
|
||||
\bm{text}
|
||||
\bmstyle{text}{more text}
|
||||
|
@ -0,0 +1,49 @@
|
||||
# tbraun 11/5/2006
|
||||
# added commands for beamer emulation package
|
||||
\begin{slides}[options]{frame title}
|
||||
\begin{slides}{frame title}
|
||||
\end{slides}
|
||||
\begin{notes}{title}
|
||||
\end{notes}
|
||||
\begin{Itemize}\item
|
||||
\end{Itemize}
|
||||
\begin{itemstep}\item
|
||||
\end{itemstep}
|
||||
\begin{enumstep}\item
|
||||
\end{enumstep}
|
||||
\email{text}
|
||||
\institution{text}
|
||||
\Logo(x,y){logo}
|
||||
\Logo{logo}
|
||||
\overlays{number}{slide environment}
|
||||
\fromSlide{slide number}{text}
|
||||
\fromSlide*{slide number}{text}
|
||||
\fromSlide{slide number}{text}
|
||||
\onlySlide{slide number}{text}
|
||||
\onlySlide*{slide number}{text}
|
||||
\onlySlide{slide number}{text}
|
||||
\untilSlide{slide number}{text}
|
||||
\untilsSlide*{slide number}{text}
|
||||
\untilsSlide{slide number}{text}
|
||||
\FromSlide{slide number}
|
||||
\OnlySlide{slide number}
|
||||
\UntilSlide{slide number}
|
||||
\slideCaption{text}
|
||||
\fontTitle{text}
|
||||
\fontText{text}
|
||||
\PDFtransition{prosper transition}
|
||||
\hiddenitem
|
||||
\prosperpart[options]{text}
|
||||
\prosperpart{text}
|
||||
\tsection*{section name}
|
||||
\tsection{section name}
|
||||
\tsectionandpart*{part text}
|
||||
\tsectionandpart{part text}
|
||||
\dualslide[x][y][z]{options}{left column}{right column}
|
||||
\dualslide[y][z]{options}{left column}{right column}
|
||||
\dualslide[z]{options}{left column}{right column}
|
||||
\dualslide{options}{left column}{right column}
|
||||
\PDForPS{PostScript text}{PDF text}
|
||||
\onlyInPDF<PDF text>
|
||||
\onlyInPS<PS text>
|
||||
|
@ -0,0 +1,14 @@
|
||||
# tbraun 11/5/2006
|
||||
# added commands for beamer emulation package
|
||||
\begin{slide}*
|
||||
\begin{slide}
|
||||
\end{slide}
|
||||
\overlay{number}
|
||||
\red
|
||||
\blue
|
||||
\green
|
||||
\ifslide
|
||||
\ifslidesonly
|
||||
\ifarticle
|
||||
\ifportrait
|
||||
|
@ -0,0 +1,21 @@
|
||||
# tbraun 11/5/2006
|
||||
# added commands for beamer emulation package
|
||||
\stepwise{text}
|
||||
\parstepwise{text}
|
||||
\liststepwise{text}
|
||||
\step{text}
|
||||
\steponce{text}
|
||||
\switch{alternate text}{text}
|
||||
\bstep{text}
|
||||
\dstep
|
||||
\vstep
|
||||
\restep{text}
|
||||
\reswitch{alternate text}<text>
|
||||
\rebstep<text>
|
||||
\redstep
|
||||
\revstep
|
||||
\boxedsteps
|
||||
\nonboxedsteps
|
||||
\code{text}
|
||||
\codeswitch
|
||||
|
@ -0,0 +1,15 @@
|
||||
# mode: booktabs.sty
|
||||
# dani/2006-02-18
|
||||
\addlinespace
|
||||
\addlinespace[space]
|
||||
\bottomrule
|
||||
\bottomrule[width]
|
||||
\cmidrule{a-b}
|
||||
\cmidrule(trim){a-b}
|
||||
\cmidrule[width](trim){a-b}
|
||||
\midrule
|
||||
\midrule[width]
|
||||
\morecmidrules
|
||||
\specialrule[width]{abovespace}{belowspace}
|
||||
\toprule
|
||||
\toprule[width]
|
@ -0,0 +1,8 @@
|
||||
\bra{text}
|
||||
\Bra{text}
|
||||
\ket{text}
|
||||
\Ket{text}
|
||||
\braket{text}
|
||||
\Braket{text}
|
||||
\set{text}
|
||||
\Set{text}
|
@ -0,0 +1,21 @@
|
||||
# calc package
|
||||
# nja 17 July 2007
|
||||
# url: http://www.ctan.org/tex-archive/help/Catalogue/entries/calc.html
|
||||
|
||||
\setcounter{ctr}{num}
|
||||
\addtocounter{ctr}{num}
|
||||
\setlength{cmd}{len}
|
||||
\addtolength{cmd}{len}
|
||||
|
||||
\real{decimal constant}
|
||||
\ratio{dimen expression}{dimen expression}
|
||||
|
||||
\widthof{text}
|
||||
\heightof{text}
|
||||
\depthof{text}
|
||||
\totalheightof{text}
|
||||
\settototalheight{cmd}{text}
|
||||
|
||||
\maxof{type expression}{type expression}
|
||||
\minof{type expression}{type expression}
|
||||
|
@ -0,0 +1,446 @@
|
||||
# tbraun 11/5/2006
|
||||
# added most/all beamer commands
|
||||
# be sure to use an up to date kile svn version, only that will work properly with the strange syntax here
|
||||
# 11/24/2006 added missing commands, thanks to Marco Bertolini
|
||||
\begin{frame}
|
||||
\begin{frame}<overlay specification>
|
||||
\begin{frame}<overlay specification>[<default overlay specification>]
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]{title}
|
||||
\begin{frame}<overlay specification>[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[<default overlay specification>]
|
||||
\begin{frame}[<default overlay specification>][options]
|
||||
\begin{frame}[<default overlay specification>][options]{title}
|
||||
\begin{frame}[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[<default overlay specification>][options]{title}{subtitle}
|
||||
\begin{frame}[options]
|
||||
\begin{frame}[options]{title}
|
||||
\begin{frame}[options]{title}{subtitle}
|
||||
\begin{frame}[options]{title}{subtitle}
|
||||
\begin{frame}{title}
|
||||
\begin{frame}{subtitle}
|
||||
\end{frame}
|
||||
\begin{thebibliography}{longest label text}
|
||||
\end{thebibliography}
|
||||
\begin{itemize}[<default overlay specification>]\item
|
||||
\begin{itemize}\item
|
||||
\end{itemize}
|
||||
\begin{enumerate}[<default overlay specification>][mini template]\item
|
||||
\begin{enumerate}[mini template]\item
|
||||
\begin{enumerate}\item
|
||||
\end{enumerate}
|
||||
\begin{description}[<default overlay specification>][long text]\item
|
||||
\begin{description}[long text]\item
|
||||
\begin{description}\item
|
||||
\end{description}
|
||||
\begin{structureenv}<overlay specification>
|
||||
\begin{structureenv}
|
||||
\end{structureenv}
|
||||
\begin{alertenv}<overlay specification>
|
||||
\begin{alertenv}
|
||||
\end{alertenv}
|
||||
\begin{block}<action specification>{block title}<action specification>
|
||||
\end{block}
|
||||
\begin{alertblock}<action specification>{block title}<action specification>
|
||||
\end{alertblock}
|
||||
\begin{exampleblock}<action specification>{block title}<overlay specification>
|
||||
\end{exampleblock}
|
||||
\begin{theorem}<action specification>[additional text]<action specification>
|
||||
\begin{theorem}<action specification><action specification>
|
||||
\end{theorem}
|
||||
\begin{definition}<action specification>[additional text]<action specification>
|
||||
\begin{definition}<action specification><action specification>
|
||||
\end{definition}
|
||||
\begin{example}<action specification>[additional text]<action specification>
|
||||
\begin{example}<action specification><action specification>
|
||||
\end{example}
|
||||
\begin{proof}<action specification>[proof name]<action specification>
|
||||
\begin{proof}<action specification><action specification>
|
||||
\end{proof}
|
||||
\begin{beamercolorbox}[options]{beamer color}
|
||||
\begin{beamercolorbox}{beamer color}
|
||||
\end{beamercolorbox}
|
||||
\begin{beamerboxesrounded}[options]{head}
|
||||
\begin{beamerboxesrounded}{head}
|
||||
\end{beamerboxesrounded}
|
||||
\begin{columns}[options]
|
||||
\begin{columns}
|
||||
\end{columns}
|
||||
\begin{column}[placement]{column width}
|
||||
\begin{column}{column width}
|
||||
\end{column}
|
||||
\begin{semiverbatim}
|
||||
\end{semiverbatim}
|
||||
\begin{abstract}<action specification>
|
||||
\end{abstract}
|
||||
\begin{verse}<action specification>
|
||||
\end{verse}
|
||||
\begin{quotation}<action specification>
|
||||
\end{quotation}
|
||||
\begin{quote}<action specification>
|
||||
\end{quote}
|
||||
\begin{onlyenv}<overlay specification>
|
||||
\begin{onlyenv}
|
||||
\end{onlyenv}
|
||||
\begin{altenv}<overlay specification>{begin text}{end text}{alternate begin text}{alternate end text}<overlay specification>
|
||||
\begin{altenv}{begin text}{end text}{alternate begin text}{alternate end text}<overlay specification>
|
||||
\end{altenv}
|
||||
\begin{overlayarea}{area width}{area height}
|
||||
\end{overlayarea}
|
||||
\begin{overprint}[area width]
|
||||
\begin{overprint}
|
||||
\end{overprint}
|
||||
\begin{actionenv}<action specification>
|
||||
\end{actionenv}
|
||||
\movie[options]{poster text}{movie filename}
|
||||
\movie{poster text}{movie filename}
|
||||
\hyperlinkmovie[options]{movie label}{text}
|
||||
\hyperlinkmovie{movie label}{text}
|
||||
\animate
|
||||
\animate<overlay specification>
|
||||
\animatevalue<start slide - end slide>{name}{start value}{end value}
|
||||
\animatevalue{name}{start value}{end value}
|
||||
\multiinclude[<default overlay specification>][options]{base file name}
|
||||
\multiinclude[options]{base file name}
|
||||
\multiinclude{base file name}
|
||||
\sound[options]{sound poster text}{sound filename}
|
||||
\sound{sound poster text}{sound filename}
|
||||
\hyperlinksound[options]{sound label}{text}
|
||||
\hyperlinksound{sound label}{text}
|
||||
\hyperlinkmute{text}
|
||||
\transblindshorizontal<overlay specification>[options]
|
||||
\transblindshorizontal<overlay specification>
|
||||
\transblindshorizontal[options]
|
||||
\transblindshorizontal
|
||||
\transblindsvertical<overlay specification>[options]
|
||||
\transblindsvertical<overlay specification>
|
||||
\transblindsvertical[options]
|
||||
\transblindsvertical
|
||||
\transboxin<overlay specification>[options]
|
||||
\transboxin<overlay specification>
|
||||
\transboxin[options]
|
||||
\transboxin
|
||||
\transboxout<overlay specification>[options]
|
||||
\transboxout<overlay specification>
|
||||
\transboxout[options]
|
||||
\transboxout
|
||||
\transdissolve<overlay specification>[options]
|
||||
\transdissolve<overlay specification>
|
||||
\transdissolve[options]
|
||||
\transdissolve
|
||||
\transglitter<overlay specification>[options]
|
||||
\transglitter<overlay specification>
|
||||
\transglitter[options]
|
||||
\transglitter
|
||||
\transsplitverticalin<overlay specification>[options]
|
||||
\transsplitverticalin<overlay specification>
|
||||
\transsplitverticalin[options]
|
||||
\transsplitverticalin
|
||||
\transsplitverticalout<overlay specification>[options]
|
||||
\transsplitverticalout<overlay specification>
|
||||
\transsplitverticalout[options]
|
||||
\transsplitverticalout
|
||||
\transsplithorizontalin<overlay specification>[options]
|
||||
\transsplithorizontalin<overlay specification>
|
||||
\transsplithorizontalin[options]
|
||||
\transsplithorizontalin
|
||||
\transsplithorizontalout<overlay specification>[options]
|
||||
\transsplithorizontalout<overlay specification>
|
||||
\transsplithorizontalout[options]
|
||||
\transsplithorizontalout
|
||||
\transwipe<overlay specification>[options]
|
||||
\transwipe<overlay specification>
|
||||
\transwipe[options]
|
||||
\transwipe
|
||||
\transduration<overlay specification>{number of seconds}
|
||||
\transduration{number of seconds}
|
||||
\usebeamercolor*[fg or bg]{beamer-color name}
|
||||
\usebeamercolor*{beamer-color name}
|
||||
\usebeamercolor[fg or bg]{beamer-color name}
|
||||
\usebeamercolor{beamer-color name}
|
||||
\ifbeamercolorempty[fg or bg]{beamer-color name}{if undefined}{if defined}
|
||||
\ifbeamercolorempty{beamer-color name}{if undefined}{if defined}
|
||||
\setbeamercolor*{beamer-color name}{options}
|
||||
\setbeamercolor{beamer-color name}{options}
|
||||
\setbeamercovered{options}
|
||||
\opaqueness{percentage of opaqueness}
|
||||
\opaqueness<overlay specification>{percentage of opaqueness}
|
||||
\opaqueness{percentage of opaqueness}
|
||||
\usebeamertemplate{element name}
|
||||
\usebeamertemplate*{element name}
|
||||
\usebeamertemplate**{element name}
|
||||
\usebeamertemplate***{element name}
|
||||
\ifbeamertemplateempty{beamer template name}{executed if empty}{executed otherwise}
|
||||
\expandbeamertemplate{beamer template name}
|
||||
\setbeamertemplate{element name}[predefined option]{args}
|
||||
\setbeamertemplate{element name}{args}
|
||||
\addtobeamertemplate{element name}{pre-text}{post-text}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}[argument number][default optional argument]{predefined text}[action]{action command}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}[default optional argument]{predefined text}[action]{action command}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}{predefined text}[action]{action command}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}[argument number][default optional argument]{predefined text}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}[argument number]{predefined text}
|
||||
\defbeamertemplate<mode specification>*{element name}{predefined option}{predefined text}
|
||||
\defbeamertemplate{element name}{predefined option}[argument number][default optional argument]{predefined text}[action]{action command}
|
||||
\defbeamertemplate{element name}{predefined option}[default optional argument]{predefined text}[action]{action command}
|
||||
\defbeamertemplate{element name}{predefined option}{predefined text}[action]{action command}
|
||||
\defbeamertemplate{element name}{predefined option}[argument number][default optional argument]{predefined text}
|
||||
\defbeamertemplate{element name}{predefined option}[argument number]{predefined text}
|
||||
\defbeamertemplate{element name}{predefined option}{predefined text}
|
||||
\defbeamertemplatealias{element name}{new predefined option name}{existing predefined option name}
|
||||
\defbeamertemplateparent{parent template name}[predefined option name]{child template list} [argument number][default optional argument]{arguments for children}
|
||||
\defbeamertemplateparent{parent template name}{child template list} [argument number][default optional argument]{arguments for children}
|
||||
\defbeamertemplateparent{parent template name}{child template list} [default optional argument]{arguments for children}
|
||||
\defbeamertemplateparent{parent template name}{child template list} {arguments for children}
|
||||
\usebeamerfont*{beamer-font name}
|
||||
\usebeamerfont{beamer-font name}
|
||||
\setbeamerfont*{beamer-font name}{attributes}
|
||||
\setbeamerfont{beamer-font name}{attributes}
|
||||
\insertnavigation
|
||||
\insertpagenumber
|
||||
\insertsection
|
||||
\insertsectionnavigation
|
||||
\insertsectionnavigationhorizontal
|
||||
\insertshortauthor
|
||||
\insertshortdate
|
||||
\insertshortinstitute
|
||||
\insertshortpart
|
||||
\insertshorttitle
|
||||
\insertshortsubtitle
|
||||
\insertsubsection
|
||||
\insertsubsectionnavigation
|
||||
\insertsubsectionnavigationhorizontal
|
||||
\insertverticalnavigation
|
||||
\insertframenumber
|
||||
\inserttotalframenumber
|
||||
\insertframestartpage
|
||||
\insertframeendpage
|
||||
\insertsubsectionstartpage
|
||||
\insertsubsectionendpage
|
||||
\insertsectionstartpage
|
||||
\insertsectionendpage
|
||||
\insertpartstartpage
|
||||
\insertpartendpage
|
||||
\insertpresentationstartpage
|
||||
\insertpresentationendpage
|
||||
\insertappendixstartpage
|
||||
\insertappendixendpage
|
||||
\insertdocumentstartpage
|
||||
\insertdocumentendpage
|
||||
\setbeamersize{}
|
||||
\insertsectionhead
|
||||
\insertsectionheadnumber
|
||||
\insertpartheadnumber
|
||||
\insertsubsectionhead
|
||||
\insertsubsectionheadnumber
|
||||
\insertslidenavigationsymbol
|
||||
\insertframenavigationsymbol
|
||||
\insertsubsectionnavigationsymbol
|
||||
\insertsectionnavigationsymbol
|
||||
\insertdocnavigationsymbol
|
||||
\insertbackfindforwardnavigationsymbol
|
||||
\insertenumlabel
|
||||
\insertenumlabel
|
||||
\insertsubsubenumlabel
|
||||
\insertdescriptionitem
|
||||
\inserttheoremheadfont
|
||||
\inserttheoremname
|
||||
\inserttheoremnumber
|
||||
\inserttheoremaddition
|
||||
\inserttheorempunctuation
|
||||
\insertcaption
|
||||
\insertcaptionname
|
||||
\insertcaptionnumber
|
||||
\insertfootnotetext
|
||||
\insertfootnotemark
|
||||
\insertnote
|
||||
\insertslideintonotes
|
||||
\logo{logo text}
|
||||
\insertlogo
|
||||
\frametitle<overlay specification>[short frame title]{frame title text}
|
||||
\frametitle<overlay specification>{frame title text}
|
||||
\frametitle[short frame title]{frame title text}
|
||||
\frametitle{frame title text}
|
||||
\framesubtitle<overlay specification>{frame subtitle text}
|
||||
\framesubtitle{frame subtitle text}
|
||||
\setbeamersize{options}
|
||||
\titlepage
|
||||
\maketitle
|
||||
\title[short title]{title}
|
||||
\title{title}
|
||||
\subtitle[short subtitle]{subtitle}
|
||||
\subtitle{subtitle}
|
||||
\author[short author names]{author names}
|
||||
\author{author names}
|
||||
\institute[short institute]{institute}
|
||||
\institute{institute}
|
||||
\date[short date]{date}
|
||||
\date{date}
|
||||
\titlegraphic{text}
|
||||
\subject{text}
|
||||
\keywords{text}
|
||||
\section<mode specification>[short section name]{section name}
|
||||
\section<mode specification>{section name}
|
||||
\section[short section name]{section name}
|
||||
\section{section name}
|
||||
\section<mode specification>*[short section name]{section name}
|
||||
\section<mode specification>*{section name}
|
||||
\section*[short section name]{section name}
|
||||
\section*{section name}
|
||||
\subsection<mode specification>[short section name]{section name}
|
||||
\subsection<mode specification>{section name}
|
||||
\subsection[short section name]{section name}
|
||||
\subsection{section name}
|
||||
\subsection<mode specification>*[short section name]{section name}
|
||||
\subsection<mode specification>*{section name}
|
||||
\subsection*[short section name]{section name}
|
||||
\subsection*{section name}
|
||||
\subsubsection<mode specification>[short section name]{section name}
|
||||
\subsubsection<mode specification>{section name}
|
||||
\subsubsection[short section name]{section name}
|
||||
\subsubsection{section name}
|
||||
\subsubsection<mode specification>*[short section name]{section name}
|
||||
\subsubsection<mode specification>*{section name}
|
||||
\subsubsection*[short section name]{section name}
|
||||
\subsubsection*{section name}
|
||||
\AtBeginSection[special star text]{text}
|
||||
\AtBeginSection{text}
|
||||
\AtBeginSubsection[special star text]{text}
|
||||
\AtBeginSubsection{text}
|
||||
\AtBeginSubsubsection[special star text]{text}
|
||||
\AtBeginSubsubsection{text}
|
||||
\part<mode specification>[short part name]{part name}
|
||||
\part<mode specification>{part name}
|
||||
\part[short part name]{part name}
|
||||
\part{part name}
|
||||
\partpage
|
||||
\AtBeginPart{text}
|
||||
\lecture[short lecture name]{lecture name}{lecture label}
|
||||
\lecture{lecture name}{lecture label}
|
||||
\includeonlylecture{lecture label}
|
||||
\AtBeginLecture{text}
|
||||
\tableofcontents[comma-separated option list]
|
||||
\tableofcontents
|
||||
\bibitem<overlay specification>[citation text]{label name}
|
||||
\bibitem<overlay specification>{label name}
|
||||
\bibitem[citation text]{label name}
|
||||
\bibitem{label name}
|
||||
\appendix<mode specification>
|
||||
\appendix
|
||||
\hypertarget<overlay specification>{target name}{text}
|
||||
\hypertarget{target name}{text}
|
||||
\beamerbutton{button text}
|
||||
\beamergotobutton{button text}
|
||||
\beamerskipbutton{button text}
|
||||
\beamerreturnbutton{button text}
|
||||
\hyperlink<overlay specification>{target name}{link text}<overlay specification>
|
||||
\hyperlink{target name}{link text}<overlay specification>
|
||||
\hyperlink{target name}{link text}
|
||||
\hyperlinkslideprev<overlay specification>{link text}
|
||||
\hyperlinkslideprev{link text}
|
||||
\hyperlinkslidenext<overlay specification>{link text}
|
||||
\hyperlinkslidenext{link text}
|
||||
\hyperlinkframestart<overlay specification>{link text}
|
||||
\hyperlinkframestart{link text}
|
||||
\hyperlinkframeend<overlay specification>{link text}
|
||||
\hyperlinkframeend{link text}
|
||||
\hyperlinkframestartnext<overlay specification>{link text}
|
||||
\hyperlinkframestartnext{link text}
|
||||
\hyperlinkframeendprev<overlay specification>{link text}
|
||||
\hyperlinkframeendprev{link text}
|
||||
\hyperlinkpresentationstart<overlay specification>{link text}
|
||||
\hyperlinkpresentationstart{link text}
|
||||
\hyperlinkpresentationend<overlay specification>{link text}
|
||||
\hyperlinkpresentationend{link text}
|
||||
\hyperlinkappendixstart<overlay specification>{link text}
|
||||
\hyperlinkappendixstart{link text}
|
||||
\hyperlinkappendixend<overlay specification>{link text}
|
||||
\hyperlinkappendixend{link text}
|
||||
\hyperlinkdocumentstart<overlay specification>{link text}
|
||||
\hyperlinkdocumentstart{link text}
|
||||
\hyperlinkdocumentend<overlay specification>{link text}
|
||||
\hyperlinkdocumentend{link text}
|
||||
\againframe<overlay specification>[<default overlay specification>][options]{name}
|
||||
\againframe<overlay specification>[options]{name}
|
||||
\againframe<overlay specification>{name}
|
||||
\againframe[<default overlay specification>][options]{name}
|
||||
\againframe[options]{name}
|
||||
\againframe{name}
|
||||
\framezoom<button overlay specification><zoomed overlay specification>[options](upper left x,upper left y)(zoom area width,zoom area depth)
|
||||
\framezoom<button overlay specification><zoomed overlay specification>(upper left x,upper left y)(zoom area width,zoom area depth)
|
||||
\structure<overlay specification>{text}
|
||||
\structure{text}
|
||||
\alert<overlay specification>{highlighted text}
|
||||
\alert{highlighted text}
|
||||
\newtheorem*{environment name}[numbered same as]{head text}[number within]
|
||||
\newtheorem*{environment name}{head text}[number within]
|
||||
\newtheorem*{environment name}{head text}
|
||||
\newtheorem{environment name}[numbered same as]{head text}[number within]
|
||||
\newtheorem{environment name}{head text}[number within]
|
||||
\newtheorem{environment name}{head text}
|
||||
\footnote<overlay specification>[options]{text}
|
||||
\footnote<overlay specification>{text}
|
||||
\footnote[options]{text}
|
||||
\footnote{text}
|
||||
\setjobnamebeamerversion{filename without extension}
|
||||
\includeslide[options]{label name}
|
||||
\includeslide{label name}
|
||||
\mode<mode specification>{text}
|
||||
\mode{text}
|
||||
\mode<mode specification>
|
||||
\mode*
|
||||
\mode
|
||||
\note<overlay specification>[options]{note text}
|
||||
\note<overlay specification>{note text}
|
||||
\note[options]{note text}
|
||||
\note{note text}
|
||||
\AtBeginNote{text}
|
||||
\AtEndNote{text}
|
||||
\pause[number]
|
||||
\pause
|
||||
\onslide<overlay specification>{text}
|
||||
\onslide+<overlay specification>{text}
|
||||
\onslide*<overlay specification>{text}
|
||||
\onslide<overlay specification>
|
||||
\onslide
|
||||
\only<overlay specification>{text}<overlay specification>
|
||||
\only{text}<overlay specification>
|
||||
\only{text}
|
||||
\uncover<overlay specification>{text}
|
||||
\uncover{text}
|
||||
\visible<overlay specification>{text}
|
||||
\visible{text}
|
||||
\invisible<overlay specification>{text}
|
||||
\invisible{text}
|
||||
\alt<overlay specification>{default text}{alternative text}<overlay specification>
|
||||
\alt{default text}{alternative text}<overlay specification>
|
||||
\alt{default text}{alternative text}
|
||||
\temporal{before slide text}{default text}{after slide text}
|
||||
\temporal<overlay specification>{before slide text}{default text}{after slide text}
|
||||
\temporal{before slide text}{default text}{after slide text}
|
||||
\item<alert specification>[item label]<alert specification>
|
||||
\item<alert specification><alert specification>
|
||||
\item[item label]<alert specification>
|
||||
\item[item label]
|
||||
\item
|
||||
\label<overlay specification>{label name}
|
||||
\label{label name}
|
||||
\resetcounteronoverlays{counter name}
|
||||
\resetcountonoverlays{count register name}
|
||||
\action<action specification>{text}
|
||||
\action{text}
|
||||
\beamerdefaultoverlayspecification{default overlay specification}
|
||||
\usetheme[options]{name list}
|
||||
\usetheme{name list}
|
||||
\usecolortheme[options]{name list}
|
||||
\usecolortheme{name list}
|
||||
\usefonttheme[options]{name}
|
||||
\usefonttheme{name}
|
||||
\useinnertheme[options]{name}
|
||||
\useinnertheme{name}
|
||||
\useoutertheme[options]{name}
|
||||
\useoutertheme{name}
|
||||
\addheadbox{beamer color}{box template}
|
||||
\addfootbox{beamer color}{box template}
|
||||
\includeonlyframes{frame label list}
|
||||
|
@ -0,0 +1,15 @@
|
||||
# latex mode: LaTeX commands (letter class)
|
||||
# dani/2006-02-18
|
||||
\begin{letter}{name}
|
||||
\end{letter}
|
||||
\address{returnaddress}
|
||||
\signature{yourname}
|
||||
\opening{text}
|
||||
\closing{text}
|
||||
\cc{text}
|
||||
\encl{text}
|
||||
\name{text}
|
||||
\ps{text}
|
||||
\location{address}
|
||||
\telephone{number}
|
||||
\subject{text}
|
@ -0,0 +1,124 @@
|
||||
# mode: koma classes (scrartcl,scrreprt,scrbook)
|
||||
# dani/2006-02-21
|
||||
\addchap[short]{title}
|
||||
\addchap{title}
|
||||
\addchap*{title}
|
||||
\addpart[short]{title}
|
||||
\addpart{title}
|
||||
\addpart*{title}
|
||||
\addsec[short]{title}
|
||||
\addsec{title}
|
||||
\addsec*{title}
|
||||
\addtokomafont{name}{cmd}
|
||||
\areaset[bcor]{width}{height}
|
||||
\areaset{width}{height}
|
||||
\begin{addmargin}{indent}
|
||||
\begin{addmargin*}{indent}
|
||||
\begin{addmargin}[leftindent]{indent}
|
||||
\begin{addmargin*}[middleindent]{indent}
|
||||
\begin{captionbeside}[short]{title}
|
||||
\begin{captionbeside}[short]{title}[pos]
|
||||
\begin{captionbeside}[short]{title}[pos][width]
|
||||
\begin{captionbeside}{title}
|
||||
\begin{captionbeside}{title}[pos]
|
||||
\begin{captionbeside}{title}[pos][width]
|
||||
\begin{captionbeside}{title}[pos][width][offset]
|
||||
\begin{labeling}[div]{template}\item
|
||||
\begin{labeling}{template}\item
|
||||
\captionabove[entry]{text}
|
||||
\captionabove{text}
|
||||
\captionbelow[entry]{text}
|
||||
\captionbelow{text}
|
||||
\chapappifchapterprefix{text}
|
||||
\dedication{text}
|
||||
\deffootnote{indent}{parindent}{definition}
|
||||
\deffootnotemark{definition}
|
||||
\deffootnote[width]{indent}{parindent}{definition}
|
||||
\dictumauthorformat{cmd}
|
||||
\dictum[author]{text}
|
||||
\dictum{text}
|
||||
\end{addmargin}
|
||||
\end{addmargin*}
|
||||
\end{captionbeside}
|
||||
\end{captionbeside}[short]{title}[pos][width][offset]
|
||||
\end{labeling}
|
||||
\enlargethispage
|
||||
\extratitle{shorttitle}
|
||||
\ifpdfoutput{then}{else}
|
||||
\ifthispageodd{true}{false}
|
||||
\ifthispagewasodd..\else..\fi
|
||||
\linespread{factor}
|
||||
\lowertitleback{text}
|
||||
\maketitle{pagenumber}
|
||||
\marginline{text}
|
||||
\markboth
|
||||
\markleft
|
||||
\markright
|
||||
\minisec{title}
|
||||
\othersectionlevelsformat{level}
|
||||
\publishers{text}
|
||||
\setbibpreamble{text}
|
||||
\setcapindent{indent}
|
||||
\setcapindent*{indent}
|
||||
\setcapmargin{indent}
|
||||
\setcapmargin*{indent}
|
||||
\setcapmargin[left]{indent}
|
||||
\setcapmargin*[middle]{indent}
|
||||
\setcapwidth[align]{width}
|
||||
\setcapwidth{width}
|
||||
\setchapterpreamble[pos]{text}
|
||||
\setchapterpreamble[pos][width]{text}
|
||||
\setchapterpreamble{text}
|
||||
\SetDIVList{list}
|
||||
\setindexpreamble{text}
|
||||
\setkomafont{name}{cmd}
|
||||
\setpartpreamble[pos]{text}
|
||||
\setpartpreamble[pos][width]{text}
|
||||
\setpartpreamble{text}
|
||||
\subject{text}
|
||||
\textsubscript{text}
|
||||
\textsuperscript{text}
|
||||
\titlehead{head}
|
||||
\typearea[bcor]{div}
|
||||
\typearea{div}
|
||||
\uppertitleback{text}
|
||||
\usekomafont{name}
|
||||
# macros
|
||||
\appendixmore
|
||||
\autodot
|
||||
\backmatter
|
||||
\capfont
|
||||
\caplabelfont
|
||||
\captionformat
|
||||
\chapapp
|
||||
\chapterformat
|
||||
\chaptermarkformat
|
||||
\chapterpagestyle
|
||||
\cleardoubleemptypage
|
||||
\cleardoubleplainpage
|
||||
\cleardoublestandardpage
|
||||
\contentsname
|
||||
\descfont
|
||||
\dictumwidth
|
||||
\figureformat
|
||||
\frontmatter
|
||||
\indexpagestyle
|
||||
\listfigurename
|
||||
\listtablename
|
||||
\mainmatter
|
||||
\partformat
|
||||
\partpagestyle
|
||||
\raggeddictum
|
||||
\raggeddictumauthor
|
||||
\raggeddictumtext
|
||||
\raggedsection
|
||||
\sectfont
|
||||
\sectionmarkformat
|
||||
\setcaphanging
|
||||
\subsectionmarkformat
|
||||
\tableformat
|
||||
\titlepagestyle
|
||||
# variable
|
||||
\pdfoutput
|
||||
\pdfpageheight
|
||||
\pdfpagewidth
|
@ -0,0 +1,91 @@
|
||||
# mode: koma letter class (scrlttr2)
|
||||
# dani/2006-02-21
|
||||
\addrchar
|
||||
\addrentry{last}{first}{address}{tel}{f1}{f2}{f3}{f4}{comment}{short}
|
||||
\addtolengthplength[factor]{length}{plength}
|
||||
\addtolengthplength{length}{plength}
|
||||
\addtoreffields{name}
|
||||
\adrchar
|
||||
\adrentry{last}{first}{address}{tel}{f1}{f2}{comment}{short}
|
||||
\AtBeginLetter{commands}
|
||||
\bankname
|
||||
\begin{letter}{name}
|
||||
\captionsamerican
|
||||
\captionsaustrian
|
||||
\captionsbritish
|
||||
\captionscroatian
|
||||
\captionsdutch
|
||||
\captionsenglish
|
||||
\captionsfinnish
|
||||
\captionsfrench
|
||||
\captionsgerman
|
||||
\captionsitalian
|
||||
\captionsngerman
|
||||
\captionsspanish
|
||||
\captionsUKenglish
|
||||
\captionsUSenglish
|
||||
\ccname
|
||||
\cc{text}
|
||||
\closing{text}
|
||||
\customername
|
||||
\dateamerican
|
||||
\dateaustrian
|
||||
\datebritish
|
||||
\datecroatian
|
||||
\datedutch
|
||||
\dateenglish
|
||||
\datefinnish
|
||||
\datefrench
|
||||
\dategerman
|
||||
\dateitalian
|
||||
\datename
|
||||
\datengerman
|
||||
\datespanish
|
||||
\dateUKenglish
|
||||
\dateUSenglish
|
||||
\defaultreffields
|
||||
\emailname
|
||||
\enclname
|
||||
\encl{text}
|
||||
\end{letter}
|
||||
\faxname
|
||||
\firstfoot{text}
|
||||
\firsthead{text}
|
||||
\headfromname
|
||||
\headtoname
|
||||
\ifkomavarempty{name}{true}{false}
|
||||
\ifkomavarempty*{name}{true}{false}
|
||||
\invoicename
|
||||
\KOMAoptions{list}
|
||||
\LetterOptionNeedsPapersize{option}{papersize}
|
||||
\LoadLetterOption{name}
|
||||
\myrefname
|
||||
\newcaptionname{language}{name}{text}
|
||||
\newkomavar[alias]{name}
|
||||
\newkomavar*[alias]{name}
|
||||
\newkomavar{name}
|
||||
\newkomavar*{name}
|
||||
\nextfoot{text}
|
||||
\nexthead{text}
|
||||
\opening{text}
|
||||
\phonename
|
||||
\providecaptionname{language}{name}{text}
|
||||
\ps{text}
|
||||
\raggedsignature
|
||||
\removereffields
|
||||
\renewcaptionname{language}{name}{text}
|
||||
\setkomavar{name}[alias]{value}
|
||||
\setkomavar*{name}[alias]{value}
|
||||
\setkomavar{name}{value}
|
||||
\setkomavar*{name}{value}
|
||||
\setlengthtoplength[factor]{length}{plength}
|
||||
\setlengthtoplength{length}{plength}
|
||||
\subjectname
|
||||
\usekomavar[alias]{name}
|
||||
\usekomavar*[alias]{name}
|
||||
\usekomavar{name}
|
||||
\usekomavar*{name}
|
||||
\useplength{name}
|
||||
\wwwname
|
||||
\yourmailname
|
||||
\yourrefname
|
@ -0,0 +1,13 @@
|
||||
# color.sty
|
||||
# tbraun 11/2/2006
|
||||
\textcolor{declared-color}{text}
|
||||
\textcolor[model]{color-spec}{text}
|
||||
\pagecolor[declared-color}
|
||||
\definecolor{name}{model}{color-spec}
|
||||
\normalcolor
|
||||
\color[model]{color}
|
||||
\color{declared-color}
|
||||
\colorbox[model]{declared-color}{text}
|
||||
\colorbox{declared-color}{text}
|
||||
\fcolorbox[model]{border-color}{fill-color}{text}
|
||||
\fcolorbox{declared-border-color}{declared-fill-color}{text}
|
@ -0,0 +1,12 @@
|
||||
# colortbl package
|
||||
# neeraavi 26 Mar 2007
|
||||
\arrayrulecolor{declared-color}
|
||||
\arrayrulecolor[color model]{color}
|
||||
\cellcolor{declared-color}
|
||||
\cellcolor[color model]{color}[left overhang][right overhang]
|
||||
\columncolor{declared-color}
|
||||
\columncolor[color model]{color}[left overhang][right overhang]
|
||||
\doublerulesepcolor{declared-color}
|
||||
\doublerulesepcolor[color model]{color}
|
||||
\rowcolor{declared-color}
|
||||
\rowcolor[color model]{color}[left overhang][right overhang]
|
@ -0,0 +1,25 @@
|
||||
#coordsys.cwl
|
||||
#for coordsys package
|
||||
#neeraavi 26 Mar 2007
|
||||
\numbline[spacing]{from}{to}
|
||||
\numbline*[spacing]{from}{to}
|
||||
\vnumbline[spacing]{from}{to}
|
||||
\vnumbline*[spacing]{from}{to}
|
||||
\coordsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\coordsys*[h-spacing][v-spacing](lower-leftl)(upper-right)
|
||||
\fcoordsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\fcoordsys*[h-spacing][v-spacing](lower-leftl)(upper-right)
|
||||
\bcoordsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\bcoordsys*[h-spacing][v-spacing](lower-leftl)(upper-right)
|
||||
\window[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\window*[h-spacing][v-spacing](lower-leftl)(upper-right)
|
||||
\coordgrid[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\coordgrid*[h-spacing][v-spacing](lower-leftl)(upper-right)
|
||||
\gridstyle{thin-declaration}{thick-declaration}
|
||||
\sethlabel[alignment]{label}
|
||||
\setvlabel[alignment]{label}
|
||||
\htickratio
|
||||
\vtickratio
|
||||
\rescaleby[symb]{num}{den}{cmd}
|
||||
\tickstyle{thin-declaration}{thick-declaration}
|
||||
\ticklength
|
@ -0,0 +1,14 @@
|
||||
# currvita.sty
|
||||
# tbraun 11/15/2006
|
||||
\begin{cv}{heading of the curriculum vitae}
|
||||
\end{cv}
|
||||
\begin{cvlist}{heading of the list}\item
|
||||
\end{cvlist}
|
||||
\cvplace{location}
|
||||
\cvheadingfont
|
||||
\cvlistheadingfont
|
||||
\cvlabelfont
|
||||
\cvlabelwidth
|
||||
\cvlabelskip
|
||||
\cvlabelsep
|
||||
\cvbibname
|
@ -0,0 +1,159 @@
|
||||
# created 08/05/2006 by tbraun
|
||||
|
||||
\CYRA
|
||||
\CYRB
|
||||
\CYRV
|
||||
\CYRG
|
||||
\CYRD
|
||||
\CYRE
|
||||
\CYRYO
|
||||
\CYRZH
|
||||
\CYRZ
|
||||
\CYRI
|
||||
\CYRISHRT
|
||||
\CYRK
|
||||
\CYRL
|
||||
\CYRM
|
||||
\CYRN
|
||||
\CYRO
|
||||
\CYRP
|
||||
\CYRR
|
||||
\CYRS
|
||||
\CYRT
|
||||
\CYRU
|
||||
\CYRF
|
||||
\CYRH
|
||||
\CYRC
|
||||
\CYRCH
|
||||
\CYRSH
|
||||
\CYRSHCH
|
||||
\CYRHRDSN
|
||||
\CYRERY
|
||||
\CYRSFTSN
|
||||
\CYREREV
|
||||
\CYRYU
|
||||
\CYRYA
|
||||
\cyra
|
||||
\cyrb
|
||||
\cyrv
|
||||
\cyrg
|
||||
\cyrd
|
||||
\cyre
|
||||
\cyryo
|
||||
\cyrzh
|
||||
\cyrz
|
||||
\cyri
|
||||
\cyrishrt
|
||||
\cyrk
|
||||
\cyrl
|
||||
\cyrm
|
||||
\cyrn
|
||||
\cyro
|
||||
\cyrp
|
||||
\cyrr
|
||||
\cyrs
|
||||
\cyrt
|
||||
\cyru
|
||||
\cyrf
|
||||
\cyrh
|
||||
\cyrc
|
||||
\cyrch
|
||||
\cyrsh
|
||||
\cyrshch
|
||||
\cyrhrdsn
|
||||
\cyrery
|
||||
\cyrsftsn
|
||||
\cyrerev
|
||||
\cyryu
|
||||
\cyrya
|
||||
\CYRABHCH
|
||||
\CYRABHCHDSC
|
||||
\CYRZHDSC
|
||||
\CYRABHDZE
|
||||
\CYRZDSC
|
||||
\CYRKHK
|
||||
\CYRKHCRS
|
||||
\CYRKDSC
|
||||
\CYRKVCRS
|
||||
\CYRLJE
|
||||
\CYRLDSC
|
||||
\CYRMDSC
|
||||
\CYRNDSC
|
||||
\CYRNG
|
||||
\CYRNJE
|
||||
\CYRNHK
|
||||
\CYROTLD
|
||||
\CYRPHK
|
||||
\CYRRTICK
|
||||
\CYRSDSC
|
||||
\CYRTDSC
|
||||
\CYRTSHE
|
||||
\CYRDJE
|
||||
\CYRUSHRT
|
||||
\CYRSHHA
|
||||
\CYRGHK
|
||||
\CYRGUP
|
||||
\CYRGHCRS
|
||||
\CYRHDSC
|
||||
\CYRDZHE
|
||||
\CYRDZE
|
||||
\CYRTETSE
|
||||
\CYRCHLDSC
|
||||
\CYRCHVCRS
|
||||
\CYRCHRDSC
|
||||
\CYRSEMISFTSN
|
||||
\CYRIE
|
||||
\CYRSCHWA
|
||||
\CYRII
|
||||
\CYRJE
|
||||
\CYRYI
|
||||
\CYRY
|
||||
\CYRYHCRS
|
||||
\CYRAE
|
||||
\CYRABHHA
|
||||
\CYRpalochka
|
||||
\cyrabhch
|
||||
\cyrabhchdsc
|
||||
\cyrzhdsc
|
||||
\cyrabhdze
|
||||
\cyrzdsc
|
||||
\cyrkhk
|
||||
\cyrkhcrs
|
||||
\cyrkdsc
|
||||
\cyrkvcrs
|
||||
\cyrlje
|
||||
\cyrldsc
|
||||
\cyrmdsc
|
||||
\cyrndsc
|
||||
\cyrng
|
||||
\cyrnje
|
||||
\cyrnhk
|
||||
\cyrotld
|
||||
\cyrphk
|
||||
\cyrrtick
|
||||
\cyrsdsc
|
||||
\cyrtdsc
|
||||
\cyrtshe
|
||||
\cyrdje
|
||||
\cyrushrt
|
||||
\cyrshha
|
||||
\cyrghk
|
||||
\cyrgup
|
||||
\cyrghcrs
|
||||
\cyrhdsc
|
||||
\cyrdzhe
|
||||
\cyrdze
|
||||
\cyrtetse
|
||||
\cyrchldsc
|
||||
\cyrchvcrs
|
||||
\cyrchrdsc
|
||||
\cyrsemisftsn
|
||||
\cyrie
|
||||
\cyrschwa
|
||||
\cyrii
|
||||
\cyrje
|
||||
\cyryi
|
||||
\cyry
|
||||
\cyryhcrs
|
||||
\cyrae
|
||||
\cyrabhha
|
@ -0,0 +1,43 @@
|
||||
# diagxy package - Michael Barr's commutative-diagram package
|
||||
# freyj 04/04/2007
|
||||
# version 2: freyj 7/10/2007
|
||||
#-----------------
|
||||
# delimiters
|
||||
\bfig
|
||||
\efig
|
||||
# in-line macros
|
||||
\to/{sh}/^{L}_{L}
|
||||
\mon^{L}_{L}
|
||||
\epi^{L}_{L}
|
||||
\toleft^{L}_{L}
|
||||
\monleft^{L}_{L}
|
||||
\epileft^{L}_{L}
|
||||
# diagram macros
|
||||
\place({x},{y})[{item}]
|
||||
\twoar({dx},{dy})
|
||||
\morphism({x},{y})|{p}|/{sh}/<{dx},{dy}>[{N}`{N};{L}]
|
||||
\square({x},{y})|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}]
|
||||
\hsquares({x},{y})|{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dx},{dy}>[{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}]
|
||||
\vsquares({x},{y})|{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy},{dy}>[{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}]
|
||||
\ptriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\qtriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\dtriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\btriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\Atriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\Vtriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\Ctriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\Dtriangle({x},{y})|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N};{L}`{L}`{L}]
|
||||
\Atrianglepair({x},{y})|{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}]
|
||||
\Vtrianglepair({x},{y})|{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}]
|
||||
\Ctrianglepair({x},{y})|{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}]
|
||||
\Dtrianglepair({x},{y})|{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}]
|
||||
\pullback({x},{y})|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/<{dx}`{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}]|{p}{p}{p}|/{sh}`{sh}`{sh}/<{dx},{dy}>[{N};{L}`{L}`{L}]
|
||||
\Square({x},{y})|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/<{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}] # width automatically determined
|
||||
\hSquares({x},{y})|{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dy}>[{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}] # width automatically determined
|
||||
\vSquares({x},{y})|{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dy},{dy}>[{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}] # width automatically determined
|
||||
\cube({x},{y})|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}]({x},{y})|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>[{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}]|{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}/[{L}`{L}`{L}`{L}]
|
||||
\node {id}({x},{y})[{N}]
|
||||
\arrow|{p}|/{sh}/[{id}`{id};{L}]
|
||||
\Loop({x},{y}){N}({dirstart},{dirend})_{L}
|
||||
\iiixiii({x},{y})|{p}{p}{p}{p}{p}{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>{zeroes}<{dx},{dy}>[{N}`{N}`{N}`{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}`{L}`{L}`{L}`{L}`{L}]
|
||||
\iiixii({x},{y})|{p}{p}{p}{p}{p}{p}{p}|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/<{dx},{dy}>{zeroes}<{dx},{dy}>[{N}`{N}`{N}`{N}`{N}`{N};{L}`{L}`{L}`{L}`{L}`{L}`{L}]
|
@ -0,0 +1,7 @@
|
||||
# tbraun
|
||||
# ctan: doi package
|
||||
# 07/4/2007
|
||||
|
||||
\doi{ref}
|
||||
\doitext
|
||||
|
@ -0,0 +1,3 @@
|
||||
# mode: enumerate.sty
|
||||
# dani/2006-02-18
|
||||
\begin{enumerate}[option]
|
@ -0,0 +1,58 @@
|
||||
# mode: fancybox.sty
|
||||
# dani/2006-02-18
|
||||
\begin{Bcenter}
|
||||
\begin{Bdescription}\item
|
||||
\begin{Bdescription}[valign]\item
|
||||
\begin{Benumerate}\item
|
||||
\begin{Benumerate}[valign]\item
|
||||
\begin{Beqnarray}
|
||||
\begin{Beqnarray*}
|
||||
\begin{Bflushleft}
|
||||
\begin{Bflushright}
|
||||
\begin{Bitemize}\item
|
||||
\begin{Bitemize}[valign]\item
|
||||
\begin{BVerbatim}
|
||||
\begin{BVerbatim}[pos]
|
||||
\begin{landfloat}{float}{rotation command}
|
||||
\begin{Landscape}{paperwidth}{paperheight}{rotation command}
|
||||
\begin{LandScape}{rotation command}
|
||||
\begin{LVerbatim}
|
||||
\begin{Sbox}
|
||||
\begin{Verbatim}
|
||||
\boxput(x,y){lr stuff11}{lr stuff2}
|
||||
\boxput*(x,y){lr stuff11}{lr stuff2}
|
||||
\BVerbatimInput{file}
|
||||
\BVerbatimInput[pos]{file}
|
||||
\cornersize*{dim}
|
||||
\cornersize{num}
|
||||
\doublebox{argument}
|
||||
\end{Bcenter}
|
||||
\end{Bdescription}
|
||||
\end{Benumerate}
|
||||
\end{Beqnarray}
|
||||
\end{Beqnarray*}
|
||||
\end{Bflushleft}
|
||||
\end{Bflushright}
|
||||
\end{Bitemize}
|
||||
\end{BVerbatim}
|
||||
\end{landfloat}
|
||||
\end{Landscape}
|
||||
\end{LandScape}
|
||||
\end{LVerbatim}
|
||||
\end{Sbox}
|
||||
\end{Verbatim}
|
||||
\fancypage{cmds1}{cmds2}
|
||||
\fancyput(x,y){lr stuff}
|
||||
\fancyput*(x,y){lr stuff}
|
||||
\LVerbatimInput{file}
|
||||
\ovalbox{argument}
|
||||
\Ovalbox{argument}
|
||||
\shadowbox{argument}
|
||||
\shadowsize
|
||||
\TheSbox
|
||||
\thisfancypage{cmds1}{cmds2}
|
||||
\thisfancyput(x,y){lr stuff}
|
||||
\thisfancyput*(x,y){lr stuff}
|
||||
\Verb
|
||||
\VerbatimInput{file}
|
||||
\VerbBox{cmd}{lr stuff}
|
@ -0,0 +1,21 @@
|
||||
# mode: fancyhdr.sty
|
||||
# dani/2006-02-18
|
||||
\chead[LH-even]{LH-odd}
|
||||
\chead{stuff}
|
||||
\fancyfootoffset{length}
|
||||
\fancyfootoffset[place]{length}
|
||||
\fancyfoot[option]{stuff}
|
||||
\fancyfoot{stuff}
|
||||
\fancyheadoffset{length}
|
||||
\fancyheadoffset[place]{length}
|
||||
\fancyhead[option]{stuff}
|
||||
\fancyhead{stuff}
|
||||
\fancyhfoffset{length}
|
||||
\fancyhfoffset[place]{length}
|
||||
\fancyhf[option]{stuff}
|
||||
\fancyhf{stuff}
|
||||
\fancypagestyle{name}{style}
|
||||
\lhead[LH-even]{LH-odd}
|
||||
\lhead{stuff}
|
||||
\rhead[LH-even]{LH-odd}
|
||||
\rhead{stuff}
|
@ -0,0 +1,175 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# basic commands
|
||||
\unit{number}{unit commands}
|
||||
\addunit{new unit command}{text}
|
||||
\pow{number}
|
||||
\ufrac{}{}
|
||||
\Ufrac{}{}
|
||||
\UFrac{}{}
|
||||
\per
|
||||
\power{text}{exponent}
|
||||
\Square{text}
|
||||
\Squared
|
||||
\cubic{base}
|
||||
\cubed
|
||||
\fourth{base}
|
||||
\reciprocal{text}
|
||||
\rp{text}
|
||||
\rpsquare{text}
|
||||
\rpsquared
|
||||
\rpcubic{text}
|
||||
\rpcubed
|
||||
\rpfourth{text}
|
||||
|
||||
\metre
|
||||
\meter
|
||||
\kilogram
|
||||
\second
|
||||
\ampere
|
||||
\kelvin
|
||||
\mole
|
||||
\candela
|
||||
|
||||
\yocto
|
||||
\zepto
|
||||
\atto
|
||||
\fempto
|
||||
\pico
|
||||
\nano
|
||||
\micro
|
||||
\milli
|
||||
\centi
|
||||
\deci
|
||||
\deca
|
||||
\deka
|
||||
\hecto
|
||||
\kilo
|
||||
\mega
|
||||
\giga
|
||||
\tera
|
||||
\peta
|
||||
\exa
|
||||
\zetta
|
||||
\yotta
|
||||
|
||||
\yoctod
|
||||
\zeptod
|
||||
\attod
|
||||
\femptod
|
||||
\picod
|
||||
\nanod
|
||||
\microd
|
||||
\millid
|
||||
\centid
|
||||
\decid
|
||||
\decad
|
||||
\dekad
|
||||
\decaD
|
||||
\hectod
|
||||
\kilod
|
||||
\megad
|
||||
\gigad
|
||||
\terad
|
||||
\petad
|
||||
\exad
|
||||
\zettad
|
||||
\yottad
|
||||
|
||||
\rad
|
||||
\sterad
|
||||
\radian
|
||||
\steradian
|
||||
\hertz
|
||||
\newton
|
||||
\pascal
|
||||
\joule
|
||||
\watt
|
||||
\coulomb
|
||||
\volt
|
||||
\farad
|
||||
\ohm
|
||||
\weber
|
||||
\tesla
|
||||
\henry
|
||||
\celsius
|
||||
\degreecelsius
|
||||
\lumen
|
||||
\lux
|
||||
\becquerel
|
||||
\Gray
|
||||
\sievert
|
||||
## derived units in base units
|
||||
\radianbase
|
||||
\steradianbase
|
||||
\hertzbase
|
||||
\newtonbase
|
||||
\pascalbase
|
||||
\joulebase
|
||||
\wattbase
|
||||
\coulombbase
|
||||
\voltbase
|
||||
\faradbase
|
||||
\ohmbase
|
||||
\siemensbase
|
||||
\weberbase
|
||||
\teslabase
|
||||
\henrybase
|
||||
\celsiusbase
|
||||
\degreecelsiusbase
|
||||
\lumenbase
|
||||
\luxbase
|
||||
\becquerelbase
|
||||
\Graybase
|
||||
\sievertbase
|
||||
## derived units
|
||||
\derradian
|
||||
\dersteradian
|
||||
\derhertz
|
||||
\dernewton
|
||||
\derpascal
|
||||
\derjoule
|
||||
\derwatt
|
||||
\dercoulomb
|
||||
\dervolt
|
||||
\derfarad
|
||||
\derohm
|
||||
\dersiemens
|
||||
\derweber
|
||||
\dertesla
|
||||
\derhenry
|
||||
\dercelsius
|
||||
\derdegreecelsius
|
||||
\derlumen
|
||||
\derlux
|
||||
\derbecquerel
|
||||
\derGray
|
||||
\dersievert
|
||||
# non SI units
|
||||
\minute
|
||||
\hour
|
||||
\dday
|
||||
\degree
|
||||
\paminute
|
||||
\parsecond
|
||||
\angstrom
|
||||
\AstroE
|
||||
\lightyear
|
||||
\parsec
|
||||
\gal
|
||||
\liter
|
||||
\litre
|
||||
\atomicmass
|
||||
\gram
|
||||
\ton
|
||||
\tonne
|
||||
\barn
|
||||
\hectare
|
||||
\are
|
||||
\bbar
|
||||
\curie
|
||||
\rem
|
||||
\roentgen
|
||||
\oersted
|
||||
\electronvolt
|
@ -0,0 +1,60 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# commands in np form
|
||||
\Graypersecondnp
|
||||
\metrepersquaresecondnp
|
||||
\joulepermolenp
|
||||
\molepercubicmetrenp
|
||||
\radianpersquaresecondnp
|
||||
\kilogramsquaremetrepersecondnp
|
||||
\radianpersecondnp
|
||||
\Squaremetrepercubicmetrenp
|
||||
\coulombpermolnp
|
||||
\amperepersquaremetrenp
|
||||
\kilogrampercubicmetrenp
|
||||
\Squaremetrepernewtonsecondnp
|
||||
\pascalsecondnp
|
||||
\coulombpercubicmetrenp
|
||||
\voltpermetrenp
|
||||
\coulombpersquaremetrenp
|
||||
\faradpermetrenp
|
||||
\wattpersquaremetrenp
|
||||
\joulepersquaremetrenp
|
||||
\newtonpercubicmetrenp
|
||||
\newtonperkilogramnp
|
||||
\jouleperkelvinnp
|
||||
\jouleperkilogramnp
|
||||
\coulombperkilogramnp
|
||||
\Squaremetrepersecondnp
|
||||
\Squaremetrepersquaresecondnp
|
||||
\kilogrammetrepersecondnp
|
||||
\candelapersquaremetrenp
|
||||
\amperepermetrenp
|
||||
\jouleperteslanp
|
||||
\henrypermetrenp
|
||||
\kilogrampersecondnp
|
||||
\kilogrampersquaremetresecondnp
|
||||
\kilogrampersquaremetrenp
|
||||
\kilogrampermetrenp
|
||||
\joulepermolekelvinnp
|
||||
\kilogramperkilomolenp
|
||||
\kilogramsquaremetrenp
|
||||
\kilogrammetrepersquaresecondnp
|
||||
\newtonpersquaremetrenp
|
||||
\persquaremetresecondnp
|
||||
\wattperkilogramnp
|
||||
\wattpercubicmetrenp
|
||||
\wattpersquaremetresteradiannp
|
||||
\jouleperkilogramkelvinnp
|
||||
\Squaremetreperkilogramnp
|
||||
\cubicmetreperkilogramnp
|
||||
\newtonpermetrenp
|
||||
\wattpermetrekelvinnp
|
||||
\newtonmetrenp
|
||||
\Squaremetrepercubicsecondnp
|
||||
\metrepersecondnp
|
||||
\joulepercubicmetrenp
|
||||
\kilogrampercubicmetrecoulombnp
|
||||
\cubicmetrepersecondnp
|
||||
\kilogrampersecondcubicmetrenp
|
@ -0,0 +1,71 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# commands in per form
|
||||
\Squaremetre
|
||||
\cubicmetre
|
||||
\Graypersecond
|
||||
\metrepersquaresecond
|
||||
\joulepermole
|
||||
\molepercubicmetre
|
||||
\radianpersquaresecond
|
||||
\kilogramsquaremetrepersecond
|
||||
\radianpersecond
|
||||
\Squaremetrepercubicmetre
|
||||
\coulombpermol
|
||||
\amperepersquaremetre
|
||||
\kilogrampercubicmetre
|
||||
\Squaremetrepernewtonsecond
|
||||
\pascalsecond
|
||||
\coulombpercubicmetre
|
||||
\amperemetresecond
|
||||
\voltpermetre
|
||||
\coulombpersquaremetre
|
||||
\faradpermetre
|
||||
\ohmmetre
|
||||
\kilowatthour
|
||||
\wattpersquaremetre
|
||||
\joulepersquaremetre
|
||||
\newtonpercubicmetre
|
||||
\newtonperkilogram
|
||||
\jouleperkelvin
|
||||
\jouleperkilogram
|
||||
\coulombperkilogram
|
||||
\Squaremetrepersecond
|
||||
\rpsquaremetrepersecond
|
||||
\Squaremetrepersquaresecond
|
||||
\rpsquaremetrepersquaresecond
|
||||
\kilogrammetrepersecond
|
||||
\candelapersquaremetre
|
||||
\amperepermetre
|
||||
\joulepertesla
|
||||
\henrypermetre
|
||||
\kilogrampersecond
|
||||
\kilogrampersquaremetresecond
|
||||
\kilogrampersquaremetre
|
||||
\kilogrampermetre
|
||||
\joulepermolekelvin
|
||||
\kilogramperkilomole
|
||||
\kilogramsquaremetre
|
||||
\kilogrammetrepersquaresecond
|
||||
\newtonpersquaremetre
|
||||
\persquaremetresecond
|
||||
\wattperkilogram
|
||||
\wattpercubicmetre
|
||||
\wattpersquaremetresteradian
|
||||
\jouleperkilogramkelvin
|
||||
\Squaremetreperkilogram
|
||||
\rpsquaremetreperkilogram
|
||||
\cubicmetreperkilogram
|
||||
\rpcubicmetreperkilogram
|
||||
\newtonpermetre
|
||||
\Celsius
|
||||
\wattpermetrekelvin
|
||||
\newtonmetre
|
||||
\Squaremetrepercubicsecond
|
||||
\metrepersecond
|
||||
\joulepercubicmetre
|
||||
\kilogrampercubicmetrecoulomb
|
||||
\cubicmetrepersecond
|
||||
\rpcubicmetrepersecond
|
||||
\kilogrampersecondcubicmetre
|
@ -0,0 +1,58 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# commands in UF form
|
||||
\GraypersecondUF
|
||||
\metrepersquaresecondUF
|
||||
\joulepermoleUF
|
||||
\molepercubicmetreUF
|
||||
\radianpersquaresecondUF
|
||||
\kilogramsquaremetrepersecondUF
|
||||
\radianpersecondUF
|
||||
\SquaremetrepercubicmetreUF
|
||||
\coulombpermolUF
|
||||
\amperepersquaremetreUF
|
||||
\kilogrampercubicmetreUF
|
||||
\SquaremetrepernewtonsecondUF
|
||||
\pascalsecondUF
|
||||
\coulombpercubicmetreUF
|
||||
\voltpermetreUF
|
||||
\coulombpersquaremetreUF
|
||||
\faradpermetreUF
|
||||
\wattpersquaremetreUF
|
||||
\joulepersquaremetreUF
|
||||
\newtonpercubicmetreUF
|
||||
\newtonperkilogramUF
|
||||
\jouleperkelvinUF
|
||||
\jouleperkilogramUF
|
||||
\coulombperkilogramUF
|
||||
\SquaremetrepersecondUF
|
||||
\SquaremetrepersquaresecondUF
|
||||
\kilogrammetrepersecondUF
|
||||
\candelapersquaremetreUF
|
||||
\amperepermetreUF
|
||||
\jouleperteslaUF
|
||||
\henrypermetreUF
|
||||
\kilogrampersecondUF
|
||||
\kilogrampersquaremetresecondUF
|
||||
\kilogrampersquaremetreUF
|
||||
\kilogrampermetreUF
|
||||
\joulepermolekelvinUF
|
||||
\kilogramperkilomoleUF
|
||||
\kilogrammetrepersquaresecondUF
|
||||
\newtonpersquaremetreUF
|
||||
\persquaremetresecondUF
|
||||
\wattperkilogramUF
|
||||
\wattpercubicmetreUF
|
||||
\wattpersquaremetresteradianUF
|
||||
\jouleperkilogramkelvinUF
|
||||
\SquaremetreperkilogramUF
|
||||
\cubicmetreperkilogramUF
|
||||
\newtonpermetreUF
|
||||
\wattpermetrekelvinUF
|
||||
\SquaremetrepercubicsecondUF
|
||||
\metrepersecondUF
|
||||
\joulepercubicmetreUF
|
||||
\kilogrampercubicmetrecoulombUF
|
||||
\cubicmetrepersecondUF
|
||||
\kilogrampersecondcubicmetreUF
|
@ -0,0 +1,58 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# commands in Uf form
|
||||
\GraypersecondUf
|
||||
\metrepersquaresecondUf
|
||||
\joulepermoleUf
|
||||
\molepercubicmetreUf
|
||||
\radianpersquaresecondUf
|
||||
\kilogramsquaremetrepersecondUf
|
||||
\radianpersecondUf
|
||||
\SquaremetrepercubicmetreUf
|
||||
\coulombpermolUf
|
||||
\amperepersquaremetreUf
|
||||
\kilogrampercubicmetreUf
|
||||
\SquaremetrepernewtonsecondUf
|
||||
\pascalsecondUf
|
||||
\coulombpercubicmetreUf
|
||||
\voltpermetreUf
|
||||
\coulombpersquaremetreUf
|
||||
\faradpermetreUf
|
||||
\wattpersquaremetreUf
|
||||
\joulepersquaremetreUf
|
||||
\newtonpercubicmetreUf
|
||||
\newtonperkilogramUf
|
||||
\jouleperkelvinUf
|
||||
\jouleperkilogramUf
|
||||
\coulombperkilogramUf
|
||||
\SquaremetrepersecondUf
|
||||
\SquaremetrepersquaresecondUf
|
||||
\kilogrammetrepersecondUf
|
||||
\candelapersquaremetreUf
|
||||
\amperepermetreUf
|
||||
\jouleperteslaUf
|
||||
\henrypermetreUf
|
||||
\kilogrampersecondUf
|
||||
\kilogrampersquaremetresecondUf
|
||||
\kilogrampersquaremetreUf
|
||||
\kilogrampermetreUf
|
||||
\joulepermolekelvinUf
|
||||
\kilogramperkilomoleUf
|
||||
\kilogrammetrepersquaresecondUf
|
||||
\newtonpersquaremetreUf
|
||||
\persquaremetresecondUf
|
||||
\wattperkilogramUf
|
||||
\wattpercubicmetreUf
|
||||
\wattpersquaremetresteradianUf
|
||||
\jouleperkilogramkelvinUf
|
||||
\SquaremetreperkilogramUf
|
||||
\cubicmetreperkilogramUf
|
||||
\newtonpermetreUf
|
||||
\wattpermetrekelvinUf
|
||||
\SquaremetrepercubicsecondUf
|
||||
\metrepersecondUf
|
||||
\joulepercubicmetreUf
|
||||
\kilogrampercubicmetrecoulombUf
|
||||
\cubicmetrepersecondUf
|
||||
\kilogrampersecondcubicmetreUf
|
@ -0,0 +1,58 @@
|
||||
# fancyunits package
|
||||
# get it from http://www.physics.ox.ac.uk/users/bauke/LaTeX/Tips_und_Tricks/fancyunits/index.html
|
||||
# tbraun 27.06.2007
|
||||
# commands in uf form
|
||||
\Grayperseconduf
|
||||
\metrepersquareseconduf
|
||||
\joulepermoleuf
|
||||
\molepercubicmetreuf
|
||||
\radianpersquareseconduf
|
||||
\kilogramsquaremetreperseconduf
|
||||
\radianperseconduf
|
||||
\Squaremetrepercubicmetreuf
|
||||
\coulombpermoluf
|
||||
\amperepersquaremetreuf
|
||||
\kilogrampercubicmetreuf
|
||||
\Squaremetrepernewtonseconduf
|
||||
\pascalseconduf
|
||||
\coulombpercubicmetreuf
|
||||
\voltpermetreuf
|
||||
\coulombpersquaremetreuf
|
||||
\faradpermetreuf
|
||||
\wattpersquaremetreuf
|
||||
\joulepersquaremetreuf
|
||||
\newtonpercubicmetreuf
|
||||
\newtonperkilogramuf
|
||||
\jouleperkelvinuf
|
||||
\jouleperkilogramuf
|
||||
\coulombperkilogramuf
|
||||
\Squaremetreperseconduf
|
||||
\Squaremetrepersquareseconduf
|
||||
\kilogrammetreperseconduf
|
||||
\candelapersquaremetreuf
|
||||
\amperepermetreuf
|
||||
\jouleperteslauf
|
||||
\henrypermetreuf
|
||||
\kilogramperseconduf
|
||||
\kilogrampersquaremetreseconduf
|
||||
\kilogrampersquaremetreuf
|
||||
\kilogrampermetreuf
|
||||
\joulepermolekelvinuf
|
||||
\kilogramperkilomoleuf
|
||||
\kilogrammetrepersquareseconduf
|
||||
\newtonpersquaremetreuf
|
||||
\persquaremetreseconduf
|
||||
\wattperkilogramuf
|
||||
\wattpercubicmetreuf
|
||||
\wattpersquaremetresteradianuf
|
||||
\jouleperkilogramkelvinuf
|
||||
\Squaremetreperkilogramuf
|
||||
\cubicmetreperkilogramuf
|
||||
\newtonpermetreuf
|
||||
\wattpermetrekelvinuf
|
||||
\Squaremetrepercubicseconduf
|
||||
\metreperseconduf
|
||||
\joulepercubicmetreuf
|
||||
\kilogrampercubicmetrecoulombuf
|
||||
\cubicmetreperseconduf
|
||||
\kilogrampersecondcubicmetreuf
|
@ -0,0 +1,14 @@
|
||||
#fancyvrb.cwl
|
||||
#for fancyvrb package
|
||||
#neeraavi 12 Apr 2007
|
||||
|
||||
\VerbatimFootnotes
|
||||
\DefineShortVerb{verb}
|
||||
\UndefineShortVerb{verb}
|
||||
\begin{Verbatim}
|
||||
\begin{Verbatim}[key=value]
|
||||
\end{Verbatim}
|
||||
\begin{Verbatim*}
|
||||
\end{Verbatim*}
|
||||
\begin{BVerbatim*}
|
||||
\end{BVerbatim*}
|
@ -0,0 +1,49 @@
|
||||
# fontspec 1.14 package
|
||||
# nja 17 July 2007
|
||||
# url: http://www.ctan.org/tex-archive/help/Catalogue/entries/fontspec.html
|
||||
|
||||
\usepackage[cm-default/lm-default/math/no-math/config/no-config/quiet]{fontspec}
|
||||
|
||||
\fontspec{fontname}
|
||||
\fontspec[fontfeature=option]{fontname}
|
||||
\fontspec[fontfeature=option,fontfeature=option]{fontname}
|
||||
|
||||
\setmainfont{fontname}
|
||||
\setmainfont[fontfeature=option]{fontname}
|
||||
\setmainfont[fontfeature=option,fontfeature=option]{fontname}
|
||||
|
||||
\setsansfont{fontname}
|
||||
\setsansfont[fontfeature=option]{fontname}
|
||||
\setsansfont[fontfeature=option,fontfeature=option]{fontname}
|
||||
|
||||
\setmonofont{fontname}
|
||||
\setmonofont[fontfeature=option]{fontname}
|
||||
\setmonofont[fontfeature=option,fontfeature=option]{fontname}
|
||||
|
||||
\newfontfamily<fontinstance>{fontname}
|
||||
|
||||
\newfontface<fontface>{fontname}
|
||||
\newfontface<fontface>[fontfeature=option]{fontname}
|
||||
\newfontface<fontface>[fontfeature=option,fontfeature=option]{fontname}
|
||||
|
||||
\setmathrm
|
||||
\setboldmathrm
|
||||
\setmathsf
|
||||
\setmathtt
|
||||
|
||||
|
||||
\defaultfontfeatures{fontfeature=option}
|
||||
\defaultfontfeatures{fontfeature=option,fontfeature=option}
|
||||
\addfontfeatures{fontfeatures}
|
||||
\addfontfeatures{fontfeature=option,fontfeature=option}
|
||||
|
||||
\newfontscript{fontspecname}{OpenTypedefinition}
|
||||
\newfontlanguage{fontspecname}{OpenTypedefinition}
|
||||
|
||||
\newAATfeature{feature}{option}{featurecode}{selectorcode}
|
||||
\newfeaturecode{feature}{option}{featurecode}{selectorcode}
|
||||
\newICUfeature{feature}{option}{featuretag}
|
||||
\newfontfeature{name}{inputstring}
|
||||
\aliasfontfeature{existingname}{newname}
|
||||
\aliasfontfeatureoption{fontfeature}{existingname}{newname}
|
||||
|
@ -0,0 +1,25 @@
|
||||
# graphicx package
|
||||
# mario 09/06/2007
|
||||
# URL: http://tug.ctan.org/tex-archive/macros/latex/required/graphics/
|
||||
\color{name}
|
||||
\color[model]{specification}
|
||||
\color{specification}
|
||||
\colorbox{name}{text}
|
||||
\colorbox[model]{specification}{text}
|
||||
\DeclareGraphicsExtensions{ext-list}
|
||||
\DeclareGraphicsRule{ext}{type}{read-file}{command}
|
||||
\definecolor{name}{model}{colour specification}
|
||||
\fcolorbox{name1}{name2}{text}
|
||||
\fcolorbox[model]{specification1}{specification2}{text}
|
||||
\graphicspath{dir-list}
|
||||
\includegraphics*[key val list]{file}
|
||||
\includegraphics[key val list]{file}
|
||||
\pagecolor{name}
|
||||
\pagecolor[model]{specification}
|
||||
\reflectbox{text}
|
||||
\resizebox*{h-length}{v-length}{text}
|
||||
\rotatebox[key val list]{angle}{text}
|
||||
\scalebox{h-scale}[v-scale]{text}
|
||||
\setkeys{Gin}{key val}
|
||||
\textcolor{name}{text}
|
||||
\textcolor[model]{specification}{text}
|
@ -0,0 +1,35 @@
|
||||
# hyperref package
|
||||
# neeraavi 21 Mar 2007
|
||||
\hypersetup{options}
|
||||
\href{URL}{text}
|
||||
\url{URL}
|
||||
\nolinkurl{URL}
|
||||
\hyperbaseurl{URL}
|
||||
\hyperimage{imageURL}{text}
|
||||
\hyperdef{category}{name}{text}
|
||||
\hyperref{URL}{category}{name}{text}
|
||||
\hyperref[label]{text}
|
||||
\hyperlink{name}{text}
|
||||
\hypertarget{name}{text}
|
||||
\phantomsection
|
||||
\autoref{label}
|
||||
\ref*{label}
|
||||
\pageref*{label}
|
||||
\pdfstringdef{macroname}{TEXstring}
|
||||
\texorpdfstring{TEXstring}{PDFstring}
|
||||
\hypercalcbp{dimen specification}
|
||||
\Acrobatmenu{menuoption}{text}
|
||||
\TextField[parameters]{label}
|
||||
\CheckBox[parameters]{label}
|
||||
\ChoiceMenu[parameters]{label}{choices}
|
||||
\PushButton[parameters]{label}
|
||||
\Submit[parameters]{label}
|
||||
\Reset[parameters]{label}
|
||||
\LayoutTextField{label}{field}
|
||||
\LayoutChoiceField{label}{field}
|
||||
\LayoutCheckField{label}{field}
|
||||
\MakeRadioField{width}{height}
|
||||
\MakeCheckField{width}{height}
|
||||
\MakeTextField{width}{height}
|
||||
\MakeChoiceField{width}{height}
|
||||
\MakeButtonField{text}
|
@ -0,0 +1,18 @@
|
||||
# ifthen 1.1 package
|
||||
# nja 17 July 2007
|
||||
# url: http://www.ctan.org/tex-archive/help/Catalogue/entries/ifthen.html
|
||||
|
||||
\ifthenelse{test}{then clause}{else clause}
|
||||
\isodd{number}
|
||||
\isundefined{command}
|
||||
\equal{string}{string}
|
||||
\AND
|
||||
\OR
|
||||
\NOT
|
||||
\lengthtest{dimen operator dimen}
|
||||
\boolean{name}
|
||||
\newboolean{name}
|
||||
\provideboolean{name}
|
||||
\setboolean{name}{truth value}
|
||||
\whiledo{test}{while clause}
|
||||
|
@ -0,0 +1,11 @@
|
||||
# tbraun
|
||||
# 2006/30/05
|
||||
|
||||
\import{full path}{file}
|
||||
\import*{full path}{file}
|
||||
\subimport{relative path}{file}
|
||||
\subimport*{relative path}{file}
|
||||
\includefrom{full path}{file}
|
||||
\includefrom*{full path}{file}
|
||||
\subincludefrom{relative path}{file}
|
||||
\subincludefrom*{relative path}{file}
|
@ -0,0 +1,32 @@
|
||||
# jurabib package
|
||||
# author: Francisco Fernández Labastida 10 Apr 2007
|
||||
# last modified: Ben E. Hard 27 august 2007
|
||||
\cite[page-range]{key}
|
||||
\cite[Annotator/See][page-range]{key}
|
||||
\cite*[page-range]{key}
|
||||
\cite*[Annotator/See][page-range]{key}
|
||||
\citefield[page-range]{field}{key}
|
||||
\citenotitlefortype{article,book,…}
|
||||
\citeswithoutentry{key1,key2,…}
|
||||
\citetitle[page-range]{key}
|
||||
\citetitle[Annotator/See][page-range]{key}
|
||||
\citetitlefortype{article,book,…}
|
||||
\footcite[page-range]{key}
|
||||
\footcite[Annotator/See][page-range]{key}
|
||||
\footcite*[page-range]{key}
|
||||
\footcite*[Annotator/See][page-range]{key}
|
||||
\footcitetitle[page-range]{key}
|
||||
\footcitetitle[Annotator/See][page-range]{key}
|
||||
\footfullcite[page-range]{key}
|
||||
\footfullcite[Annotator/See][page-range]{key}
|
||||
\fullcite[page-range]{key}
|
||||
\fullcite[Annotator/See][page-range]{key}
|
||||
\nextcitefull{key1,key2,…}
|
||||
\nextcitenotitle{key1,key2,…}
|
||||
\nextcitereset{key1,key2,…}
|
||||
\nextciteshort{key1,key2,…}
|
||||
\nobibliography{bibfile}
|
||||
\noibidem
|
||||
\noidem
|
||||
\nocite{key-or-*}
|
||||
|
@ -0,0 +1,5 @@
|
||||
# latex mode: LaTeX commands (latex 2.09 level)
|
||||
# obsolete commands from LaTeX 2.09
|
||||
# dani/2006-02-18
|
||||
\documentstyle[options]{style}
|
||||
\documentstyle{style}
|
@ -0,0 +1,177 @@
|
||||
# latex mode: LaTeX commands (package level)
|
||||
# dani/2006-02-18
|
||||
# commands with big Letters and others
|
||||
\AtBeginDocument{code}
|
||||
\AtEndDocument{code}
|
||||
\AtEndOfClass{code}
|
||||
\AtEndOfPackage{code}
|
||||
\CheckCommand{cmd}[args][default]{def}
|
||||
\CheckCommand{cmd}[args]{def}
|
||||
\CheckCommand{cmd}{def}
|
||||
\CurrentOption
|
||||
\DeclareOption*{code}
|
||||
\DeclareOption{option}{code}
|
||||
\DeclareRobustCommand
|
||||
\ExecuteOptions{optionlist}
|
||||
\IfFileExists{file}{then}{else}
|
||||
\InputIfFileExists{file}{then}{else}
|
||||
\LoadClass[optionlist]{class}
|
||||
\LoadClass[optionlist]{class}[release]
|
||||
\LoadClass{class}
|
||||
\LoadClass{class}[release]
|
||||
\NeedsTeXFormat{format}
|
||||
\NeedsTeXFormat{format}[release]
|
||||
\OptionNotUsed
|
||||
\PackageError{text}
|
||||
\PackageInfo{text}
|
||||
\PackageWarning{text}
|
||||
\PackageWarningNoLine{text}
|
||||
\PassOptionsToClass{optionlist}{class}
|
||||
\PassOptionsToPackage{optionlist}{package}
|
||||
\ProcessOptions
|
||||
\ProcessOptions*
|
||||
\ProvidesClass{name}
|
||||
\ProvidesClass{name}[release]
|
||||
\ProvidesFile{ma,e}
|
||||
\ProvidesFile{name}{release}
|
||||
\ProvidesPackage{name}
|
||||
\ProvidesPackage{name}[release]
|
||||
\RequirePackage[optionlist]{package}
|
||||
\RequirePackage[optionlist]{package}[release]
|
||||
\RequirePackage{package}
|
||||
\RequirePackage{package}[release]
|
||||
# counter, lengths and dimens
|
||||
\setcounter{counter}{value}
|
||||
\setlanguage{language}
|
||||
\setlength{\gnat}{length}
|
||||
\setpapersize{layout}
|
||||
\settodepth{\gnat}{text}
|
||||
\settoheight{\gnat}{text}
|
||||
\settowidth{\gnat}{text}
|
||||
\addto
|
||||
\addtocontents{file}{text}
|
||||
\addtocounter{counter}{value}
|
||||
\addtolength{\gnat}{length}
|
||||
\addtoversion
|
||||
\addvspace{length}
|
||||
\deffootnote[width}{indention}{par indention}{definition}
|
||||
\newcounter{foo}
|
||||
\newcounter{foo}[counter]
|
||||
\refstepcounter{counter}
|
||||
\restorecr
|
||||
\reversemarginpar
|
||||
\stepcounter{counter}
|
||||
\stretch{number}
|
||||
\usecounter{counter}
|
||||
\usefont{enc}{family}{series}{shape}
|
||||
\value{counter}
|
||||
\newfont{cmd}{fontname}
|
||||
# counter representative
|
||||
\thechapter
|
||||
\theenumi
|
||||
\theenumiv
|
||||
\theequation
|
||||
\thefigure
|
||||
\thefootnote
|
||||
\thefootnotemark
|
||||
\thehours
|
||||
\theminutes
|
||||
\thempfn
|
||||
\thempfootnote
|
||||
\thepage
|
||||
\theparagraph
|
||||
\thepart
|
||||
\thesection
|
||||
\thesubparagraph
|
||||
\thesubsection
|
||||
\thesubsubsection
|
||||
\thetable
|
||||
# boxes
|
||||
\savebox{cmd}[width][pos]{text}
|
||||
\savebox{cmd}[width]{text}
|
||||
\savebox{cmd}{text}
|
||||
\dashbox{dashlength}(width,height)[position]{text}
|
||||
\dashbox{dashlength}(width,height){text}
|
||||
\makebox(width,height)[position]{text}
|
||||
\makebox(width,height){text}
|
||||
\makebox[width][position]{text}
|
||||
\makebox[width]{text}
|
||||
\usebox{\box}
|
||||
\raisebox{distance}[extendabove][extendbelow]{text}
|
||||
\raisebox{distance}[extendabove]{text}
|
||||
\raisebox{distance}{text}
|
||||
\newsavebox{\box}
|
||||
# variables
|
||||
\belowcaptionskip
|
||||
\binoppenalty
|
||||
\bottomfraction
|
||||
\bottomnumber
|
||||
\dblfigrule
|
||||
\dblfloatpagefraction
|
||||
\dblfloatsep
|
||||
\dbltextfloatsep
|
||||
\dbltopfraction
|
||||
\dbltopnumber
|
||||
\defaultscriptratio
|
||||
\defaultscriptscriptratio
|
||||
\doublerulesep
|
||||
\emergencystretch
|
||||
\footnotesep
|
||||
\footskip
|
||||
\intextsep
|
||||
\itemindent
|
||||
\itemsep
|
||||
\labelenumi
|
||||
\labelitemi
|
||||
\labelitemii
|
||||
\labelitemiii
|
||||
\labelitemiv
|
||||
\labelsep
|
||||
\labelwidth
|
||||
\leftmargin
|
||||
\leftmargini
|
||||
\leftmarginii
|
||||
\leftmarginiii
|
||||
\leftmarginiv
|
||||
\leftmarginv
|
||||
\leftmarginvi
|
||||
\leftmark
|
||||
\marginparpush
|
||||
\marginparsep
|
||||
\marginparwidth
|
||||
\paperheight
|
||||
\paperwidth
|
||||
\tabbingsep
|
||||
\tabcolsep
|
||||
\topfigrule
|
||||
\topfraction
|
||||
\topmargin
|
||||
\topnumber
|
||||
\topsep
|
||||
\totalheight
|
||||
\totalnumber
|
||||
\textfloatsep
|
||||
\textfraction
|
||||
\abovecaptionskip
|
||||
\addpenalty
|
||||
\arraycolsep
|
||||
\arrayrulewidth
|
||||
\arraystretch
|
||||
\badness
|
||||
\baselinestretch
|
||||
\columnsep
|
||||
\columnseprule
|
||||
\columnwidth
|
||||
\evensidemargin
|
||||
\extracolsep
|
||||
\fboxrule
|
||||
\fboxsep
|
||||
\floatpagefraction
|
||||
\floatsep
|
||||
\headheight
|
||||
\headsep
|
||||
\height
|
||||
\partopsep
|
||||
\parsep
|
||||
\lineskiplimits
|
||||
\footheight
|
@ -0,0 +1,462 @@
|
||||
# latex mode: LaTeX commands (document level)
|
||||
# dani/2006-02-18
|
||||
# tbraun/2006-08-03 removed dup inserted by me ...
|
||||
# tbraun/2007-02-24 added left/right variants
|
||||
\abstractname{name}
|
||||
\addcontentsline{file}{secunit}{entry}
|
||||
\Alph{counter}
|
||||
\alph{counter}
|
||||
\and
|
||||
\appendix
|
||||
\appendixname
|
||||
\arabic{counter}
|
||||
\author{names}
|
||||
\begin{}
|
||||
\begin{abstract}
|
||||
\begin{alltt}
|
||||
\begin{array}{cols}
|
||||
\begin{array}[pos]{cols}
|
||||
\begin{center}
|
||||
\begin{description}\item
|
||||
\begin{displaymath}
|
||||
\begin{document}
|
||||
\begin{enumerate}\item
|
||||
\begin{equation}
|
||||
\begin{figure}
|
||||
\begin{figure}[placement]
|
||||
\begin{figure*}
|
||||
\begin{figure*}[placement]
|
||||
\begin{filecontents}
|
||||
\begin{flushleft}
|
||||
\begin{flushright}
|
||||
\begin{itemize}\item
|
||||
\begin{list}{label}{spacing}
|
||||
\begin{lrbox}
|
||||
\begin{math}
|
||||
\begin{minipage}[position]{width}
|
||||
\begin{minipage}{width}
|
||||
\begin{picture}(width,height)
|
||||
\begin{picture}(width,height)(xoffset,yoffset)
|
||||
\begin{quotation}
|
||||
\begin{quote}
|
||||
\begin{tabbing}
|
||||
\begin{table*}
|
||||
\begin{table*}[placement]
|
||||
\begin{table}
|
||||
\begin{table}[placement]
|
||||
\begin{tabular}{cols}
|
||||
\begin{tabular}[pos]{cols}
|
||||
\begin{tabular*}{width}[pos]{cols}
|
||||
\begin{tabular*}{width}{cols}
|
||||
\begin{thebibliography}{widestlabel}
|
||||
\begin{theindex}
|
||||
\begin{theorem}
|
||||
\begin{theorem}[optional]
|
||||
\begin{titlepage}
|
||||
\begin{trivlist}
|
||||
\begin{verbatim}
|
||||
\begin{verbatim*}
|
||||
\begin{verse}
|
||||
\end{}
|
||||
\end{abstract}
|
||||
\end{alltt}
|
||||
\end{array}
|
||||
\end{center}
|
||||
\end{description}
|
||||
\end{displaymath}
|
||||
\end{document}
|
||||
\end{enumerate}
|
||||
\end{equation}
|
||||
\end{figure}
|
||||
\end{figure*}
|
||||
\end{filecontents}
|
||||
\end{flushleft}
|
||||
\end{flushright}
|
||||
\end{itemize}
|
||||
\end{list}
|
||||
\end{lrbox}
|
||||
\end{math}
|
||||
\end{minipage}
|
||||
\end{picture}
|
||||
\end{quotation}
|
||||
\end{quote}
|
||||
\end{tabbing}
|
||||
\end{table}
|
||||
\end{table*}
|
||||
\end{tabular}
|
||||
\end{tabular*}
|
||||
\end{thebibliography}
|
||||
\end{theindex}
|
||||
\end{theorem}
|
||||
\end{titlepage}
|
||||
\end{trivlist}
|
||||
\end{verbatim}
|
||||
\end{verbatim*}
|
||||
\end{verse}
|
||||
\ensuremath{text}
|
||||
\bezier{n}(x1,y1)(x2,y2)(x3,y3)
|
||||
\bfseries
|
||||
\bibitem{citekey}
|
||||
\bibitem[label]{citekey}
|
||||
\bibliographystyle{style}
|
||||
\bibliography{file}
|
||||
\boldmath
|
||||
\botfigrule
|
||||
\cal
|
||||
\caption{title}
|
||||
\caption[short]{title}
|
||||
\cdots
|
||||
\chapter{title}
|
||||
\chapter*{title}
|
||||
\chapter[short]{title}
|
||||
\chaptermark{code}
|
||||
\chaptername{name}
|
||||
\cite{keylist}
|
||||
\cite[text]{keylist}
|
||||
\circle{diameter}
|
||||
\circle*{diameter}
|
||||
\cleardoublepage
|
||||
\clearpage
|
||||
\cline{i-j}
|
||||
\contentsline{type}{text}{page}
|
||||
\contentsname{name}
|
||||
\date{text}
|
||||
\ddots
|
||||
\depth
|
||||
\descriptionlabel{code}
|
||||
\documentclass[options]{style}
|
||||
\documentclass{style}
|
||||
\emph{text}
|
||||
\enlargethispage*{size}
|
||||
\enlargethispage{size}
|
||||
\family
|
||||
\fbox{text}
|
||||
\figurename{name}
|
||||
\flq
|
||||
\flqq
|
||||
\flushbottom
|
||||
\fnsymbol{counter}
|
||||
\fontencoding{enc}
|
||||
\fontfamily{family}
|
||||
\fontseries{series}
|
||||
\fontshape{shape}
|
||||
\fontsize{size}{skip}
|
||||
\fontsubfuzz
|
||||
\footnotemark
|
||||
\footnotemark[number]
|
||||
\footnotesize
|
||||
\footnotetext[number]{text}
|
||||
\footnotetext{text}
|
||||
\footnote[number]{text}
|
||||
\footnote{text}
|
||||
\frac{num}{den}
|
||||
\framebox(xdimen,ydimen)[position]{text}
|
||||
\framebox(xdimen,ydimen){text}
|
||||
\framebox[width][position]{text}
|
||||
\framebox[width]{text}
|
||||
\frame{text}
|
||||
\frq
|
||||
\frqq
|
||||
\glossaryentry{text}{pagenum}
|
||||
\glossary{text}
|
||||
\glq
|
||||
\glqq
|
||||
\grq
|
||||
\grqq
|
||||
\hline
|
||||
\hlinefill
|
||||
\hspace*{length}
|
||||
\hspace{length}
|
||||
\hss
|
||||
\huge
|
||||
\Huge
|
||||
\hyphenation{words}
|
||||
\include{file}
|
||||
\input{file}
|
||||
\includegraphics[options]{name}
|
||||
\includegraphics{name}
|
||||
\includeonly{filelist}
|
||||
\indexname{name}
|
||||
\indexspace
|
||||
\index{entry}
|
||||
\inputlineno
|
||||
\item
|
||||
\item[label]
|
||||
\iterate
|
||||
\itshape
|
||||
\kill
|
||||
\label{key}
|
||||
\language
|
||||
\LARGE
|
||||
\Large
|
||||
\large
|
||||
\LaTeX
|
||||
\LaTeXe
|
||||
\ldots
|
||||
\lefteqn
|
||||
\lefthyphenmin
|
||||
\line(xslope,yslope){length}
|
||||
\linebreak
|
||||
\linebreak[number]
|
||||
\linethickness{dimension}
|
||||
\linewidth
|
||||
\listfigurename{name}
|
||||
\listfiles
|
||||
\listoffigures
|
||||
\listoftables
|
||||
\listparindent
|
||||
\listtablename{name}
|
||||
\makeatletter
|
||||
\makeatother
|
||||
\makeglossary
|
||||
\makeindex
|
||||
\makelabel
|
||||
\makelabels{number}
|
||||
\MakeLowercase{text}
|
||||
\maketitle
|
||||
\MakeUppercase{text}
|
||||
\marginpar[left]{right}
|
||||
\marginpar{right}
|
||||
\markboth{lefthead}{righthead}
|
||||
\markright{righthead}
|
||||
\mathbb
|
||||
\mathbf
|
||||
\mathcal
|
||||
\mathds
|
||||
\mathellipsis
|
||||
\mathfrak
|
||||
\mathgroup
|
||||
\mathit
|
||||
\mathnormal
|
||||
\mathrm
|
||||
\mathscr
|
||||
\mathsf
|
||||
\mathsterling
|
||||
\mathtt
|
||||
\mathunderscore
|
||||
\mathversion
|
||||
\mbox{text}
|
||||
\mdseries
|
||||
\multicolumn{cols}{pos}{text}
|
||||
\multiput(xcoord,ycoord)(xdelta,ydelta){copies}{object}
|
||||
\newlabel
|
||||
\newlength{\length}
|
||||
\newline
|
||||
\newpage
|
||||
\newtheorem{envname}[numberedlike]{caption}
|
||||
\newtheorem{envname}{caption}
|
||||
\newtheorem{envname}{caption}[within]
|
||||
\nocite{keylist}
|
||||
\nocorr
|
||||
\nocorrlist{charlist}
|
||||
\nofiles
|
||||
\nolinebreak
|
||||
\nolinebreak[number]
|
||||
\nonumber
|
||||
\nopagebreak
|
||||
\nopagebreak[number]
|
||||
\normalcolor
|
||||
\normalfont
|
||||
\normalmarginpar
|
||||
\normalsize
|
||||
\nouppercase
|
||||
\null
|
||||
\obeycr
|
||||
\oddsidemargin
|
||||
\oldstylenums
|
||||
\onecolumn
|
||||
\oval(width,height)
|
||||
\oval(width,height)[portion]
|
||||
\overbrace{text}
|
||||
\overline{text}
|
||||
\pagebreak
|
||||
\pagebreak[number]
|
||||
\pagename
|
||||
\pagenumbering{numstyle}
|
||||
\pageref{key}
|
||||
\pagestyle{option}
|
||||
\pagetotal
|
||||
\paragraph*{title}
|
||||
\paragraph[short]{title}
|
||||
\paragraphmark
|
||||
\paragraph{title}
|
||||
\parbox[position]{width}{text}
|
||||
\parbox{width}{text}
|
||||
\part*{title}
|
||||
\part[short]{title}
|
||||
\partname{name}
|
||||
\part{title}
|
||||
\plus
|
||||
\poptabs
|
||||
\pounds
|
||||
\put(xcoord,ycoord){text}
|
||||
\ref{key}
|
||||
\refname{name}
|
||||
\righthyphenmin
|
||||
\rightmargin
|
||||
\rightmark
|
||||
\rmfamily
|
||||
\Roman{counter}
|
||||
\roman{counter}
|
||||
\rule[lift]{width}{thickness}
|
||||
\rule{width}{thickness}
|
||||
\samepage
|
||||
\sbox{cmd}[text]
|
||||
\scriptsize
|
||||
\scshape
|
||||
\section{title}
|
||||
\section*{title}
|
||||
\section[short]{title}
|
||||
\sectionmark{code}
|
||||
\selectfont
|
||||
\sffamily
|
||||
\shortstack[position]{text\\text}
|
||||
\shortstack{text\\text}
|
||||
\slshape
|
||||
\small
|
||||
\smash
|
||||
\space
|
||||
\sqrt[root]{arg}
|
||||
\sqrt{arg}
|
||||
\stackrel{above}{under}
|
||||
\stop
|
||||
\subitem
|
||||
\subparagraph*{title}
|
||||
\subparagraph[short]{title}
|
||||
\subparagraphmark{code}
|
||||
\subparagraph{title}
|
||||
\subsection{title}
|
||||
\subsection*{title}
|
||||
\subsection[short]{title}
|
||||
\subsectionmark{code}
|
||||
\subsubitem
|
||||
\subsubsection*{title}
|
||||
\subsubsection[short]{title}
|
||||
\subsubsectionmark{code}
|
||||
\subsubsection{title}
|
||||
\suppressfloats
|
||||
\suppressfloats[placement]
|
||||
\symbol{n}
|
||||
\tablename{name}
|
||||
\tableofcontents
|
||||
\textasciicircum
|
||||
\textasciitilde
|
||||
\textasteriskcentered
|
||||
\textbackslash
|
||||
\textbar
|
||||
\textbf{text}
|
||||
\textbraceleft
|
||||
\textbraceright
|
||||
\textbullet
|
||||
\textcircled
|
||||
\textcompwordmark
|
||||
\textdagger
|
||||
\textdaggerdbl
|
||||
\textdollar
|
||||
\textellipsis
|
||||
\textemdash
|
||||
\textendash
|
||||
\textexclamdown
|
||||
\textgreater
|
||||
\textheight
|
||||
\textit{text}
|
||||
\textless
|
||||
\textmd{text}
|
||||
\textnormal
|
||||
\textparagraph
|
||||
\textperiodcentered
|
||||
\textquestiondown
|
||||
\textquotedblleft
|
||||
\textquotedblright
|
||||
\textquoteleft
|
||||
\textquoteright
|
||||
\textregistered
|
||||
\textrm{text}
|
||||
\textsc{text}
|
||||
\textsection
|
||||
\textsf{text}
|
||||
\textsl{text}
|
||||
\textsterling
|
||||
\textsuperscript
|
||||
\texttrademark
|
||||
\texttt{text}
|
||||
\textunderscore
|
||||
\textup{text}
|
||||
\textvisiblespace
|
||||
\textwidth
|
||||
\thanks{text}
|
||||
\thicklines
|
||||
\thinlines
|
||||
\thispagestyle{empty/plain/headings/myheadings}
|
||||
\time
|
||||
\tiny
|
||||
\title{text}
|
||||
\today
|
||||
\ttfamily
|
||||
\twocolumn[text]
|
||||
\typein[cmd]{msg}
|
||||
\typein{msg}
|
||||
\typeout{msg}
|
||||
\unboldmath
|
||||
\underbrace{text}
|
||||
\underline{text}
|
||||
\upshape
|
||||
\usepackage[options]{package}
|
||||
\usepackage{package}
|
||||
\vdots
|
||||
\vector(xslope,yslope){length}
|
||||
\verb
|
||||
\vline
|
||||
\vspace*{length}
|
||||
\vspace{length}
|
||||
\width
|
||||
# new definitions
|
||||
\newcommand{cmd}[args][default]{def}
|
||||
\newcommand{cmd}[args]{def}
|
||||
\newcommand{cmd}{def}
|
||||
\providecommand{cmd}[args][default]{def}
|
||||
\providecommand{cmd}[args]{def}
|
||||
\providecommand{cmd}{def}
|
||||
\newenvironment{nam}[args][default]{begdef}{enddef}
|
||||
\newenvironment{nam}[args]{begdef}{enddef}
|
||||
\newenvironment{nam}{begdef}{enddef}
|
||||
\renewcommand{cmd}[args][default]{def}
|
||||
\renewcommand{cmd}[args]{def}
|
||||
\renewcommand{cmd}{def}
|
||||
\renewenvironment{nam}[args][default]{begdef}{enddef}
|
||||
\renewenvironment{nam}[args]{begdef}{enddef}
|
||||
\renewenvironment{nam}{begdef}{enddef}
|
||||
\left(
|
||||
\left[
|
||||
\left\lbrace
|
||||
\left|
|
||||
\left\|
|
||||
\left/
|
||||
\left\backslash
|
||||
\left\langle
|
||||
\left\lfloor
|
||||
\left\lceil
|
||||
\left\uparrow
|
||||
\left\downarrow
|
||||
\left\updownarrow
|
||||
\left\Uparrow
|
||||
\left\Downarrow
|
||||
\left\Updownarrow
|
||||
\left.
|
||||
\right(
|
||||
\right[
|
||||
\right\rbrace
|
||||
\right|
|
||||
\right\|
|
||||
\right/
|
||||
\right\backslash
|
||||
\right\rangle
|
||||
\right\rfloor
|
||||
\right\rceil
|
||||
\right\uparrow
|
||||
\right\downarrow
|
||||
\right\updownarrow
|
||||
\right\Uparrow
|
||||
\right\Downarrow
|
||||
\right\Updownarrow
|
||||
\right.
|
@ -0,0 +1,16 @@
|
||||
# latex mode: LaTeX commands (l2tabu level)
|
||||
# commands that shall not be used for reasons documented in l2tabu.pdf
|
||||
# dani/2006-02-18
|
||||
\begin{appendix}
|
||||
\begin{eqnarray}
|
||||
\begin{eqnarray*}
|
||||
\begin{fussypar}
|
||||
\begin{sloppypar}
|
||||
\end{appendix}
|
||||
\end{eqnarray}
|
||||
\end{eqnarray*}
|
||||
\end{fussypar}
|
||||
\end{sloppypar}
|
||||
\centerline{text}
|
||||
\fussy
|
||||
\sloppy
|
@ -0,0 +1,269 @@
|
||||
# tex/latex mode: MathSymbols
|
||||
# dani/8.1.2004
|
||||
\acute{a}
|
||||
\aleph
|
||||
\alpha
|
||||
\amalg
|
||||
\angle
|
||||
\approx
|
||||
\arccos
|
||||
\arcsin
|
||||
\arctan
|
||||
\arg
|
||||
\Arrowvert
|
||||
\arrowvert
|
||||
\ast
|
||||
\asymp
|
||||
\backslash
|
||||
\bar{a}
|
||||
\beta
|
||||
\Big
|
||||
\big
|
||||
\bigcap
|
||||
\bigcirc
|
||||
\bigcup
|
||||
\Bigg
|
||||
\bigg
|
||||
\Biggl
|
||||
\Biggl..\Biggr
|
||||
\biggl
|
||||
\biggl..\biggr
|
||||
\Biggm
|
||||
\biggm
|
||||
\Biggr
|
||||
\biggr
|
||||
\Bigl
|
||||
\Bigl..\Bigr
|
||||
\bigl
|
||||
\bigl..\bigr
|
||||
\Bigm
|
||||
\bigm
|
||||
\bigodot
|
||||
\bigoplus
|
||||
\bigotimes
|
||||
\Bigr
|
||||
\bigr
|
||||
\bigsqcup
|
||||
\bigtriangledown
|
||||
\bigtriangleup
|
||||
\biguplus
|
||||
\bigvee
|
||||
\bigwedge
|
||||
\bot
|
||||
\bracevert
|
||||
\breve{a}
|
||||
\bullet
|
||||
\cap
|
||||
\cdot
|
||||
\check{a}
|
||||
\chi
|
||||
\circ
|
||||
\clubsuit
|
||||
\cong
|
||||
\coprod
|
||||
\cos
|
||||
\cosh
|
||||
\cot
|
||||
\coth
|
||||
\csc
|
||||
\cup
|
||||
\dagger
|
||||
\dashv
|
||||
\ddagger
|
||||
\ddot{a}
|
||||
\deg
|
||||
\Delta
|
||||
\delta
|
||||
\det
|
||||
\diamond
|
||||
\diamondsuit
|
||||
\dim
|
||||
\div
|
||||
\doteq
|
||||
\dot{a}
|
||||
\dot{x}
|
||||
\Downarrow
|
||||
\Downarrow
|
||||
\downarrow
|
||||
\downarrow
|
||||
\ell
|
||||
\emptyset
|
||||
\epsilon
|
||||
\equiv
|
||||
\eta
|
||||
\exists
|
||||
\exp
|
||||
\flat
|
||||
\forall
|
||||
\frown
|
||||
\Gamma
|
||||
\gamma
|
||||
\gcd
|
||||
\ge
|
||||
\geq
|
||||
\gets
|
||||
\gg
|
||||
\grave{a}
|
||||
\hat{a}
|
||||
\hbar
|
||||
\heartsuit
|
||||
\hom
|
||||
\hookleftarrow
|
||||
\hookrightarrow
|
||||
\Im
|
||||
\imath
|
||||
\in
|
||||
\inf
|
||||
\infty
|
||||
\int
|
||||
\iota
|
||||
\jmath
|
||||
\kappa
|
||||
\ker
|
||||
\Lambda
|
||||
\lambda
|
||||
\langle
|
||||
\lbrace
|
||||
\lbrack
|
||||
\lceil
|
||||
\le
|
||||
\Leftarrow
|
||||
\leftarrow
|
||||
\leftharpoondown
|
||||
\leftharpoonup
|
||||
\Leftrightarrow
|
||||
\leftrightarrow
|
||||
\leq
|
||||
\lfloor
|
||||
\lg
|
||||
\lgroup
|
||||
\lim
|
||||
\liminf
|
||||
\limsup
|
||||
\ll
|
||||
\lmoustache
|
||||
\ln
|
||||
\log
|
||||
\Longleftarrow
|
||||
\longleftarrow
|
||||
\longleftrightarrow
|
||||
\Longleftrightarrow
|
||||
\longmapsto
|
||||
\Longrightarrow
|
||||
\longrightarrow
|
||||
\mapsto
|
||||
\max
|
||||
\mid
|
||||
\min
|
||||
\models
|
||||
\mp
|
||||
\mu
|
||||
\nabla
|
||||
\natural
|
||||
\nearrow
|
||||
\neg
|
||||
\neq
|
||||
\ni
|
||||
\not
|
||||
\notin
|
||||
\nu
|
||||
\nwarrow
|
||||
\odot
|
||||
\oint
|
||||
\Omega
|
||||
\omega
|
||||
\ominus
|
||||
\oplus
|
||||
\oslash
|
||||
\otimes
|
||||
\parallel
|
||||
\partial
|
||||
\perp
|
||||
\Phi
|
||||
\phi
|
||||
\Pi
|
||||
\pi
|
||||
\pm
|
||||
\Pr
|
||||
\prec
|
||||
\preceq
|
||||
\prime
|
||||
\prod
|
||||
\propto
|
||||
\Psi
|
||||
\psi
|
||||
\rangle
|
||||
\rbrace
|
||||
\rbrack
|
||||
\rceil
|
||||
\Re
|
||||
\rfloor
|
||||
\rgroup
|
||||
\rho
|
||||
\Rightarrow
|
||||
\rightarrow
|
||||
\rightharpoondown
|
||||
\rightharpoonup
|
||||
\rightleftharpoons
|
||||
\rmoustache
|
||||
\searrow
|
||||
\sec
|
||||
\setminus
|
||||
\sharp
|
||||
\Sigma
|
||||
\sigma
|
||||
\sim
|
||||
\simeq
|
||||
\sin
|
||||
\sinh
|
||||
\smile
|
||||
\spadesuit
|
||||
\sqcup
|
||||
\sqsupseteq
|
||||
\star
|
||||
\subset
|
||||
\subseteq
|
||||
\succ
|
||||
\succeq
|
||||
\sum
|
||||
\sup
|
||||
\supset
|
||||
\supseteq
|
||||
\surd
|
||||
\swarrow
|
||||
\tan
|
||||
\tanh
|
||||
\tau
|
||||
\Theta
|
||||
\theta
|
||||
\tilde{a}
|
||||
\times
|
||||
\to
|
||||
\top
|
||||
\triangle
|
||||
\triangleleft
|
||||
\triangleright
|
||||
\Uparrow
|
||||
\uparrow
|
||||
\Updownarrow
|
||||
\updownarrow
|
||||
\uplus
|
||||
\Upsilon
|
||||
\upsilon
|
||||
\varepsilon
|
||||
\varphi
|
||||
\varpi
|
||||
\varrho
|
||||
\varsigma
|
||||
\vartheta
|
||||
\vdash
|
||||
\vec{a}
|
||||
\vee
|
||||
\Vert
|
||||
\vert
|
||||
\wedge
|
||||
\wp
|
||||
\wr
|
||||
\Xi
|
||||
\xi
|
||||
\zeta
|
@ -0,0 +1,3 @@
|
||||
# layout package
|
||||
# neeraavi 20 Mar 2007
|
||||
\layout
|
@ -0,0 +1,20 @@
|
||||
# mode: listings.sty
|
||||
# dani/2006-02-18
|
||||
\begin{lstlisting}
|
||||
\begin{lstlisting}[kv-list]
|
||||
\end{lstlisting}
|
||||
\lstalias{alias}{language}
|
||||
\lstdefinestyle{style name}{kv-list}
|
||||
\lstinline
|
||||
\lstinline[kv-list]
|
||||
\lstinputlisting{filename}
|
||||
\lstinputlisting[kv-list]{filename}
|
||||
\lstlistingname
|
||||
\lstlistlistingname
|
||||
\lstlistoflistings
|
||||
\lstname
|
||||
\lstnewenvironment{name}[params][default]{starting code}{ending code}
|
||||
\lstnewenvironment{name}[params]{starting code}{ending code}
|
||||
\lstnewenvironment{name}{starting code}{ending code}
|
||||
\lstset{kv-list}
|
||||
\thelstlisting
|
@ -0,0 +1,22 @@
|
||||
#logsys.cwl
|
||||
#for logsys package
|
||||
#neeraavi 26 Mar 2007
|
||||
\logline[spacing]{from}{to}
|
||||
\logline*[spacing]{from}{to}
|
||||
\vlogline[spacing]{from}{to}
|
||||
\vlogline*[spacing]{from}{to}
|
||||
\logsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\logsys*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\semilogsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\semilogsys*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\loglogsys[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\loglogsys*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\loggrid[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\loggrid*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\semiloggrid[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\semiloggrid*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\logloggrid[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\logloggrid*[h-spacing][v-spacing](lower-left)(upper-right)
|
||||
\interval
|
||||
\intervalthickness
|
||||
\vinterval
|
@ -0,0 +1,17 @@
|
||||
# mode: longtable.sty
|
||||
# dani/2006-02-18
|
||||
\begin{longtable}[alignment]{preamble}
|
||||
\begin{longtable}{preamble}
|
||||
\caption*{text}
|
||||
\endfirstfoot
|
||||
\endfirsthead
|
||||
\endfoot
|
||||
\endhead
|
||||
\end{longtable}
|
||||
\LTcapwidth
|
||||
\LTleft
|
||||
\LTpost
|
||||
\LTpre
|
||||
\LTright
|
||||
\setlongtables
|
||||
\tabularnewline
|
@ -0,0 +1,2 @@
|
||||
\begin{landscape}
|
||||
\end{landscape}
|
@ -0,0 +1,16 @@
|
||||
# manyfoot.cwl
|
||||
# manyfoot package
|
||||
# neeraavi 27 Mar 2007
|
||||
\extrafootnoterule
|
||||
\defaultfootnoterule
|
||||
\newfootnote
|
||||
\Footnotemark{marker}
|
||||
\Footnotetext{marker}{inserted text}
|
||||
\Footnote{marker}{inserted text}
|
||||
\DeclareNewFootnote[footnote-style]{suffix}[enumeration-style]
|
||||
\SelectFootnoteRule{default}
|
||||
\SelectFootnoteRule[priority]{rule-name}[action]
|
||||
\footnoterulepriority
|
||||
\SetFootnoteHook
|
||||
\SplitNote
|
||||
\ExtraParaSkip
|
@ -0,0 +1,17 @@
|
||||
# mode: mdwlist.sty
|
||||
# dani/2006-02-18
|
||||
\begin{description*}
|
||||
\begin{enumerate*}
|
||||
\begin{itemize*}
|
||||
\desclabelstyle{style}
|
||||
\desclabelwidth{length}
|
||||
\end{description*}
|
||||
\end{enumerate*}
|
||||
\end{itemize*}
|
||||
\multilinelabel
|
||||
\nextlinelabel
|
||||
\pushlabel
|
||||
\resume{envname}
|
||||
\resume[magicname]{envname}
|
||||
\suspend{envname}
|
||||
\suspend[magicname]{envname}
|
@ -0,0 +1,15 @@
|
||||
# mode: multicol.sty
|
||||
# dani/2006-02-18
|
||||
\begin{multicols}{n}
|
||||
\begin{multicols*}{n}
|
||||
\begin{multicols}{n}[preface]
|
||||
\begin{multicols*}{n}[preface]
|
||||
\begin{multicols}{n}[preface][skip]
|
||||
\begin{multicols*}{n}[preface][skip]
|
||||
\columnbreak
|
||||
\end{multicols}
|
||||
\end{multicols*}
|
||||
\multicolsep
|
||||
\multicoltolerance
|
||||
\postmulticols
|
||||
\premulticols
|
@ -0,0 +1,3 @@
|
||||
# mode: multido.sty
|
||||
# dani/2006-02-22
|
||||
\multido{variables}{repititions}{actions}
|
@ -0,0 +1,8 @@
|
||||
# pdfpages package
|
||||
# mario 09/06/2007
|
||||
# URL: http://tug.ctan.org/tex-archive/macros/latex/contrib/pdfpages/
|
||||
\includepdf[options]{filename}
|
||||
\includepdf{filename}
|
||||
\includepdfmerge[options]{file-list}
|
||||
\includepdfmerge{file-list}
|
||||
\includepdfset{global options}
|
@ -0,0 +1,8 @@
|
||||
\psfrag{tag}{replacement}
|
||||
\psfrag{tag}[posn][psposn][scale][rot]{replacement}
|
||||
\psfrag*{tag}{replacement}
|
||||
\psfrag*{tag}[posn][psposn][scale][rot]{replacement}
|
||||
\begin{psfrags}
|
||||
\end{psfrags}
|
||||
\psfragscanon
|
||||
\psfragscanoff
|
@ -0,0 +1,12 @@
|
||||
# mode: pst-3d.sty
|
||||
# dani/2006-02-22
|
||||
\psshadow[par]{stuff}
|
||||
\psshadow*[par]{stuff}
|
||||
\psshadow{stuff}
|
||||
\psshadow*{stuff}
|
||||
\pstilt{degrees}{stuff}
|
||||
\psTilt{degrees}{stuff}
|
||||
\pstilt[par]{degrees}{stuff}
|
||||
\psTilt[par]{degrees}{stuff}
|
||||
\ThreeDput[par](x0,y0,z0){object}
|
||||
\ThreeDput(x0,y0,z0){object}
|
@ -0,0 +1,4 @@
|
||||
# mode: pst-blur.sty
|
||||
# dani/2006-02-22
|
||||
\psblurbox{stuff}
|
||||
\psblurbox[par]{stuff}
|
@ -0,0 +1,17 @@
|
||||
# mode: pst-char.sty
|
||||
# dani/2006-02-22
|
||||
\begin{charclip}[par]{text}
|
||||
\begin{charclip*}[par]{text}
|
||||
\begin{charclip}{text}
|
||||
\begin{charclip*}{text}
|
||||
\end{charclip}
|
||||
\end{charclip*}
|
||||
\endpscharclip
|
||||
\pscharclip[par]{text}
|
||||
\pscharclip*[par]{text}
|
||||
\pscharclip{text}
|
||||
\pscharclip*{text}
|
||||
\pscharpath[par]{text}
|
||||
\pscharpath*[par]{text}
|
||||
\pscharpath{text}
|
||||
\pscharpath*{text}
|
@ -0,0 +1,22 @@
|
||||
# mode: pst-coil.sty
|
||||
# dani/2006-02-22
|
||||
\psCoil{angle1}{angle2}
|
||||
\psCoil*{angle1}{angle2}
|
||||
\pscoil{arrows}(x0,y0)(x1,y1)
|
||||
\pscoil*{arrows}(x0,y0)(x1,y1)
|
||||
\psCoil[par]{angle1}{angle2}
|
||||
\psCoil*[par]{angle1}{angle2}
|
||||
\pscoil[par]{arrows}(x0,y0)(x1,y1)
|
||||
\pscoil*[par]{arrows}(x0,y0)(x1,y1)
|
||||
\pscoil[par](x0,y0)(x1,y1)
|
||||
\pscoil*[par](x0,y0)(x1,y1)
|
||||
\pscoil(x0,y0)(x1,y1)
|
||||
\pscoil*(x0,y0)(x1,y1)
|
||||
\pszigzag{arrows}(x0,y0)(x1,y1)
|
||||
\pszigzag*{arrows}(x0,y0)(x1,y1)
|
||||
\pszigzag[par]{arrows}(x0,y0)(x1,y1)
|
||||
\pszigzag*[par]{arrows}(x0,y0)(x1,y1)
|
||||
\pszigzag[par](x0,y0)(x1,y1)
|
||||
\pszigzag*[par](x0,y0)(x1,y1)
|
||||
\pszigzag(x0,y0)(x1,y1)
|
||||
\pszigzag*(x0,y0)(x1,y1)
|
@ -0,0 +1,8 @@
|
||||
# mode: pst-eps.sty
|
||||
# dani/2006-02-22
|
||||
\begin{TeXtoEPS}
|
||||
\endTeXtoEPS
|
||||
\end{TeXtoEPS}
|
||||
\PSTtoEPS{file}{graphics objects}
|
||||
\PSTtoEPS[par]{file}{graphics objects}
|
||||
\TeXtoEPS
|
@ -0,0 +1,4 @@
|
||||
# mode: pst-fill.sty
|
||||
# dani/2006-02-22
|
||||
\psboxfill{stuff}
|
||||
\PstTiling
|
@ -0,0 +1,281 @@
|
||||
# mode: pst-node.sty
|
||||
# dani/2006-02-22
|
||||
\circlenode{name}{stuff}
|
||||
\circlenode*{name}{stuff}
|
||||
\circlenode[par]{name}{stuff}
|
||||
\circlenode*[par]{name}{stuff}
|
||||
\Cnode[par](x,y){name}
|
||||
\Cnode*[par](x,y){name}
|
||||
\cnode[par](x,y){radius}{name}
|
||||
\cnode*[par](x,y){radius}{name}
|
||||
\cnodeput{angle}(x,y){name}{stuff}
|
||||
\cnodeput*{angle}(x,y){name}{stuff}
|
||||
\cnodeput[par]{angle}(x,y){name}{stuff}
|
||||
\cnodeput*[par]{angle}(x,y){name}{stuff}
|
||||
\cnodeput[par](x,y){name}{stuff}
|
||||
\cnodeput*[par](x,y){name}{stuff}
|
||||
\cnodeput(x,y){name}{stuff}
|
||||
\cnodeput*(x,y){name}{stuff}
|
||||
\Cnode(x,y){name}
|
||||
\Cnode*(x,y){name}
|
||||
\cnode(x,y){radius}{name}
|
||||
\cnode*(x,y){radius}{name}
|
||||
\dianode{name}{stuff}
|
||||
\dianode*{name}{stuff}
|
||||
\dianode[par]{name}{stuff}
|
||||
\dianode*[par]{name}{stuff}
|
||||
\dotnode[par](x,y){name}{stuff}
|
||||
\dotnode*[par](x,y){name}{stuff}
|
||||
\dotnode(x,y){name}{stuff}
|
||||
\dotnode*(x,y){name}{stuff}
|
||||
\fnode[par](x,y){name}{stuff}
|
||||
\fnode*[par](x,y){name}{stuff}
|
||||
\fnode(x,y){name}{stuff}
|
||||
\fnode*(x,y){name}{stuff}
|
||||
\naput[par]{stuff}
|
||||
\naput*[par]{stuff}
|
||||
\naput{stuff}
|
||||
\naput*{stuff}
|
||||
\nbput[par]{stuff}
|
||||
\nbput*[par]{stuff}
|
||||
\nbput{stuff}
|
||||
\nbput*{stuff}
|
||||
\ncangle{arrows}{nodeA}{nodeB}
|
||||
\ncangle*{arrows}{nodeA}{nodeB}
|
||||
\ncangle{nodeA}{nodeB}
|
||||
\ncangle*{nodeA}{nodeB}
|
||||
\ncangle[par]{arrows}{nodeA}{nodeB}
|
||||
\ncangle*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncangle[par]{nodeA}{nodeB}
|
||||
\ncangle*[par]{nodeA}{nodeB}
|
||||
\ncangles{arrows}{nodeA}{nodeB}
|
||||
\ncangles*{arrows}{nodeA}{nodeB}
|
||||
\ncangles{nodeA}{nodeB}
|
||||
\ncangles*{nodeA}{nodeB}
|
||||
\ncangles[par]{arrows}{nodeA}{nodeB}
|
||||
\ncangles*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncangles[par]{nodeA}{nodeB}
|
||||
\ncangles*[par]{nodeA}{nodeB}
|
||||
\ncarc{arrows}{nodeA}{nodeB}
|
||||
\ncarc*{arrows}{nodeA}{nodeB}
|
||||
\ncarcbox{nodeA}{nodeB}
|
||||
\ncarcbox*{nodeA}{nodeB}
|
||||
\ncarcbox[par]{nodeA}{nodeB}
|
||||
\ncarcbox*[par]{nodeA}{nodeB}
|
||||
\ncarc{nodeA}{nodeB}
|
||||
\ncarc*{nodeA}{nodeB}
|
||||
\ncarc[par]{arrows}{nodeA}{nodeB}
|
||||
\ncarc*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncarc[par]{nodeA}{nodeB}
|
||||
\ncarc*[par]{nodeA}{nodeB}
|
||||
\ncbar{arrows}{nodeA}{nodeB}
|
||||
\ncbar*{arrows}{nodeA}{nodeB}
|
||||
\ncbar{nodeA}{nodeB}
|
||||
\ncbar*{nodeA}{nodeB}
|
||||
\ncbar[par]{arrows}{nodeA}{nodeB}
|
||||
\ncbar*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncbar[par]{nodeA}{nodeB}
|
||||
\ncbar*[par]{nodeA}{nodeB}
|
||||
\ncbox{nodeA}{nodeB}
|
||||
\ncbox*{nodeA}{nodeB}
|
||||
\ncbox[par]{nodeA}{nodeB}
|
||||
\ncbox*[par]{nodeA}{nodeB}
|
||||
\nccircle{arrows}{nodeA}{nodeB}
|
||||
\nccircle*{arrows}{nodeA}{nodeB}
|
||||
\nccircle{nodeA}{nodeB}
|
||||
\nccircle*{nodeA}{nodeB}
|
||||
\nccircle[par]{arrows}{nodeA}{nodeB}
|
||||
\nccircle*[par]{arrows}{nodeA}{nodeB}
|
||||
\nccircle[par]{nodeA}{nodeB}
|
||||
\nccircle*[par]{nodeA}{nodeB}
|
||||
\nccoil{arrows}{nodeA}{nodeB}
|
||||
\nccoil*{arrows}{nodeA}{nodeB}
|
||||
\nccoil{nodeA}{nodeB}
|
||||
\nccoil*{nodeA}{nodeB}
|
||||
\nccoil[par]{arrows}{nodeA}{nodeB}
|
||||
\nccoil*[par]{arrows}{nodeA}{nodeB}
|
||||
\nccoil[par]{nodeA}{nodeB}
|
||||
\nccoil*[par]{nodeA}{nodeB}
|
||||
\nccurve{arrows}{nodeA}{nodeB}
|
||||
\nccurve*{arrows}{nodeA}{nodeB}
|
||||
\nccurve{nodeA}{nodeB}
|
||||
\nccurve*{nodeA}{nodeB}
|
||||
\nccurve[par]{arrows}{nodeA}{nodeB}
|
||||
\nccurve*[par]{arrows}{nodeA}{nodeB}
|
||||
\nccurve[par]{nodeA}{nodeB}
|
||||
\nccurve*[par]{nodeA}{nodeB}
|
||||
\ncdiag{arrows}{nodeA}{nodeB}
|
||||
\ncdiag*{arrows}{nodeA}{nodeB}
|
||||
\ncdiagg{arrows}{nodeA}{nodeB}
|
||||
\ncdiagg*{arrows}{nodeA}{nodeB}
|
||||
\ncdiagg{nodeA}{nodeB}
|
||||
\ncdiagg*{nodeA}{nodeB}
|
||||
\ncdiagg[par]{arrows}{nodeA}{nodeB}
|
||||
\ncdiagg*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncdiagg[par]{nodeA}{nodeB}
|
||||
\ncdiagg*[par]{nodeA}{nodeB}
|
||||
\ncdiag{nodeA}{nodeB}
|
||||
\ncdiag*{nodeA}{nodeB}
|
||||
\ncdiag[par]{arrows}{nodeA}{nodeB}
|
||||
\ncdiag*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncdiag[par]{nodeA}{nodeB}
|
||||
\ncdiag*[par]{nodeA}{nodeB}
|
||||
\ncline{arrows}{nodeA}{nodeB}
|
||||
\ncline*{arrows}{nodeA}{nodeB}
|
||||
\ncLine{arrows}{nodeA}{nodeB}
|
||||
\ncLine*{arrows}{nodeA}{nodeB}
|
||||
\ncline{nodeA}{nodeB}
|
||||
\ncline*{nodeA}{nodeB}
|
||||
\ncLine{nodeA}{nodeB}
|
||||
\ncLine*{nodeA}{nodeB}
|
||||
\ncline[par]{arrows}{nodeA}{nodeB}
|
||||
\ncline*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncLine[par]{arrows}{nodeA}{nodeB}
|
||||
\ncLine*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncline[par]{nodeA}{nodeB}
|
||||
\ncline*[par]{nodeA}{nodeB}
|
||||
\ncLine[par]{nodeA}{nodeB}
|
||||
\ncLine*[par]{nodeA}{nodeB}
|
||||
\ncloop{arrows}{nodeA}{nodeB}
|
||||
\ncloop*{arrows}{nodeA}{nodeB}
|
||||
\ncloop{nodeA}{nodeB}
|
||||
\ncloop*{nodeA}{nodeB}
|
||||
\ncloop[par]{arrows}{nodeA}{nodeB}
|
||||
\ncloop*[par]{arrows}{nodeA}{nodeB}
|
||||
\ncloop[par]{nodeA}{nodeB}
|
||||
\ncloop*[par]{nodeA}{nodeB}
|
||||
\ncput[par]{stuff}
|
||||
\ncput*[par]{stuff}
|
||||
\ncput{stuff}
|
||||
\ncput*{stuff}
|
||||
\nczigzag{arrows}{nodeA}{nodeB}
|
||||
\nczigzag*{arrows}{nodeA}{nodeB}
|
||||
\nczigzag{nodeA}{nodeB}
|
||||
\nczigzag*{nodeA}{nodeB}
|
||||
\nczigzag[par]{arrows}{nodeA}{nodeB}
|
||||
\nczigzag*[par]{arrows}{nodeA}{nodeB}
|
||||
\nczigzag[par]{nodeA}{nodeB}
|
||||
\nczigzag*[par]{nodeA}{nodeB}
|
||||
\nput[par]{refangle}{name}{stuff}
|
||||
\nput*[par]{refangle}{name}{stuff}
|
||||
\nput{refangle}{name}{stuff}
|
||||
\nput*{refangle}{name}{stuff}
|
||||
\ovalnode{name}{stuff}
|
||||
\ovalnode*{name}{stuff}
|
||||
\ovalnode[par]{name}{stuff}
|
||||
\ovalnode*[par]{name}{stuff}
|
||||
\pcangle{arrows}(x1,y1)(x2,y2)
|
||||
\pcangle*{arrows}(x1,y1)(x2,y2)
|
||||
\pcangle[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcangle*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcangle[par](x1,y1)(x2,y2)
|
||||
\pcangle*[par](x1,y1)(x2,y2)
|
||||
\pcangle(x1,y1)(x2,y2)
|
||||
\pcangle*(x1,y1)(x2,y2)
|
||||
\pcarc{arrows}(x1,y1)(x2,y2)
|
||||
\pcarc*{arrows}(x1,y1)(x2,y2)
|
||||
\pcarcbox[par](x1,y1)(x2,y2)
|
||||
\pcarcbox*[par](x1,y1)(x2,y2)
|
||||
\pcarcbox(x1,y1)(x2,y2)
|
||||
\pcarcbox*(x1,y1)(x2,y2)
|
||||
\pcarc[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcarc*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcarc[par](x1,y1)(x2,y2)
|
||||
\pcarc*[par](x1,y1)(x2,y2)
|
||||
\pcarc(x1,y1)(x2,y2)
|
||||
\pcarc*(x1,y1)(x2,y2)
|
||||
\pcbar{arrows}(x1,y1)(x2,y2)
|
||||
\pcbar*{arrows}(x1,y1)(x2,y2)
|
||||
\pcbar[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcbar*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcbar[par](x1,y1)(x2,y2)
|
||||
\pcbar*[par](x1,y1)(x2,y2)
|
||||
\pcbar(x1,y1)(x2,y2)
|
||||
\pcbar*(x1,y1)(x2,y2)
|
||||
\pcbox[par](x1,y1)(x2,y2)
|
||||
\pcbox*[par](x1,y1)(x2,y2)
|
||||
\pcbox(x1,y1)(x2,y2)
|
||||
\pcbox*(x1,y1)(x2,y2)
|
||||
\pccoil{arrows}(x1,y1)(x2,y2)
|
||||
\pccoil*{arrows}(x1,y1)(x2,y2)
|
||||
\pccoil[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pccoil*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pccoil[par](x1,y1)(x2,y2)
|
||||
\pccoil*[par](x1,y1)(x2,y2)
|
||||
\pccoil(x1,y1)(x2,y2)
|
||||
\pccoil*(x1,y1)(x2,y2)
|
||||
\pccurve{arrows}(x1,y1)(x2,y2)
|
||||
\pccurve*{arrows}(x1,y1)(x2,y2)
|
||||
\pccurve[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pccurve*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pccurve[par](x1,y1)(x2,y2)
|
||||
\pccurve*[par](x1,y1)(x2,y2)
|
||||
\pccurve(x1,y1)(x2,y2)
|
||||
\pccurve*(x1,y1)(x2,y2)
|
||||
\pcdiag{arrows}(x1,y1)(x2,y2)
|
||||
\pcdiag*{arrows}(x1,y1)(x2,y2)
|
||||
\pcdiag[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcdiag*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcdiag[par](x1,y1)(x2,y2)
|
||||
\pcdiag*[par](x1,y1)(x2,y2)
|
||||
\pcdiag(x1,y1)(x2,y2)
|
||||
\pcdiag*(x1,y1)(x2,y2)
|
||||
\pcline{arrows}(x1,y1)(x2,y2)
|
||||
\pcline*{arrows}(x1,y1)(x2,y2)
|
||||
\pcline[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcline*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcline[par](x1,y1)(x2,y2)
|
||||
\pcline*[par](x1,y1)(x2,y2)
|
||||
\pcline(x1,y1)(x2,y2)
|
||||
\pcline*(x1,y1)(x2,y2)
|
||||
\pcloop{arrows}(x1,y1)(x2,y2)
|
||||
\pcloop*{arrows}(x1,y1)(x2,y2)
|
||||
\pcloop[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcloop*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pcloop[par](x1,y1)(x2,y2)
|
||||
\pcloop*[par](x1,y1)(x2,y2)
|
||||
\pcloop(x1,y1)(x2,y2)
|
||||
\pcloop*(x1,y1)(x2,y2)
|
||||
\pczigzag{arrows}(x1,y1)(x2,y2)
|
||||
\pczigzag*{arrows}(x1,y1)(x2,y2)
|
||||
\pczigzag[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pczigzag*[par]{arrows}(x1,y1)(x2,y2)
|
||||
\pczigzag[par](x1,y1)(x2,y2)
|
||||
\pczigzag*[par](x1,y1)(x2,y2)
|
||||
\pczigzag(x1,y1)(x2,y2)
|
||||
\pczigzag*(x1,y1)(x2,y2)
|
||||
\pnode(x,y){stuff}
|
||||
\rnode{name}{stuff}
|
||||
\Rnode[par](x,y){name}{stuff}
|
||||
\Rnode*[par](x,y){name}{stuff}
|
||||
\rnode[refpoint]{name}{stuff}
|
||||
\Rnode(x,y){name}{stuff}
|
||||
\Rnode*(x,y){name}{stuff}
|
||||
\taput[par]{stuff}
|
||||
\taput*[par]{stuff}
|
||||
\taput{stuff}
|
||||
\taput*{stuff}
|
||||
\tbput[par]{stuff}
|
||||
\tbput*[par]{stuff}
|
||||
\tbput{stuff}
|
||||
\tbput*{stuff}
|
||||
\thput[par]{stuff}
|
||||
\thput*[par]{stuff}
|
||||
\thput{stuff}
|
||||
\thput*{stuff}
|
||||
\tlput[par]{stuff}
|
||||
\tlput*[par]{stuff}
|
||||
\tlput{stuff}
|
||||
\tlput*{stuff}
|
||||
\trinode{name}{stuff}
|
||||
\trinode*{name}{stuff}
|
||||
\trinode[par]{name}{stuff}
|
||||
\trinode*[par]{name}{stuff}
|
||||
\trput[par]{stuff}
|
||||
\trput*[par]{stuff}
|
||||
\trput{stuff}
|
||||
\trput*{stuff}
|
||||
\tvput[par]{stuff}
|
||||
\tvput*[par]{stuff}
|
||||
\tvput{stuff}
|
||||
\tvput*{stuff}
|
@ -0,0 +1,36 @@
|
||||
# mode: pst-plot.sty
|
||||
# dani/2006-02-22
|
||||
\dataplot{commands}
|
||||
\dataplot*{commands}
|
||||
\dataplot[par]{commands}
|
||||
\dataplot*[par]{commands}
|
||||
\fileplot{file}
|
||||
\fileplot*{file}
|
||||
\fileplot[par]{file}
|
||||
\fileplot*[par]{file}
|
||||
\listplot{list}
|
||||
\listplot*{list}
|
||||
\listplot[par]{list}
|
||||
\listplot*[par]{list}
|
||||
\parametricplot[par]{tmin}{tmax}{function}
|
||||
\parametricplot*[par]{tmin}{tmax}{function}
|
||||
\parametricplot{tmin}{tmax}{function}
|
||||
\parametricplot*{tmin}{tmax}{function}
|
||||
\psaxes{arrows}(x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes*{arrows}(x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes[par]{arrows}(x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes*[par]{arrows}(x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes[par](x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes*[par](x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes(x0,y0)(x1,y1)(x2,y2)
|
||||
\psaxes*(x0,y0)(x1,y1)(x2,y2)
|
||||
\pshlabel
|
||||
\psplot[par]{xmin}{xmax}{function}
|
||||
\psplot*[par]{xmin}{xmax}{function}
|
||||
\psplot{xmin}{xmax}{function}
|
||||
\psplot*{xmin}{xmax}{function}
|
||||
\psvlabel
|
||||
\psxlabel
|
||||
\psylabel
|
||||
\readdata{command}{file}
|
||||
\savedata{command}[data]
|
@ -0,0 +1,4 @@
|
||||
# mode: pst-text.sty
|
||||
# dani/2006-02-22
|
||||
\pstextpath[pos](x,y){graphics object}{text}
|
||||
\pstextpath(x,y){graphics object}{text}
|
@ -0,0 +1,66 @@
|
||||
# mode: pst-tree.sty
|
||||
# dani/2006-02-22
|
||||
\begin{psTree}{node}
|
||||
\end{psTree}
|
||||
\psedge
|
||||
\pspred
|
||||
\pssucc
|
||||
\pstree{node}{subtrees}
|
||||
\skiplevel[par]{subtrees}
|
||||
\skiplevel*[par]{subtrees}
|
||||
\skiplevels[par]{n}
|
||||
\skiplevels*[par]{n}
|
||||
\TC
|
||||
\TC*
|
||||
\Tc{dim}
|
||||
\Tc*{dim}
|
||||
\Tcircle[par]{stuff}
|
||||
\Tcircle*[par]{stuff}
|
||||
\TCircle[par]{stuff}
|
||||
\TCircle*[par]{stuff}
|
||||
\Tcircle{stuff}
|
||||
\Tcircle*{stuff}
|
||||
\TCircle{stuff}
|
||||
\TCircle*{stuff}
|
||||
\TC[par]
|
||||
\TC*[par]
|
||||
\Tc[par]{dim}
|
||||
\Tc*[par]{dim}
|
||||
\Tdia[par]{stuff}
|
||||
\Tdia*[par]{stuff}
|
||||
\Tdia{stuff}
|
||||
\Tdia*{stuff}
|
||||
\Tdot
|
||||
\Tdot*
|
||||
\Tdot[par]
|
||||
\Tdot*[par]
|
||||
\Tf
|
||||
\Tf*
|
||||
\Tfan
|
||||
\Tfan*
|
||||
\Tfan[par]
|
||||
\Tfan*[par]
|
||||
\Tf[par]
|
||||
\Tf*[par]
|
||||
\Tn
|
||||
\Toval[par]{stuff}
|
||||
\Toval*[par]{stuff}
|
||||
\Toval{stuff}
|
||||
\Toval*{stuff}
|
||||
\Tp
|
||||
\Tp*
|
||||
\Tp[par]
|
||||
\Tp*[par]
|
||||
\Tr[par]{stuff}
|
||||
\Tr*[par]{stuff}
|
||||
\TR[par]{stuff}
|
||||
\TR*[par]{stuff}
|
||||
\Tr{stuff}
|
||||
\Tr*{stuff}
|
||||
\TR{stuff}
|
||||
\TR*{stuff}
|
||||
\tspace{dim}
|
||||
\Ttri[par]{stuff}
|
||||
\Ttri*[par]{stuff}
|
||||
\Ttri{stuff}
|
||||
\Ttri*{stuff}
|
@ -0,0 +1,242 @@
|
||||
# mode: pstricks.sty
|
||||
# dani/2006-02-22
|
||||
\arrows{arrows}
|
||||
\begin{pspicture}[par](x0,y0)(x1,y1)
|
||||
\begin{pspicture*}[par](x0,y0)(x1,y1)
|
||||
\begin{pspicture}(x0,y0)(x1,y1)
|
||||
\begin{pspicture*}(x0,y0)(x1,y1)
|
||||
\clipbox[dim]{stuff}
|
||||
\clipbox{stuff}
|
||||
\closedshadow
|
||||
\closedshadow[par]
|
||||
\closepath
|
||||
\code{code}
|
||||
\coor(x1,y1)(x2,y2)
|
||||
\cput{angle}(x,y){stuff}
|
||||
\cput*{angle}(x,y){stuff}
|
||||
\cput[par]{angle}(x,y){stuff}
|
||||
\cput*[par]{angle}(x,y){stuff}
|
||||
\curveto(x1,y1)(x2,y2)(x3,y3)
|
||||
\degrees
|
||||
\degrees[num]
|
||||
\dim{dim}
|
||||
\endoverlaybox
|
||||
\endpsclip
|
||||
\end{pspicture}
|
||||
\end{pspicture*}
|
||||
\everypsbox{commands}
|
||||
\file{file}
|
||||
\fill
|
||||
\fill[par]
|
||||
\grestore
|
||||
\gsave
|
||||
\lineto(coor)
|
||||
\movepath(coor)
|
||||
\moveto(coor)
|
||||
\mrestore
|
||||
\msave
|
||||
\multips{angle}(x0,y0)(x1,y1){int}{graphics}
|
||||
\multips(x0,y0)(x1,y1){int}{graphics}
|
||||
\multirput{angle}(x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput*{angle}(x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput[refpoint]{angle}(x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput*[refpoint]{angle}(x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput[refpoint](x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput*[refpoint](x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput(x0,y0)(x1,y1){int}{stuff}
|
||||
\multirput*(x0,y0)(x1,y1){int}{stuff}
|
||||
\newcmykcolor{color}{num1 num2 num3 num4}
|
||||
\newgray{color}{num}
|
||||
\newhsbcolor{color}{num1 num2 num3}
|
||||
\newpath
|
||||
\newpsobject{name}{object}{kv-list}
|
||||
\newpsstyle{name}{kv-list}
|
||||
\newrgbcolor{color}{num1 num2 num3}
|
||||
\NormalCoor
|
||||
\openshadow
|
||||
\openshadow[par]
|
||||
\overlaybox
|
||||
\parabola{arrows}(x0,y0)(x1,y1)
|
||||
\parabola*{arrows}(x0,y0)(x1,y1)
|
||||
\parabola[par]{arrows}(x0,y0)(x1,y1)
|
||||
\parabola*[par]{arrows}(x0,y0)(x1,y1)
|
||||
\parabola[par](x0,y0)(x1,y1)
|
||||
\parabola*[par](x0,y0)(x1,y1)
|
||||
\parabola(x0,y0)(x1,y1)
|
||||
\parabola*(x0,y0)(x1,y1)
|
||||
\psaddtolength{cmd}{dim}
|
||||
\psarc{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarc*{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarcn{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarcn*{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarcn[par]{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarcn*[par]{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarcn[par](x,y){radius}{angleA}{angleB}
|
||||
\psarcn*[par](x,y){radius}{angleA}{angleB}
|
||||
\psarcn(x,y){radius}{angleA}{angleB}
|
||||
\psarcn*(x,y){radius}{angleA}{angleB}
|
||||
\psarc[par]{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarc*[par]{arrows}(x,y){radius}{angleA}{angleB}
|
||||
\psarc[par](x,y){radius}{angleA}{angleB}
|
||||
\psarc*[par](x,y){radius}{angleA}{angleB}
|
||||
\psarc(x,y){radius}{angleA}{angleB}
|
||||
\psarc*(x,y){radius}{angleA}{angleB}
|
||||
\psbezier{arrows}(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier*{arrows}(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier[par]{arrows}(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier*[par]{arrows}(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier[par](x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier*[par](x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psbezier*(x0,y0)(x1,y1)(x2,y2)(x3,y3)
|
||||
\psccurve{arrows}(x1,y1)(xn,yn)
|
||||
\psccurve*{arrows}(x1,y1)(xn,yn)
|
||||
\psccurve[par]{arrows}(x1,y1)(xn,yn)
|
||||
\psccurve*[par]{arrows}(x1,y1)(xn,yn)
|
||||
\psccurve[par](x1,y1)(xn,yn)
|
||||
\psccurve*[par](x1,y1)(xn,yn)
|
||||
\psccurve(x1,y1)(xn,yn)
|
||||
\psccurve*(x1,y1)(xn,yn)
|
||||
\pscirclebox[par]{stuff}
|
||||
\pscirclebox*[par]{stuff}
|
||||
\pscirclebox{stuff}
|
||||
\pscirclebox*{stuff}
|
||||
\pscircle[par](x0,y0){radius}
|
||||
\pscircle*[par](x0,y0){radius}
|
||||
\pscircle(x0,y0){radius}
|
||||
\pscircle*(x0,y0){radius}
|
||||
\psclip{graphics}
|
||||
\pscurve{arrows}(x1,y1)(xn,yn)
|
||||
\pscurve*{arrows}(x1,y1)(xn,yn)
|
||||
\pscurve[par]{arrows}(x1,y1)(xn,yn)
|
||||
\pscurve*[par]{arrows}(x1,y1)(xn,yn)
|
||||
\pscurve[par](x1,y1)(xn,yn)
|
||||
\pscurve*[par](x1,y1)(xn,yn)
|
||||
\pscurve(x1,y1)(xn,yn)
|
||||
\pscurve*(x1,y1)(xn,yn)
|
||||
\pscustom{commands}
|
||||
\pscustom*{commands}
|
||||
\pscustom[par]{commands}
|
||||
\pscustom*[par]{commands}
|
||||
\psdblframebox[par]{stuff}
|
||||
\psdblframebox*[par]{stuff}
|
||||
\psdblframebox{stuff}
|
||||
\psdblframebox*{stuff}
|
||||
\psdiabox[par]{stuff}
|
||||
\psdiabox*[par]{stuff}
|
||||
\psdiabox{stuff}
|
||||
\psdiabox*{stuff}
|
||||
\psdiamond[par](x0,y0)(x1,y1)
|
||||
\psdiamond*[par](x0,y0)(x1,y1)
|
||||
\psdiamond(x0,y0)(x1,y1)
|
||||
\psdiamond*(x0,y0)(x1,y1)
|
||||
\psdot[par](x1,y1)
|
||||
\psdot*[par](x1,y1)
|
||||
\psdots[par](x1,y1)(xn,yn)
|
||||
\psdots*[par](x1,y1)(xn,yn)
|
||||
\psdots(x1,y1)(xn,yn)
|
||||
\psdots*(x1,y1)(xn,yn)
|
||||
\psdot(x1,y1)
|
||||
\psdot*(x1,y1)
|
||||
\psecurve{arrows}(x1,y1)(xn,yn)
|
||||
\psecurve*{arrows}(x1,y1)(xn,yn)
|
||||
\psecurve[par]{arrows}(x1,y1)(xn,yn)
|
||||
\psecurve*[par]{arrows}(x1,y1)(xn,yn)
|
||||
\psecurve[par](x1,y1)(xn,yn)
|
||||
\psecurve*[par](x1,y1)(xn,yn)
|
||||
\psecurve(x1,y1)(xn,yn)
|
||||
\psecurve*(x1,y1)(xn,yn)
|
||||
\psellipse[par](x0,y0)(x1,y1)
|
||||
\psellipse*[par](x0,y0)(x1,y1)
|
||||
\psellipse(x0,y0)(x1,y1)
|
||||
\psellipse*(x0,y0)(x1,y1)
|
||||
\psframebox[par]{stuff}
|
||||
\psframebox*[par]{stuff}
|
||||
\psframebox{stuff}
|
||||
\psframebox*{stuff}
|
||||
\psframe[par](x0,y0)(x1,y1)
|
||||
\psframe*[par](x0,y0)(x1,y1)
|
||||
\psframe(x0,y0)(x1,y1)
|
||||
\psframe*(x0,y0)(x1,y1)
|
||||
\psgrid(x0,y0)(x1,y1)(x2,y2)
|
||||
\pslabelsep
|
||||
\pslbrace
|
||||
\psline{arrows}(x0,y0)(x1,y1)
|
||||
\psline*{arrows}(x0,y0)(x1,y1)
|
||||
\psline[par]{arrows}(x0,y0)(x1,y1)
|
||||
\psline*[par]{arrows}(x0,y0)(x1,y1)
|
||||
\psline[par](x0,y0)(x1,y1)
|
||||
\psline*[par](x0,y0)(x1,y1)
|
||||
\psline(x0,y0)(x1,y1)
|
||||
\psline*(x0,y0)(x1,y1)
|
||||
\pslongbox{name}{cmd}
|
||||
\psmathboxfalse
|
||||
\psmathboxtrue
|
||||
\psovalbox[par]{stuff}
|
||||
\psovalbox*[par]{stuff}
|
||||
\psovalbox{stuff}
|
||||
\psovalbox*{stuff}
|
||||
\psoverlay{string}
|
||||
\pspolygon[par](x0,y0)(x1,y1)(x2,y2)
|
||||
\pspolygon*[par](x0,y0)(x1,y1)(x2,y2)
|
||||
\pspolygon(x0,y0)(x1,y1)(x2,y2)
|
||||
\pspolygon*(x0,y0)(x1,y1)(x2,y2)
|
||||
\psrbrace
|
||||
\psset{kv-list}
|
||||
\pssetlength{cmd}{dim}
|
||||
\psshadowbox[par]{stuff}
|
||||
\psshadowbox*[par]{stuff}
|
||||
\psshadowbox{stuff}
|
||||
\psshadowbox*{stuff}
|
||||
\pstriangle[par](x0,y0)(x1,y1)
|
||||
\pstriangle*[par](x0,y0)(x1,y1)
|
||||
\pstriangle(x0,y0)(x1,y1)
|
||||
\pstriangle*(x0,y0)(x1,y1)
|
||||
\pstribox[par]{stuff}
|
||||
\pstribox*[par]{stuff}
|
||||
\pstribox{stuff}
|
||||
\pstribox*{stuff}
|
||||
\psverbboxfalse
|
||||
\psverbboxtrue
|
||||
\pswedge[par](x0,y0){radius}{angle1}{angle2}
|
||||
\pswedge*[par](x0,y0){radius}{angle1}{angle2}
|
||||
\pswedge(x0,y0){radius}{angle1}{angle2}
|
||||
\pswedge*(x0,y0){radius}{angle1}{angle2}
|
||||
\putoverlaybox{string}
|
||||
\qdisk(coor){radius}
|
||||
\qline(coor0)(coor1)
|
||||
\radians
|
||||
\rcoor(x1,y1)(x2,y2)
|
||||
\rcurveto(x1,y1)(x2,y2)(x3,y3)
|
||||
\rlineto(coor)
|
||||
\rotate{angle}
|
||||
\rotatedown{stuff}
|
||||
\rotateleft{stuff}
|
||||
\rotateright{stuff}
|
||||
\rput[refpoint]{rotation}(x,y){stuff}
|
||||
\rput*[refpoint]{rotation}(x,y){stuff}
|
||||
\rput[refpoint](x,y){stuff}
|
||||
\rput*[refpoint](x,y){stuff}
|
||||
\rput{rotation}(x,y){stuff}
|
||||
\rput*{rotation}(x,y){stuff}
|
||||
\rput(x,y){stuff}
|
||||
\rput*(x,y){stuff}
|
||||
\scalebox{num1 num2}{stuff}
|
||||
\scalebox{num}{stuff}
|
||||
\scaleboxto(x,y){stuff}
|
||||
\scale{num}
|
||||
\scale{num1 num2}
|
||||
\setcolor{color}
|
||||
\SpecialCoor
|
||||
\stroke
|
||||
\stroke[par]
|
||||
\swapaxes
|
||||
\translate(coor)
|
||||
\uput{labelsep}[refangle]{rotation}(x,y){stuff}
|
||||
\uput*{labelsep}[refangle]{rotation}(x,y){stuff}
|
||||
\uput{labelsep}[refangle](x,y){stuff}
|
||||
\uput*{labelsep}[refangle](x,y){stuff}
|
||||
\uput[refangle]{rotation}(x,y){stuff}
|
||||
\uput*[refangle]{rotation}(x,y){stuff}
|
||||
\uput[refangle](x,y){stuff}
|
||||
\uput*[refangle](x,y){stuff}
|
@ -0,0 +1,8 @@
|
||||
#rotating.cwl
|
||||
#for rotating package
|
||||
#neeraavi 12 Apr 2007
|
||||
|
||||
\begin{sidewaystable}
|
||||
\end{sidewaystable}
|
||||
\begin{sidewaysfigure}
|
||||
\end{sidewaysfigure}
|
@ -0,0 +1,15 @@
|
||||
# mode: scraddr.sty
|
||||
# dani/2006-02-21
|
||||
\addrentry{last}{first}{address}{tel}{f1}{f2}{f3}{f4}{comment}{short}
|
||||
\Address
|
||||
\adrentry{last}{first}{address}{tel}{f1}{f2}{comment}{short}
|
||||
\Comment
|
||||
\FirstName
|
||||
\FreeI
|
||||
\FreeII
|
||||
\FreeIII
|
||||
\FreeIV
|
||||
\InputAddressFile{file}
|
||||
\LastName
|
||||
\Name
|
||||
\Telephone
|
@ -0,0 +1,4 @@
|
||||
# mode: scrdate.sty
|
||||
# dani/2006-02-21
|
||||
\todaysname
|
||||
\nameday{name}
|
@ -0,0 +1,10 @@
|
||||
# mode: scrlfile.sty
|
||||
# dani/2006-02-21
|
||||
\AfterFile
|
||||
\BeforePackage
|
||||
\BeforeClass
|
||||
\BeforeFile
|
||||
\AfterClass
|
||||
\AfterClass*
|
||||
\AfterPackage
|
||||
\AfterPackage*
|
@ -0,0 +1,68 @@
|
||||
# mode: scrpage2.sty
|
||||
# dani/2006-02-21
|
||||
\automark{left}
|
||||
\automark[right]{left}
|
||||
\cefoot[plain]{text}
|
||||
\cefoot{text}
|
||||
\cehead[plain]{text}
|
||||
\cehead{text}
|
||||
\cfoot[plain]{text}
|
||||
\cfoot{text}
|
||||
\chead[plain]{text}
|
||||
\chead{text}
|
||||
\clearscrheadfoot
|
||||
\clearscrheadings
|
||||
\clearscrplain
|
||||
\cofoot[plain]{text}
|
||||
\cofoot{text}
|
||||
\cohead[plain]{text}
|
||||
\cohead{text}
|
||||
\headfont
|
||||
\headmark
|
||||
\ifoot[plain]{text}
|
||||
\ifoot{text}
|
||||
\ihead[plain]{text}
|
||||
\ihead{text}
|
||||
\lefoot[plain]{text}
|
||||
\lefoot{text}
|
||||
\lehead[plain]{text}
|
||||
\lehead{text}
|
||||
\lofoot[plain]{text}
|
||||
\lofoot{text}
|
||||
\lohead[plain]{text}
|
||||
\lohead{text}
|
||||
\manualmark
|
||||
\ofoot[plain]{text}
|
||||
\ofoot{text}
|
||||
\ohead[plain]{text}
|
||||
\ohead{text}
|
||||
\pagemark
|
||||
\pnumfont
|
||||
\refoot[plain]{text}
|
||||
\refoot{text}
|
||||
\rehead[plain]{text}
|
||||
\rehead{text}
|
||||
\rofoot[plain]{text}
|
||||
\rofoot{text}
|
||||
\rohead[plain]{text}
|
||||
\rohead{text}
|
||||
\setfootbotline{dimen}
|
||||
\setfootbotline{dimen}[commands]
|
||||
\setfootbotline[length]{dimen}
|
||||
\setfootbotline[length]{dimen}[commands]
|
||||
\setfootsepline{dimen}
|
||||
\setfootsepline{dimen}[commands]
|
||||
\setfootsepline[length]{dimen}
|
||||
\setfootsepline[length]{dimen}[commands]
|
||||
\setfootwidth[offset]{width}
|
||||
\setfootwidth{width}
|
||||
\setheadsepline{dimen}
|
||||
\setheadsepline{dimen}[commands]
|
||||
\setheadsepline[length]{dimen}
|
||||
\setheadsepline[length]{dimen}[commands]
|
||||
\setheadtopline{dimen}
|
||||
\setheadtopline{dimen}[commands]
|
||||
\setheadtopline[length]{dimen}
|
||||
\setheadtopline[length]{dimen}[commands]
|
||||
\setheadwidth[offset]{width}
|
||||
\setheadwidth{width}
|
@ -0,0 +1,7 @@
|
||||
# mode: scrtime.sty
|
||||
# dani/2006-02-21
|
||||
\thistime
|
||||
\thistime[div]
|
||||
\thistime*
|
||||
\thistime*[div]
|
||||
\settime{value}
|
@ -0,0 +1,12 @@
|
||||
\singlespacing
|
||||
\onehalfspacing
|
||||
\doublespacing
|
||||
\SetSinglespace{factor}
|
||||
\begin{singlespace}
|
||||
\begin{doublespace}
|
||||
\begin{onehalfspace}
|
||||
\begin{spacing}{factor}
|
||||
\end{singlespace}
|
||||
\end{doublespace}
|
||||
\end{onehalfspace}
|
||||
\end{spacing}
|
@ -0,0 +1,14 @@
|
||||
# mode: subfig.sty
|
||||
# dani/2006-02-18
|
||||
\captionsetup{kv-list}
|
||||
\captionsetup[variable]{kv-list}
|
||||
\ContinuedFloat
|
||||
\DeclareCaptionListOfFormat{keyowrd}{code}
|
||||
\listsubcaptions
|
||||
\newsubfloat{floatname}
|
||||
\newsubfloat[kv-list]{floatname}
|
||||
\subfloat{body}
|
||||
\subfloat[listentry][subcaption]{body}
|
||||
\subfloat[subcaption]{body}
|
||||
\subref{label}
|
||||
\subref*{label}
|
@ -0,0 +1,23 @@
|
||||
# mode: supertabular.sty
|
||||
# dani/2006-02-18
|
||||
# small changes: tbraun/2006-03-08
|
||||
\begin{mpsupertabular}{preamble}
|
||||
\begin{mpsupertabular*}{preamble}
|
||||
\begin{supertabular}{preamble}
|
||||
\begin{supertabular*}{preamble}
|
||||
\bottomcaption[short]{text}
|
||||
\bottomcaption{text}
|
||||
\end{mpsupertabular}
|
||||
\end{mpsupertabular*}
|
||||
\end{supertabular}
|
||||
\end{supertabular*}
|
||||
\setSTheight{value}
|
||||
\shrinkheight{length}
|
||||
\tablecaption[short]{text}
|
||||
\tablecaption{text}
|
||||
\tablefirsthead{text}
|
||||
\tablehead{text}
|
||||
\tablelasttail{text}
|
||||
\tabletail{text}
|
||||
\topcaption[short]{text}
|
||||
\topcaption{text}
|
@ -0,0 +1,41 @@
|
||||
#tbraun 9.02.2008
|
||||
# svn-multi aka svnkw ctan package
|
||||
|
||||
\svnid
|
||||
\svnidlong
|
||||
\svn
|
||||
\svn*
|
||||
\svnkwsave
|
||||
\svnrev
|
||||
\svndate
|
||||
\svnauthor
|
||||
\svnfilerev
|
||||
\svnfiledate
|
||||
\svnfileauthor
|
||||
\svnmainurl
|
||||
\svnmainfilename
|
||||
\svnsetmainfile
|
||||
\svnkw
|
||||
\svnkwdef
|
||||
\svnfileyear
|
||||
\svnfilemonth
|
||||
\svnfileday
|
||||
\svnfilehour
|
||||
\svnfileminute
|
||||
\svnfilesecond
|
||||
\svnfiletimezone
|
||||
\svnyear
|
||||
\svnmonth
|
||||
\svnday
|
||||
\svnhour
|
||||
\svnminute
|
||||
\svnsecond
|
||||
\svntimezone
|
||||
\svnpdfdate
|
||||
\svnRegisterAuthor
|
||||
\svnFullAuthor
|
||||
\svnFullAuthor*
|
||||
\svnRegisterRevision
|
||||
\svnFullRevision
|
||||
\svnFullRevision*
|
||||
\svnnolinkurl
|
@ -0,0 +1,19 @@
|
||||
# tbraun 8.02.2008
|
||||
# ctan svninfo package
|
||||
|
||||
\svnInfo
|
||||
\svnInfoFile
|
||||
\svnInfoRevision
|
||||
\svnInfoMinRevision
|
||||
\svnInfoMaxRevision
|
||||
\svnInfoDate
|
||||
\svnInfoTime
|
||||
\svnInfoOwner
|
||||
\svnInfoYear
|
||||
\svnInfoMonth
|
||||
\svnInfoDay
|
||||
\svnInfoLongDate
|
||||
\svnId
|
||||
\svnToday
|
||||
\svnInfoMaxToday
|
||||
# \svnKeyword $<Keyword>$ # not supported by kile
|
@ -0,0 +1,7 @@
|
||||
# mode: tabularx.sty
|
||||
# dani/2006-02-18
|
||||
\arraybackslash
|
||||
\begin{tabularx}{width}{preamble}
|
||||
\end{tabularx}
|
||||
\tabularxcolumn
|
||||
\tracingtabularx
|
@ -0,0 +1,439 @@
|
||||
# tex/latex mode: Tex commands
|
||||
# dani/8.1.2004
|
||||
\above
|
||||
\abovedisplayshortskip
|
||||
\abovedisplayskip
|
||||
\abovewithdelims
|
||||
\accent
|
||||
\active
|
||||
\adjdemerits
|
||||
\advance
|
||||
\advancepageno
|
||||
\afterassignment
|
||||
\aftergroup
|
||||
\allowbreak
|
||||
\allowhyphens
|
||||
\annotations
|
||||
\atop
|
||||
\atopwithdelims
|
||||
\baselineskip
|
||||
\batchmode
|
||||
\begingroup
|
||||
\begingroup..\endgroup
|
||||
\belowdisplayshortskip
|
||||
\belowdisplayskip
|
||||
\bgroup
|
||||
\bgroup..\egroup
|
||||
\bigskip
|
||||
\bigskipamount
|
||||
\bordermatrix
|
||||
\botmark
|
||||
\box
|
||||
\boxmaxdepth
|
||||
\brokenpenalty
|
||||
\buildrel
|
||||
\bye
|
||||
\cal
|
||||
\cases
|
||||
\catcode
|
||||
\centering
|
||||
\char
|
||||
\chardef
|
||||
\choose
|
||||
\cleaders
|
||||
\cleartabs
|
||||
\closein
|
||||
\closeout
|
||||
\closing
|
||||
\clubpenalty
|
||||
\columns
|
||||
\copy
|
||||
\copyright
|
||||
\count
|
||||
\countdef
|
||||
\crcr
|
||||
\csname
|
||||
\danger
|
||||
\dash
|
||||
\day
|
||||
\deadcycles
|
||||
\def
|
||||
\defaulthyphenchar
|
||||
\defaultskewchar
|
||||
\delcode
|
||||
\delimiter
|
||||
\delimiterfactor
|
||||
\delimitershortfall
|
||||
\dimen
|
||||
\dimendef
|
||||
\discretionary
|
||||
\displayindent
|
||||
\displaylimits
|
||||
\displaylines
|
||||
\displaywidowpenalty
|
||||
\displaywidth
|
||||
\divide
|
||||
\dotfill
|
||||
\dots
|
||||
\doublehyphendemerits
|
||||
\edef
|
||||
\egroup
|
||||
\eject
|
||||
\else
|
||||
\empty
|
||||
\end
|
||||
\endcsname
|
||||
\endgraf
|
||||
\endgroup
|
||||
\endinput
|
||||
\endlinechar
|
||||
\enskip
|
||||
\enspace
|
||||
\eqalign
|
||||
\eqalignno
|
||||
\eqno
|
||||
\errhelp
|
||||
\errmessage
|
||||
\errorstopmode
|
||||
\escapechar
|
||||
\everycr
|
||||
\everydisplay
|
||||
\everyhbox
|
||||
\everyjob
|
||||
\everymath
|
||||
\everypar
|
||||
\everyvbox
|
||||
\exhyphenpenalty
|
||||
\expandafter
|
||||
\fam
|
||||
\fill
|
||||
\finalhypendemerits
|
||||
\firstmark
|
||||
\floatingpenalty
|
||||
\folio
|
||||
\font
|
||||
\fontdimen
|
||||
\fontname
|
||||
\footins
|
||||
\footnote
|
||||
\footnoterule
|
||||
\frenchspacing
|
||||
\futurelet
|
||||
\gdef
|
||||
\global
|
||||
\globaldefs
|
||||
\halign
|
||||
\hangafter
|
||||
\hangindent
|
||||
\hbadness
|
||||
\hbox
|
||||
\hfil
|
||||
\hfill
|
||||
\hfilneg
|
||||
\hfuzz
|
||||
\hoffset
|
||||
\hrule
|
||||
\hrulefill
|
||||
\hsize
|
||||
\hskip
|
||||
\hyphenchar
|
||||
\hyphenpenalty
|
||||
\if
|
||||
\ifcase
|
||||
\ifcat
|
||||
\ifdim
|
||||
\ifeof
|
||||
\iffalse
|
||||
\ifhbox
|
||||
\ifhmode
|
||||
\ifinner
|
||||
\ifmmode
|
||||
\ifnum
|
||||
\ifodd
|
||||
\iftrue
|
||||
\ifundefined
|
||||
\ifvbox
|
||||
\ifvmode
|
||||
\ifvoid
|
||||
\ifx
|
||||
\if..\fi
|
||||
\ifcase..\fi
|
||||
\ifcat..\fi
|
||||
\ifdim..\fi
|
||||
\ifeof..\fi
|
||||
\iffalse..\fi
|
||||
\ifhbox..\fi
|
||||
\ifhmode..\fi
|
||||
\ifinner..\fi
|
||||
\ifmmode..\fi
|
||||
\ifnum..\fi
|
||||
\ifodd..\fi
|
||||
\iftrue..\fi
|
||||
\ifvbox..\fi
|
||||
\ifvmode..\fi
|
||||
\ifvoid..\fi
|
||||
\ifx..\fi
|
||||
\if..\else..\fi
|
||||
\ifcase..\else..\fi
|
||||
\ifcat..\else..\fi
|
||||
\ifdim..\else..\fi
|
||||
\ifeof..\else..\fi
|
||||
\iffalse..\else..\fi
|
||||
\ifhbox..\else..\fi
|
||||
\ifhmode..\else..\fi
|
||||
\ifinner..\else..\fi
|
||||
\ifmmode..\else..\fi
|
||||
\ifnum..\else..\fi
|
||||
\ifodd..\else..\fi
|
||||
\iftrue..\else..\fi
|
||||
\ifvbox..\else..\fi
|
||||
\ifvmode..\else..\fi
|
||||
\ifvoid..\else..\fi
|
||||
\ifx..\else..\fi
|
||||
\ignorespaces
|
||||
\immediate
|
||||
\indent
|
||||
\insert
|
||||
\insertpenalties
|
||||
\interdisplaylinepenalty
|
||||
\interfootnotelinepenalty
|
||||
\interlinepenalty
|
||||
\jobname
|
||||
\joinrel
|
||||
\kern
|
||||
\lastbox
|
||||
\lastkern
|
||||
\lastpenalty
|
||||
\lastskip
|
||||
\lccode
|
||||
\leaders
|
||||
\leavevmode
|
||||
\left
|
||||
\left..\right
|
||||
\leftskip
|
||||
\leqno
|
||||
\let
|
||||
\limits
|
||||
\line
|
||||
\linepenalty
|
||||
\lineskip
|
||||
\lineskiplimit
|
||||
\llap
|
||||
\long
|
||||
\looseness
|
||||
\lower
|
||||
\lowercase
|
||||
\mag
|
||||
\magnification
|
||||
\magstep
|
||||
\margin
|
||||
\mark
|
||||
\mathaccent
|
||||
\mathbin
|
||||
\mathchar
|
||||
\mathchardef
|
||||
\mathchoice
|
||||
\mathclose
|
||||
\mathcode
|
||||
\mathinner
|
||||
\mathop
|
||||
\mathopen
|
||||
\mathord
|
||||
\mathpunct
|
||||
\mathrel
|
||||
\mathstrut
|
||||
\mathsurround
|
||||
\matrix
|
||||
\maxdeadcycles
|
||||
\maxdepth
|
||||
\maxdimen
|
||||
\meaning
|
||||
\medmuskip
|
||||
\medskip
|
||||
\medskipamount
|
||||
\message
|
||||
\mkern
|
||||
\month
|
||||
\moveleft
|
||||
\moveright
|
||||
\mskip
|
||||
\multiply
|
||||
\multispan
|
||||
\muskip
|
||||
\muskipdef
|
||||
\negthinspace
|
||||
\newbox
|
||||
\newcount
|
||||
\newdimen
|
||||
\newhelp
|
||||
\newif
|
||||
\newlinechar
|
||||
\newmuskip
|
||||
\newread
|
||||
\newskip
|
||||
\newtoks
|
||||
\newwrite
|
||||
\noalign
|
||||
\noexpand
|
||||
\noindent
|
||||
\nointerlineskip
|
||||
\nolimits
|
||||
\nonfrenchspacing
|
||||
\nonscript
|
||||
\nonstopmode
|
||||
\nopagenumbers
|
||||
\nulldelimiterspace
|
||||
\nullfont
|
||||
\number
|
||||
\obeylines
|
||||
\obeyspaces
|
||||
\offinterlineskip
|
||||
\omit
|
||||
\openin
|
||||
\openout
|
||||
\outer
|
||||
\output
|
||||
\outputpenalty
|
||||
\over
|
||||
\overfullrule
|
||||
\overleftarrow
|
||||
\overrightarrow
|
||||
\overwithdelims
|
||||
\pagedepth
|
||||
\pagefilllstretch
|
||||
\pagefillstretch
|
||||
\pagefilstretch
|
||||
\pagegoal
|
||||
\pageinsert
|
||||
\pageno
|
||||
\pageshrink
|
||||
\pagestretch
|
||||
\par
|
||||
\parfillskip
|
||||
\parindent
|
||||
\parshape
|
||||
\parskip
|
||||
\patterns
|
||||
\pausing
|
||||
\penalty
|
||||
\phantom
|
||||
\pmatrix
|
||||
\postdisplaypenalty
|
||||
\predisplaypenalty
|
||||
\predisplaysize
|
||||
\pretolerance
|
||||
\prevdepth
|
||||
\prevgraf
|
||||
\proclaim
|
||||
\protect
|
||||
\qquad
|
||||
\quad
|
||||
\radical
|
||||
\raggedbottom
|
||||
\raggedcenter
|
||||
\raggedleft
|
||||
\raggedright
|
||||
\raise
|
||||
\read
|
||||
\relax
|
||||
\relpenalty
|
||||
\removelastskip
|
||||
\repeat
|
||||
\right
|
||||
\rightskip
|
||||
\rlap
|
||||
\romannumeral
|
||||
\scriptfont
|
||||
\scriptscriptfont
|
||||
\scriptscriptstyle
|
||||
\scriptspace
|
||||
\scriptstyle
|
||||
\scrollmode
|
||||
\setbox
|
||||
\sfcode
|
||||
\shipout
|
||||
\show
|
||||
\showbox
|
||||
\showboxbreadth
|
||||
\showboxdepth
|
||||
\showhyphens
|
||||
\showlists
|
||||
\showthe
|
||||
\skew
|
||||
\skewchar
|
||||
\skip
|
||||
\skipdef
|
||||
\slash
|
||||
\smallskip
|
||||
\smallskipamount
|
||||
\spacefactor
|
||||
\spaceskip
|
||||
\span
|
||||
\special
|
||||
\splitbotmark
|
||||
\splitfirstmark
|
||||
\splitmaxdepth
|
||||
\splittopskip
|
||||
\string
|
||||
\strut
|
||||
\tabskip
|
||||
\TeX
|
||||
\textfont
|
||||
\textindent
|
||||
\textstyle
|
||||
\the
|
||||
\thickmuskip
|
||||
\thinmuskip
|
||||
\thinspace
|
||||
\toks
|
||||
\toksdef
|
||||
\tolerance
|
||||
\topins
|
||||
\topmark
|
||||
\topskip
|
||||
\tracingcommands
|
||||
\tracingfonts
|
||||
\tracinglostchars
|
||||
\tracingmacros
|
||||
\tracingonline
|
||||
\tracingoutput
|
||||
\tracingpages
|
||||
\tracingparagraphs
|
||||
\tracingrestores
|
||||
\tracingstats
|
||||
\uccode
|
||||
\uchyph
|
||||
\underbar
|
||||
\unhbox
|
||||
\unhcopy
|
||||
\unitlength
|
||||
\unkern
|
||||
\unpenalty
|
||||
\unskip
|
||||
\unvbox
|
||||
\unvcopy
|
||||
\uppercase
|
||||
\vadjust
|
||||
\valign
|
||||
\vbadness
|
||||
\vbox
|
||||
\vcenter
|
||||
\vfil
|
||||
\vfill
|
||||
\vfilll
|
||||
\vfilneg
|
||||
\vfuzz
|
||||
\voffset
|
||||
\vphantom
|
||||
\vrule
|
||||
\vsize
|
||||
\vskip
|
||||
\vsplit
|
||||
\vss
|
||||
\vtop
|
||||
\widowpenalty
|
||||
\write
|
||||
\xdef
|
||||
\xleaders
|
||||
\xspaceskip
|
||||
\year
|
@ -0,0 +1,129 @@
|
||||
# textcomp package
|
||||
# tbraun 04/27/2006
|
||||
|
||||
\capitalgrave{text}
|
||||
\capitalacute{text}
|
||||
\capitalcircumflex{text}
|
||||
\capitaltilde{text}
|
||||
\capitaldieresis{text}
|
||||
\capitalhungarumlaut{text}
|
||||
\capitalring{text}
|
||||
\capitalcaron{text}
|
||||
\capitalbreve{text}
|
||||
\capitaldotaccent{text}
|
||||
\capitalcedilla{text}
|
||||
\capitalogonek{text}
|
||||
\t{text}
|
||||
\capitaltie{text}
|
||||
\newtie{text}
|
||||
\capitalnewtie{text}
|
||||
\textcapitalcompwordmark
|
||||
\textascendercompwordmark
|
||||
\oldstylenums{number}
|
||||
\textzerooldstyle
|
||||
\textoneoldstyle
|
||||
\texttwooldstyle
|
||||
\textthreeoldstyle
|
||||
\textfouroldstyle
|
||||
\textfiveoldstyle
|
||||
\textsixoldstyle
|
||||
\textsevenoldstyle
|
||||
\texteightoldstyle
|
||||
\textnineoldstyle
|
||||
\textquotestraightbase
|
||||
\textquotestraightdblbase
|
||||
\texttwelveudash
|
||||
\textthreequartersemdash
|
||||
\textleftarrow
|
||||
\textrightarrow
|
||||
\textblank
|
||||
\textdollar
|
||||
\textquotesingle
|
||||
\textasteriskcentered
|
||||
\textdblhyphen
|
||||
\textfractionsolidus
|
||||
\textlangle
|
||||
\textminus
|
||||
\textrangle
|
||||
\textmho
|
||||
\textbigcircle
|
||||
\textohm
|
||||
\textlbrackdbl
|
||||
\textrbrackdbl
|
||||
\textuparrow
|
||||
\textdownarrow
|
||||
\textasciigrave
|
||||
\textborn
|
||||
\textdivorced
|
||||
\textdied
|
||||
\textleaf
|
||||
\textmarried
|
||||
\textmusicalnote
|
||||
\texttildelow
|
||||
\textdblhyphenchar
|
||||
\textasciibreve
|
||||
\textasciicaron
|
||||
\textacutedbl
|
||||
\textgravedbl
|
||||
\textdagger
|
||||
\textdaggerdbl
|
||||
\textbardbl
|
||||
\textperthousand
|
||||
\textbullet
|
||||
\textcelsius
|
||||
\textdollaroldstyle
|
||||
\textcent
|
||||
\textflorin
|
||||
\textcolonmonetary
|
||||
\textwon
|
||||
\textnaira
|
||||
\textguarani
|
||||
\textpeso
|
||||
\textlira
|
||||
\textrecipe
|
||||
\textinterrobang
|
||||
\textinterrobangdown
|
||||
\textdong
|
||||
\texttrademark
|
||||
\textpertenthousand
|
||||
\textpilcrow
|
||||
\textbaht
|
||||
\textnumero
|
||||
\textdiscount
|
||||
\textestimated
|
||||
\textopenbullet
|
||||
\textservicemark
|
||||
\textlquill
|
||||
\textrquill
|
||||
\textcent
|
||||
\textsterling
|
||||
\textcurrency
|
||||
\textyen
|
||||
\textbrokenbar
|
||||
\textsection
|
||||
\textasciidieresis
|
||||
\textcopyright
|
||||
\textordfeminine
|
||||
\textcopyleft
|
||||
\textlnot
|
||||
\textcircled
|
||||
\textregistered
|
||||
\textasciimacron
|
||||
\textdegree
|
||||
\textpm
|
||||
\texttwosuperior
|
||||
\textthreesuperior
|
||||
\textasciiacute
|
||||
\textmu
|
||||
\textparagraph
|
||||
\textperiodcentered
|
||||
\textreferencemark
|
||||
\textonesuperior
|
||||
\textordmasculine
|
||||
\textsurd
|
||||
\textonequarter
|
||||
\textonehalf
|
||||
\textthreequarters
|
||||
\texteuro
|
||||
\texttimes
|
||||
\textdiv
|
@ -0,0 +1,19 @@
|
||||
# tbraun 5.01.2007
|
||||
# ctan url package
|
||||
|
||||
\url{}
|
||||
# \url|| not supported by kile 2.0
|
||||
\urldef{\newurlcmd}\url{}
|
||||
\DeclareUrlCommand{}{}
|
||||
\urlstyle{}
|
||||
\UrlBreaks
|
||||
\UrlBigBreaks
|
||||
\UrlNoBreaks
|
||||
\UrlOrds
|
||||
\UrlSpecials
|
||||
\UrlTildeSpecial
|
||||
\UrlFont
|
||||
\UrlFont
|
||||
\UrlFont
|
||||
\UrlLeft
|
||||
\UrlRight
|
@ -0,0 +1,30 @@
|
||||
# mode: varioref.sty
|
||||
# dani/2006-02-18
|
||||
\fullref{label}
|
||||
\labelformat{counter}{argument}
|
||||
\Ref{label}
|
||||
\reftextafter{text}
|
||||
\reftextbefore{text}
|
||||
\reftextcurrent{text}
|
||||
\reftextfaceafter{text}
|
||||
\reftextfacebefore{text}
|
||||
\reftextfaraway
|
||||
\reftextlabelrange
|
||||
\reftextpagerange
|
||||
\vpageref{label}
|
||||
\vpageref*{label}
|
||||
\vpagerefrange{fromlabel}{tolabel}
|
||||
\vpagerefrange*{fromlabel}{tolabel}
|
||||
\vpagerefrange[same page]{fromlabel}{tolabel}
|
||||
\vpagerefrange*[same page]{fromlabel}{tolabel}
|
||||
\vpageref[samepage]{label}
|
||||
\vpageref*[samepage]{label}
|
||||
\vpageref[samepage][otherpage]{label}
|
||||
\vpageref*[samepage][otherpage]{label}
|
||||
\vref{label}
|
||||
\vref*{label}
|
||||
\Vref{label}
|
||||
\Vref*{label}
|
||||
\vrefpagenum{cmd}{label}
|
||||
\vrefrange{fromlabel}{tolabel}
|
||||
\vreftextvario{text1}{text2}
|
@ -0,0 +1,45 @@
|
||||
# verse 2.3 package
|
||||
# nja 17 July 2007 not submitted
|
||||
|
||||
\begin{verse}
|
||||
\begin{verse}[length of average line]
|
||||
\end{verse}
|
||||
|
||||
\begin{altverse}
|
||||
\end{altverse}
|
||||
|
||||
\begin{patverse}
|
||||
\end{patverse}
|
||||
\begin{patverse*}
|
||||
\end{patverse*}
|
||||
|
||||
\indentpattern{digits}
|
||||
|
||||
|
||||
\versewidth
|
||||
|
||||
\vin
|
||||
\vgap
|
||||
\vindent
|
||||
\leftmargini
|
||||
\stanzaskip
|
||||
|
||||
\verselinebreak
|
||||
\verselinebreak[length]
|
||||
\flagverse{flag}
|
||||
\vleftskip
|
||||
\vrightskip
|
||||
\poemlines{nth}
|
||||
\thepoemline
|
||||
\verselinenumfont{font-spec}
|
||||
\verselinenumbersleft
|
||||
\verselinenumbersright
|
||||
|
||||
\poemtitle{short}{long}
|
||||
\poemtitle*{short}{long}
|
||||
\poemtoc
|
||||
\poemtitlefont
|
||||
\beforepoemtitleskip
|
||||
\afterpoemtitleskip
|
||||
\poemtitlemark{title}
|
||||
|
@ -0,0 +1,171 @@
|
||||
# virginialake package
|
||||
# Tom Gundersen <teg@jklm.no> 24/2/08
|
||||
# http://alessio.guglielmi.name/res/vl/index.html
|
||||
|
||||
# formulae/structures
|
||||
\vlor
|
||||
\vlan
|
||||
\vlim
|
||||
\vlne
|
||||
\vldi
|
||||
\vlmi
|
||||
\vls
|
||||
\vlsbr
|
||||
\vlscn
|
||||
\vlhole
|
||||
\vlsmallbrackets
|
||||
\vlnosmallbrackets
|
||||
\vlupdate
|
||||
\vlstore
|
||||
\vlread
|
||||
\vldot
|
||||
\vlsqbrl
|
||||
\vlsqbrr
|
||||
\vlrobrl
|
||||
\vlrobrr
|
||||
\vlnos
|
||||
\vlnostructuresyntax
|
||||
|
||||
# derivations
|
||||
\vlnostructuresyntax
|
||||
\vlsmallleftlabels
|
||||
\vlnosmallleftlabels
|
||||
\vlderivation{derivation}
|
||||
\vlproof{left label}{right label}{conclusion}
|
||||
\vlder{left label}{right label}{conclusion}{premiss}
|
||||
\vltreeder{label}{conclusion}{left premiss}{middle premiss}{right premiss}
|
||||
\vlinf{left label}{right label}{conclusion}{premiss}
|
||||
\vliinf{left label}{right label}{conclusion}{left premiss}{right premiss}
|
||||
\vliiinf{left label}{right label}{conclusion}{left premiss}{middle premiss}{right premiss}
|
||||
\vlpr{left label}{right label}{conclusion}
|
||||
\vlde{left label}{right label}{conclusion}{premiss (derivation)}
|
||||
\vltr{label}{conclusion}{left premiss (derivation)}{middle premiss (derivation)}{right premiss (derivation)}
|
||||
\vltr{label}{conclusion}{left premiss (derivation)}{middle premiss (derivation)}{right premiss (derivation)}{scale}
|
||||
\vlin{left label}{right label}{conclusion}{premiss (derivation)}
|
||||
\vliin{left label}{right label}{conclusion}{left premiss (derivation)}{right premiss (derivation)}
|
||||
\vliiin{left label}{right label}{conclusion}{left premiss (derivation)}{middle premiss (derivation)}{right premiss (derivation)}
|
||||
\vlhy{premiss}
|
||||
|
||||
# atomic flows
|
||||
\aftriangletrue
|
||||
\aftrianglefalse
|
||||
\afaid{label}{label}{label}{label}{label}{label}
|
||||
\afaidcol{label}{label}{label}{label}{label}{label}{colour}{colour}
|
||||
\afaidex{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afaidexcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
\afaidnw{label}{label}
|
||||
\afaidnwcol{label}{label}{colour}
|
||||
|
||||
\afaiu{label}{label}{label}{label}{label}{label}
|
||||
\afaiucol{label}{label}{label}{label}{label}{label}{colour}{colour}
|
||||
\afaiuex{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afaiuexcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
\afaiunw{label}{label}
|
||||
\afaiunwcol{label}{label}{colour}
|
||||
|
||||
\afnegspace
|
||||
\afraise
|
||||
\aflower
|
||||
|
||||
\afacd{label}{label}{label}{label}{label}{label}
|
||||
\afacdcol{label}{label}{label}{label}{label}{label}{colour}{colour}{colour}
|
||||
\afacdex{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacdexsq{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacdexcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}{colour}
|
||||
\afacdexsqcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}{colour}
|
||||
\afacdnw{label}{label}{label}{label}
|
||||
\afacdnwcol{label}{label}{label}{label}{colour}{colour}
|
||||
\afacdnwex{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacdexsq{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacdnwexcol{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
\afacdnwexsqcol{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
|
||||
\afacu{label}{label}{label}{label}{label}{label}
|
||||
\afacucol{label}{label}{label}{label}{label}{label}{colour}{colour}{colour}
|
||||
\afacuex{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacuexsq{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacuexcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}{colour}
|
||||
\afacuexsqcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}{colour}
|
||||
\afacunw{label}{label}{label}{label}
|
||||
\afacunwcol{label}{label}{label}{label}{colour}{colour}
|
||||
\afacunwex{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacuexsq{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afacunwexcol{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
\afacunwexsqcol{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
|
||||
\afaiu{label}{label}{label}{label}{label}{label}
|
||||
\afaiucol{label}{label}{label}{label}{label}{label}{colour}{colour}
|
||||
\afaiuex{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}
|
||||
\afaiuexcol{label}{label}{label}{label}{label}{label}{scale numerator}{scale denominator}{colour}{colour}
|
||||
\afaiunw{label}{label}
|
||||
\afaiunwcol{label}{label}{colour}
|
||||
|
||||
\afawd{label}{label}{label}{label}
|
||||
\afawdcol{label}{label}{label}{label}{colour}{colour}
|
||||
\afawdnw{label}{label}
|
||||
|
||||
\afawu{label}{label}{label}{label}
|
||||
\afawucol{label}{label}{label}{label}{colour}{colour}
|
||||
\afawunw{label}{label}
|
||||
|
||||
\aff{scale}{label}{label}
|
||||
\affcol{scale}{label}{label}{colour}
|
||||
|
||||
\aft{scale}{label}{label}
|
||||
\aftcol{scale}{label}{label}{colour}
|
||||
|
||||
\afvdj
|
||||
\afvj{scale}
|
||||
\afvjcol{scale}{colour}
|
||||
\afvjd{label}{label}{scale}
|
||||
\afvjdcol{label}{label}{scale}{colour}
|
||||
\afvju{label}{label}{scale}
|
||||
\afvjucol{label}{label}{scale}{colour}
|
||||
\aftvj{scale}
|
||||
\aftvjcol{scale}{colour}
|
||||
\aftvjd{label}{label}{scale}
|
||||
\aftvjdcol{label}{label}{scale}{colour}
|
||||
\aftvju{label}{label}{scale}
|
||||
\aftvjucol{label}{label}{scale}{colour}
|
||||
|
||||
\afex{scale}{scale}
|
||||
\afexcol{scale}{scale}{colour}{colour}
|
||||
|
||||
\afcjl{scale}
|
||||
\afcjlcol{scale}{colour}
|
||||
\afcjld{label}{label}{scale}
|
||||
\afcjldcol{label}{label}{scale}{colour}
|
||||
\afcjlu{label}{label}{scale}
|
||||
\afcjlucol{label}{label}{scale}{colour}
|
||||
\aftcjl{scale}
|
||||
\aftcjlcol{scale}{colour}
|
||||
\aftcjld{label}{label}{scale}
|
||||
\aftcjldcol{label}{label}{scale}{colour}
|
||||
\aftcjlu{label}{label}{scale}
|
||||
\aftcjlucol{label}{label}{scale}{colour}
|
||||
|
||||
\afcjr{scale}
|
||||
\afcjrcol{scale}{colour}
|
||||
\afcjrd{label}{label}{scale}
|
||||
\afcjrdcol{label}{label}{scale}{colour}
|
||||
\afcjru{label}{label}{scale}
|
||||
\afcjrucol{label}{label}{scale}{colour}
|
||||
\aftcjr{scale}
|
||||
\aftcjrcol{scale}{colour}
|
||||
\aftcjrd{label}{label}{scale}
|
||||
\aftcjrdcol{label}{label}{scale}{colour}
|
||||
\aftcjru{label}{label}{scale}
|
||||
\aftcjrucol{label}{label}{scale}{colour}
|
||||
|
||||
# check this stuff if you want to use it...
|
||||
#\afexpu 542
|
||||
#\afexpd 825
|
||||
\affr{scale}{scale}
|
||||
|
||||
\atomicflow{atomicflow}
|
||||
\atomicflowinv{atomicflow}
|
||||
|
||||
# smash macros
|
||||
\vldownsmash
|
||||
\vlupsmash
|
||||
\vlsmash
|
@ -0,0 +1,27 @@
|
||||
# xifthen package
|
||||
# nja 17 July 2007
|
||||
# url: http://www.ctan.org/tex-archive/help/Catalogue/entries/xifthen.html
|
||||
|
||||
# also in ifthen
|
||||
\ifthenelse{test}{then clause}{else clause}
|
||||
\boolean{name}
|
||||
\newboolean{name}
|
||||
\setboolean{name}{truth value}
|
||||
\isodd{number}
|
||||
\isundefined{command}
|
||||
\equal{string}{string}
|
||||
\AND
|
||||
\OR
|
||||
\NOT
|
||||
\lengthtest{dimen operator dimen}
|
||||
|
||||
# in xifthen but not in ifthen
|
||||
\isnamedefined{command name}
|
||||
\isempty{content}
|
||||
\isequivalentto{command}{command}
|
||||
\isin{substring}{string}
|
||||
\endswith{string}{substring}
|
||||
\cnttest{counter expression}<comparison>{counter expression}
|
||||
\dimtest{dimen expression}<comparison>{dimen expression}
|
||||
\newtest{command}[n]{testexpression}
|
||||
|
@ -0,0 +1,20 @@
|
||||
# xltxtra v0.3a package
|
||||
# nja 17 July 2007
|
||||
# url: http://www.ctan.org/tex-archive/help/Catalogue/entries/xltxtra.html
|
||||
|
||||
\textsuperscript*
|
||||
\textsubscript*
|
||||
\realsubscript
|
||||
\realsuperscript
|
||||
\fakesubscript
|
||||
\fakesuperscript
|
||||
|
||||
\vfrac{numerator}{denominator}
|
||||
|
||||
\namedglyph{glyphname}
|
||||
|
||||
\showhyphens
|
||||
|
||||
\XeTeX
|
||||
\XeLaTeX
|
||||
|
@ -0,0 +1,24 @@
|
||||
# mode: xtab.sty
|
||||
# dani/2006-02-18
|
||||
\begin{mpxtabular}{preamble}
|
||||
\begin{mpxtabular*}{preamble}
|
||||
\begin{xtabular}{preamble}
|
||||
\begin{xtabular*}{preamble}
|
||||
\bottomcaption[short]{text}
|
||||
\bottomcaption{text}
|
||||
\end{mpxtabular}
|
||||
\end{mpxtabular*}
|
||||
\end{xtabular}
|
||||
\end{xtabular*}
|
||||
\notablelasthead
|
||||
\shrinkheight{length}
|
||||
\tablecaption[short]{text}
|
||||
\tablecaption{text}
|
||||
\tablefirsthead{text}
|
||||
\tablehead{text}
|
||||
\tablelasthead{text}
|
||||
\tablelasttail{text}
|
||||
\tabletail{text}
|
||||
\topcaption[short]{text}
|
||||
\topcaption{text}
|
||||
\xentryfraction{decimal-fraction}
|
@ -0,0 +1,19 @@
|
||||
# tbraun 16.02.2008
|
||||
# ctan yfonts package
|
||||
|
||||
\gothfamily
|
||||
\swabfamily
|
||||
\frakfamily
|
||||
\initfamily
|
||||
\textgoth{text}
|
||||
\textswab{text}
|
||||
\textfrak{text}
|
||||
\textinit{text}
|
||||
\frakdefault
|
||||
\gothdefault
|
||||
\swabdefault
|
||||
\initdefault
|
||||
\etc
|
||||
\fraklines
|
||||
\yinipar
|
||||
\yinitpar
|
@ -0,0 +1,180 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Jun 4 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "configcheckerdlg.h"
|
||||
|
||||
#include <qfileinfo.h>
|
||||
#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kcursor.h>
|
||||
#include <kprogress.h>
|
||||
#include <kglobal.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <klistbox.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "configcheckerwidget.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
|
||||
ResultItem::ResultItem(KListBox *lb, const QString &tool, int status, const QValueList<ConfigTest> &tests) : QListBoxItem(lb)
|
||||
{
|
||||
QString rt = "<hr><b><font color=\"%1\">%2</font></b> (%3)<br><ul>";
|
||||
for ( uint i = 0; i < tests.count(); ++i)
|
||||
{
|
||||
QString itemcolor = "black";
|
||||
if ( tests[i].status() == ConfigTest::Failure ) itemcolor = "#FFA201";
|
||||
else if ( tests[i].status() == ConfigTest::Critical ) itemcolor = "#AA0000";
|
||||
rt += QString("<li><b><font color=\"%1\">%2</font></b>: %3</li>").arg(itemcolor).arg(tests[i].name()).arg(tests[i].resultText());
|
||||
}
|
||||
rt += "</ul>";
|
||||
|
||||
QString color = "#00AA00", statustr = i18n("Passed");
|
||||
if ( status == ConfigTest::Failure )
|
||||
{
|
||||
color = "#FFA201";
|
||||
statustr = i18n("Failed, but not critical");
|
||||
}
|
||||
else if ( status == ConfigTest::Critical )
|
||||
{
|
||||
color = "#AA0000";
|
||||
statustr = i18n("Critical failure, Kile will not function properly");
|
||||
}
|
||||
|
||||
m_richText = new QSimpleRichText(rt.arg(color).arg(tool).arg(statustr), listBox()->font());
|
||||
m_richText->setWidth(listBox()->width());
|
||||
|
||||
//this is for sorting only
|
||||
setText(QString::number(status) + ':' + tool);
|
||||
}
|
||||
|
||||
void ResultItem::paint(QPainter *p)
|
||||
{
|
||||
m_richText->draw(p, 0, 0, QRect(), listBox()->colorGroup());
|
||||
}
|
||||
|
||||
ConfigChecker::ConfigChecker(QWidget* parent) :
|
||||
KDialogBase( Plain, i18n("System Check"), Ok|Cancel|User1, Ok, parent, 0, true, true, KGuiItem("&Save Results...")),
|
||||
m_tester(0L)
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout(plainPage(), 1, 1);
|
||||
m_widget = new ConfigCheckerWidget(plainPage());
|
||||
layout->addWidget(m_widget, 1, 1);
|
||||
|
||||
enableButton(Ok, false);
|
||||
enableButton(User1, false);
|
||||
|
||||
run();
|
||||
}
|
||||
|
||||
ConfigChecker::~ConfigChecker()
|
||||
{
|
||||
}
|
||||
|
||||
KProgress* ConfigChecker::progressBar()
|
||||
{
|
||||
return m_widget->progressBar();
|
||||
}
|
||||
|
||||
QLabel* ConfigChecker::label()
|
||||
{
|
||||
return m_widget->label();
|
||||
}
|
||||
|
||||
KListBox* ConfigChecker::listBox()
|
||||
{
|
||||
return m_widget->listBox();
|
||||
}
|
||||
|
||||
void ConfigChecker::run()
|
||||
{
|
||||
m_tester = new Tester(this, "configtester");
|
||||
|
||||
connect(m_tester, SIGNAL(started()), this, SLOT(started()));
|
||||
connect(m_tester, SIGNAL(percentageDone(int)), this, SLOT(setPercentageDone(int)));
|
||||
connect(m_tester, SIGNAL(finished(bool)), this, SLOT(finished(bool)));
|
||||
connect(this, SIGNAL(user1Clicked()), this, SLOT(saveResults()));
|
||||
|
||||
m_tester->runTests();
|
||||
}
|
||||
|
||||
void ConfigChecker::slotCancel()
|
||||
{
|
||||
if (m_tester) m_tester->stop();
|
||||
finished(false);
|
||||
reject();
|
||||
}
|
||||
|
||||
void ConfigChecker::saveResults()
|
||||
{
|
||||
KURL url = KFileDialog::getSaveURL();
|
||||
if ( !url.isEmpty() ) m_tester->saveResults(url);
|
||||
}
|
||||
|
||||
void ConfigChecker::started()
|
||||
{
|
||||
setCursor(KCursor::workingCursor());
|
||||
setPercentageDone(0);
|
||||
}
|
||||
|
||||
void ConfigChecker::finished(bool ok)
|
||||
{
|
||||
setCursor(KCursor::arrowCursor());
|
||||
enableButton(Cancel, false);
|
||||
|
||||
if (ok)
|
||||
{
|
||||
label()->setText(i18n("Finished testing your system..."));
|
||||
|
||||
QStringList tools = m_tester->testedTools();
|
||||
QStringList critical, failure;
|
||||
for ( uint i = 0; i < tools.count(); ++i )
|
||||
{
|
||||
int status = m_tester->statusForTool(tools[i]);
|
||||
if ( status == ConfigTest::Critical ) critical.append(tools[i]);
|
||||
else if ( status == ConfigTest::Failure ) failure.append(tools[i]);
|
||||
new ResultItem(listBox(), tools[i], status, m_tester->resultForTool(tools[i]));
|
||||
}
|
||||
|
||||
listBox()->sort();
|
||||
|
||||
QString cap = i18n("Test Results");
|
||||
if ( critical.count() > 0 )
|
||||
KMessageBox::error(this, i18n("<qt>The following tools did not pass all <b>critical</b> tests:<br>%1<br>Your system is not ready to use. Please consult the results to find out what to fix.</qt>").arg(critical.join(", ")), cap);
|
||||
else if ( failure.count() > 0 )
|
||||
KMessageBox::information(this, i18n("The following tools did not pass all tests:\n %1\nYou will still be able to use Kile; however, not all features are guaranteed to work.").arg(failure.join(", ")), cap);
|
||||
else
|
||||
KMessageBox::information(this, i18n("No problems detected, your system is ready to use."), cap);
|
||||
}
|
||||
else
|
||||
label()->setText(i18n("Tests finished abruptly..."));
|
||||
|
||||
enableButton(Ok, true);
|
||||
enableButton(User1, true);
|
||||
}
|
||||
|
||||
void ConfigChecker::setPercentageDone(int p)
|
||||
{
|
||||
progressBar()->setProgress(p);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "configcheckerdlg.moc"
|
@ -0,0 +1,75 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Jun 4 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEDIALOG_CONFIGCHECKER_H
|
||||
#define KILEDIALOG_CONFIGCHECKER_H
|
||||
|
||||
#include <qsimplerichtext.h>
|
||||
|
||||
#include <kdialogbase.h>
|
||||
|
||||
#include "configtester.h"
|
||||
|
||||
class QLabel;
|
||||
class QPainter;
|
||||
|
||||
class KProgress;
|
||||
class KListBox;
|
||||
|
||||
class ConfigCheckerWidget;
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
class ResultItem : public QListBoxItem
|
||||
{
|
||||
public:
|
||||
ResultItem(KListBox *lb, const QString &tool, int status, const QValueList<ConfigTest> &tests);
|
||||
int width(const QListBox *) const { return m_richText->widthUsed(); }
|
||||
int height(const QListBox *) const { return m_richText->height(); }
|
||||
|
||||
protected:
|
||||
void paint(QPainter *);
|
||||
|
||||
private:
|
||||
QSimpleRichText *m_richText;
|
||||
};
|
||||
|
||||
class ConfigChecker : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ConfigChecker(QWidget* parent = 0);
|
||||
~ConfigChecker();
|
||||
|
||||
public slots:
|
||||
void run();
|
||||
void started();
|
||||
void finished(bool);
|
||||
void setPercentageDone(int);
|
||||
void saveResults();
|
||||
void slotCancel();
|
||||
|
||||
private:
|
||||
KProgress* progressBar();
|
||||
QLabel* label();
|
||||
KListBox* listBox();
|
||||
|
||||
private:
|
||||
ConfigCheckerWidget *m_widget;
|
||||
Tester *m_tester;
|
||||
};
|
||||
}
|
||||
#endif
|
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
|
||||
<class>ConfigCheckerWidget</class>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>ConfigCheckerWidget</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>580</width>
|
||||
<height>482</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>2</hsizetype>
|
||||
<vsizetype>2</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>580</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Performing System Check</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>m_lbChecking</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Checking if your TeX system is installed correctly...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KProgress">
|
||||
<property name="name">
|
||||
<cstring>m_progress</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>2</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
<cstring>m_grpResults</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>2</hsizetype>
|
||||
<vsizetype>2</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Results</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="KListBox" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>m_lstResults</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>2</hsizetype>
|
||||
<vsizetype>2</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>480</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">configcheckerwidget.ui.h</include>
|
||||
</includes>
|
||||
<functions>
|
||||
<function specifier="non virtual" returnType="KProgress *">progressBar()</function>
|
||||
<function specifier="non virtual" returnType="QLabel *">label()</function>
|
||||
<function specifier="non virtual" returnType="KListBox *">listBox()</function>
|
||||
</functions>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<includehints>
|
||||
<includehint>kprogress.h</includehint>
|
||||
<includehint>klistbox.h</includehint>
|
||||
</includehints>
|
||||
</UI>
|
@ -0,0 +1,27 @@
|
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation.
|
||||
**
|
||||
** If you wish to add, delete or rename functions or slots use
|
||||
** Qt Designer which will update this file, preserving your code. Create an
|
||||
** init() function in place of a constructor, and a destroy() function in
|
||||
** place of a destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
KProgress* ConfigCheckerWidget::progressBar()
|
||||
{
|
||||
return m_progress;
|
||||
}
|
||||
|
||||
|
||||
QLabel* ConfigCheckerWidget::label()
|
||||
{
|
||||
return m_lbChecking;
|
||||
}
|
||||
|
||||
KListBox* ConfigCheckerWidget::listBox()
|
||||
{
|
||||
return m_lstResults;
|
||||
}
|
@ -0,0 +1,521 @@
|
||||
/***************************************************************************
|
||||
date : Mar 30 2007
|
||||
version : 0.24
|
||||
copyright : (C) 2004-2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "configcodecompletion.h"
|
||||
|
||||
#include <kdialog.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <klocale.h>
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qtabwidget.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qvgroupbox.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qlabel.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qframe.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
|
||||
#include "kilelistselector.h"
|
||||
#include "kileconfig.h"
|
||||
#include "kilelogwidget.h"
|
||||
#include "kiletool_enums.h"
|
||||
|
||||
ConfigCodeCompletion::ConfigCodeCompletion(KConfig *config, KileWidget::LogMsg *logwidget, QWidget *parent, const char *name )
|
||||
: QWidget(parent,name), m_config(config), m_logwidget(logwidget)
|
||||
{
|
||||
// Layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout(this, 5,KDialog::spacingHint() );
|
||||
|
||||
// Groupbox with TabDialog and two button
|
||||
QGroupBox *gb_tab= new QGroupBox(i18n("Complete Modes"), this );
|
||||
QGridLayout *grid_tab = new QGridLayout( gb_tab, 2,1, 12,8, "" );
|
||||
grid_tab->addRowSpacing( 0, 12 );
|
||||
|
||||
// create TabWidget
|
||||
tab = new QTabWidget(gb_tab);
|
||||
|
||||
// add three pages: Tex/Latex, Dictionary, Abbreviation
|
||||
addPage(tab, TexPage, i18n("TeX/LaTeX"), "tex");
|
||||
addPage(tab, DictionaryPage, i18n("Dictionary"), "dictionary");
|
||||
addPage(tab, AbbreviationPage, i18n("Abbreviation"), "abbreviation");
|
||||
|
||||
// add two centered button
|
||||
add = new KPushButton(i18n("Add..."),gb_tab);
|
||||
remove = new KPushButton(i18n("Remove"),gb_tab);
|
||||
|
||||
grid_tab->addMultiCellWidget(tab,1,1,0,1);
|
||||
grid_tab->addWidget(add,2,0,Qt::AlignRight);
|
||||
grid_tab->addWidget(remove,2,1,Qt::AlignLeft);
|
||||
|
||||
// below: OptionBox
|
||||
QButtonGroup *bg_options = new QButtonGroup( this, "bgOptions" );
|
||||
bg_options->setColumnLayout(0, Qt::Vertical );
|
||||
bg_options->layout()->setSpacing( 6 );
|
||||
bg_options->layout()->setMargin( 11 );
|
||||
QGridLayout *bg_optionsLayout = new QGridLayout( bg_options->layout() );
|
||||
bg_optionsLayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
cb_setcursor = new QCheckBox(i18n("Place cursor"),bg_options);
|
||||
cb_setbullets = new QCheckBox(i18n("Insert bullets"),bg_options);
|
||||
cb_closeenv = new QCheckBox(i18n("Close environments"),bg_options);
|
||||
cb_usecomplete = new QCheckBox(i18n("Use complete"),bg_options);
|
||||
cb_autocomplete = new QCheckBox(i18n("Auto completion (LaTeX)"),bg_options);
|
||||
lb_latexthreshold = new QLabel(i18n("Threshold:"),bg_options);
|
||||
sp_latexthreshold = new QSpinBox(1,9,1,bg_options);
|
||||
QLabel *lb_latexletters = new QLabel(i18n("letters"),bg_options);
|
||||
cb_autocompletetext = new QCheckBox(i18n("Auto completion (text)"),bg_options);
|
||||
lb_textthreshold = new QLabel(i18n("Threshold:"),bg_options);
|
||||
sp_textthreshold = new QSpinBox(1,9,1,bg_options);
|
||||
QLabel *lb_textletters = new QLabel(i18n("letters"),bg_options);
|
||||
cb_showabbrevview = new QCheckBox(i18n("Show abbreviations"),bg_options);
|
||||
cb_autocompleteabbrev = new QCheckBox(i18n("Auto completion (abbrev.)"),bg_options);
|
||||
cb_citeoutofbraces = new QCheckBox(i18n("Move out of braces (citation keylists)"),bg_options);
|
||||
|
||||
bg_optionsLayout->addWidget(cb_setcursor,0,0);
|
||||
bg_optionsLayout->addWidget(cb_setbullets,1,0);
|
||||
bg_optionsLayout->addWidget(cb_closeenv,2,0);
|
||||
bg_optionsLayout->addWidget(cb_showabbrevview,3,0);
|
||||
bg_optionsLayout->addWidget(cb_usecomplete,0,2);
|
||||
bg_optionsLayout->addWidget(cb_autocomplete,1,2);
|
||||
bg_optionsLayout->addWidget(lb_latexthreshold,1,4);
|
||||
bg_optionsLayout->addWidget(sp_latexthreshold,1,6);
|
||||
bg_optionsLayout->addWidget(lb_latexletters,1,7);
|
||||
bg_optionsLayout->addWidget(cb_autocompletetext,2,2);
|
||||
bg_optionsLayout->addWidget(lb_textthreshold,2,4);
|
||||
bg_optionsLayout->addWidget(sp_textthreshold,2,6);
|
||||
bg_optionsLayout->addWidget(lb_textletters,2,7);
|
||||
bg_optionsLayout->addWidget(cb_autocompleteabbrev,3,2);
|
||||
bg_optionsLayout->addMultiCellWidget(cb_citeoutofbraces,4,4,0,7);
|
||||
|
||||
// tune layout
|
||||
bg_optionsLayout->setColSpacing(1,20);
|
||||
bg_optionsLayout->setColSpacing(3,12);
|
||||
bg_optionsLayout->setColSpacing(5,8);
|
||||
bg_optionsLayout->setColStretch(7,1);
|
||||
|
||||
QWhatsThis::add(cb_setcursor,i18n("Try to place the cursor."));
|
||||
QWhatsThis::add(cb_setbullets,i18n("Insert bullets, where the user must input data."));
|
||||
QWhatsThis::add(cb_closeenv,i18n("Also close an environment, when an opening command is inserted."));
|
||||
QWhatsThis::add(cb_usecomplete,i18n("Enable components of word completion."));
|
||||
QWhatsThis::add(cb_autocomplete,i18n("Directional or popup-based completion with TeX/LaTeX commands, which are given in all selected word completion lists. This mode can only be selected, if no other plugin for autocompletion is active."));
|
||||
QWhatsThis::add(cb_autocompletetext,i18n("Directional or popup-based completion from words in the current document. This mode can only be selected, if no other plugin for autocompletion is active."));
|
||||
QWhatsThis::add(sp_latexthreshold,i18n("Automatically show a completion list of TeX/LaTeX commands, when the word has this length."));
|
||||
QWhatsThis::add(sp_textthreshold,i18n("Automatically show a completion list, when the word has this length."));
|
||||
QWhatsThis::add(cb_citeoutofbraces,i18n("Move cursor out of braces after selecting from a citation keylist."));
|
||||
|
||||
// bottom: warning
|
||||
QLabel *lb_automodes = new QLabel(i18n("Warning: all autocompletion modes will be disabled, if you enable KTextEditor plugin word completion."),this);
|
||||
|
||||
// add OptionBox and TabDialog into the layout
|
||||
vbox->addWidget(gb_tab);
|
||||
vbox->addWidget(bg_options);
|
||||
vbox->addWidget(lb_automodes);
|
||||
vbox->addStretch();
|
||||
|
||||
connect(tab,SIGNAL(currentChanged(QWidget*)),this,SLOT(showPage(QWidget*)));
|
||||
connect(add,SIGNAL(clicked()),this,SLOT(addClicked()));
|
||||
connect(remove,SIGNAL(clicked()),this,SLOT(removeClicked()));
|
||||
|
||||
// justify height
|
||||
QCheckListItem *item = new QCheckListItem(m_listview[AbbreviationPage], "Test", QCheckListItem::CheckBox);
|
||||
int h = 6*(item->height()+1) + 1;
|
||||
for ( uint i=TexPage; i<NumPages; ++i )
|
||||
m_listview[i]->setFixedHeight(h);
|
||||
delete item;
|
||||
|
||||
// find resource directories for cwl files
|
||||
getCwlDirs();
|
||||
}
|
||||
|
||||
ConfigCodeCompletion::~ConfigCodeCompletion()
|
||||
{
|
||||
}
|
||||
|
||||
void ConfigCodeCompletion::addPage(QTabWidget *tab, CompletionPage page, const QString &title, const QString &dirname)
|
||||
{
|
||||
m_page[page] = new QWidget(tab);
|
||||
|
||||
m_listview[page] = new KListView( m_page[page] );
|
||||
m_listview[page]->addColumn(i18n("Complete Files"));
|
||||
m_listview[page]->addColumn(i18n("Local File"));
|
||||
m_listview[page]->setFullWidth(true);
|
||||
|
||||
QGridLayout *grid = new QGridLayout(m_page[page], 1,1, 10,10);
|
||||
grid->addWidget(m_listview[page],0,0);
|
||||
|
||||
// add Tab
|
||||
tab->addTab(m_page[page],title);
|
||||
|
||||
// remember directory name
|
||||
m_dirname << dirname;
|
||||
|
||||
connect(m_listview[page], SIGNAL(clicked( QListViewItem *)), this, SLOT(slotListviewClicked(QListViewItem *)));
|
||||
}
|
||||
|
||||
//////////////////// read/write configuration ////////////////////
|
||||
|
||||
void ConfigCodeCompletion::readConfig(void)
|
||||
{
|
||||
// read selected and deselected filenames with wordlists
|
||||
m_wordlist[TexPage] = KileConfig::completeTex();
|
||||
m_wordlist[DictionaryPage] = KileConfig::completeDict();
|
||||
m_wordlist[AbbreviationPage] = KileConfig::completeAbbrev();
|
||||
|
||||
// set checkbox status
|
||||
cb_usecomplete->setChecked( KileConfig::completeEnabled() );
|
||||
cb_setcursor->setChecked( KileConfig::completeCursor() );
|
||||
cb_setbullets->setChecked( KileConfig::completeBullets() );
|
||||
cb_closeenv->setChecked( KileConfig::completeCloseEnv() );
|
||||
cb_showabbrevview->setChecked( KileConfig::completeShowAbbrev() );
|
||||
cb_citeoutofbraces->setChecked( KileConfig::completeCitationMove() );
|
||||
|
||||
// set checkboxes and thresholds for autocompletion modes
|
||||
if ( kateCompletionPlugin() )
|
||||
{
|
||||
cb_autocomplete->setChecked( false );
|
||||
cb_autocompletetext->setChecked( false );
|
||||
cb_autocompleteabbrev->setChecked( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
cb_autocomplete->setChecked( KileConfig::completeAuto() );
|
||||
cb_autocompletetext->setChecked( KileConfig::completeAutoText() );
|
||||
cb_autocompleteabbrev->setChecked( KileConfig::completeAutoAbbrev() );
|
||||
}
|
||||
sp_latexthreshold->setValue( KileConfig::completeAutoThreshold() );
|
||||
sp_textthreshold->setValue( KileConfig::completeAutoTextThreshold() );
|
||||
|
||||
// insert filenames into listview
|
||||
for ( uint i=TexPage; i<NumPages; ++i )
|
||||
setListviewEntries( CompletionPage(i) );
|
||||
}
|
||||
|
||||
void ConfigCodeCompletion::writeConfig(void)
|
||||
{
|
||||
// default: no changes in configuration
|
||||
bool changed = false;
|
||||
|
||||
// get listview entries
|
||||
for ( uint i=TexPage; i<NumPages; ++i )
|
||||
changed |= getListviewEntries( CompletionPage(i) );
|
||||
|
||||
// Konfigurationslisten abspeichern
|
||||
KileConfig::setCompleteTex( m_wordlist[TexPage] );
|
||||
KileConfig::setCompleteDict( m_wordlist[DictionaryPage] );
|
||||
KileConfig::setCompleteAbbrev( m_wordlist[AbbreviationPage] );
|
||||
|
||||
// save checkbox status
|
||||
KileConfig::setCompleteEnabled(cb_usecomplete->isChecked());
|
||||
KileConfig::setCompleteCursor(cb_setcursor->isChecked());
|
||||
KileConfig::setCompleteBullets(cb_setbullets->isChecked());
|
||||
KileConfig::setCompleteCloseEnv(cb_closeenv->isChecked());
|
||||
KileConfig::setCompleteShowAbbrev( cb_showabbrevview->isChecked() );
|
||||
KileConfig::setCompleteCitationMove( cb_citeoutofbraces->isChecked() );
|
||||
|
||||
// read autocompletion settings
|
||||
bool autoModeLatex = cb_autocomplete->isChecked();
|
||||
bool autoModeText = cb_autocompletetext->isChecked();
|
||||
bool autoModeAbbrev = cb_autocompleteabbrev->isChecked();
|
||||
if ( kateCompletionPlugin() )
|
||||
{
|
||||
if ( autoModeLatex || autoModeText || autoModeAbbrev)
|
||||
{
|
||||
QString msg = i18n("You enabled the KTextEditor-Plugin for word completion, "
|
||||
"but this conflicts with the auto completion modes of Kile. "
|
||||
"As only one of these completion modes can be used, the "
|
||||
"autocompletion modes of Kile will be disabled.");
|
||||
KMessageBox::information( 0L,"<center>" + msg + "</center>",i18n("Autocomplete warning") );
|
||||
|
||||
// disable Kile autocomplete modes
|
||||
autoModeLatex = false;
|
||||
autoModeText = false;
|
||||
autoModeAbbrev = false;
|
||||
}
|
||||
}
|
||||
|
||||
// save settings for Kile autocompletion modes
|
||||
KileConfig::setCompleteAuto( autoModeLatex );
|
||||
KileConfig::setCompleteAutoText( autoModeText );
|
||||
KileConfig::setCompleteAutoAbbrev( autoModeAbbrev );
|
||||
KileConfig::setCompleteAutoThreshold( sp_latexthreshold->value() );
|
||||
KileConfig::setCompleteAutoTextThreshold( sp_textthreshold->value() );
|
||||
|
||||
// save changed wordlists?
|
||||
KileConfig::setCompleteChangedLists(changed);
|
||||
}
|
||||
|
||||
// read kate plugin configuration
|
||||
bool ConfigCodeCompletion::kateCompletionPlugin()
|
||||
{
|
||||
m_config->setGroup("Kate Document Defaults");
|
||||
return m_config->readBoolEntry("KTextEditor Plugin ktexteditor_docwordcompletion",false);
|
||||
}
|
||||
|
||||
//////////////////// listview ////////////////////
|
||||
|
||||
// ListView fr den Konfigurationsdialog einstellen
|
||||
|
||||
void ConfigCodeCompletion::setListviewEntries(CompletionPage page)
|
||||
{
|
||||
QString listname = m_dirname[page];
|
||||
QString localdir = m_localCwlDir + listname + '/';
|
||||
QString globaldir = m_globalCwlDir + listname + '/';
|
||||
|
||||
// Daten aus der Konfigurationsliste in das ListView-Widget eintragen
|
||||
m_listview[page]->setUpdatesEnabled(false);
|
||||
m_listview[page]->clear();
|
||||
QStringList::ConstIterator it;
|
||||
for ( it=m_wordlist[page].begin(); it!=m_wordlist[page].end(); ++it )
|
||||
{
|
||||
QString basename = (*it).right( (*it).length()-2 );
|
||||
bool localExists = QFileInfo(localdir+basename+".cwl").exists();
|
||||
|
||||
QCheckListItem *item = new QCheckListItem(m_listview[page],basename,QCheckListItem::CheckBox);
|
||||
if ( localExists )
|
||||
{
|
||||
item->setOn( (*it).at(0) == '1' ? true : false );
|
||||
item->setText(1,"+");
|
||||
}
|
||||
else if ( QFileInfo(globaldir+basename+".cwl").exists() )
|
||||
{
|
||||
item->setOn( (*it).at(0) == '1' ? true : false );
|
||||
}
|
||||
else
|
||||
{
|
||||
item->setOn(false);
|
||||
item->setText(1,i18n("File not found"));
|
||||
}
|
||||
m_listview[page]->insertItem(item);
|
||||
}
|
||||
|
||||
updateColumnWidth(m_listview[page]);
|
||||
m_listview[page]->setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
void ConfigCodeCompletion::updateColumnWidth(KListView *listview)
|
||||
{
|
||||
listview->setColumnWidth(0,listview->columnWidth(0)+60);
|
||||
}
|
||||
|
||||
bool ConfigCodeCompletion::getListviewEntries(CompletionPage page)
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
// count number of entries
|
||||
uint n = m_listview[page]->childCount();
|
||||
|
||||
// there are changes if this number has changed
|
||||
if ( n != m_wordlist[page].count() )
|
||||
changed = true;
|
||||
|
||||
// clear all stringlist with files, if there are no entries
|
||||
if ( n == 0 ) {
|
||||
m_wordlist[page].clear();
|
||||
return changed;
|
||||
}
|
||||
|
||||
// now check all entries if they have changed
|
||||
QStringList newfiles;
|
||||
int index = 0;
|
||||
QCheckListItem *item = (QCheckListItem *)m_listview[page]->firstChild();
|
||||
while ( item ) {
|
||||
QString s = ( item->isOn() ) ? "1-" : "0-";
|
||||
s += item->text(0);
|
||||
newfiles.append(s);
|
||||
|
||||
// check for a change
|
||||
if ( m_wordlist[page][index] != s )
|
||||
changed = true;
|
||||
|
||||
// go on
|
||||
item = (QCheckListItem *)item->nextSibling();
|
||||
++index;
|
||||
}
|
||||
|
||||
// only update if there are changes
|
||||
if ( changed )
|
||||
m_wordlist[page] = newfiles;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
bool ConfigCodeCompletion::isListviewEntry(KListView *listview, const QString &filename)
|
||||
{
|
||||
QCheckListItem *item = (QCheckListItem *)listview->firstChild();
|
||||
while ( item )
|
||||
{
|
||||
if ( item->text() == filename )
|
||||
return true;
|
||||
item = (QCheckListItem *)item->nextSibling();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////// tabpages parameter ////////////////////
|
||||
|
||||
KListView *ConfigCodeCompletion::getListview(QWidget *page)
|
||||
{
|
||||
for ( uint i=TexPage; i<NumPages; ++i )
|
||||
{
|
||||
if ( page == m_page[i] )
|
||||
return m_listview[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString ConfigCodeCompletion::getListname(QWidget *page)
|
||||
{
|
||||
for ( uint i=TexPage; i<NumPages; ++i )
|
||||
{
|
||||
if ( page == m_page[i] )
|
||||
return m_dirname[i];
|
||||
}
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
//////////////////// shwo tabpages ////////////////////
|
||||
|
||||
void ConfigCodeCompletion::showPage(QWidget *page)
|
||||
{
|
||||
KListView *listview = getListview(page);
|
||||
if ( listview )
|
||||
remove->setEnabled( listview->selectedItems().count() > 0 );
|
||||
}
|
||||
|
||||
//////////////////// add/remove new wordlists ////////////////////
|
||||
|
||||
// find local and global resource directories
|
||||
|
||||
void ConfigCodeCompletion::getCwlDirs()
|
||||
{
|
||||
m_localCwlDir = locateLocal("appdata","complete/");
|
||||
m_globalCwlDir = QString::null;
|
||||
|
||||
QStringList dirs = KGlobal::dirs()->findDirs("appdata","complete/");
|
||||
for ( QStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it )
|
||||
{
|
||||
if ( (*it) != m_localCwlDir )
|
||||
{
|
||||
m_globalCwlDir = (*it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// find local and global cwl files: global files are not added,
|
||||
// if there is already a local file with this name. We fill a map
|
||||
// with filename as key and filepath as value. Additionally all
|
||||
// filenames are added to a stringlist.
|
||||
|
||||
void ConfigCodeCompletion::getCwlFiles(QMap<QString,QString> &map, QStringList &list, const QString &dir)
|
||||
{
|
||||
QStringList files = QDir(dir,"*.cwl").entryList();
|
||||
for ( QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it )
|
||||
{
|
||||
QString filename = QFileInfo(*it).fileName();
|
||||
if ( ! map.contains(filename) )
|
||||
{
|
||||
map[filename] = dir + '/' + (*it);
|
||||
list << filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigCodeCompletion::addClicked()
|
||||
{
|
||||
// determine current subdirectory for current tab page
|
||||
QString listname = getListname(tab->currentPage());
|
||||
|
||||
|
||||
// get a sorted list of all cwl files from both directories
|
||||
QMap<QString,QString> filemap;
|
||||
QStringList filelist;
|
||||
getCwlFiles(filemap,filelist,m_localCwlDir+listname);
|
||||
getCwlFiles(filemap,filelist,m_globalCwlDir+listname);
|
||||
filelist.sort();
|
||||
|
||||
// dialog to add cwl files
|
||||
KileListSelectorMultiple *dlg = new KileListSelectorMultiple(filelist,i18n("Complete Files"),i18n("Select Files"), this);
|
||||
if ( dlg->exec() )
|
||||
{
|
||||
if ( dlg->currentItem() >= 0 )
|
||||
{
|
||||
KListView *listview = getListview(tab->currentPage()); // get current page
|
||||
QStringList filenames = dlg->selected(); // get selected files
|
||||
for ( QStringList::ConstIterator it=filenames.begin(); it!=filenames.end(); ++it )
|
||||
{
|
||||
QString filename = *it;
|
||||
// could we accept the wordlist?
|
||||
QFileInfo fi( filemap[filename] );
|
||||
if ( !filename.isEmpty() && fi.exists() && fi.isReadable() )
|
||||
{
|
||||
QString basename = filename.left(filename.length()-4);
|
||||
|
||||
// check if this entry already exists
|
||||
if ( isListviewEntry(listview,basename) )
|
||||
{
|
||||
m_logwidget->printMsg(KileTool::Info,i18n("Wordlist '%1' is already used.").arg(basename),i18n("Complete"));
|
||||
continue;
|
||||
}
|
||||
|
||||
// add new entry
|
||||
QCheckListItem *item = new QCheckListItem(listview,basename,QCheckListItem::CheckBox);
|
||||
item->setOn(true);
|
||||
item->setSelected(true);
|
||||
if ( filemap[filename].left(m_localCwlDir.length()) == m_localCwlDir )
|
||||
item->setText(1,"+");
|
||||
|
||||
listview->insertItem(item);
|
||||
}
|
||||
}
|
||||
updateColumnWidth(listview);
|
||||
}
|
||||
}
|
||||
delete dlg;
|
||||
|
||||
}
|
||||
|
||||
// delete a selected entry
|
||||
|
||||
void ConfigCodeCompletion::removeClicked()
|
||||
{
|
||||
QWidget *page = tab->currentPage();
|
||||
KListView *list = getListview(page); // determine page
|
||||
QCheckListItem *item = (QCheckListItem *)list->selectedItem(); // determine entry
|
||||
|
||||
if ( item )
|
||||
{
|
||||
list->takeItem(item);
|
||||
delete item;
|
||||
// Button enabled/disabled?
|
||||
showPage(page);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigCodeCompletion::slotListviewClicked(QListViewItem *)
|
||||
{
|
||||
KListView *listview = getListview(tab->currentPage()); // get current page
|
||||
remove->setEnabled( listview->selectedItems().count() > 0 );
|
||||
}
|
||||
|
||||
#include "configcodecompletion.moc"
|
@ -0,0 +1,99 @@
|
||||
/***************************************************************************
|
||||
date : Mar 30 2007
|
||||
version : 0.24
|
||||
copyright : (C) 2004-2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIGCODECOMPLETION_H
|
||||
#define CONFIGCODECOMPLETION_H
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qtabwidget.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#include <kdeversion.h>
|
||||
#include <klistview.h>
|
||||
#include <kpushbutton.h>
|
||||
#include <kconfig.h>
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
namespace KileWidget { class LogMsg; }
|
||||
|
||||
class ConfigCodeCompletion : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConfigCodeCompletion(KConfig *config, KileWidget::LogMsg *logwidget, QWidget *parent=0, const char *name=0);
|
||||
~ConfigCodeCompletion();
|
||||
|
||||
void readConfig(void);
|
||||
void writeConfig(void);
|
||||
|
||||
private:
|
||||
enum CompletionPage { TexPage=0, DictionaryPage=1, AbbreviationPage=2, NumPages=3 };
|
||||
|
||||
KConfig *m_config;
|
||||
KileWidget::LogMsg *m_logwidget;
|
||||
|
||||
// tabs, views, pages, wordlists
|
||||
QTabWidget *tab;
|
||||
KListView *m_listview[NumPages];
|
||||
QWidget *m_page[NumPages];
|
||||
QStringList m_wordlist[NumPages];
|
||||
QStringList m_dirname;
|
||||
|
||||
// button
|
||||
KPushButton *add,*remove;
|
||||
|
||||
// Checkboxes/Spinboxes
|
||||
QCheckBox *cb_usecomplete, *cb_autocomplete;
|
||||
QCheckBox *cb_setcursor, *cb_setbullets;
|
||||
QCheckBox *cb_closeenv;
|
||||
QSpinBox *sp_latexthreshold;
|
||||
QLabel *lb_latexthreshold;
|
||||
QCheckBox *cb_autocompletetext;
|
||||
QSpinBox *sp_textthreshold;
|
||||
QLabel *lb_textthreshold;
|
||||
QCheckBox *cb_autocompleteabbrev;
|
||||
QCheckBox *cb_showabbrevview;
|
||||
QCheckBox *cb_citeoutofbraces;
|
||||
|
||||
bool kateCompletionPlugin();
|
||||
|
||||
KListView *getListview(QWidget *page);
|
||||
QString getListname(QWidget *page);
|
||||
void addPage(QTabWidget *tab, CompletionPage page, const QString &title, const QString &dirname);
|
||||
|
||||
void setListviewEntries(CompletionPage page);
|
||||
bool getListviewEntries(CompletionPage page);
|
||||
bool isListviewEntry(KListView *listview, const QString &filename);
|
||||
void updateColumnWidth(KListView *listview);
|
||||
|
||||
QString m_localCwlDir, m_globalCwlDir;
|
||||
void getCwlFiles(QMap<QString,QString> &map, QStringList &list, const QString &dir);
|
||||
void getCwlDirs();
|
||||
|
||||
private slots:
|
||||
void showPage(QWidget *page);
|
||||
void addClicked();
|
||||
void removeClicked();
|
||||
void slotListviewClicked(QListViewItem *);
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,353 @@
|
||||
/***************************************************************************
|
||||
date : Feb 09 2004
|
||||
version : 0.10.0
|
||||
copyright : (C) 2004 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "configstructure.h"
|
||||
|
||||
#include <kdialog.h>
|
||||
#include <kconfig.h>
|
||||
#include <klocale.h>
|
||||
#include <kiconloader.h>
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qtabwidget.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qvgroupbox.h>
|
||||
#include <qframe.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qpainter.h>
|
||||
#include <qrect.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
namespace KileStructure
|
||||
{
|
||||
|
||||
//////////////////// KileCenteredTableItem ////////////////////
|
||||
|
||||
void KileCenteredTableItem::paint(QPainter* p,const QColorGroup& cg,const QRect& cr,bool selected)
|
||||
{
|
||||
int w = cr.width();
|
||||
int h = cr.height();
|
||||
|
||||
if (selected && colSpan()==1 ) {
|
||||
p->fillRect( 0,0,w,h, cg.brush( QColorGroup::Highlight ) );
|
||||
p->setPen( cg.highlightedText() );
|
||||
} else {
|
||||
p->fillRect( 0,0,w,h, Qt::white );
|
||||
p->setPen( Qt::black );
|
||||
/*
|
||||
QFont f( p->font() );
|
||||
f.setBold(true);
|
||||
p->setFont(f);
|
||||
*/
|
||||
}
|
||||
|
||||
p->drawText( 2,0,w-4,h, Qt::AlignHCenter|AlignVCenter, text() );
|
||||
}
|
||||
|
||||
//////////////////// KileTable ////////////////////
|
||||
|
||||
KileTable::KileTable(QWidget *dialog, QWidget *parent, const char *name) : QTable(parent,name)
|
||||
{
|
||||
setShowGrid(false);
|
||||
setSelectionMode(QTable::NoSelection);
|
||||
setFocusStyle(QTable::FollowStyle);
|
||||
|
||||
verticalHeader()->hide();
|
||||
setLeftMargin(0);
|
||||
setVScrollBarMode(QScrollView::AlwaysOff);
|
||||
setHScrollBarMode(QScrollView::AlwaysOff);
|
||||
setFocusPolicy(QWidget::NoFocus);
|
||||
|
||||
horizontalHeader()->setResizeEnabled(false);
|
||||
horizontalHeader()->setClickEnabled(false);
|
||||
|
||||
connect(this,SIGNAL(clickedCell(KileTable *,int,int)),dialog,SLOT(clickedTable(KileTable *,int,int)));
|
||||
}
|
||||
|
||||
void KileTable::contentsMousePressEvent(QMouseEvent *ev)
|
||||
{
|
||||
ev->accept();
|
||||
emit( clickedCell( this,rowAt(ev->y()), columnAt(ev->x()) ));
|
||||
}
|
||||
|
||||
//////////////////// ConfigStructure ////////////////////
|
||||
|
||||
ConfigStructure::ConfigStructure(QWidget *parent, const char *name )
|
||||
: QWidget(parent,name)
|
||||
{
|
||||
m_entries << i18n( "Files" ) << i18n( "Labels" ) << i18n( "References" )
|
||||
<< i18n( "Index" ) << i18n( "Graphics" ) << i18n( "Sectioning" );
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout(this, 5,KDialog::spacingHint() );
|
||||
|
||||
// Groupbox with entries
|
||||
QVGroupBox *gb_entries= new QVGroupBox(i18n("Entries"), this );
|
||||
QWidget *widget1 = new QWidget(gb_entries);
|
||||
QVBoxLayout *vbox1 = new QVBoxLayout(widget1, 5,KDialog::spacingHint() );
|
||||
|
||||
// table with entries
|
||||
m_entriestable = new KileTable(this,widget1);
|
||||
m_entriestable->setNumCols(3);
|
||||
m_entriestable->setNumRows(6);
|
||||
m_entriestable->setColumnReadOnly(0,true);
|
||||
|
||||
QStringList list1;
|
||||
list1 << i18n( "Title" ) << i18n( "Visible" ) << i18n( "Open" );
|
||||
m_entriestable->setColumnLabels(list1);
|
||||
m_entriestable->horizontalHeader()->setLabel(1,SmallIcon("structure"), i18n( "Visible" ));
|
||||
m_entriestable->horizontalHeader()->setLabel(2,SmallIcon("structure"), i18n( "Node" ));
|
||||
|
||||
for ( uint i=0; i<m_entries.count(); ++i ) {
|
||||
QTableItem *item = new QTableItem(m_entriestable,QTableItem::Never, m_entries[i]);
|
||||
m_entriestable->setItem( i,0,item );
|
||||
m_visible[i] = new QCheckTableItem(m_entriestable,"");
|
||||
m_entriestable->setItem( i,1, m_visible[i] );
|
||||
m_defaultopen[i] = new QCheckTableItem(m_entriestable,"close");
|
||||
m_entriestable->setItem( i,2, m_defaultopen[i] );
|
||||
}
|
||||
|
||||
// groupbox with sectioning
|
||||
QVGroupBox *gb_sectioning= new QVGroupBox(i18n("Sectioning"), this );
|
||||
QWidget *widget2 = new QWidget(gb_sectioning);
|
||||
QVBoxLayout *vbox2 = new QVBoxLayout(widget2, 5,KDialog::spacingHint() );
|
||||
|
||||
// document class
|
||||
QWidget *widget3 = new QWidget(widget2);
|
||||
QHBoxLayout *hbox3 = new QHBoxLayout(widget3, 5,KDialog::spacingHint() );
|
||||
QLabel *label7 = new QLabel(i18n("Document class:"), widget3);
|
||||
comboclasses = new QComboBox(widget3);
|
||||
hbox3->addWidget(label7);
|
||||
hbox3->addSpacing(10);
|
||||
hbox3->addWidget(comboclasses);
|
||||
hbox3->setStretchFactor(comboclasses,1);
|
||||
|
||||
// table with sectioning commands
|
||||
m_sectioningtable = new KileTable(this,widget2);
|
||||
m_sectioningtable->setNumCols(3);
|
||||
m_sectioningtable->setNumRows(5);
|
||||
m_sectioningtable->setColumnReadOnly(0,true);
|
||||
m_sectioningtable->setColumnReadOnly(1,true);
|
||||
|
||||
QStringList list2;
|
||||
list2 << i18n( "Level" ) << i18n( "LaTeX Command" ) << i18n( "Structure Node" );
|
||||
m_sectioningtable->setColumnLabels(list2);
|
||||
m_sectioningtable->horizontalHeader()->setLabel(2,SmallIcon("structure"),"Structure Node");
|
||||
|
||||
// default structure level
|
||||
QGroupBox *structGroup = new QGroupBox(2, Qt::Horizontal, i18n("Structure View"), widget2);
|
||||
QLabel *label9 = new QLabel(i18n("Default expansion &level: "),structGroup);
|
||||
m_structurelevel = new QSpinBox(1,5, 1, structGroup);
|
||||
label9->setBuddy(m_structurelevel);
|
||||
|
||||
QGroupBox *classGroup = new QGroupBox(1,Qt::Horizontal,i18n("Document Classes"), widget2);
|
||||
QWidget *widget4 = new QWidget(classGroup);
|
||||
QHBoxLayout *hbox4 = new QHBoxLayout(widget4, 5,KDialog::spacingHint() );
|
||||
QLabel *label10 = new QLabel("Manage classes:",widget4);
|
||||
add = new QPushButton(i18n("Add"), widget4);
|
||||
remove = new QPushButton(i18n("Remove"), widget4);
|
||||
hbox4->addWidget(label10);
|
||||
hbox4->addStretch();
|
||||
hbox4->addWidget(add);
|
||||
hbox4->addWidget(remove);
|
||||
|
||||
// add widgets to the left vertical layout
|
||||
vbox1->addWidget(m_entriestable);
|
||||
vbox1->addStretch();
|
||||
|
||||
// add widgets to the right vertical layout
|
||||
vbox2->addWidget(widget3);
|
||||
vbox2->addSpacing(10);
|
||||
vbox2->addWidget(m_sectioningtable);
|
||||
vbox2->addSpacing(10);
|
||||
vbox2->addWidget(structGroup);
|
||||
vbox2->addWidget(classGroup);
|
||||
vbox2->addStretch();
|
||||
|
||||
// add both groupboxes to horizontal layout
|
||||
hbox->addWidget(gb_entries);
|
||||
hbox->addWidget(gb_sectioning);
|
||||
hbox->setStretchFactor(gb_entries,3);
|
||||
hbox->setStretchFactor(gb_sectioning,4);
|
||||
|
||||
// set default sectioning commands
|
||||
comboclasses->insertItem("latex");
|
||||
QStringList *sectcommands = new QStringList;
|
||||
*sectcommands << "part" << "chapter" << "section" << "subsection" << "subsubsection";
|
||||
m_docclasses["latex"] = sectcommands;
|
||||
showSectioning(m_docclasses["latex"]);
|
||||
remove->setEnabled(false);
|
||||
|
||||
connect(m_structurelevel,SIGNAL(valueChanged(int)),this,SLOT(spinboxChanged(int)));
|
||||
connect(comboclasses,SIGNAL(activated(const QString &)),this,SLOT(comboboxChanged(const QString &)));
|
||||
connect(add,SIGNAL(clicked()),this,SLOT(clickedAdd()));
|
||||
|
||||
add->setEnabled(false);
|
||||
}
|
||||
|
||||
ConfigStructure::~ConfigStructure()
|
||||
{
|
||||
QMap<QString, const QStringList*>::Iterator it, end = m_docclasses.end();
|
||||
for(it = m_docclasses.begin() ; it != end ; ++it)
|
||||
delete *it;
|
||||
}
|
||||
|
||||
void ConfigStructure::polish()
|
||||
{
|
||||
// QWidget::polish();
|
||||
|
||||
uint w = m_entriestable->sizeHint().width();
|
||||
m_entriestable->setColumnWidth(0,3*w/7);
|
||||
m_entriestable->setColumnWidth(1,2*w/7);
|
||||
m_entriestable->setColumnWidth(2,2*w/7+1);
|
||||
m_entriestable->setColumnStretchable(2,true);
|
||||
|
||||
w = m_sectioningtable->sizeHint().width();
|
||||
m_sectioningtable->setColumnWidth(0,w/6);
|
||||
m_sectioningtable->setColumnWidth(1,3*w/6);
|
||||
m_sectioningtable->setColumnWidth(2,2*w/6+1);
|
||||
m_sectioningtable->setColumnStretchable(2,true);
|
||||
|
||||
}
|
||||
|
||||
void ConfigStructure::clickedTable(KileTable *table,int row, int col)
|
||||
{
|
||||
if ( table==m_entriestable && row>=0 && row<6 ) {
|
||||
if ( col==1 )
|
||||
m_visible[row]->setChecked( !m_visible[row]->isChecked() );
|
||||
else if ( col == 2 ) {
|
||||
if ( m_defaultopen[row]->isChecked() ) {
|
||||
m_defaultopen[row]->setChecked(false);
|
||||
m_defaultopen[row]->setText("close");
|
||||
} else {
|
||||
m_defaultopen[row]->setChecked(true);
|
||||
m_defaultopen[row]->setText("open");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStructure::spinboxChanged(int)
|
||||
{
|
||||
if ( m_docclasses.contains( comboclasses->currentText() ) ) {
|
||||
changeSectioning(m_docclasses[comboclasses->currentText()]);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStructure::comboboxChanged(const QString &name)
|
||||
{
|
||||
if ( m_docclasses.contains(name) ) {
|
||||
showSectioning(m_docclasses[name]);
|
||||
remove->setEnabled( name != "latex" );
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStructure::changeSectioning(const QStringList *list)
|
||||
{
|
||||
for (uint i=0; i<list->count(); ++i) {
|
||||
QString label = ( i < (uint)m_structurelevel->value() ) ? "open" : "close";
|
||||
m_sectioningtable->setText(i,2,label);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStructure::showSectioning(const QStringList *list)
|
||||
{
|
||||
QString label1,label2,label3;
|
||||
for (uint i=0; i<5; ++i) {
|
||||
if ( i < list->count() ) {
|
||||
label1 = QString("%1").arg(i+1);
|
||||
label2 = (*list)[i];
|
||||
label3 = ( i < (uint)m_structurelevel->value() ) ? "open" : "close";
|
||||
} else {
|
||||
label1 = label2 = label3 = QString::null;
|
||||
}
|
||||
KileCenteredTableItem *item1 = new KileCenteredTableItem(m_sectioningtable,
|
||||
QTableItem::Never,label1);
|
||||
m_sectioningtable->setItem( i,0,item1 );
|
||||
m_sectioningtable->setText( i,1,label2 );
|
||||
KileCenteredTableItem *item3 = new KileCenteredTableItem(m_sectioningtable,
|
||||
QTableItem::Never,label3);
|
||||
m_sectioningtable->setItem( i,2,item3 );
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStructure::clickedAdd()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////// read/write configuration ////////////////////
|
||||
|
||||
void ConfigStructure::readConfig(KConfig *config)
|
||||
{
|
||||
// config section
|
||||
config->setGroup( "Structure Entries" );
|
||||
for ( uint i=0; i<m_entries.count(); ++i ) {
|
||||
int defaultvalue = ( m_entries[i] == i18n( "Sectioning" ) ) ? KileStructure::Visible | KileStructure::Opened
|
||||
: KileStructure::Visible;
|
||||
int num = config->readNumEntry(m_entries[i],defaultvalue);
|
||||
m_visible[i]->setChecked( (num & KileStructure::Visible) ? true : false );
|
||||
if ( num & KileStructure::Opened ) {
|
||||
m_defaultopen[i]->setChecked(true);
|
||||
m_defaultopen[i]->setText("open");
|
||||
}
|
||||
}
|
||||
|
||||
config->setGroup( "Structure Sectioning" );
|
||||
QStringList classlist = config->readListEntry("classes");
|
||||
classlist.sort();
|
||||
for ( uint i=0; i<classlist.count(); ++i ) {
|
||||
QStringList list = config->readListEntry(classlist[i]);
|
||||
if ( list.count() > 0 ) {
|
||||
comboclasses->insertItem(classlist[i]);
|
||||
QStringList *sectioningcommands = new QStringList(list);
|
||||
m_docclasses[classlist[i]] = sectioningcommands;
|
||||
}
|
||||
}
|
||||
|
||||
m_structurelevel->setValue(config->readNumEntry("DefaultLevel",3));
|
||||
}
|
||||
|
||||
void ConfigStructure::writeConfig(KConfig *config)
|
||||
{
|
||||
// config section
|
||||
config->setGroup( "Structure Entries" );
|
||||
for ( uint i=0; i<m_entries.count(); ++i ) {
|
||||
int num = ( m_visible[i]->isChecked() ) ? KileStructure::Visible : KileStructure::None;
|
||||
if ( m_defaultopen[i]->isChecked() )
|
||||
num += KileStructure::Opened;
|
||||
config->writeEntry(m_entries[i],num);
|
||||
}
|
||||
|
||||
config->setGroup( "Structure Sectioning" );
|
||||
QStringList classlist;
|
||||
for ( int i=0; i<comboclasses->count(); ++i ) {
|
||||
QString entry = comboclasses->text(i);
|
||||
if ( entry != "latex" ) {
|
||||
classlist << entry;
|
||||
QString entrylist = m_docclasses[entry]->join(",");
|
||||
config->writeEntry( entry, entrylist );
|
||||
}
|
||||
}
|
||||
config->writeEntry( "classes", classlist );
|
||||
|
||||
config->writeEntry("DefaultLevel",m_structurelevel->value());
|
||||
}
|
||||
|
||||
}
|
||||
#include "configstructure.moc"
|
@ -0,0 +1,98 @@
|
||||
/***************************************************************************
|
||||
date : Feb 09 2004
|
||||
version : 0.10.0
|
||||
copyright : (C) 2004 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIGSTRUCTURE_H
|
||||
#define CONFIGSTRUCTURE_H
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qtable.h>
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qmap.h>
|
||||
|
||||
class KConfig;
|
||||
|
||||
class QRect;
|
||||
class QPainter;
|
||||
class QSpinBox;
|
||||
class QComboBox;
|
||||
class QPushButton;
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
namespace KileStructure
|
||||
{
|
||||
|
||||
enum { None=0x0, Visible=0x1, Opened=0x2 };
|
||||
|
||||
class KileCenteredTableItem : public QTableItem
|
||||
{
|
||||
public:
|
||||
KileCenteredTableItem(QTable *table,EditType et,const QString& text) : QTableItem(table,et,text) {}
|
||||
void paint(QPainter* p,const QColorGroup& cg,const QRect& cr,bool selected);
|
||||
int alignment() const { return Qt::AlignHCenter; }
|
||||
};
|
||||
|
||||
class KileTable : public QTable
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KileTable(QWidget *dialog, QWidget *parent=0, const char *name=0);
|
||||
void paintFocus(QPainter *, const QRect &) {}
|
||||
protected:
|
||||
void contentsMousePressEvent(QMouseEvent *ev);
|
||||
signals:
|
||||
void clickedCell(KileTable *,int row,int cell);
|
||||
};
|
||||
|
||||
|
||||
class ConfigStructure : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConfigStructure(QWidget *parent=0, const char *name=0);
|
||||
~ConfigStructure();
|
||||
|
||||
void readConfig(KConfig *config);
|
||||
void writeConfig(KConfig *config);
|
||||
|
||||
private:
|
||||
QStringList m_entries;
|
||||
QComboBox *comboclasses;
|
||||
QSpinBox *m_structurelevel;
|
||||
QPushButton *add, *remove;
|
||||
|
||||
KileTable *m_entriestable,*m_sectioningtable;
|
||||
QCheckTableItem *m_visible[6], *m_defaultopen[6];
|
||||
QMap<QString,const QStringList *> m_docclasses;
|
||||
|
||||
void showSectioning(const QStringList *list);
|
||||
void changeSectioning(const QStringList *list);
|
||||
|
||||
public slots:
|
||||
void polish();
|
||||
|
||||
private slots:
|
||||
void clickedTable(KileTable *table,int row,int col);
|
||||
void clickedAdd();
|
||||
void spinboxChanged(int);
|
||||
void comboboxChanged(const QString &name);
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,270 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Jun 4 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "configtester.h"
|
||||
|
||||
#include <qfile.h>
|
||||
|
||||
#include <kio/netaccess.h>
|
||||
#include <klocale.h>
|
||||
#include <kprocess.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <ktempdir.h>
|
||||
#include <ksimpleconfig.h>
|
||||
#include <kglobal.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileconfig.h"
|
||||
#include "kiletool.h"
|
||||
|
||||
ConfigTest::ConfigTest() :
|
||||
m_name(QString::null),
|
||||
m_arg(QString::null),
|
||||
m_altArg(QString::null),
|
||||
m_mustPass(false)
|
||||
{
|
||||
}
|
||||
|
||||
ConfigTest::ConfigTest(const QString &name, bool mustpass, const QString &arg, const QString &altarg /*= QString::null*/) :
|
||||
m_name(name),
|
||||
m_arg(arg),
|
||||
m_altArg(altarg),
|
||||
m_mustPass(mustpass)
|
||||
{
|
||||
}
|
||||
|
||||
int ConfigTest::status() const
|
||||
{
|
||||
bool passed = false;
|
||||
if ( m_name == "binary" )
|
||||
passed = m_arg.endsWith(m_altArg);
|
||||
else if ( m_name == "version" )
|
||||
passed = true;
|
||||
else
|
||||
passed = (m_arg == "0");
|
||||
|
||||
if ( passed ) return Success;
|
||||
else if ( m_mustPass ) return Critical;
|
||||
else return Failure;
|
||||
}
|
||||
|
||||
QString ConfigTest::name() const
|
||||
{
|
||||
return prettyName(m_name);
|
||||
}
|
||||
|
||||
QString ConfigTest::resultText() const
|
||||
{
|
||||
QString str = successMessage(m_name);
|
||||
if ( status() == Failure ) str = failureMessage(m_name);
|
||||
else if ( status() == Critical ) str = criticalMessage(m_name);
|
||||
|
||||
if ( m_name == "binary" )
|
||||
{
|
||||
str += " (" + m_altArg + " => " + m_arg + ')';
|
||||
if ( status()==Failure && s_msgFailure.contains(m_altArg) )
|
||||
str += QString("<br>(%1)").arg( s_msgFailure[m_altArg] );
|
||||
return str;
|
||||
}
|
||||
else if ( m_name == "version" )
|
||||
return m_arg;
|
||||
else
|
||||
return str;
|
||||
}
|
||||
|
||||
QMap<QString,QString> ConfigTest::s_prettyName;
|
||||
QMap<QString,QString> ConfigTest::s_msgSuccess;
|
||||
QMap<QString,QString> ConfigTest::s_msgFailure;
|
||||
QMap<QString,QString> ConfigTest::s_msgCritical;
|
||||
|
||||
void ConfigTest::addPrettyName(const QString &test, const QString &prettyName) { s_prettyName [test] = prettyName;}
|
||||
void ConfigTest::addSuccessMessage(const QString &test, const QString &msg) { s_msgSuccess [test] = msg; }
|
||||
void ConfigTest::addFailureMessage(const QString &test, const QString &msg) { s_msgFailure [test] = msg; }
|
||||
void ConfigTest::addCriticalMessage(const QString &test, const QString &msg) { s_msgCritical [test] = msg; }
|
||||
|
||||
QString ConfigTest::prettyName(const QString &test)
|
||||
{
|
||||
if ( s_prettyName.contains(test) ) return s_prettyName[test];
|
||||
else return test;
|
||||
}
|
||||
|
||||
QString ConfigTest::successMessage(const QString &test)
|
||||
{
|
||||
if ( s_msgSuccess.contains(test) ) return s_msgSuccess[test];
|
||||
else return i18n("Passed");
|
||||
}
|
||||
|
||||
QString ConfigTest::failureMessage(const QString &test)
|
||||
{
|
||||
if ( s_msgFailure.contains(test) ) return s_msgFailure[test];
|
||||
else return i18n("Failed");
|
||||
}
|
||||
|
||||
QString ConfigTest::criticalMessage(const QString &test)
|
||||
{
|
||||
if ( s_msgCritical.contains(test) ) return s_msgCritical[test];
|
||||
else return i18n("Critical failure");
|
||||
}
|
||||
|
||||
Tester::Tester(QObject *parent, const char *name) : QObject(parent, name), m_process(0L)
|
||||
{
|
||||
ConfigTest::addPrettyName("binary", i18n("Binary"));
|
||||
ConfigTest::addCriticalMessage("binary", i18n("Could not find the binary for this essential tool."));
|
||||
|
||||
ConfigTest::addPrettyName("basic", i18n("Simple Test"));
|
||||
ConfigTest::addCriticalMessage("basic", i18n("This essential tool does not work at all, check your installation."));
|
||||
|
||||
ConfigTest::addPrettyName("version", i18n("Version"));
|
||||
|
||||
ConfigTest::addPrettyName("kile", i18n("Running in Kile"));
|
||||
QString str = i18n("Kile is not configured correctly. Go to Settings->Configure Kile->Tools and either fix the problem or change to the default settings.");
|
||||
ConfigTest::addCriticalMessage("kile", str);
|
||||
ConfigTest::addFailureMessage("kile", str);
|
||||
|
||||
ConfigTest::addPrettyName("src", i18n("Source Specials Switch"));
|
||||
ConfigTest::addSuccessMessage("src", i18n("Supported, use the 'Modern' configuration for (La)TeX and PDF(La)TeX to auto-enable inverse and forward search capabilities."));
|
||||
ConfigTest::addFailureMessage("src", i18n("Not supported, use the srcltx package to enable the inverse and forward search capabilities."));
|
||||
|
||||
// add some special messages, when programs are not installed,
|
||||
// which are not needed, but probably useful for the work with kile
|
||||
ConfigTest::addFailureMessage("dvipng", i18n("You can't use the png preview for mathgroups in the bottom bar."));
|
||||
ConfigTest::addFailureMessage("convert", i18n("You can't use the png previews with conversions 'dvi->ps->png' and 'pdf->png'."));
|
||||
ConfigTest::addFailureMessage("acroread", i18n("You can't open pdf documents with Acrobat Reader. But you could use KPDF or KGhostView."));
|
||||
}
|
||||
|
||||
|
||||
Tester::~Tester()
|
||||
{
|
||||
if (m_tempDir) m_tempDir->unlink();
|
||||
delete m_tempDir;
|
||||
delete m_process;
|
||||
}
|
||||
|
||||
void Tester::saveResults(const KURL & dest)
|
||||
{
|
||||
KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_resultsFile), dest, -1, true);
|
||||
}
|
||||
|
||||
void Tester::runTests()
|
||||
{
|
||||
QString srcdir = KGlobal::dirs()->findResourceDir("appdata","test/runTests.sh") + "test";
|
||||
KILE_DEBUG() << "Tester::runTests: srcdir = " << srcdir << endl;
|
||||
m_tempDir = new KTempDir();
|
||||
QString destdir = m_tempDir->name();
|
||||
KILE_DEBUG() << "Tester::runTests: destdir = " << destdir << endl;
|
||||
m_resultsFile = destdir + "results.rc";
|
||||
|
||||
QString shellname = KGlobal::dirs()->findExe("sh");
|
||||
KILE_DEBUG() << "Tester::runTests: shellname = " << shellname << endl;
|
||||
m_process = new KShellProcess(QFile::encodeName( shellname ));
|
||||
if (! KileConfig::teXPaths().isEmpty())
|
||||
{
|
||||
m_process->setEnvironment("TEXINPUTS", KileInfo::expandEnvironmentVars( KileConfig::teXPaths() + ":$TEXINPUTS"));
|
||||
}
|
||||
*m_process << "cd " + KShellProcess::quote(destdir) + " && ";
|
||||
*m_process << "cp " + KShellProcess::quote(srcdir) +"/* " + KShellProcess::quote(destdir) + " && ";
|
||||
*m_process << "source runTests.sh " + KShellProcess::quote(m_resultsFile) + " " + KShellProcess::quote(destdir);
|
||||
connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(determineProgress(KProcess *, char *, int)));
|
||||
connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(processTestResults(KProcess *)));
|
||||
if (m_process->start(KProcess::NotifyOnExit, KProcess::AllOutput)) emit(started());
|
||||
}
|
||||
|
||||
void Tester::stop()
|
||||
{
|
||||
if (m_process) m_process->kill();
|
||||
}
|
||||
|
||||
void Tester::determineProgress(KProcess */*proc*/, char *buf, int len)
|
||||
{
|
||||
static QString s = QString::null;
|
||||
|
||||
s += QString::fromLocal8Bit(buf, len);
|
||||
if ( s.endsWith("\n") )
|
||||
{
|
||||
bool ok = false;
|
||||
int number = s.toInt(&ok);
|
||||
if (ok) emit(percentageDone(number));
|
||||
s = QString::null;
|
||||
}
|
||||
}
|
||||
|
||||
void Tester::processTestResults (KProcess *proc)
|
||||
{
|
||||
if (proc->normalExit())
|
||||
{
|
||||
emit(percentageDone(100));
|
||||
|
||||
KSimpleConfig config(m_resultsFile, true);
|
||||
QStringList groups = config.groupList();
|
||||
QStringList::Iterator itend = groups.end();
|
||||
for ( QStringList::Iterator it = groups.begin(); it != itend; ++it )
|
||||
processTool(&config, *it);
|
||||
|
||||
emit(finished(true));
|
||||
}
|
||||
else
|
||||
{
|
||||
emit(percentageDone(0));
|
||||
emit(finished(false));
|
||||
}
|
||||
}
|
||||
|
||||
void Tester::processTool(KConfig *config, const QString &tool)
|
||||
{
|
||||
config->setGroup(tool);
|
||||
|
||||
QStringList criticaltests = QStringList::split(",", config->readEntry("mustpass", ""));
|
||||
|
||||
//Did we find the executable?
|
||||
QValueList<ConfigTest> tests;
|
||||
tests << ConfigTest("binary", criticaltests.contains("where"), config->readEntry("where"), config->readEntry("executable"));
|
||||
if (config->hasKey("version") ) tests << ConfigTest("version", criticaltests.contains("version"), config->readEntry("version"));
|
||||
if (config->hasKey("basic") ) tests << ConfigTest("basic", criticaltests.contains("basic"), config->readEntry("basic"));
|
||||
if (config->hasKey("src") ) tests << ConfigTest("src", criticaltests.contains("src"), config->readEntry("src"));
|
||||
if (config->hasKey("kile") ) tests << ConfigTest("kile", criticaltests.contains("kile"), config->readEntry("kile"));
|
||||
|
||||
addResult(tool, tests);
|
||||
}
|
||||
|
||||
void Tester::addResult(const QString &tool, const QValueList<ConfigTest> &tests)
|
||||
{
|
||||
m_results [tool] = tests;
|
||||
}
|
||||
|
||||
QStringList Tester::testedTools()
|
||||
{
|
||||
return m_results.keys();
|
||||
}
|
||||
|
||||
QValueList<ConfigTest> Tester::resultForTool(const QString & tool)
|
||||
{
|
||||
return m_results[tool];
|
||||
}
|
||||
|
||||
int Tester::statusForTool(const QString & tool)
|
||||
{
|
||||
QValueList<ConfigTest> tests = m_results[tool];
|
||||
int status = ConfigTest::Success;
|
||||
for ( uint i = 0; i < tests.count(); ++i)
|
||||
{
|
||||
if ( (tests[i].status() == ConfigTest::Failure) && (status == ConfigTest::Success)) status = ConfigTest::Failure;
|
||||
if (tests[i].status() == ConfigTest::Critical) status = ConfigTest::Critical;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
#include "configtester.moc"
|
@ -0,0 +1,98 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Jun 4 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIGCHECKER_H
|
||||
#define CONFIGCHECKER_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class KTempDir;
|
||||
class KConfig;
|
||||
class KProcess;
|
||||
class KURL;
|
||||
|
||||
/**
|
||||
@author Jeroen Wijnhout
|
||||
*/
|
||||
|
||||
class ConfigTest
|
||||
{
|
||||
public:
|
||||
enum Status { Success = 3, Failure = 2, Critical = 1 };
|
||||
|
||||
ConfigTest();
|
||||
ConfigTest(const QString &name, bool mustpass, const QString &arg, const QString &altarg = QString::null);
|
||||
|
||||
int status() const;
|
||||
|
||||
QString resultText() const;
|
||||
QString name() const;
|
||||
|
||||
private:
|
||||
QString m_name, m_arg, m_altArg;
|
||||
bool m_mustPass;
|
||||
|
||||
public:
|
||||
static void addPrettyName(const QString &test, const QString &prettyName);
|
||||
static void addSuccessMessage(const QString &test, const QString &msg);
|
||||
static void addFailureMessage(const QString &test, const QString &msg);
|
||||
static void addCriticalMessage(const QString &test, const QString &msg);
|
||||
|
||||
static QString prettyName(const QString &test);
|
||||
static QString successMessage(const QString &test);
|
||||
static QString failureMessage(const QString &test);
|
||||
static QString criticalMessage(const QString &test);
|
||||
|
||||
private:
|
||||
static QMap<QString,QString> s_prettyName, s_msgSuccess, s_msgFailure, s_msgCritical;
|
||||
};
|
||||
|
||||
class Tester : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Tester(QObject *parent = 0, const char *name = 0);
|
||||
~Tester();
|
||||
|
||||
QStringList testedTools();
|
||||
QValueList<ConfigTest> resultForTool(const QString &);
|
||||
int statusForTool(const QString &);
|
||||
|
||||
public slots:
|
||||
void runTests();
|
||||
void saveResults(const KURL &);
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void started();
|
||||
void percentageDone(int);
|
||||
void finished(bool);
|
||||
|
||||
private slots:
|
||||
void determineProgress(KProcess *, char *, int);
|
||||
void processTestResults (KProcess *);
|
||||
void processTool(KConfig *, const QString &);
|
||||
|
||||
void addResult(const QString &tool, const QValueList<ConfigTest> &tests);
|
||||
|
||||
private:
|
||||
QMap<QString,QValueList<ConfigTest> > m_results;
|
||||
QString m_resultsFile;
|
||||
KTempDir *m_tempDir;
|
||||
KProcess *m_process;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,326 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Feb 29 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "convert.h"
|
||||
|
||||
#include <qregexp.h>
|
||||
#include <qtextcodec.h>
|
||||
#include <qfile.h>
|
||||
|
||||
#include <kmessagebox.h>
|
||||
#include <kglobal.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kate/document.h>
|
||||
|
||||
QMap<QString, ConvertMap*> ConvertMap::g_maps;
|
||||
|
||||
bool ConvertMap::create(const QString & encoding)
|
||||
{
|
||||
KILE_DEBUG() << "\tlooking for map for " << encoding << endl;
|
||||
ConvertMap * map = g_maps[encoding];
|
||||
|
||||
if ( map == 0 )
|
||||
{
|
||||
KILE_DEBUG() << "\tcreating a map for " << encoding << endl;
|
||||
map = new ConvertMap(encoding); // FIXME This will never be deleted if load() succeeds...
|
||||
if ( map->load() )
|
||||
g_maps[encoding] = map;
|
||||
else {
|
||||
delete map;
|
||||
map = 0L;
|
||||
}
|
||||
|
||||
map = g_maps[encoding];
|
||||
}
|
||||
|
||||
return ( map != 0L );
|
||||
}
|
||||
|
||||
QString ConvertMap::encodingNameFor(const QString & name)
|
||||
{
|
||||
QString std;
|
||||
for ( uint i = 0; i < name.length(); ++i )
|
||||
if ( !name[i].isSpace() )
|
||||
std += name[i];
|
||||
|
||||
std = std.lower();
|
||||
|
||||
if ( std.startsWith("iso8859-") )
|
||||
return "latin" + std.right(1);
|
||||
|
||||
if ( std.startsWith("cp") )
|
||||
return "cp" + std.right(4);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
QString ConvertMap::isoNameFor(const QString & name)
|
||||
{
|
||||
QString std;
|
||||
for ( uint i = 0; i < name.length(); ++i )
|
||||
if ( !name[i].isSpace() )
|
||||
std += name[i];
|
||||
|
||||
std = std.lower();
|
||||
|
||||
if ( std.startsWith("latin") )
|
||||
return "ISO 8859-" + std.right(1);
|
||||
|
||||
if ( std.startsWith("cp" ) )
|
||||
return "cp " + std.right(4);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
ConvertMap::ConvertMap(const QString & enc )
|
||||
{
|
||||
m_aliases.append(encodingNameFor(enc));
|
||||
m_aliases.append(isoNameFor(enc));
|
||||
}
|
||||
|
||||
void ConvertMap::addPair(QChar c, const QString & enc)
|
||||
{
|
||||
m_toASCII[c] = commandIsTerminated(enc) ? enc : enc + "{}" ;
|
||||
m_toEncoding[enc] = c;
|
||||
}
|
||||
|
||||
bool ConvertMap::commandIsTerminated(const QString & command)
|
||||
{
|
||||
static QRegExp reCommandSequences("\\\\([a-zA-Z]+|\\\"|\\')$");
|
||||
|
||||
return (reCommandSequences.search(command) == -1);
|
||||
}
|
||||
|
||||
bool ConvertMap::load()
|
||||
{
|
||||
static QRegExp reMap("^(.*):(.*)");
|
||||
|
||||
//makeMap(encoding());
|
||||
|
||||
//if map already exists, replace it
|
||||
QFile qf(KGlobal::dirs()->findResource("appdata","encodings/" + encoding() + ".enc"));
|
||||
|
||||
if ( qf.open(IO_ReadOnly) )
|
||||
{
|
||||
QTextStream stream( &qf );
|
||||
QTextCodec *codec = QTextCodec::codecForName(isoName().ascii());
|
||||
if ( codec ) stream.setCodec(codec);
|
||||
|
||||
while ( !stream.atEnd() )
|
||||
{
|
||||
//parse the line
|
||||
if ( stream.readLine().find(reMap) != -1)
|
||||
addPair(reMap.cap(1)[0], reMap.cap(2));
|
||||
}
|
||||
qf.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//BEGIN ConvertIO classes
|
||||
ConvertIO::ConvertIO(Kate::Document *doc) :
|
||||
m_doc(doc),
|
||||
m_text(QString::null),
|
||||
m_line(QString::null),
|
||||
m_nLine(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString & ConvertIO::currentLine()
|
||||
{
|
||||
return m_line;
|
||||
}
|
||||
|
||||
void ConvertIO::nextLine()
|
||||
{
|
||||
m_line = m_doc->textLine(m_nLine++);
|
||||
}
|
||||
|
||||
void ConvertIO::writeText()
|
||||
{
|
||||
m_doc->setText(m_text);
|
||||
}
|
||||
|
||||
uint ConvertIO::current()
|
||||
{
|
||||
return m_nLine;
|
||||
}
|
||||
|
||||
bool ConvertIO::done()
|
||||
{
|
||||
return current() == m_doc->numLines();
|
||||
}
|
||||
|
||||
ConvertIOFile::ConvertIOFile(Kate::Document *doc, const KURL & url) : ConvertIO(doc), m_url(url)
|
||||
{
|
||||
}
|
||||
|
||||
void ConvertIOFile::writeText()
|
||||
{
|
||||
QFile qf(m_url.path());
|
||||
if ( qf.open(IO_WriteOnly) )
|
||||
{
|
||||
//read the file
|
||||
QTextStream stream( &qf );
|
||||
stream << m_text;
|
||||
qf.close();
|
||||
}
|
||||
else
|
||||
kdWarning() << "Could not open " << m_url.path() << endl;
|
||||
}
|
||||
|
||||
ConvertBase::ConvertBase(const QString & encoding, ConvertIO * io) :
|
||||
m_io(io),
|
||||
m_encoding(encoding),
|
||||
m_map(0L)
|
||||
{
|
||||
}
|
||||
|
||||
//END ConvertIO classes
|
||||
|
||||
//BEGIN ConvertBase
|
||||
QString ConvertBase::mapNext(uint &i)
|
||||
{
|
||||
return (QString)m_io->currentLine()[i++];
|
||||
}
|
||||
|
||||
bool ConvertBase::convert()
|
||||
{
|
||||
if ( ! setMap() ) return false;
|
||||
|
||||
m_io->text() = QString::null;
|
||||
do
|
||||
{
|
||||
m_io->nextLine();
|
||||
uint i = 0;
|
||||
while ( i < m_io->currentLine().length() )
|
||||
{
|
||||
m_io->text() += mapNext(i);
|
||||
}
|
||||
if ( ! m_io->done() ) m_io->text() += '\n';
|
||||
}
|
||||
while ( ! m_io->done() );
|
||||
|
||||
m_io->writeText();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConvertBase::setMap()
|
||||
{
|
||||
//create map (or use existing)
|
||||
if (ConvertMap::create(m_encoding))
|
||||
m_map = ConvertMap::mapFor(m_encoding);
|
||||
else
|
||||
m_map = 0L;
|
||||
|
||||
return ( m_map != 0L );
|
||||
}
|
||||
//END ConvertBase
|
||||
|
||||
//BEGIN ConvertEncToASCII
|
||||
QString ConvertEncToASCII::mapNext(uint &i)
|
||||
{
|
||||
return m_map->canDecode(m_io->currentLine()[i]) ? m_map->toASCII(m_io->currentLine()[i++]) : (QString)m_io->currentLine()[i++];
|
||||
}
|
||||
//END ConvertEncToASCII
|
||||
|
||||
//BEGIN ConvertASCIIToEnc
|
||||
|
||||
//i is the position of the '\'
|
||||
QString ConvertASCIIToEnc::nextSequence(uint &i)
|
||||
{
|
||||
//get first two characters
|
||||
QString seq = (QString)m_io->currentLine()[i++];
|
||||
|
||||
if ( m_io->currentLine()[i].isLetter() )
|
||||
{
|
||||
while ( m_io->currentLine()[i].isLetter() )
|
||||
seq += (QString)m_io->currentLine()[i++];
|
||||
}
|
||||
else
|
||||
return seq + (QString)m_io->currentLine()[i++];
|
||||
|
||||
return seq;
|
||||
}
|
||||
|
||||
bool ConvertASCIIToEnc::isModifier(const QString & seq)
|
||||
{
|
||||
static QRegExp reModifier("\\\\([cHkruv]|\"|\'|\\^|`|~|=|\\.)");
|
||||
return reModifier.exactMatch(seq);
|
||||
}
|
||||
|
||||
QString ConvertASCIIToEnc::getSequence(uint &i)
|
||||
{
|
||||
QString seq = nextSequence(i);
|
||||
static QRegExp reBraces("\\{([a-zA-Z]?)\\}");
|
||||
|
||||
if ( isModifier(seq) )
|
||||
{
|
||||
KILE_DEBUG() << "\tisModifier true : " << seq << endl;
|
||||
if ( seq[seq.length() - 1].isLetter() ) seq += ' ';
|
||||
|
||||
while ( m_io->currentLine()[i].isSpace() ) i++;
|
||||
|
||||
if ( m_io->currentLine().mid(i,2) == "{}" ) i = i + 2;
|
||||
|
||||
if ( m_io->currentLine()[i] == '\\' )
|
||||
seq += nextSequence(i);
|
||||
else
|
||||
{
|
||||
if ( reBraces.exactMatch(m_io->currentLine().mid(i,3)) )
|
||||
{
|
||||
KILE_DEBUG() << "\tbraces detected" << endl;
|
||||
i = i + 3;
|
||||
seq += reBraces.cap(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
QChar nextChar = m_io->currentLine()[i++];
|
||||
if ( !nextChar.isSpace() ) seq += (QString)nextChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( m_map->canEncode(seq) )
|
||||
{
|
||||
if ( m_io->currentLine().mid(i,2) == "{}" ) i = i + 2;
|
||||
else if ( m_io->currentLine()[i].isSpace() ) ++i;
|
||||
}
|
||||
|
||||
return seq;
|
||||
}
|
||||
|
||||
QString ConvertASCIIToEnc::mapNext(uint &i)
|
||||
{
|
||||
if ( m_io->currentLine()[i] == '\\' )
|
||||
{
|
||||
QString seq = getSequence(i);
|
||||
KILE_DEBUG() << "'\tsequence: " << seq << endl;
|
||||
if ( m_map->canEncode(seq) )
|
||||
{
|
||||
KILE_DEBUG() << "\tcan encode this" << endl;
|
||||
//if ( m_io->currentLine().mid(i, 2) == "{}" ) i = i + 2;
|
||||
return m_map->toEncoding(seq);
|
||||
}
|
||||
else
|
||||
return seq;
|
||||
}
|
||||
|
||||
return ConvertBase::mapNext(i);
|
||||
}
|
||||
//END ConvertASCIIToEnc
|
@ -0,0 +1,135 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Feb 29 2004
|
||||
copyright : (C) 2004 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONVERT_H
|
||||
#define CONVERT_H
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#include <kurl.h>
|
||||
|
||||
namespace Kate { class Document; }
|
||||
|
||||
class ConvertMap
|
||||
{
|
||||
protected:
|
||||
ConvertMap(const QString & encoding);
|
||||
|
||||
public:
|
||||
const QString & encoding() const { return m_aliases[0]; }
|
||||
const QString & isoName() const { return m_aliases[1]; }
|
||||
|
||||
QChar toEncoding(const QString & enc) { return m_toEncoding[enc]; }
|
||||
QString toASCII(const QChar & c) { return m_toASCII[c]; }
|
||||
|
||||
void addPair(QChar c, const QString & enc);
|
||||
|
||||
bool canDecode(const QChar & c) { return ( m_toASCII.contains(c) > 0 ); }
|
||||
bool canEncode(const QString & enc) { return ( m_toEncoding.contains(enc) > 0 ); }
|
||||
|
||||
bool load();
|
||||
|
||||
private:
|
||||
bool commandIsTerminated(const QString &);
|
||||
|
||||
private:
|
||||
QStringList m_aliases;
|
||||
QMap<QChar, QString> m_toASCII;
|
||||
QMap<QString, QChar> m_toEncoding;
|
||||
|
||||
//static members
|
||||
public:
|
||||
static bool create(const QString & encoding);
|
||||
static QString encodingNameFor(const QString &);
|
||||
static QString isoNameFor(const QString &);
|
||||
static ConvertMap * mapFor(const QString & enc) { return g_maps[enc]; }
|
||||
|
||||
private:
|
||||
static QMap<QString, ConvertMap*> g_maps;
|
||||
};
|
||||
|
||||
class ConvertIO
|
||||
{
|
||||
public:
|
||||
ConvertIO(Kate::Document *doc);
|
||||
virtual ~ConvertIO() {}
|
||||
|
||||
virtual void nextLine(); //read next line
|
||||
virtual QString & currentLine();
|
||||
virtual QString & text() { return m_text; }
|
||||
virtual void writeText();
|
||||
virtual uint current(); //current line number
|
||||
virtual bool done();
|
||||
|
||||
protected:
|
||||
Kate::Document *m_doc;
|
||||
QString m_text, m_line;
|
||||
uint m_nLine;
|
||||
};
|
||||
|
||||
class ConvertIOFile : public ConvertIO
|
||||
{
|
||||
public:
|
||||
ConvertIOFile(Kate::Document *doc, const KURL & url);
|
||||
|
||||
void writeText();
|
||||
|
||||
private:
|
||||
KURL m_url;
|
||||
};
|
||||
|
||||
class ConvertBase
|
||||
{
|
||||
public:
|
||||
ConvertBase(const QString & encoding, ConvertIO * io);
|
||||
virtual ~ConvertBase() {};
|
||||
|
||||
public:
|
||||
virtual bool convert();
|
||||
|
||||
protected:
|
||||
virtual bool setMap();
|
||||
|
||||
virtual QString mapNext(uint &);
|
||||
|
||||
ConvertIO *m_io;
|
||||
QString m_encoding;
|
||||
ConvertMap *m_map;
|
||||
};
|
||||
|
||||
class ConvertEncToASCII : public ConvertBase
|
||||
{
|
||||
public:
|
||||
ConvertEncToASCII(const QString & encoding, ConvertIO * io) : ConvertBase(encoding, io) {}
|
||||
|
||||
protected:
|
||||
QString mapNext(uint &);
|
||||
};
|
||||
|
||||
class ConvertASCIIToEnc : public ConvertBase
|
||||
{
|
||||
public:
|
||||
ConvertASCIIToEnc(const QString & encoding, ConvertIO * io) : ConvertBase(encoding, io) {}
|
||||
|
||||
protected:
|
||||
QString getSequence(uint &);
|
||||
QString nextSequence(uint &);
|
||||
bool isModifier(const QString &);
|
||||
QString mapNext(uint &);
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,203 @@
|
||||
#! /usr/bin/perl -w
|
||||
#
|
||||
# Static Hashtable Generator
|
||||
#
|
||||
# (c) 2000-2002 by Harri Porten <porten@kde.org> and
|
||||
# David Faure <faure@kde.org>
|
||||
|
||||
$file = $ARGV[0];
|
||||
shift;
|
||||
my $findSize = 0;
|
||||
my $includelookup = 0;
|
||||
# Use -s as second argument to make it try many hash sizes
|
||||
$findSize = 1 if (defined($ARGV[0]) && $ARGV[0] eq "-s");
|
||||
# Use -i as second argument to make it include "lookup.h"
|
||||
$includelookup = 1 if (defined($ARGV[0]) && $ARGV[0] eq "-i");
|
||||
print STDERR "Creating hashtable for $file\n";
|
||||
open(IN, $file) or die "No such file $file";
|
||||
|
||||
@keys = ();
|
||||
@values = ();
|
||||
@attrs = ();
|
||||
@params = ();
|
||||
|
||||
my $inside = 0;
|
||||
my $name;
|
||||
my $size;
|
||||
my $hashsize;
|
||||
my $banner = 0;
|
||||
my $namespace = "KJS";
|
||||
|
||||
sub calcTable();
|
||||
sub output();
|
||||
sub hashValue($);
|
||||
|
||||
while (<IN>) {
|
||||
chop;
|
||||
s/^\s*//g;
|
||||
if (/^\#|^$/) {
|
||||
# comment. do nothing
|
||||
} elsif (/^\@namespace\s+(\w+)/ && !$inside) {
|
||||
$namespace = $1;
|
||||
} elsif (/^\@begin/ && !$inside) {
|
||||
if (/^\@begin\s*([:_\w]+)\s*(\d+)\s*$/) {
|
||||
$inside = 1;
|
||||
$name = $1;
|
||||
$hashsize = $2;
|
||||
} else {
|
||||
printf STDERR "WARNING: \@begin without table name and hashsize, skipping $_\n";
|
||||
}
|
||||
} elsif (/^\@end\s*$/ && $inside) {
|
||||
|
||||
if($findSize) {
|
||||
my $entriesnum=@keys;
|
||||
print STDERR "Table: $name $entriesnum entries\n";
|
||||
for( $i=3 ; $i<79 ; ++$i) { $hashsize=$i ; calcTable(); }
|
||||
} else {
|
||||
calcTable();
|
||||
}
|
||||
|
||||
output();
|
||||
@keys = ();
|
||||
@values = ();
|
||||
@attrs = ();
|
||||
@params = ();
|
||||
$inside = 0;
|
||||
} elsif (/^([-:\@\w\[\=\]]+)\s*([\w\:-]+)\s*([\w\|]*)\s*(\w*)\s*$/ && $inside) {
|
||||
my $key = $1;
|
||||
my $val = $2;
|
||||
my $att = $3;
|
||||
my $param = $4;
|
||||
push(@keys, $key);
|
||||
push(@values, $val);
|
||||
printf STDERR "WARNING: Number of arguments missing for $key/$val\n"
|
||||
if ( $att =~ m/Function/ && length($param) == 0);
|
||||
push(@attrs, length($att) > 0 ? $att : "0");
|
||||
push(@params, length($param) > 0 ? $param : "0");
|
||||
} elsif ($inside) {
|
||||
die "invalid data";
|
||||
}
|
||||
}
|
||||
|
||||
die "missing closing \@end" if ($inside);
|
||||
|
||||
sub calcTable() {
|
||||
@table = ();
|
||||
@links = ();
|
||||
$size = $hashsize;
|
||||
my $collisions = 0;
|
||||
my $maxdepth = 0;
|
||||
my $i = 0;
|
||||
foreach $key (@keys) {
|
||||
my $depth = 0;
|
||||
my $h = hashValue($key) % $hashsize;
|
||||
while (defined($table[$h])) {
|
||||
if (defined($links[$h])) {
|
||||
$h = $links[$h];
|
||||
$depth++;
|
||||
} else {
|
||||
$collisions++;
|
||||
$links[$h] = $size;
|
||||
$h = $size;
|
||||
$size++;
|
||||
}
|
||||
}
|
||||
#print STDERR "table[$h] = $i\n";
|
||||
$table[$h] = $i;
|
||||
$i++;
|
||||
$maxdepth = $depth if ( $depth > $maxdepth);
|
||||
}
|
||||
|
||||
# Ensure table is big enough (in case of undef entries at the end)
|
||||
if ( $#table+1 < $size ) {
|
||||
$#table = $size-1;
|
||||
}
|
||||
#print STDERR "After loop: size=$size table=".($#table+1)."\n";
|
||||
|
||||
if ($findSize) {
|
||||
my $emptycount = 0;
|
||||
foreach $entry (@table) {
|
||||
$emptycount++ if (!defined($entry));
|
||||
}
|
||||
print STDERR "Hashsize: $hashsize Total Size: $size Empty: $emptycount MaxDepth: $maxdepth Collisions: $collisions\n";
|
||||
}
|
||||
# my $debugtable = 0;
|
||||
# foreach $entry (@table) {
|
||||
# print STDERR "$debugtable " . (defined $entry ? $entry : '<undefined>');
|
||||
# print STDERR " -> " . $links[$debugtable] if (defined($links[$debugtable]));
|
||||
# print STDERR "\n";
|
||||
# $debugtable++;
|
||||
# }
|
||||
}
|
||||
|
||||
sub hashValue($) {
|
||||
@chars = split(/ */, $_[0]);
|
||||
my $val = 0;
|
||||
foreach $c (@chars) {
|
||||
$val += ord($c);
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
sub output() {
|
||||
if (!$banner) {
|
||||
$banner = 1;
|
||||
print "/* Automatically generated from $file using $0. DO NOT EDIT ! */\n";
|
||||
}
|
||||
|
||||
my $nameEntries = "${name}Entries";
|
||||
$nameEntries =~ s/:/_/g;
|
||||
my $nameStringTable = "${name}Strings";
|
||||
$nameStringTable =~ y/:/_/;
|
||||
|
||||
print "\n#include \"lookup.h\"\n" if ($includelookup);
|
||||
print "\nusing namespace KJS;\n"; # because of DontDelete etc.
|
||||
print "\nnamespace $namespace {\n";
|
||||
|
||||
# first, build the string table
|
||||
my %soffset = ();
|
||||
print "\nstatic const char $nameStringTable\[\] = {\n";
|
||||
my $s = "\0";
|
||||
print " \"\\0\"\n";
|
||||
for my $k (sort { length $b <=> length $a || $a cmp $b } @keys) {
|
||||
if ($s =~ /^(.*)\Q$k\E\0/) {
|
||||
$soffset{$k} = length $1;
|
||||
} else {
|
||||
$soffset{$k} = length $s;
|
||||
print " \"$k\\0\"\n";
|
||||
$s .= $k;
|
||||
$s .= "\0";
|
||||
}
|
||||
}
|
||||
print "};\n\n";
|
||||
|
||||
# now, dump the hash table
|
||||
|
||||
print "\nstatic const struct HashEntry ".$nameEntries."[] = {\n";
|
||||
my $i = 0;
|
||||
#print STDERR "writing out table with ".($#table+1)." entries\n";
|
||||
foreach $entry (@table) {
|
||||
if (defined($entry)) {
|
||||
my $key = $keys[$entry];
|
||||
print " \{ " . $soffset{$key};
|
||||
print ", " . $values[$entry];
|
||||
print ", " . $attrs[$entry];
|
||||
print ", " . $params[$entry];
|
||||
print ", ";
|
||||
if (defined($links[$i])) {
|
||||
print $links[$i] . " \}";
|
||||
} else {
|
||||
print "-1 \}"
|
||||
}
|
||||
} else {
|
||||
print " \{ 0, 0, 0, 0, -1 \}";
|
||||
}
|
||||
print "," unless ($i == $size - 1);
|
||||
print "\n";
|
||||
$i++;
|
||||
}
|
||||
print "};\n\n";
|
||||
print "const struct HashTable $name = ";
|
||||
print "\{ 2, $size, ".$nameEntries.", $hashsize, ".$nameStringTable."\};\n\n";
|
||||
print "} // namespace\n";
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Jul 29 2001
|
||||
copyright : (C) 2001 - 2003 by Brachet Pascal, (C) 2004 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "docpart.h"
|
||||
|
||||
#include <kconfig.h>
|
||||
#include <kstdaction.h>
|
||||
#include <kglobal.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kstandarddirs.h>
|
||||
#include <kmimemagic.h>
|
||||
#include <kmimetype.h>
|
||||
#include <ktrader.h>
|
||||
#include <krun.h>
|
||||
#include <khtml_part.h>
|
||||
#include <khtml_settings.h>
|
||||
|
||||
DocumentationViewer::DocumentationViewer(QWidget *parent, const char *name ) : KHTMLPart(parent,name, 0, 0, BrowserViewGUI)
|
||||
{
|
||||
m_hpos = 0;
|
||||
KConfig konqConfig("konquerorrc");
|
||||
konqConfig.setGroup("HTML Settings");
|
||||
//const KHTMLSettings * set = settings();
|
||||
//( const_cast<KHTMLSettings *>(set) )->init( &konqConfig, false );
|
||||
QString rc = KGlobal::dirs()->findResource("appdata", "docpartui.rc");
|
||||
setXMLFile(rc);
|
||||
(void) KStdAction::back(this, SLOT(back()), actionCollection(),"Back" );
|
||||
(void) KStdAction::forward(this, SLOT(forward()), actionCollection(),"Forward" );
|
||||
(void) KStdAction::home(this, SLOT(home()), actionCollection(),"Home" );
|
||||
}
|
||||
|
||||
DocumentationViewer::~DocumentationViewer() {}
|
||||
|
||||
void DocumentationViewer::urlSelected(const QString &url, int button, int state,const QString & target, KParts::URLArgs args)
|
||||
{
|
||||
KURL cURL = completeURL(url);
|
||||
QString mime = KMimeType::findByURL(cURL).data()->name();
|
||||
|
||||
//load this URL in the embedded viewer if KHTML can handle it, or when mimetype detection failed
|
||||
KService::Ptr service = KService::serviceByDesktopName("khtml");
|
||||
if ( ( mime == KMimeType::defaultMimeType() ) || (service && service->hasServiceType(mime)) )
|
||||
{
|
||||
KHTMLPart::urlSelected(url, button, state, target, args);
|
||||
openURL(cURL) ;
|
||||
addToHistory(cURL.url());
|
||||
}
|
||||
//KHTML can't handle it, look for an appropriate application
|
||||
else
|
||||
{
|
||||
KTrader::OfferList offers = KTrader::self()->query(mime, "Type == 'Application'");
|
||||
KService::Ptr ptr = offers.first();
|
||||
KURL::List lst;
|
||||
lst.append(cURL);
|
||||
if (ptr) KRun::run(*ptr, lst);
|
||||
}
|
||||
}
|
||||
|
||||
void DocumentationViewer::home()
|
||||
{
|
||||
if ( !m_history.isEmpty() ) openURL( KURL(m_history.first()) );
|
||||
}
|
||||
|
||||
void DocumentationViewer::forward()
|
||||
{
|
||||
if ( forwardEnable() )
|
||||
{
|
||||
++m_hpos;
|
||||
openURL( KURL( m_history[m_hpos]) );
|
||||
emit updateStatus( backEnable() , forwardEnable() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DocumentationViewer::back()
|
||||
{
|
||||
if ( backEnable() ) {
|
||||
--m_hpos;
|
||||
openURL( KURL(m_history[m_hpos]) );
|
||||
emit updateStatus( backEnable() , forwardEnable() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DocumentationViewer::addToHistory( const QString & url )
|
||||
{
|
||||
if ( m_history.count() > 0 )
|
||||
{
|
||||
while ( m_hpos < m_history.count()-1 )
|
||||
m_history.pop_back();
|
||||
}
|
||||
|
||||
if ( !m_history.isEmpty() ) ++m_hpos;
|
||||
|
||||
m_history.append(url);
|
||||
|
||||
m_hpos = m_history.count()-1;
|
||||
emit updateStatus( backEnable() , forwardEnable() );
|
||||
}
|
||||
|
||||
|
||||
bool DocumentationViewer::backEnable()
|
||||
{
|
||||
return m_hpos > 0;
|
||||
}
|
||||
|
||||
|
||||
bool DocumentationViewer::forwardEnable()
|
||||
{
|
||||
return m_hpos < m_history.count()-1;
|
||||
}
|
||||
|
||||
#include "docpart.moc"
|
@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Jul 29 2001
|
||||
copyright : (C) 2001 - 2003 by Brachet Pascal, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef DOCPART_H
|
||||
#define DOCPART_H
|
||||
|
||||
#include <khtml_part.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
class DocumentationViewer : public KHTMLPart
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DocumentationViewer(QWidget *parent=0, const char *name=0);
|
||||
~DocumentationViewer();
|
||||
bool backEnable();
|
||||
bool forwardEnable();
|
||||
|
||||
public slots:
|
||||
void home();
|
||||
void forward();
|
||||
void back();
|
||||
void addToHistory( const QString & url );
|
||||
|
||||
signals:
|
||||
void updateStatus( bool back, bool forward );
|
||||
|
||||
protected:
|
||||
virtual void urlSelected( const QString &url, int button=0, int state=0,const QString &_target= QString::null, KParts::URLArgs args = KParts::URLArgs());
|
||||
|
||||
private:
|
||||
QStringList m_history;
|
||||
unsigned int m_hpos;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||
<kpartgui name="docpart" version="1">
|
||||
<ToolBar name="extraToolBar"><text>Extra</text>
|
||||
<Action name="Back"/>
|
||||
<Action name="Forward"/>
|
||||
<Action name="Home"/>
|
||||
<Separator lineSeparator="true"/>
|
||||
<Action name="find" />
|
||||
<Separator lineSeparator="true"/>
|
||||
<Action name="incFontSizes" />
|
||||
<Action name="decFontSizes" />
|
||||
</ToolBar>
|
||||
</kpartgui>
|
||||
|
@ -0,0 +1,231 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net) *
|
||||
***************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "editorkeysequencemanager.h"
|
||||
|
||||
#include "kileinfo.h"
|
||||
#include "kilejscript.h"
|
||||
|
||||
#include <kate/document.h>
|
||||
#include <klocale.h>
|
||||
|
||||
#define MAX(a,b) (a >= b ? a : b)
|
||||
|
||||
namespace KileEditorKeySequence {
|
||||
|
||||
Manager::Manager(KileInfo* kileInfo, QObject *parent, const char *name) : QObject(parent, name), m_kileInfo(kileInfo) {
|
||||
}
|
||||
|
||||
Manager::~Manager() {
|
||||
}
|
||||
|
||||
void Manager::addAction(const QString& seq, Action *action) {
|
||||
if(seq.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if(m_actionMap.find(seq) == m_actionMap.end()) {
|
||||
m_actionMap[seq] = action;
|
||||
m_watchedKeySequencesList.push_back(seq);
|
||||
emit watchedKeySequencesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Manager::removeKeySequence(const QString& seq) {
|
||||
if(seq.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
QMap<QString, Action*>::iterator it = m_actionMap.find(seq);
|
||||
if(it != m_actionMap.end()) {
|
||||
delete (it.data());
|
||||
m_actionMap.remove(it);
|
||||
m_watchedKeySequencesList.remove(seq);
|
||||
emit watchedKeySequencesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::removeKeySequence(const QStringList& l) {
|
||||
bool changed = false;
|
||||
for(QStringList::const_iterator i = l.begin(); i != l.end(); ++i) {
|
||||
if((*i).isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
QMap<QString, Action*>::iterator it = m_actionMap.find(*i);
|
||||
if(it != m_actionMap.end()) {
|
||||
delete (it.data());
|
||||
m_actionMap.remove(it);
|
||||
m_watchedKeySequencesList.remove(*i);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if(changed) {
|
||||
emit watchedKeySequencesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::addActionMap(const QMap<QString, Action*>& map) {
|
||||
bool changed = false;
|
||||
for(QMap<QString, Action*>::const_iterator i = map.begin(); i != map.end(); ++i) {
|
||||
if(i.key().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if(m_actionMap[i.key()] != i.data()) {
|
||||
m_actionMap[i.key()] = i.data();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if(changed) {
|
||||
emit watchedKeySequencesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QString Manager::getKeySequence(const Action* a) {
|
||||
for(QMap<QString, Action*>::const_iterator i = m_actionMap.begin(); i != m_actionMap.end(); ++i) {
|
||||
if(i.data() == a) {
|
||||
return i.key();
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
Action* Manager::getAction(const QString& seq) {
|
||||
QMap<QString, Action*>::iterator i = m_actionMap.find(seq);
|
||||
return (i == m_actionMap.end()) ? 0L : (*i);
|
||||
}
|
||||
|
||||
void Manager::setEditorKeySequence(const QString& /* seq */, Action* /* action */) {
|
||||
}
|
||||
|
||||
void Manager::keySequenceTyped(const QString& seq) {
|
||||
m_actionMap[seq]->execute();
|
||||
}
|
||||
|
||||
void Manager::clear() {
|
||||
m_watchedKeySequencesList.clear();
|
||||
m_actionMap.clear();
|
||||
emit watchedKeySequencesChanged();
|
||||
}
|
||||
|
||||
|
||||
const QStringList& Manager::getWatchedKeySequences() {
|
||||
return m_watchedKeySequencesList;
|
||||
}
|
||||
|
||||
bool Manager::isSequenceAssigned(const QString& seq) const {
|
||||
for(QValueList<QString>::const_iterator i = m_watchedKeySequencesList.begin(); i != m_watchedKeySequencesList.end(); ++i) {
|
||||
if((*i).startsWith(seq)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QPair<int, QString> Manager::checkSequence(const QString& seq, const QString& skip) {
|
||||
for(QValueList<QString>::iterator i = m_watchedKeySequencesList.begin(); i != m_watchedKeySequencesList.end(); ++i) {
|
||||
if((*i) == skip) {
|
||||
continue;
|
||||
}
|
||||
if((*i).startsWith(seq)) {
|
||||
return (*i == seq) ? qMakePair<int, QString>(1, seq) : qMakePair<int, QString>(2, *i);
|
||||
}
|
||||
if(!(*i).isEmpty() && seq.startsWith(*i)) {
|
||||
return qMakePair<int, QString>(3, *i);
|
||||
}
|
||||
}
|
||||
return qMakePair<int, QString>(0, QString());
|
||||
}
|
||||
|
||||
Recorder::Recorder(Kate::View *view, Manager *manager) : QObject(view), m_manager(manager), m_view(view) {
|
||||
connect(m_manager, SIGNAL(watchedKeySequencesChanged()), this, SLOT(reloadWatchedKeySequences()));
|
||||
connect(this, SIGNAL(detectedTypedKeySequence(const QString&)), m_manager, SLOT(keySequenceTyped(const QString&)));
|
||||
m_view->cursorPositionReal(&m_oldLine, &m_oldCol);
|
||||
reloadWatchedKeySequences();
|
||||
}
|
||||
|
||||
Recorder::~Recorder() {
|
||||
}
|
||||
|
||||
bool Recorder::eventFilter(QObject* /* o */, QEvent *e) {
|
||||
if (e->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *keyEvent = (QKeyEvent*)(e);
|
||||
uint curLine, curCol;
|
||||
m_view->cursorPositionReal(&curLine, &curCol);
|
||||
if(curLine != m_oldLine || m_oldCol+1 != curCol) {
|
||||
m_typedSequence = QString();
|
||||
m_oldLine = curLine;
|
||||
m_oldCol = curCol;
|
||||
}
|
||||
else {
|
||||
++m_oldCol;
|
||||
}
|
||||
m_typedSequence += keyEvent->text();
|
||||
if(m_typedSequence.length() == m_maxSequenceLength+1) {
|
||||
m_typedSequence = m_typedSequence.mid(1, m_typedSequence.length() - 1);
|
||||
}
|
||||
return seekForKeySequence(m_typedSequence);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Recorder::seekForKeySequence(const QString& s) {
|
||||
for(uint i = 0; i < s.length(); ++i) {
|
||||
QString toCheck = s.right(s.length() - i);
|
||||
if(m_watchedKeySequencesList.contains(toCheck) > 0) {
|
||||
m_view->getDoc()->removeText(m_oldLine, m_oldCol-(s.length() - i - 1), m_oldLine, m_oldCol);
|
||||
m_typedSequence = QString::null; // clean m_typedSequence to avoid wrong action triggering if one presses keys without printable character
|
||||
emit detectedTypedKeySequence(toCheck);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Recorder::reloadWatchedKeySequences() {
|
||||
m_watchedKeySequencesList = m_manager->getWatchedKeySequences();
|
||||
m_maxSequenceLength = 0;
|
||||
for(QStringList::iterator i = m_watchedKeySequencesList.begin(); i != m_watchedKeySequencesList.end(); ++i) {
|
||||
m_maxSequenceLength = MAX(m_maxSequenceLength, (*i).length());
|
||||
}
|
||||
if(m_maxSequenceLength < m_typedSequence.length()) {
|
||||
m_typedSequence = m_typedSequence.right(m_maxSequenceLength);
|
||||
}
|
||||
}
|
||||
|
||||
Action::Action() {
|
||||
}
|
||||
|
||||
Action::~Action() {
|
||||
}
|
||||
|
||||
QString Action::getDescription() const {
|
||||
return QString();
|
||||
}
|
||||
|
||||
ExecuteJScriptAction::ExecuteJScriptAction(KileJScript::JScript *jScript, KileJScript::Manager *jScriptManager) : m_jScript(jScript), m_jScriptManager(jScriptManager){
|
||||
}
|
||||
|
||||
ExecuteJScriptAction::~ExecuteJScriptAction() {
|
||||
}
|
||||
|
||||
void ExecuteJScriptAction::execute() {
|
||||
m_jScriptManager->executeJScript(m_jScript);
|
||||
}
|
||||
|
||||
QString ExecuteJScriptAction::getDescription() const {
|
||||
return i18n("Script execution of %1").arg(m_jScript->getFileName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#include "editorkeysequencemanager.moc"
|
@ -0,0 +1,230 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net) *
|
||||
***************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef EDITORKEYSEQUENCEMANAGER_H
|
||||
#define EDITORKEYSEQUENCEMANAGER_H
|
||||
|
||||
#include <qevent.h>
|
||||
#include <qmap.h>
|
||||
#include <qobject.h>
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
// include <kaction.h>
|
||||
#include <kate/view.h>
|
||||
|
||||
namespace KileJScript {
|
||||
class JScript;
|
||||
class Manager;
|
||||
}
|
||||
|
||||
class KileInfo;
|
||||
|
||||
namespace KileEditorKeySequence {
|
||||
/**
|
||||
* This class represents an action that can be assigned to an editor key sequence.
|
||||
**/
|
||||
class Action {
|
||||
public:
|
||||
Action();
|
||||
virtual ~Action();
|
||||
|
||||
/**
|
||||
* The main method, which implements the "action" itself.
|
||||
**/
|
||||
virtual void execute() = 0;
|
||||
|
||||
/**
|
||||
* Returns a textual representation of the action.
|
||||
**/
|
||||
virtual QString getDescription() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class represents the execution of a JavaScript in Kile.
|
||||
**/
|
||||
class ExecuteJScriptAction : public Action {
|
||||
public:
|
||||
ExecuteJScriptAction(KileJScript::JScript *jScript, KileJScript::Manager *jScriptManager);
|
||||
virtual ~ExecuteJScriptAction();
|
||||
|
||||
virtual void execute();
|
||||
virtual QString getDescription() const;
|
||||
|
||||
protected:
|
||||
KileJScript::JScript *m_jScript;
|
||||
KileJScript::Manager *m_jScriptManager;
|
||||
};
|
||||
|
||||
// forward declaration
|
||||
class Recorder;
|
||||
|
||||
/**
|
||||
* This manager class is responsible for handling the key sequences that get assigned
|
||||
* to actions. Currently, every key sequence can only trigger one single action.
|
||||
*
|
||||
* Whenever a watched key sequence is typed, the manager triggers the corresponding
|
||||
* action. The only characters that are allowed in key sequences are those that make
|
||||
* the cursor advance by one position, i.e. for example tabs are not allowed in key
|
||||
* sequences.
|
||||
**/
|
||||
class Manager : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
friend class Recorder;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructs a new manager object.
|
||||
**/
|
||||
Manager(KileInfo* kileInfo, QObject *parent = 0, const char *name = 0);
|
||||
virtual ~Manager();
|
||||
|
||||
/**
|
||||
* Adds a new consequence and the corresponding action.
|
||||
* @param seq the key sequence
|
||||
* @param action the action for the sequence
|
||||
**/
|
||||
void addAction(const QString& seq, Action *action);
|
||||
|
||||
/**
|
||||
* Convenience method. Adds a key sequence-to-action map to this
|
||||
* manager, removing any existing mappings.
|
||||
* @warning This method overrides any exising mappings !
|
||||
**/
|
||||
void addActionMap(const QMap<QString, Action*>& map);
|
||||
|
||||
/**
|
||||
* Removes all the mappings.
|
||||
**/
|
||||
void clear();
|
||||
|
||||
/**
|
||||
* Returns a list of all the key sequences that are currently being
|
||||
* watched.
|
||||
**/
|
||||
const QStringList& getWatchedKeySequences();
|
||||
|
||||
/**
|
||||
* Returns the key sequence that corresponds to an action.
|
||||
* @param a the action that is considered
|
||||
**/
|
||||
QString getKeySequence(const Action* a);
|
||||
|
||||
/**
|
||||
* Returns the action that corresponds to a key sequence.
|
||||
**/
|
||||
Action* getAction(const QString& seq);
|
||||
|
||||
/**
|
||||
* Remove a key sequence, i.e. the key sequence is no longer watched.
|
||||
* @param seq the key sequence that should be removed
|
||||
**/
|
||||
void removeKeySequence(const QString& seq);
|
||||
|
||||
/**
|
||||
* Convenience method. Removes every key sequence contained in the list.
|
||||
* @see removeKeySequence(const QString& seq)
|
||||
**/
|
||||
void removeKeySequence(const QStringList& l);
|
||||
|
||||
/**
|
||||
* @warning not implemented yet !
|
||||
**/
|
||||
void setEditorKeySequence(const QString& seq, Action *action);
|
||||
|
||||
/**
|
||||
* Checks whether the sequence "seq" is already assigned to an action.
|
||||
* This method also checks whether a longer sequence that starts with
|
||||
* "seq" is assigned to an action.
|
||||
* @param seq the sequence that should be checked
|
||||
* @return "true" if and only the sequence "seq" or another sequence
|
||||
* that starts with "seq" is assigned to an action
|
||||
**/
|
||||
bool isSequenceAssigned(const QString& seq) const;
|
||||
|
||||
/**
|
||||
* Performs a few checks on a key sequence.
|
||||
* @returns in the first component: 0 if the sequence is free; 1
|
||||
* if the sequence is assigned; 2 if there is a longer,
|
||||
* currently stored sequence that starts with "seq"; 3
|
||||
* if "seq" starts with a shorter sequence that is currently
|
||||
* stored
|
||||
*
|
||||
* in the second component: a string that corresponds to one
|
||||
* of the previous cases (in the case 0: QString())
|
||||
**/
|
||||
QPair<int, QString> checkSequence(const QString& seq, const QString& skip = QString());
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Emitted whenever the set of watched key sequences changes.
|
||||
**/
|
||||
void watchedKeySequencesChanged();
|
||||
|
||||
protected slots:
|
||||
/**
|
||||
* Signalises to the manager that a (watched) sequence has been typed.
|
||||
* @param seq the sequence that has been typed
|
||||
**/
|
||||
void keySequenceTyped(const QString& seq);
|
||||
|
||||
protected:
|
||||
KileInfo *m_kileInfo;
|
||||
QMap<QString, Action*> m_actionMap;
|
||||
QStringList m_watchedKeySequencesList;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class keeps track of the characters that are typed. It is used in
|
||||
* conjunction with a Kate view and a KileEditorKeySequence::Manager.
|
||||
**/
|
||||
class Recorder : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Recorder(Kate::View *view, Manager *manager);
|
||||
virtual ~Recorder();
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Emitted whenever a key sequence that is currently watched has
|
||||
* been typed.
|
||||
**/
|
||||
void detectedTypedKeySequence(const QString& seq);
|
||||
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Reloads the key sequences that this recorders watches.
|
||||
**/
|
||||
void reloadWatchedKeySequences();
|
||||
|
||||
protected:
|
||||
Manager *m_manager;
|
||||
QString m_typedSequence;
|
||||
uint m_maxSequenceLength;
|
||||
uint m_oldCol, m_oldLine;
|
||||
Kate::View* m_view;
|
||||
QStringList m_watchedKeySequencesList;
|
||||
|
||||
virtual bool eventFilter(QObject *o, QEvent *e);
|
||||
|
||||
/**
|
||||
* Checks whether a key sequence is currently watched.
|
||||
* @param s the key sequence that should be checked
|
||||
**/
|
||||
bool seekForKeySequence(const QString& s);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,4 @@
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES latin1.enc latin2.enc latin3.enc latin4.enc latin5.enc latin9.enc cp1250.enc cp1252.enc DESTINATION share/apps/kile/encodings )
|
@ -0,0 +1,3 @@
|
||||
encodingsdir = $(kde_datadir)/kile/encodings
|
||||
encodings_DATA = latin1.enc latin2.enc latin3.enc latin4.enc latin5.enc latin9.enc cp1250.enc cp1252.enc
|
||||
|
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
|
||||
<class>KileWidgetEnvironmentConfig</class>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>KileWidgetEnvironmentConfig</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>586</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>LaTeX</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QButtonGroup">
|
||||
<property name="name">
|
||||
<cstring>m_bgEnv</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Complete Environments</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_CompleteEnvironment</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically complete \begin{env} with \end{env}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<widget class="QButtonGroup">
|
||||
<property name="name">
|
||||
<cstring>m_bgGraphics</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Automatic Indentation Inside Environments</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_envIndentation</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activated</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>Enable auto indentation of environments.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_envIndentSpaces</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use spaces instead of tabs to indent</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>Use spaces instead of a tabulator to autoindent environments.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout2</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>m_lbNumSpaces</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of spaces:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_envIndentNumSpaces</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer1</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QSpinBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_envIndentNumSpaces</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>Use this number of spaces to autoindent environments.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>spacer2</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</hbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
@ -0,0 +1,194 @@
|
||||
/***************************************************************************
|
||||
date : Dec 06 2005
|
||||
version : 0.12
|
||||
copyright : (C) 2005 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "floatdialog.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qregexp.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kileedit.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
|
||||
FloatEnvironmentDialog::FloatEnvironmentDialog(KConfig *config, KileInfo *ki, QWidget *parent)
|
||||
: Wizard(config,parent), m_ki(ki)
|
||||
{
|
||||
QWidget *page = new QWidget(this);
|
||||
setMainWidget(page);
|
||||
|
||||
QGridLayout *grid = new QGridLayout(page, 6,2, 8,8);
|
||||
|
||||
// environment groupbox
|
||||
QButtonGroup *egroup = new QButtonGroup( i18n("Environment"),page);
|
||||
egroup->setColumnLayout(0, Qt::Vertical );
|
||||
egroup->layout()->setSpacing( 6 );
|
||||
egroup->layout()->setMargin( 11 );
|
||||
QGridLayout *egrouplayout = new QGridLayout( egroup->layout() );
|
||||
egrouplayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
m_rbFigure = new QRadioButton(i18n("&Figure"), egroup);
|
||||
m_rbTable = new QRadioButton(i18n("T&able"), egroup);
|
||||
|
||||
egrouplayout->addWidget( m_rbFigure, 0,0 );
|
||||
egrouplayout->addWidget( m_rbTable, 0,1 );
|
||||
|
||||
// position groupbox
|
||||
QButtonGroup *pgroup = new QButtonGroup( i18n("Position"),page);
|
||||
pgroup->setColumnLayout(0, Qt::Vertical );
|
||||
pgroup->layout()->setSpacing( 6 );
|
||||
pgroup->layout()->setMargin( 11 );
|
||||
QGridLayout *pgrouplayout = new QGridLayout( pgroup->layout() );
|
||||
pgrouplayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel *label1 = new QLabel(i18n("Here exact:"), pgroup);
|
||||
QLabel *label2 = new QLabel(i18n("Top of page:"), pgroup);
|
||||
QLabel *label3 = new QLabel(i18n("Bottom of page:"), pgroup);
|
||||
QLabel *label4 = new QLabel(i18n("Extra page:"), pgroup);
|
||||
m_cbHere = new QCheckBox(pgroup);
|
||||
m_cbTop = new QCheckBox(pgroup);
|
||||
m_cbBottom = new QCheckBox(pgroup);
|
||||
m_cbPage = new QCheckBox(pgroup);
|
||||
|
||||
pgrouplayout->addWidget( label1, 0,0 );
|
||||
pgrouplayout->addWidget( label2, 1,0 );
|
||||
pgrouplayout->addWidget( label3, 0,2 );
|
||||
pgrouplayout->addWidget( label4, 1,2 );
|
||||
pgrouplayout->addWidget( m_cbHere, 0,1 );
|
||||
pgrouplayout->addWidget( m_cbTop, 1,1 );
|
||||
pgrouplayout->addWidget( m_cbBottom, 0,3 );
|
||||
pgrouplayout->addWidget( m_cbPage, 1,3 );
|
||||
|
||||
// center environment
|
||||
QLabel *label5 = new QLabel(i18n("Center:"),page);
|
||||
m_cbCenter = new QCheckBox(page);
|
||||
|
||||
// Caption
|
||||
QLabel *label6 = new QLabel(i18n("Ca&ption:"),page);
|
||||
m_edCaption = new KLineEdit("",page);
|
||||
m_edCaption->setMinimumWidth(300);
|
||||
label6->setBuddy(m_edCaption);
|
||||
|
||||
// Label
|
||||
QLabel *label7 = new QLabel(i18n("&Label:"),page);
|
||||
m_edLabel = new KLineEdit("",page);
|
||||
m_edLabel->setMinimumWidth(300);
|
||||
label7->setBuddy(m_edLabel);
|
||||
|
||||
|
||||
// add widgets
|
||||
grid->addMultiCellWidget( egroup, 0,0,0,1 );
|
||||
grid->addMultiCellWidget( pgroup, 1,1,0,1 );
|
||||
grid->addWidget(label5,2,0);
|
||||
grid->addWidget(label6,3,0);
|
||||
grid->addWidget(label7,4,0);
|
||||
grid->addWidget(m_cbCenter,2,1);
|
||||
grid->addWidget(m_edCaption,3,1);
|
||||
grid->addWidget(m_edLabel,4,1);
|
||||
|
||||
// default values
|
||||
m_cbCenter->setChecked(true);
|
||||
m_cbHere->setChecked(true);
|
||||
m_cbTop->setChecked(true);
|
||||
m_cbPage->setChecked(true);
|
||||
m_rbFigure->setChecked(true);
|
||||
m_prefix = "fig:";
|
||||
m_edLabel->setText(m_prefix);
|
||||
slotEnvironmentClicked();
|
||||
|
||||
grid->setRowStretch(5,1);
|
||||
setFocusProxy( m_edCaption );
|
||||
|
||||
// signals and slots
|
||||
connect(m_rbFigure, SIGNAL(clicked()), this, SLOT(slotEnvironmentClicked()));
|
||||
connect(m_rbTable, SIGNAL(clicked()), this, SLOT(slotEnvironmentClicked()));
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////// determine the whole tag //////////////////////////////
|
||||
|
||||
void FloatEnvironmentDialog::slotOk()
|
||||
{
|
||||
QString envname = ( m_rbFigure->isChecked() ) ? "figure" : "table";
|
||||
QString indent = m_ki->editorExtension()->autoIndentEnvironment();
|
||||
|
||||
QString position;
|
||||
if ( m_cbHere->isChecked() )
|
||||
position += 'h';
|
||||
if ( m_cbTop->isChecked() )
|
||||
position += 't';
|
||||
if ( m_cbBottom->isChecked() )
|
||||
position += 'b';
|
||||
if ( m_cbPage->isChecked() )
|
||||
position += 'p';
|
||||
|
||||
m_td.tagBegin = "\\begin{" + envname + '}';
|
||||
if ( !position.isEmpty() )
|
||||
m_td.tagBegin += '[' + position + ']';
|
||||
m_td.tagBegin += '\n';
|
||||
|
||||
int row = 1;
|
||||
if ( m_cbCenter->isChecked() ) {
|
||||
m_td.tagBegin += indent + "\\centering\n";
|
||||
row = 2;
|
||||
}
|
||||
|
||||
m_td.tagEnd = indent + '\n';
|
||||
|
||||
QString caption = m_edCaption->text();
|
||||
if ( ! caption.isEmpty() )
|
||||
m_td.tagEnd += indent + "\\caption{" + caption + "}\n";
|
||||
|
||||
QString label = m_edLabel->text();
|
||||
if ( !label.isEmpty() && label!=m_prefix )
|
||||
m_td.tagEnd += indent + "\\label{" + label + "}\n";
|
||||
|
||||
m_td.tagEnd += "\\end{" + envname + "}\n";
|
||||
|
||||
m_td.dy=row;
|
||||
m_td.dx=indent.length();
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
void FloatEnvironmentDialog::slotEnvironmentClicked()
|
||||
{
|
||||
QString caption,oldprefix;
|
||||
|
||||
if ( m_rbFigure->isChecked() ) {
|
||||
caption = i18n("Figure Environment");
|
||||
oldprefix = "^tab:";
|
||||
m_prefix = "fig:";
|
||||
} else {
|
||||
caption = i18n("Table Environment");
|
||||
oldprefix = "^fig:";
|
||||
m_prefix = "tab:";
|
||||
}
|
||||
|
||||
setCaption(caption);
|
||||
QString s = m_edLabel->text();
|
||||
s.replace( QRegExp(oldprefix),m_prefix);
|
||||
m_edLabel->setText(s);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "floatdialog.moc"
|
@ -0,0 +1,58 @@
|
||||
/***************************************************************************
|
||||
date : Jan 28 2005
|
||||
version : 0.10
|
||||
copyright : (C) 2005 by Holger Danielsson
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef FLOATDIALOG_H
|
||||
#define FLOATDIALOG_H
|
||||
|
||||
#include "kilewizard.h"
|
||||
#include <klineedit.h>
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qradiobutton.h>
|
||||
|
||||
#include "kileinfo.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
|
||||
class FloatEnvironmentDialog : public Wizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FloatEnvironmentDialog(KConfig *config, KileInfo *ki, QWidget *parent);
|
||||
~FloatEnvironmentDialog() {}
|
||||
|
||||
public slots:
|
||||
void slotOk();
|
||||
|
||||
private slots:
|
||||
void slotEnvironmentClicked();
|
||||
|
||||
private:
|
||||
KLineEdit *m_edLabel, *m_edCaption;
|
||||
QRadioButton *m_rbFigure, *m_rbTable;
|
||||
QCheckBox *m_cbHere,*m_cbTop,*m_cbBottom,*m_cbPage;
|
||||
QCheckBox *m_cbCenter;
|
||||
|
||||
QString m_prefix;
|
||||
KileInfo *m_ki;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,251 @@
|
||||
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
|
||||
<class>KileWidgetGeneralConfig</class>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>KileWidgetGeneralConfig</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>776</width>
|
||||
<height>460</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
<cstring>groupBox5</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Project Options</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>kcfg_Restore</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Reopen files and projects on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Default project location:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_DefaultProjectLocation</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_DefaultProjectLocation</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
<cstring>groupBox1</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>1</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Autosave Options</string>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_Autosave</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto&save</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout2</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>textLabel1</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interval &time in minutes (1 - 9999):</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_AutosaveInterval</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KIntNumInput">
|
||||
<property name="name">
|
||||
<cstring>kcfg_AutosaveInterval</cstring>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>9999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
<cstring>groupBox3</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Template Variables</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="KLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_Author</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_TemplateEncoding</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_DocumentClassOptions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel3</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Author:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_Author</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel4</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Documentclass options:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_DocumentClassOptions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel5</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Input &encoding:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_TemplateEncoding</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
<cstring>groupBox4</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>File Clean-Up Details</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_CleanUpAfterClose</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically clean-up files after close</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit">
|
||||
<property name="name">
|
||||
<cstring>kcfg_CleanUpFileExtensions</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_UnfoldConfigTree</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open all tree items of config pages, when calling this dialog</string>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>It's impossible to open special tree items in Kile's configuration dialog. You have the choice to open all items, which may lead to a bad size of the dialog, or none of them.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>kcfg_RunLyxServer</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Let Kile process LyX commands sent by bibliography editors/viewers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<includehints>
|
||||
<includehint>knuminput.h</includehint>
|
||||
<includehint>knuminput.h</includehint>
|
||||
<includehint>klineedit.h</includehint>
|
||||
<includehint>klineedit.h</includehint>
|
||||
<includehint>klineedit.h</includehint>
|
||||
<includehint>klineedit.h</includehint>
|
||||
</includehints>
|
||||
</UI>
|
@ -0,0 +1,134 @@
|
||||
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
|
||||
<class>KileWidgetGraphicsConfig</class>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>KileWidgetGraphicsConfig</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>602</width>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Graphics</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QButtonGroup">
|
||||
<property name="name">
|
||||
<cstring>m_bgGraphics</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Include Graphics</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>m_tlResolution</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default resolution:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_resolution</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_resolution</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>m_tlBbox</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding box:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_boundingbox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="0">
|
||||
<property name="name">
|
||||
<cstring>m_tlImageMagick</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ImageMagick:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>m_tlResolutionHelp</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(used when the picture offers no resolution)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_boundingbox</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tr&y to determine from the picture</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>m_tlBBoxHelp</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(you have to install the ImageMagick package to use this option)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="4" column="1">
|
||||
<property name="name">
|
||||
<cstring>m_lbImagemagick</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
</customwidgets>
|
||||
<includes>
|
||||
<include location="global" impldecl="in declaration">kconfig.h</include>
|
||||
<include location="local" impldecl="in declaration">latexcmd.h</include>
|
||||
<include location="local" impldecl="in declaration">latexcmddialog.h</include>
|
||||
</includes>
|
||||
<variables>
|
||||
<variable access="private">KConfig *m_config;</variable>
|
||||
<variable access="private">KileDocument::LatexCommands *m_commands;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot access="private" specifier="non virtual">slotConfigure()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
<function specifier="non virtual">setLatexCommands( KConfig * config, KileDocument::LatexCommands * commands )</function>
|
||||
</functions>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<includehints>
|
||||
<includehint>klineedit.h</includehint>
|
||||
</includehints>
|
||||
</UI>
|
@ -0,0 +1,4 @@
|
||||
|
||||
########### install files ###############
|
||||
|
||||
INSTALL( FILES latex-kile.lst latex-tetex.lst latex-tetex3.lst latex-texlive-3.9.lst DESTINATION share/apps/kile/help )
|
@ -0,0 +1,3 @@
|
||||
helpdir = $(kde_datadir)/kile/help
|
||||
help_DATA = latex-kile.lst latex-tetex.lst latex-tetex3.lst latex-texlive-3.9.lst
|
||||
|
@ -0,0 +1,236 @@
|
||||
# Keys for LaTeX help (from Kile)
|
||||
# v0.1
|
||||
# dani/2003
|
||||
#
|
||||
\a => IDX139
|
||||
\addcontentsline => SEC173
|
||||
\address => SEC92
|
||||
\addtocontents => SEC174
|
||||
\addtocounter => SEC4
|
||||
\addtolength => SEC86
|
||||
\addvspace => SEC148
|
||||
\alph => SEC5
|
||||
\Alph => SEC5
|
||||
\appendix => IDX314
|
||||
\arabic => SEC6
|
||||
array => SEC31
|
||||
\author => SEC133
|
||||
\backslash => IDX346
|
||||
\begin => SEC30
|
||||
\bfseries => IDX380
|
||||
\bibitem => SEC70
|
||||
\bibliography => SEC73
|
||||
\bibliographystyle => SEC73
|
||||
\bigskip => SEC149
|
||||
\caption => IDX80
|
||||
\cc => SEC93
|
||||
\cdots => IDX275
|
||||
center => SEC32
|
||||
\centering => SEC33
|
||||
\chapter => SEC142
|
||||
\circle => SEC48
|
||||
\cite => SEC71
|
||||
\cleardoublepage => SEC108
|
||||
\clearpage => SEC109
|
||||
\cline => SEC65
|
||||
\closing => SEC94
|
||||
\dashbox => SEC49
|
||||
\date => SEC134
|
||||
\ddots => IDX276
|
||||
\depth => IDX193
|
||||
description => SEC34
|
||||
\documentclass => SEC24
|
||||
\dotfill => SEC144
|
||||
\emph => IDX376
|
||||
\encl => SEC95
|
||||
\end => SEC30
|
||||
\enlargethispage => SEC110
|
||||
enumerate => SEC35
|
||||
eqnarray => SEC36
|
||||
equation => SEC37
|
||||
\fbox => SEC154
|
||||
figure => SEC38
|
||||
\flushbottom => SEC26
|
||||
flushleft => SEC39
|
||||
flushright => SEC41
|
||||
\fnsymbol => SEC7
|
||||
\fontencoding => IDX416
|
||||
\fontfamily => IDX417
|
||||
\fontseries => IDX418
|
||||
\fontshape => IDX419
|
||||
\fontsize => IDX420
|
||||
\footnote => SEC80
|
||||
\footnotemark => SEC81
|
||||
\footnotesize => IDX406
|
||||
\footnotetext => SEC82
|
||||
\frac => IDX277
|
||||
\frame => SEC50
|
||||
\framebox => SEC51
|
||||
\fussy => SEC111
|
||||
\height => IDX192
|
||||
\hfill => SEC145
|
||||
\hline => SEC66
|
||||
\hrulefill => SEC146
|
||||
\hspace => SEC147
|
||||
\Huge => IDX413
|
||||
\huge => IDX412
|
||||
\hyphenation => SEC112
|
||||
\include => SEC168
|
||||
\includeonly => SEC169
|
||||
\indent => SEC121
|
||||
\input => SEC170
|
||||
\item => SEC43
|
||||
itemize => SEC43
|
||||
\itshape => IDX375
|
||||
\kill => IDX136
|
||||
\label => SEC16
|
||||
\large => IDX409
|
||||
\LARGE => IDX411
|
||||
\Large => IDX410
|
||||
\ldots => IDX278
|
||||
\lefteqn => IDX74
|
||||
letter => SEC44
|
||||
\line => SEC52
|
||||
\linebreak => SEC113
|
||||
\linethickness => SEC53
|
||||
list => SEC45
|
||||
\listoffigures => IDX358
|
||||
\listoftables => IDX359
|
||||
\location => IDX204
|
||||
lrbox => SEC156
|
||||
\makebox => SEC157
|
||||
\makebox => SEC54
|
||||
\makelabels => SEC97
|
||||
\maketitle => SEC132
|
||||
\markboth => SEC139
|
||||
\markright => SEC140
|
||||
\mathbf => IDX394
|
||||
\mathcal => IDX399
|
||||
\mathit => IDX397
|
||||
\mathnormal => IDX398
|
||||
\mathrm => IDX393
|
||||
\mathsf => IDX395
|
||||
\mathtt => IDX396
|
||||
\mathversion => IDX400
|
||||
\mbox => SEC158
|
||||
\mdseries => IDX378
|
||||
\medskip => SEC150
|
||||
minipage => SEC46
|
||||
\multicolumn => SEC67
|
||||
\multiput => SEC55
|
||||
\name => SEC98
|
||||
\newcommand => SEC20
|
||||
\newcounter => SEC8
|
||||
\newenvironment => SEC21
|
||||
\newfont => SEC23
|
||||
\newlength => SEC84
|
||||
\newline => SEC114
|
||||
\newpage => SEC115
|
||||
\newsavebox => SEC159
|
||||
\newtheorem => SEC22
|
||||
\nocite => SEC72
|
||||
\nofiles => IDX360
|
||||
\noindent => SEC122
|
||||
\nolinebreak => SEC116
|
||||
\nopagebreak => SEC117
|
||||
\normalfont => IDX392
|
||||
\normalsize => IDX408
|
||||
\onecolumn => SEC27
|
||||
\opening => SEC99
|
||||
\oval => SEC56
|
||||
\overbrace => IDX279
|
||||
\overline => IDX280
|
||||
\pagebreak => SEC118
|
||||
\pagenumbering => SEC137
|
||||
\pageref => SEC17
|
||||
\pagestyle => SEC138
|
||||
\par => SEC123
|
||||
\paragraph => SEC142
|
||||
\parbox => SEC160
|
||||
picture => SEC47
|
||||
\ps => SEC100
|
||||
\pushtabs => IDX137
|
||||
\put => SEC57
|
||||
quotation => SEC60
|
||||
quote => SEC61
|
||||
\raggedbottom => SEC28
|
||||
\raggedleft => SEC42
|
||||
\raggedright => SEC40
|
||||
\raisebox => SEC161
|
||||
\ref => SEC18
|
||||
\refstepcounter => SEC9
|
||||
\rmfamily => IDX373
|
||||
\roman => SEC10
|
||||
\Roman => SEC10
|
||||
\rule => SEC162
|
||||
\savebox => SEC163
|
||||
\sbox => SEC164
|
||||
\scriptsize => IDX405
|
||||
\scshape => IDX388
|
||||
\section => SEC142
|
||||
\selectfont => IDX421
|
||||
\setcounter => SEC12
|
||||
\setlength => SEC85
|
||||
\settodepth => SEC87
|
||||
\settoheight => SEC88
|
||||
\settowidth => SEC89
|
||||
\sffamily => IDX386
|
||||
\shortstack => SEC58
|
||||
\signature => SEC101
|
||||
\sloppy => SEC119
|
||||
\slshape => IDX384
|
||||
\small => IDX407
|
||||
\smallskip => SEC151
|
||||
\sqrt => IDX281
|
||||
\startbreaks => SEC102
|
||||
\stepcounter => SEC11
|
||||
\stopbreaks => SEC103
|
||||
\subparagraph => SEC142
|
||||
\subsection => SEC142
|
||||
\subsubsection => SEC142
|
||||
\symbol => IDX347
|
||||
tabbing => SEC62
|
||||
table => SEC63
|
||||
\tableofcontents => IDX357
|
||||
tabular => SEC64
|
||||
\telephone => SEC104
|
||||
\textbf => IDX380
|
||||
\textit => IDX375
|
||||
\textmd => IDX378
|
||||
\textnormal => IDX392
|
||||
\textrm => IDX373
|
||||
\textsc => IDX388
|
||||
\textsf => IDX386
|
||||
\textsl => IDX384
|
||||
\texttt => IDX389
|
||||
\textup => IDX381
|
||||
\thanks => SEC135
|
||||
thebibliography => SEC69
|
||||
theorem => SEC74
|
||||
\thispagestyle => SEC141
|
||||
\tiny => IDX404
|
||||
\title => SEC136
|
||||
titlepage => SEC75
|
||||
\today => IDX165
|
||||
\totalheight => IDX194
|
||||
\ttfamily => IDX389
|
||||
\twocolumn => SEC29
|
||||
\typein => SEC176
|
||||
\typeout => SEC177
|
||||
\underbrace => IDX282
|
||||
\underline => IDX283
|
||||
\upshape => IDX381
|
||||
\usebox => SEC165
|
||||
\usecounter => SEC13
|
||||
\usefont => IDX422
|
||||
\usepackage => IDX46
|
||||
\value => SEC14
|
||||
\vdots => IDX284
|
||||
\vector => SEC59
|
||||
\verb => SEC77
|
||||
verbatim => SEC76
|
||||
verse => SEC78
|
||||
\vfill => SEC152
|
||||
\vline => SEC68
|
||||
\vspace => SEC153
|
||||
\width => SEC90
|
@ -0,0 +1,204 @@
|
||||
# Keys for LaTeX help (from TeTeX)
|
||||
# v0.2
|
||||
# dani/2003
|
||||
# jeroen/2005
|
||||
\part
|
||||
\chapter => ltx-141.html
|
||||
\section => ltx-141.html
|
||||
\subsection => ltx-141.html
|
||||
\subsubsection => ltx-141.html
|
||||
\paragraph => ltx-141.html
|
||||
\subparagraph => ltx-141.html
|
||||
\subsubparagraph => ltx-141.html
|
||||
\subsubsubparagraph => ltx-141.html
|
||||
\documentclass => ltx-22.html
|
||||
\documentstyle => ltx-22.html
|
||||
\addcontentsline => ltx-171.html
|
||||
\addtocontents => ltx-172.html
|
||||
\addtocounter => ltx-195.html
|
||||
\address => ltx-93.html
|
||||
\addtolength => ltx-89.html
|
||||
\addvspace => ltx-198.html
|
||||
\alph => ltx-199.html
|
||||
\appendix => ltx-200.html
|
||||
\arabic => ltx-201.html
|
||||
\author => ltx-203.html
|
||||
\backslash => ltx-164.html
|
||||
\baselineskip => baselineskip.html
|
||||
\baselinestretch => baselineskip.html
|
||||
\bf => ltx-204.html
|
||||
\bibitem => ltx-205.html
|
||||
\bigskip => ltx-206.html
|
||||
\boldmath => boldmath.html
|
||||
\cal => ltx-407.html
|
||||
\caption => caption.html
|
||||
\cdots => ltx-207.html
|
||||
\centering => ltx-30.html
|
||||
\circle => ltx-210.html
|
||||
\cite => ltx-211.html
|
||||
\cleardoublepage => ltx-212.html
|
||||
\clearpage => ltx-213.html
|
||||
\cline => ltx-214.html
|
||||
\closing => ltx-98.html
|
||||
\dashbox => ltx-216.html
|
||||
\date => ltx-217.html
|
||||
\ddots => ltx-218.html
|
||||
\dotfill => ltx-220.html
|
||||
\em => ltx-221.html
|
||||
\ensuremath => ensuremath.html
|
||||
\fbox => ltx-226.html
|
||||
\flushbottom => ltx-227.html
|
||||
\fnsymbol => ltx-230.html
|
||||
\footnote => ltx-231.html
|
||||
\footnotemark => ltx-232.html
|
||||
\footnotesize => ltx-233.html
|
||||
\footnotetext => ltx-234.html
|
||||
\frac => ltx-235.html
|
||||
\frame => ltx-236.html
|
||||
\framebox => ltx-237.html
|
||||
\frenchspacing => frenchsp.html
|
||||
\hfill => ltx-238.html
|
||||
\hline => ltx-239.html
|
||||
\hrulefill => ltx-240.html
|
||||
\hspace => ltx-241.html
|
||||
\huge => ltx-242.html
|
||||
\Huge => ltx-243.html
|
||||
\hyphenation => ltx-244.html
|
||||
\include => ltx-245.html
|
||||
\includeonly => ltx-246.html
|
||||
\indent => ltx-247.html
|
||||
\input => ltx-248.html
|
||||
\it => ltx-249.html
|
||||
\item => item.html
|
||||
\kill => ltx-251.html
|
||||
\label => ltx-252.html
|
||||
\large => ltx-253.html
|
||||
\Large => ltx-254.html
|
||||
\LARGE => ltx-255.html
|
||||
\ldots => ltx-256.html
|
||||
\left => ltx-403.html#big
|
||||
\lefteqn => lefteqn.html
|
||||
\line => ltx-257.html
|
||||
\linebreak => ltx-258.html
|
||||
\linethickness => ltx-259.html
|
||||
\linewidth => textwidth.html
|
||||
\location => ltx-261.html
|
||||
\makebox => ltx-262.html
|
||||
\maketitle => ltx-263.html
|
||||
\markboth => ltx-264.html
|
||||
\markright => ltx-264.html
|
||||
\mathcal => ltx-407.html
|
||||
\mathop => stackrel.html#mathop
|
||||
\mbox => ltx-265.html
|
||||
\medskip => ltx-266.html
|
||||
\multicolumn => ltx-268.html
|
||||
\multiput => ltx-269.html
|
||||
\newcommand => ltx-18.html
|
||||
\newcounter => ltx-271.html
|
||||
\newenvironment => ltx-19.html
|
||||
\newfont => ltx-21.html
|
||||
\newlength => ltx-87.html
|
||||
\newline => ltx-275.html
|
||||
\newpage => ltx-276.html
|
||||
\newsavebox => ltx-277.html
|
||||
\newtheorem => ltx-20.html
|
||||
\nocite => ltx-279.html
|
||||
\noindent => ltx-280.html
|
||||
\nolinebreak => ltx-281.html
|
||||
\normalsize => ltx-282.html
|
||||
\nopagebreak => ltx-283.html
|
||||
\not => ltx-404.html#not
|
||||
\onecolumn => ltx-284.html
|
||||
\opening => ltx-97.html
|
||||
\oval => ltx-286.html
|
||||
\overbrace => ltx-287.html
|
||||
\overline => ltx-288.html
|
||||
\pagebreak => ltx-289.html
|
||||
\pagenumbering => ltx-137.html
|
||||
\pageref => ltx-291.html
|
||||
\pagestyle => ltx-138.html
|
||||
\par => ltx-293.html
|
||||
\parbox => ltx-294.html
|
||||
\parindent => ltx-86.html#lencmd
|
||||
\parskip => parskip.html
|
||||
\protect => fragile.html
|
||||
\providecommand => ltx-18.html
|
||||
\put => ltx-296.html
|
||||
\raggedbottom => ltx-299.html
|
||||
\raggedleft => ltx-300.html
|
||||
\raggedright => ltx-301.html
|
||||
\raisebox => ltx-302.html
|
||||
\ref => ltx-303.html
|
||||
\renewcommand => ltx-18.html
|
||||
\right => ltx-403.html#big
|
||||
\rm => ltx-304.html
|
||||
\roman => ltx-305.html
|
||||
\rule => ltx-306.html
|
||||
\savebox => ltx-307.html
|
||||
\sbox => ltx-307.html
|
||||
\sc => ltx-308.html
|
||||
\scriptsize => ltx-309.html
|
||||
\setcounter => ltx-310.html
|
||||
\setlength => ltx-88.html
|
||||
\settowidth => ltx-90.html
|
||||
\sf => ltx-313.html
|
||||
\shortstack => ltx-314.html
|
||||
\signature => ltx-315.html
|
||||
\sl => ltx-316.html
|
||||
\small => ltx-317.html
|
||||
\smallskip => ltx-318.html
|
||||
\sqrt => ltx-319.html
|
||||
\stackrel => stackrel.html
|
||||
\tableofcontents => toc.html
|
||||
\telephone => ltx-323.html
|
||||
\textwidth => textwidth.html
|
||||
\textheight => ltx-86.html#lencmd
|
||||
\thanks => ltx-324.html
|
||||
\thispagestyle => ltx-140.html
|
||||
\tiny => ltx-328.html
|
||||
\title => ltx-329.html
|
||||
\today => ltx-330.html
|
||||
\tt => ltx-331.html
|
||||
\twocolumn => ltx-332.html
|
||||
\typeout => ltx-174.html
|
||||
\typein => ltx-175.html
|
||||
\underbrace => ltx-335.html
|
||||
\underline => ltx-336.html
|
||||
\unitlength => unitlength.html
|
||||
\usebox => ltx-337.html
|
||||
\usecounter => ltx-338.html
|
||||
\value => ltx-339.html
|
||||
\vdots => ltx-340.html
|
||||
\vector => ltx-341.html
|
||||
\verb => ltx-342.html
|
||||
\vfill => ltx-345.html
|
||||
\vline => ltx-346.html
|
||||
\vphantom => ltx-403.html#big
|
||||
\vspace => ltx-347.html
|
||||
abstract => ltx-420.html
|
||||
array => ltx-202.html
|
||||
center => ltx-29.html
|
||||
description => ltx-31.html
|
||||
displaymath => ltx-421.html
|
||||
enumerate => ltx-222.html
|
||||
eqnarray => ltx-223.html
|
||||
equation => ltx-224.html
|
||||
figure => ltx-225.html
|
||||
flushleft => ltx-228.html
|
||||
flushright => ltx-229.html
|
||||
itemize => ltx-250.html
|
||||
list => ltx-260.html
|
||||
math => ltx-115.html#math
|
||||
minipage => ltx-267.html
|
||||
picture => ltx-43.html
|
||||
quotation => ltx-297.html
|
||||
quote => ltx-298.html
|
||||
tabbing => ltx-58.html
|
||||
table => ltx-67.html
|
||||
tabular => ltx-68.html
|
||||
thebibliography => ltx-73.html
|
||||
theorem => ltx-77.html
|
||||
titlepage => ltx-78.html
|
||||
trivlist => trivlist.html
|
||||
verbatim => ltx-79.html
|
||||
verse => ltx-81.html
|
@ -0,0 +1,340 @@
|
||||
# Keys for LaTeX help (for TeTeX v3.x)
|
||||
# v0.1
|
||||
# dani/2005
|
||||
#
|
||||
\acute => latex.html#accents-chars-math
|
||||
\addcontentsline => latex.html#bslash-addcontentsline-title
|
||||
\address => latex.html#bslash-address-title
|
||||
\addtocontents => latex.html#bslash-addtocontents-title
|
||||
\addtocounter => latex.html#bslash-addtocounter-title
|
||||
\addtolength => latex.html#bslash-addtolength-title
|
||||
\addvspace => latex.html#bslash-addvspace-title
|
||||
\aleph => latex.html#misc-symbols-title
|
||||
\alph => latex.html#bslash-alph-title
|
||||
\angle => latex.html#misc-symbols-title
|
||||
\appendix => latex.html#sectioning
|
||||
\approx => latex.html#binary-and-relational-ops-title
|
||||
\arabic => latex.html#bslash-arabic-title
|
||||
\ast => latex.html#binary-and-relational-ops-title
|
||||
\author => latex.html#bslash-author-title
|
||||
\backslash => latex.html#delimiters-title
|
||||
\bar => latex.html#accents-chars-math
|
||||
\bfseries => latex.html#typefaces
|
||||
\bibitem => latex.html#bslash-bibitem-title
|
||||
\bibliographystyle => latex.html#using-bibtex-title
|
||||
\bibliography => latex.html#using-bibtex-title
|
||||
\bigcap => latex.html#variable-math-size-symbols-title
|
||||
\bigcup => latex.html#variable-math-size-symbols-title
|
||||
\bigodot => latex.html#variable-math-size-symbols-title
|
||||
\bigoplus => latex.html#variable-math-size-symbols-title
|
||||
\bigotimes => latex.html#variable-math-size-symbols-title
|
||||
\bigskip => latex.html#bslash-bigskip-title
|
||||
\biguplus => latex.html#variable-math-size-symbols-title
|
||||
\bigvee => latex.html#variable-math-size-symbols-title
|
||||
\bigwedge => latex.html#variable-math-size-symbols-title
|
||||
\Box => latex.html#misc-symbols-title
|
||||
\breve => latex.html#accents-chars-math
|
||||
\bullet => latex.html#binary-and-relational-ops-title
|
||||
\caption => latex.html#figure-title
|
||||
\cc => latex.html#bslash-cc-title
|
||||
\cdot => latex.html#binary-and-relational-ops-title
|
||||
\cdots => latex.html#math-miscellany-title
|
||||
\centering => latex.html#bslash-centering-title
|
||||
\chapter => latex.html#sectioning
|
||||
\check => latex.html#accents-chars-math
|
||||
\circ => latex.html#binary-and-relational-ops-title
|
||||
\circle => latex.html#bslash-circle-title
|
||||
\cite => latex.html#bslash-cite-title
|
||||
\cleardoublepage => latex.html#bslash-cleardoublepage-title
|
||||
\clearpage => latex.html#bslash-clearpage-title
|
||||
\cline => latex.html#bslash-cline-title
|
||||
\closing => latex.html#bslash-closing-title
|
||||
\clubsuit => latex.html#misc-symbols-title
|
||||
\coprod => latex.html#variable-math-size-symbols-title
|
||||
\dashbox => latex.html#bslash-dashbox-title
|
||||
\date => latex.html#bslash-date-title
|
||||
\ddot => latex.html#accents-chars-math
|
||||
\ddots => latex.html#math-miscellany-title
|
||||
\depth => latex.html#predefined-lengths-title
|
||||
\Diamond => latex.html#misc-symbols-title
|
||||
\diamondsuit => latex.html#misc-symbols-title
|
||||
\div => latex.html#binary-and-relational-ops-title
|
||||
\documentclass => latex.html#document-classes
|
||||
\dot => latex.html#accents-chars-math
|
||||
\dotfill => latex.html#bslash-dotfill-title
|
||||
\downarrow => latex.html#arrows-title
|
||||
\downarrow => latex.html#delimiters-title
|
||||
\ell => latex.html#misc-symbols-title
|
||||
\emph => latex.html#typefaces
|
||||
\encl => latex.html#bslash-encl-title
|
||||
\enlargethispage => latex.html#bslash-enlargethispage-title
|
||||
\ensuremath => latex.html#math-miscellany-title
|
||||
\equiv => latex.html#binary-and-relational-ops-title
|
||||
\exists => latex.html#misc-symbols-title
|
||||
\fbox => latex.html#bslash-fbox-title
|
||||
\fboxrule => latex.html#bslash-framebox-op-picture-cp-title
|
||||
\fboxsep => latex.html#bslash-framebox-op-picture-cp-title
|
||||
\flat => latex.html#misc-symbols-title
|
||||
\flushbottom => latex.html#bslash-flushbottom-title
|
||||
\fnsymbol => latex.html#bslash-fnsymbol-title
|
||||
\fontencoding => latex.html#low-dash-level-font-commands-title
|
||||
\fontfamily => latex.html#low-dash-level-font-commands-title
|
||||
\fontseries => latex.html#low-dash-level-font-commands-title
|
||||
\fontshape => latex.html#low-dash-level-font-commands-title
|
||||
\fontsize => latex.html#low-dash-level-font-commands-title
|
||||
\footnote => latex.html#bslash-footnote-title
|
||||
\footnotemark => latex.html#bslash-footnotemark-title
|
||||
\footnotesize => latex.html#sizes-title
|
||||
\footnotetext => latex.html#bslash-footnotetext-title
|
||||
\forall => latex.html#misc-symbols-title
|
||||
\frac => latex.html#math-miscellany-title
|
||||
\framebox => latex.html#bslash-framebox-op-picture-cp-title
|
||||
\frame => latex.html#bslash-frame-title
|
||||
\fussy => latex.html#bslash-fussy-title
|
||||
\geq => latex.html#binary-and-relational-ops-title
|
||||
\gg => latex.html#binary-and-relational-ops-title
|
||||
\graphicspath => latex-packages.html#graphicspath
|
||||
\grave => latex.html#accents-chars-math
|
||||
\hat => latex.html#accents-chars-math
|
||||
\hbar => latex.html#misc-symbols-title
|
||||
\heartsuit => latex.html#misc-symbols-title
|
||||
\height => latex.html#predefined-lengths-title
|
||||
\hfill => latex.html#bslash-hfill-title
|
||||
\hline => latex.html#bslash-hline-title
|
||||
\hrulefill => latex.html#bslash-hrulefill-title
|
||||
\hspace => latex.html#bslash-hspace-title
|
||||
\huge => latex.html#sizes-title
|
||||
\Huge => latex.html#sizes-title
|
||||
\hypersetup => latex-packages.html#hyperref
|
||||
\hyphenation => latex.html#bslash-hyphenation-title
|
||||
\imath => latex.html#misc-symbols-title
|
||||
\Im => latex.html#misc-symbols-title
|
||||
\include => latex.html#bslash-include-title
|
||||
\includegraphics => latex-packages.html#includegraphics
|
||||
\includeonly => latex.html#bslash-includeonly-title
|
||||
\indent => latex.html#bslash-indent-title
|
||||
\infty => latex.html#misc-symbols-title
|
||||
\input => latex.html#bslash-input-title
|
||||
\int => latex.html#variable-math-size-symbols-title
|
||||
\item => latex.html#enumerate-title
|
||||
\itshape => latex.html#typefaces
|
||||
\jmath => latex.html#misc-symbols-title
|
||||
\label => latex.html#bslash-label-title
|
||||
\langle => latex.html#delimiters-title
|
||||
\large => latex.html#sizes-title
|
||||
\Large => latex.html#sizes-title
|
||||
\LARGE => latex.html#sizes-title
|
||||
\ldots => latex.html#math-miscellany-title
|
||||
\leftarrow => latex.html#arrows-title
|
||||
\Leftarrow => latex.html#arrows-title
|
||||
\lefteqn => latex.html#eqnarray-title
|
||||
\leftrightarrow => latex.html#arrows-title
|
||||
\Leftrightarrow => latex.html#arrows-title
|
||||
\leq => latex.html#binary-and-relational-ops-title
|
||||
\linebreak => latex.html#bslash-linebreak-title
|
||||
\line => latex.html#bslash-line-title
|
||||
\linethickness => latex.html#bslash-linethickness-title
|
||||
\listoffigures => latex.html#table-of-contents
|
||||
\listoftables => latex.html#table-of-contents
|
||||
\ll => latex.html#binary-and-relational-ops-title
|
||||
\location => latex.html#bslash-location-title
|
||||
\longleftarrow => latex.html#arrows-title
|
||||
\Longleftarrow => latex.html#arrows-title
|
||||
\longleftrightarrow => latex.html#arrows-title
|
||||
\longrightarrow => latex.html#arrows-title
|
||||
\Longrightarrow => latex.html#arrows-title
|
||||
\makebox => latex.html#bslash-makebox-title
|
||||
\makelabels => latex.html#bslash-makelabels-title
|
||||
\maketitle => latex.html#bslash-maketitle-title
|
||||
\marginpar => latex.html#margin-notes
|
||||
\markboth => latex.html#bslash-markboth-title
|
||||
\markright => latex.html#bslash-markright-title
|
||||
\mathbf => latex.html#typefaces
|
||||
\mathcal => latex.html#typefaces
|
||||
\mathit => latex.html#typefaces
|
||||
\mathnormal => latex.html#typefaces
|
||||
\mathrm => latex.html#typefaces
|
||||
\mathsf => latex.html#typefaces
|
||||
\mathtt => latex.html#typefaces
|
||||
\mathversion => latex.html#typefaces
|
||||
\mbox => latex.html#bslash-mbox-title
|
||||
\mdseries => latex.html#typefaces
|
||||
\medskip => latex.html#bslash-medskip-title
|
||||
\mp => latex.html#binary-and-relational-ops-title
|
||||
\multicolumn => latex.html#bslash-multicolumn-title
|
||||
\multiput => latex.html#bslash-multiput-title
|
||||
\nabla => latex.html#misc-symbols-title
|
||||
\name => latex.html#bslash-name-title
|
||||
\natural => latex.html#misc-symbols-title
|
||||
\nearrow => latex.html#arrows-title
|
||||
\neq => latex.html#binary-and-relational-ops-title
|
||||
\newcommand => latex.html#bslash-newcommand-title
|
||||
\newcounter => latex.html#bslash-newcounter-title
|
||||
\newenvironment => latex.html#bslash-newenvironment-title
|
||||
\newfont => latex.html#bslash-newfont-title
|
||||
\newlength => latex.html#bslash-newlength-title
|
||||
\newline => latex.html#bslash-newline-title
|
||||
\newpage => latex.html#bslash-newpage-title
|
||||
\newsavebox => latex.html#bslash-newsavebox-title
|
||||
\newtheorem => latex.html#bslash-newtheorem-title
|
||||
\nocite => latex.html#bslash-nocite-title
|
||||
\noindent => latex.html#bslash-noindent-title
|
||||
\nolinebreak => latex.html#bslash-nolinebreak-title
|
||||
\nopagebreak => latex.html#bslash-nopagebreak-title
|
||||
\normalsize => latex.html#sizes-title
|
||||
\nwarrow => latex.html#arrows-title
|
||||
\oint => latex.html#variable-math-size-symbols-title
|
||||
\onecolumn => latex.html#bslash-onecolumn-title
|
||||
\opening => latex.html#bslash-opening-title
|
||||
\oval => latex.html#bslash-oval-title
|
||||
\overbrace => latex.html#math-miscellany-title
|
||||
\overline => latex.html#math-miscellany-title
|
||||
\pagebreak => latex.html#bslash-pagebreak-title
|
||||
\pagenumbering => latex.html#bslash-pagenumbering-title
|
||||
\pageref => latex.html#bslash-pageref-title
|
||||
\pagestyle => latex.html#bslash-pagestyle-title
|
||||
\paragraph => latex.html#sectioning
|
||||
\parbox => latex.html#bslash-parbox-title
|
||||
\par => latex.html#bslash-par-title
|
||||
\partial => latex.html#misc-symbols-title
|
||||
\part => latex.html#sectioning
|
||||
\per => latex.html#binary-and-relational-ops-title
|
||||
\pm => latex.html#binary-and-relational-ops-title
|
||||
\prime => latex.html#misc-symbols-title
|
||||
\prod => latex.html#variable-math-size-symbols-title
|
||||
\propto => latex.html#binary-and-relational-ops-title
|
||||
\ps => latex.html#bslash-ps-title
|
||||
\put => latex.html#bslash-put-title
|
||||
\put => latex.html#picture-title
|
||||
\raggedbottom => latex.html#bslash-raggedbottom-title
|
||||
\raggedleft => latex.html#bslash-raggedleft-title
|
||||
\raggedright => latex.html#bslash-raggedright-title
|
||||
\raisebox => latex.html#bslash-raisebox-title
|
||||
\rangle => latex.html#delimiters-title
|
||||
\ref => latex.html#bslash-ref-title
|
||||
\refstepcounter => latex.html#bslash-refstepcounter-title
|
||||
\Re => latex.html#misc-symbols-title
|
||||
\renewcommand => latex.html#bslash-newcommand-title
|
||||
\renewenvironment => latex.html#bslash-newenvironment-title
|
||||
\rightarrow => latex.html#arrows-title
|
||||
\Rightarrow => latex.html#arrows-title
|
||||
\rmfamily => latex.html#typefaces
|
||||
\roman => latex.html#bslash-roman-title
|
||||
\rule => latex.html#bslash-rule-title
|
||||
\samepage => latex.html#bslash-samepage-title
|
||||
\savebox => latex.html#bslash-savebox-title
|
||||
\sbox => latex.html#bslash-sbox-title
|
||||
\scriptsize => latex.html#sizes-title
|
||||
\scshape => latex.html#typefaces
|
||||
\searrow => latex.html#arrows-title
|
||||
\section => latex.html#sectioning
|
||||
\selectfont => latex.html#low-dash-level-font-commands-title
|
||||
\setcounter => latex.html#bslash-setcounter-title
|
||||
\setlength => latex.html#bslash-setlength-title
|
||||
\settodepth => latex.html#bslash-settodepth-title
|
||||
\settoheight => latex.html#bslash-settoheight-title
|
||||
\settowidth => latex.html#bslash-settowidth-title
|
||||
\sffamily => latex.html#typefaces
|
||||
\shortstack => latex.html#bslash-shortstack-title
|
||||
\signature => latex.html#bslash-signature-title
|
||||
\sim => latex.html#binary-and-relational-ops-title
|
||||
\simeq => latex.html#binary-and-relational-ops-title
|
||||
\sloppy => latex.html#bslash-sloppy-title
|
||||
\slshape => latex.html#typefaces
|
||||
\small => latex.html#sizes-title
|
||||
\smallskip => latex.html#bslash-smallskip-title
|
||||
\spadesuit => latex.html#misc-symbols-title
|
||||
\sqrt => latex.html#math-miscellany-title
|
||||
\stackrel => latex.html#arrows-title
|
||||
\star => latex.html#binary-and-relational-ops-title
|
||||
\startbreaks => latex.html#bslash-startbreaks-title
|
||||
\stepcounter => latex.html#bslash-stepcounter-title
|
||||
\stopbreaks => latex.html#bslash-stopbreaks-title
|
||||
\subparagraph => latex.html#sectioning
|
||||
\subsection => latex.html#sectioning
|
||||
\subset => latex.html#binary-and-relational-ops-title
|
||||
\subsubsection => latex.html#sectioning
|
||||
\sum => latex.html#variable-math-size-symbols-title
|
||||
\surd => latex.html#misc-symbols-title
|
||||
\swarrow => latex.html#arrows-title
|
||||
\tableofcontents => latex.html#table-of-contents
|
||||
\telephone => latex.html#bslash-telephone-title
|
||||
\textbf => latex.html#typefaces
|
||||
\textit => latex.html#typefaces
|
||||
\textmd => latex.html#typefaces
|
||||
\textnormal => latex.html#typefaces
|
||||
\textrm => latex.html#typefaces
|
||||
\textsc => latex.html#typefaces
|
||||
\textsf => latex.html#typefaces
|
||||
\textsl => latex.html#typefaces
|
||||
\texttt => latex.html#typefaces
|
||||
\textup => latex.html#typefaces
|
||||
\thanks => latex.html#bslash-thanks-title
|
||||
\thispagestyle => latex.html#bslash-thispagestyle-title
|
||||
\tilde => latex.html#accents-chars-math
|
||||
\times => latex.html#binary-and-relational-ops-title
|
||||
\tiny => latex.html#sizes-title
|
||||
\title => latex.html#bslash-title-title
|
||||
\totalheight => latex.html#predefined-lengths-title
|
||||
\triangle => latex.html#misc-symbols-title
|
||||
\ttfamily => latex.html#typefaces
|
||||
\twocolumn => latex.html#bslash-twocolumn-title
|
||||
\typein => latex.html#bslash-typein-title
|
||||
\typeout => latex.html#bslash-typeout-title
|
||||
\underbrace => latex.html#math-miscellany-title
|
||||
\underline => latex.html#math-miscellany-title
|
||||
\unitlength => latex.html#picture-title
|
||||
\uparrow => latex.html#arrows-title
|
||||
\Uparrow => latex.html#arrows-title
|
||||
\uparrow => latex.html#delimiters-title
|
||||
\updownarrow => latex.html#delimiters-title
|
||||
\upshape => latex.html#typefaces
|
||||
\usebox => latex.html#bslash-usebox-title
|
||||
\usecounter => latex.html#bslash-usecounter-title
|
||||
\usefont => latex.html#low-dash-level-font-commands-title
|
||||
\usepackage => latex.html#document-classes
|
||||
\value => latex.html#bslash-value-title
|
||||
\vdots => latex.html#math-miscellany-title
|
||||
\vec => latex.html#accents-chars-math
|
||||
\vector => latex.html#bslash-vector-title
|
||||
\verb => latex.html#bslash-verb-title
|
||||
\vert => latex.html#delimiters-title
|
||||
\Vert => latex.html#delimiters-title
|
||||
\vfill => latex.html#bslash-vfill-title
|
||||
\vline => latex.html#bslash-vline-title
|
||||
\vpageref => latex-packages.html#varioref
|
||||
\vpagerefrange => latex-packages.html#varioref
|
||||
\vref => latex-packages.html#varioref
|
||||
\vrefrange => latex-packages.html#varioref
|
||||
\vspace => latex.html#bslash-vspace-title
|
||||
\widehat => latex.html#accents-chars-math
|
||||
\widetilde => latex.html#accents-chars-math
|
||||
\width => latex.html#predefined-lengths-title
|
||||
\wp => latex.html#misc-symbols-title
|
||||
array => latex.html#array-title
|
||||
center => latex.html#center-title
|
||||
description => latex.html#description-title
|
||||
displaymath => latex.html#math-formulae
|
||||
enumerate => latex.html#enumerate-title
|
||||
eqnarray => latex.html#eqnarray-title
|
||||
equation => latex.html#equation-title
|
||||
figure => latex.html#figure-title
|
||||
flushleft => latex.html#flushleft-title
|
||||
flushright => latex.html#flushright-title
|
||||
itemize => latex.html#itemize-title
|
||||
letter => latex.html#letter-title
|
||||
list => latex.html#list-title
|
||||
lrbox => latex.html#lrbox-title
|
||||
math => latex.html#math-formulae
|
||||
minipage => latex.html#minipage-title
|
||||
picture => latex.html#picture-title
|
||||
quotation => latex.html#quotation-title
|
||||
quote => latex.html#quote-title
|
||||
tabbing => latex.html#tabbing-title
|
||||
table => latex.html#table-title
|
||||
tabular => latex.html#tabular-title
|
||||
thebibliography => latex.html#thebibliography-title
|
||||
theorem => latex.html#theorem-title
|
||||
titlepage => latex.html#titlepage-title
|
||||
verbatim => latex.html#verbatim-title
|
||||
verse => latex.html#verse-title
|
@ -0,0 +1,559 @@
|
||||
# Keys for LaTeX help (for TexLive with TeX-Refs v3.9)
|
||||
# v0.2
|
||||
# dani/2007
|
||||
#
|
||||
\acute => tex-refs.html#accents-chars-math
|
||||
\addcontentsline => tex-refs.html#cmd-addcontentsline-title
|
||||
\address => tex-refs.html#cmd-address
|
||||
\addtocontents => tex-refs.html#cmd-addtocontents-title
|
||||
\addtocounter => tex-refs.html#cmd-addtocounter
|
||||
\addtolength => tex-refs.html#cmd-addtolength
|
||||
\addvspace => tex-refs.html#cmd-addvspace
|
||||
\aleph => tex-refs.html#cmd-misc-symbol-aleph
|
||||
\alpha => tex-refs.html#greek-letters-title
|
||||
\alph => tex-refs.html#cmd-alph-title
|
||||
\angle => tex-refs.html#cmd-misc-symbol-angle
|
||||
\appendix => tex-refs.html#cmd-sectioning-appendix
|
||||
\approx => tex-refs.html#binary-and-relational-ops-title
|
||||
\aput => tex-refs.html#pstricks-attaching
|
||||
\Aput => tex-refs.html#pstricks-attaching
|
||||
\arabic => tex-refs.html#cmd-arabic-title
|
||||
\arccos => tex-refs.html#cmd-math-func-arccos
|
||||
\arcsin => tex-refs.html#cmd-math-func-arcsin
|
||||
\arctan => tex-refs.html#cmd-math-func-arctan
|
||||
array => tex-refs.html#env-array
|
||||
\arrows => tex-refs.html#hackers
|
||||
\ast => tex-refs.html#binary-and-relational-ops-title
|
||||
\author => tex-refs.html#cmd-author
|
||||
\autoref => tex-refs.html#hyperref
|
||||
\backslash => tex-refs.html#delimiters-title
|
||||
\beta => tex-refs.html#greek-letters-title
|
||||
\bibitem => tex-refs.html#cmd-bibitem
|
||||
\bibliographystyle => tex-refs.html#using-bibtex
|
||||
\bibliography => tex-refs.html#using-bibtex
|
||||
\bigcap => tex-refs.html#cmd-math-symbol-bigcap
|
||||
\bigcup => tex-refs.html#cmd-math-symbol-bigcup
|
||||
\bigodot => tex-refs.html#cmd-math-symbol-bigodot
|
||||
\bigoplus => tex-refs.html#cmd-math-symbol-bigoplus
|
||||
\bigotimes => tex-refs.html#cmd-math-symbol-bigotimes
|
||||
\bigskip => tex-refs.html#cmd-bigskip
|
||||
\biguplus => tex-refs.html#cmd-math-symbol-biguplus
|
||||
\bigvee => tex-refs.html#cmd-math-symbol-bigvee
|
||||
\bigwedge => tex-refs.html#cmd-math-symbol-bigwedge
|
||||
\bmod => tex-refs.html#cmd-math-func-bmod
|
||||
\bm => tex-refs.html#cmd-bm
|
||||
\boldsymbol => tex-refs.html#amsmath
|
||||
\Box => tex-refs.html#cmd-misc-symbol-box
|
||||
\bput => tex-refs.html#pstricks-attaching
|
||||
\Bput => tex-refs.html#pstricks-attaching
|
||||
\breve => tex-refs.html#accents-chars-math
|
||||
\bullet => tex-refs.html#binary-and-relational-ops-title
|
||||
\cc => tex-refs.html#cmd-cc
|
||||
\cdots => tex-refs.html#cmd-math-misc-cdots
|
||||
\cdots => tex-refs.html#ellipsis-title
|
||||
\cdot => tex-refs.html#binary-and-relational-ops-title
|
||||
\centering => tex-refs.html#cmd-centering
|
||||
center => tex-refs.html#env-center
|
||||
\chapter => tex-refs.html#cmd-sectioning-chapter
|
||||
\check => tex-refs.html#accents-chars-math
|
||||
\chi => tex-refs.html#greek-letters-title
|
||||
\circlenode => tex-refs.html#pstricks-nodes
|
||||
\circle => tex-refs.html#cmd-circle
|
||||
\circ => tex-refs.html#binary-and-relational-ops-title
|
||||
\cite => tex-refs.html#cmd-cite
|
||||
\cleardoublepage => tex-refs.html#cmd-cleardoublepage
|
||||
\clearpage => tex-refs.html#cmd-clearpage
|
||||
\cline => tex-refs.html#cmd-cline
|
||||
\clipbox => tex-refs.html#pstricks-clipping
|
||||
\closedshadow => tex-refs.html#safe-tricks
|
||||
\closepath => tex-refs.html#safe-tricks
|
||||
\closing => tex-refs.html#cmd-closing
|
||||
\clubsuit => tex-refs.html#cmd-misc-symbol-clubsuit
|
||||
\cnodeput => tex-refs.html#pstricks-nodes
|
||||
\cnode => tex-refs.html#pstricks-nodes
|
||||
\code => tex-refs.html#hackers
|
||||
\coor => tex-refs.html#hackers
|
||||
\coprod => tex-refs.html#cmd-math-symbol-coprod
|
||||
\cosh => tex-refs.html#cmd-math-func-cosh
|
||||
\cos => tex-refs.html#cmd-math-func-cos
|
||||
\coth => tex-refs.html#cmd-math-func-coth
|
||||
\cot => tex-refs.html#cmd-math-func-cot
|
||||
\cput => tex-refs.html#pstricks-framed
|
||||
\csc => tex-refs.html#cmd-math-func-csc
|
||||
\curveto => tex-refs.html#pretty-safe-tricks
|
||||
\dag => tex-refs.html#cmd-other-symbol-dag
|
||||
\dashbox => tex-refs.html#cmd-dashbox
|
||||
\dataplot => tex-refs.html#pstricks-plots
|
||||
\date => tex-refs.html#cmd-date
|
||||
\ddots => tex-refs.html#cmd-math-misc-ddots
|
||||
\ddots => tex-refs.html#ellipsis-title
|
||||
\ddot => tex-refs.html#accents-chars-math
|
||||
\degrees => tex-refs.html#pstricks-dimensions
|
||||
\deg => tex-refs.html#cmd-math-func-deg
|
||||
\delta => tex-refs.html#greek-letters-title
|
||||
\Delta => tex-refs.html#greek-letters-title
|
||||
\depth => tex-refs.html#cmd-length-pre-depth
|
||||
description => tex-refs.html#env-description
|
||||
\det => tex-refs.html#cmd-math-func-det
|
||||
\diamondsuit => tex-refs.html#cmd-misc-symbol-diamondsuit
|
||||
\Diamond => tex-refs.html#cmd-misc-symbol-diamond
|
||||
\dim => tex-refs.html#cmd-math-func-dim
|
||||
\dim => tex-refs.html#hackers
|
||||
\div => tex-refs.html#binary-and-relational-ops-title
|
||||
\documentclass => tex-refs.html#starting-and-ending
|
||||
\dotfill => tex-refs.html#cmd-dotfill
|
||||
\dot => tex-refs.html#accents-chars-math
|
||||
\downarrow => tex-refs.html#arrows-title
|
||||
\downarrow => tex-refs.html#delimiters-title
|
||||
\ell => tex-refs.html#cmd-misc-symbol-ell
|
||||
\emph => tex-refs.html#styles-title
|
||||
\encl => tex-refs.html#cmd-encl
|
||||
\endoverlaybox => tex-refs.html#pstricks-overlays
|
||||
\endpscharclip => tex-refs.html#pstricks-stroking
|
||||
\endpsclip => tex-refs.html#pstricks-clipping
|
||||
\endpspicture => tex-refs.html#pictures
|
||||
\endTeXtoEPS => tex-refs.html#pstricks-exporting
|
||||
\enlargethispage => tex-refs.html#cmd-enlargethispage
|
||||
\ensuremath => tex-refs.html#cmd-math-misc-ensuremath
|
||||
enumerate => tex-refs.html#env-enumerate
|
||||
\epsilon => tex-refs.html#greek-letters-title
|
||||
eqnarray => tex-refs.html#env-eqnarray
|
||||
equation => tex-refs.html#env-equation
|
||||
\equiv => tex-refs.html#binary-and-relational-ops-title
|
||||
\eta => tex-refs.html#greek-letters-title
|
||||
\everypsbox => tex-refs.html#pstricks-boxes
|
||||
\exists => tex-refs.html#cmd-misc-symbol-exists
|
||||
\exp => tex-refs.html#cmd-math-func-exp
|
||||
\fbox => tex-refs.html#cmd-fbox
|
||||
figure => tex-refs.html#env-figure
|
||||
\fileplot => tex-refs.html#pstricks-plots
|
||||
\file => tex-refs.html#hackers
|
||||
\fill => tex-refs.html#safe-tricks
|
||||
\flat => tex-refs.html#cmd-misc-symbol-flat
|
||||
\floatname => tex-refs.html#float
|
||||
\floatplacement => tex-refs.html#float
|
||||
\floatstyle => tex-refs.html#float
|
||||
\flqq => tex-refs.html#german
|
||||
\flq => tex-refs.html#german
|
||||
\flushbottom => tex-refs.html#cmd-flushbottom-title
|
||||
flushleft => tex-refs.html#env-flushleft
|
||||
flushright => tex-refs.html#env-flushright
|
||||
\fnsymbol => tex-refs.html#cmd-fnsymbol-title
|
||||
\fontencoding => tex-refs.html#low-dash-level-font-commands-title
|
||||
\fontfamily => tex-refs.html#low-dash-level-font-commands-title
|
||||
\fontseries => tex-refs.html#low-dash-level-font-commands-title
|
||||
\fontshape => tex-refs.html#low-dash-level-font-commands-title
|
||||
\fontsizep => tex-refs.html#low-dash-level-font-commands-title
|
||||
\footnotemark => tex-refs.html#cmd-footnotemark
|
||||
\footnotesize => tex-refs.html#sizes-title
|
||||
\footnote => tex-refs.html#cmd-cmd-footnote
|
||||
\footnotetext => tex-refs.html#cmd-footnotetext
|
||||
\forall => tex-refs.html#cmd-misc-symbol-forall
|
||||
\frac => tex-refs.html#cmd-math-misc-frac
|
||||
\framebox => tex-refs.html#cmd-framebox
|
||||
\framebox => tex-refs.html#cmd-framebox-op-picture-cp
|
||||
\frame => tex-refs.html#cmd-frame
|
||||
\frqq => tex-refs.html#german
|
||||
\frq => tex-refs.html#german
|
||||
\fussy => tex-refs.html#cmd-fussy
|
||||
\gamma => tex-refs.html#greek-letters-title
|
||||
\Gamma => tex-refs.html#greek-letters-title
|
||||
\gcd => tex-refs.html#cmd-math-func-gcd
|
||||
\geq => tex-refs.html#binary-and-relational-ops-title
|
||||
\gg => tex-refs.html#binary-and-relational-ops-title
|
||||
\glqq => tex-refs.html#german
|
||||
\glq => tex-refs.html#german
|
||||
\graphicspath => tex-refs.html#graphicspath
|
||||
\grave => tex-refs.html#accents-chars-math
|
||||
\grestore => tex-refs.html#safe-tricks
|
||||
\grqq => tex-refs.html#german
|
||||
\gsave => tex-refs.html#safe-tricks
|
||||
\hat => tex-refs.html#accents-chars-math
|
||||
\hbar => tex-refs.html#cmd-misc-symbol-hbar
|
||||
\heartsuit => tex-refs.html#cmd-misc-symbol-heartsuit
|
||||
\height => tex-refs.html#cmd-length-pre-height
|
||||
\hfill => tex-refs.html#cmd-hfill
|
||||
\hline => tex-refs.html#cmd-hline
|
||||
\hom => tex-refs.html#cmd-math-func-hom
|
||||
\href => tex-refs.html#hyperref
|
||||
\hrulefill => tex-refs.html#cmd-hrulefill
|
||||
\hspace => tex-refs.html#cmd-hspace
|
||||
\huge => tex-refs.html#sizes-title
|
||||
\Huge => tex-refs.html#sizes-title
|
||||
\hyertarget => tex-refs.html#hyperref
|
||||
\hyperbaseurl => tex-refs.html#hyperref
|
||||
\hyperimage => tex-refs.html#hyperref
|
||||
\hyperlink => tex-refs.html#hyperref
|
||||
\hyperref => tex-refs.html#hyperref
|
||||
\hyphenation => tex-refs.html#cmd-hyphenation
|
||||
\imath => tex-refs.html#cmd-misc-symbol-imath
|
||||
\Im => tex-refs.html#cmd-misc-symbol-im
|
||||
\includegraphics => tex-refs.html#includegraphics
|
||||
\includeonly => tex-refs.html#cmd-includeonly-title
|
||||
\include => tex-refs.html#cmd-include-title
|
||||
\indent => tex-refs.html#cmd-indent
|
||||
\inf => tex-refs.html#cmd-math-func-inf
|
||||
\infty => tex-refs.html#cmd-misc-symbol-infty
|
||||
\input => tex-refs.html#cmd-input-title
|
||||
\int => tex-refs.html#cmd-math-symbol-int
|
||||
\iota => tex-refs.html#greek-letters-title
|
||||
itemize => tex-refs.html#env-itemize
|
||||
\jmath => tex-refs.html#cmd-misc-symbol-jmath
|
||||
\kappa => tex-refs.html#greek-letters-title
|
||||
\ker => tex-refs.html#cmd-math-func-ker
|
||||
\kill => tex-refs.html#env-tabbing
|
||||
\label => tex-refs.html#cmd-label-title
|
||||
\lambda => tex-refs.html#greek-letters-title
|
||||
\Lambda => tex-refs.html#greek-letters-title
|
||||
\langle => tex-refs.html#delimiters-title
|
||||
\large => tex-refs.html#sizes-title
|
||||
\Large => tex-refs.html#sizes-title
|
||||
\LARGE => tex-refs.html#sizes-title
|
||||
\ldots => tex-refs.html#cmd-math-misc-ldots
|
||||
\ldots => tex-refs.html#ellipsis-title
|
||||
\leftarrow => tex-refs.html#arrows-title
|
||||
\Leftarrow => tex-refs.html#arrows-title
|
||||
\leftrightarrow => tex-refs.html#arrows-title
|
||||
\Leftrightarrow => tex-refs.html#arrows-title
|
||||
\leq => tex-refs.html#binary-and-relational-ops-title
|
||||
letter => tex-refs.html#env-letter
|
||||
\lg => tex-refs.html#cmd-math-func-lg
|
||||
\liminf => tex-refs.html#cmd-math-func-liminf
|
||||
\limsup => tex-refs.html#cmd-math-func-limsup
|
||||
\lim => tex-refs.html#cmd-math-func-lim
|
||||
\linebreak => tex-refs.html#cmd-linebreak
|
||||
\line => tex-refs.html#cmd-line
|
||||
\linethickness => tex-refs.html#cmd-linethickness
|
||||
\lineto => tex-refs.html#pretty-safe-tricks
|
||||
\listof => tex-refs.html#float
|
||||
\listplot => tex-refs.html#pstricks-plots
|
||||
list => tex-refs.html#env-list
|
||||
\ll => tex-refs.html#binary-and-relational-ops-title
|
||||
\ln => tex-refs.html#cmd-math-func-ln
|
||||
\location => tex-refs.html#cmd-location
|
||||
\log => tex-refs.html#cmd-math-func-log
|
||||
\longleftarrow => tex-refs.html#arrows-title
|
||||
\Longleftarrow => tex-refs.html#arrows-title
|
||||
\longleftrightarrow => tex-refs.html#arrows-title
|
||||
\longrightarrow => tex-refs.html#arrows-title
|
||||
\Longrightarrow => tex-refs.html#arrows-title
|
||||
\lput => tex-refs.html#pstricks-attaching
|
||||
lrbox => tex-refs.html#env-lrbox
|
||||
\makebox => tex-refs.html#cmd-makebox
|
||||
\makelabels => tex-refs.html#cmd-makelabels
|
||||
\maketitle => tex-refs.html#cmd-maketitle
|
||||
\markboth => tex-refs.html#cmd-markboth
|
||||
\markright => tex-refs.html#cmd-markright
|
||||
\mathbf => tex-refs.html#styles-title
|
||||
\mathcal => tex-refs.html#styles-title
|
||||
\mathit => tex-refs.html#styles-title
|
||||
\mathnormal => tex-refs.html#styles-title
|
||||
\mathrm => tex-refs.html#styles-title
|
||||
\mathtt => tex-refs.html#styles-title
|
||||
\max => tex-refs.html#cmd-math-func-max
|
||||
\mbox => tex-refs.html#cmd-mbox
|
||||
\medskip => tex-refs.html#cmd-medskip
|
||||
minipage => tex-refs.html#env-minipage
|
||||
\min => tex-refs.html#cmd-math-func-min
|
||||
\movepath => tex-refs.html#safe-tricks
|
||||
\moveto => tex-refs.html#safe-tricks
|
||||
\mp => tex-refs.html#binary-and-relational-ops-title
|
||||
\mput => tex-refs.html#pstricks-attaching
|
||||
\mrestore => tex-refs.html#safe-tricks
|
||||
\msave => tex-refs.html#safe-tricks
|
||||
\multicolumn => tex-refs.html#cmd-multicolumn
|
||||
\multips => tex-refs.html#pstricks-repetition
|
||||
\multiput => tex-refs.html#cmd-multiput
|
||||
\multirput => tex-refs.html#pstricks-repetition
|
||||
\mu => tex-refs.html#greek-letters-title
|
||||
\nabla => tex-refs.html#cmd-misc-symbol-nabla
|
||||
\name => tex-refs.html#cmd-name
|
||||
\natural => tex-refs.html#cmd-misc-symbol-natural
|
||||
\ncangles => tex-refs.html#pstricks-connections
|
||||
\ncangle => tex-refs.html#pstricks-connections
|
||||
\ncarc => tex-refs.html#pstricks-connections
|
||||
\ncbar => tex-refs.html#pstricks-connections
|
||||
\nccircle => tex-refs.html#pstricks-connections
|
||||
\nccoil => tex-refs.html#pstricks-coils
|
||||
\nccurve => tex-refs.html#pstricks-connections
|
||||
\ncdiagg => tex-refs.html#pstricks-connections
|
||||
\ncdiag => tex-refs.html#pstricks-connections
|
||||
\ncline => tex-refs.html#pstricks-connections
|
||||
\ncLine => tex-refs.html#pstricks-connections
|
||||
\ncloop => tex-refs.html#pstricks-connections
|
||||
\nczigzag => tex-refs.html#pstricks-coils
|
||||
\nearrow => tex-refs.html#arrows-title
|
||||
\neq => tex-refs.html#binary-and-relational-ops-title
|
||||
\newcmykcolor => tex-refs.html#pstricks-color
|
||||
\newcommand => tex-refs.html#cmd-newcommand-title
|
||||
\newcounter => tex-refs.html#cmd-newcounter-title
|
||||
\newenvironment => tex-refs.html#cmd-newenvironment-title
|
||||
\newfloat => tex-refs.html#float
|
||||
\newfont => tex-refs.html#cmd-newfont-title
|
||||
\newgray => tex-refs.html#pstricks-color
|
||||
\newhsbcolor => tex-refs.html#pstricks-color
|
||||
\newlength => tex-refs.html#cmd-newlength
|
||||
\newline => tex-refs.html#cmd-newline
|
||||
\newpage => tex-refs.html#cmd-newpage
|
||||
\newpath => tex-refs.html#safe-tricks
|
||||
\newpsobject => tex-refs.html#pstricks-custom
|
||||
newpsstyle => tex-refs.html#pstricks-custom
|
||||
\newrgbcolor => tex-refs.html#pstricks-color
|
||||
\newsavebox => tex-refs.html#cmd-newsavebox
|
||||
\newtheorem => tex-refs.html#cmd-newtheorem-title
|
||||
\nocite => tex-refs.html#cmd-nocite
|
||||
\noindent => tex-refs.html#cmd-noindent
|
||||
\nolinebreak => tex-refs.html#cmd-nolinebreak
|
||||
\nolinkurl => tex-refs.html#cmd-nolinkurl
|
||||
\nopagebreak => tex-refs.html#cmd-nopagebreak
|
||||
\NormalCoor => tex-refs.html#pstricks-coordinates
|
||||
\normalsize => tex-refs.html#sizes-title
|
||||
\nu => tex-refs.html#greek-letters-title
|
||||
\nwarrow => tex-refs.html#arrows-title
|
||||
\oint => tex-refs.html#cmd-math-symbol-oint
|
||||
\omega => tex-refs.html#greek-letters-title
|
||||
\Omega => tex-refs.html#greek-letters-title
|
||||
\onecolumn => tex-refs.html#cmd-onecolumn-title
|
||||
\opening => tex-refs.html#cmd-opening
|
||||
\openshadow => tex-refs.html#safe-tricks
|
||||
\ovalnode => tex-refs.html#pstricks-nodes
|
||||
\oval => tex-refs.html#cmd-oval
|
||||
\overbrace => tex-refs.html#cmd-math-misc-overbrace
|
||||
\overlaybox => tex-refs.html#pstricks-overlays
|
||||
\overline => tex-refs.html#cmd-math-misc-overline
|
||||
\pagebreak => tex-refs.html#cmd-pagebreak
|
||||
\pagenumbering => tex-refs.html#cmd-pagenumbering
|
||||
\pageref => tex-refs.html#cmd-pageref
|
||||
\pagestyle => tex-refs.html#cmd-pagestyle
|
||||
\parabola => tex-refs.html#pstricks-curves
|
||||
\paragraph => tex-refs.html#cmd-sectioning-paragraph
|
||||
\parametricplot => tex-refs.html#pstricks-plots
|
||||
\parbox => tex-refs.html#cmd-parbox
|
||||
\par => tex-refs.html#cmd-par
|
||||
\partial => tex-refs.html#cmd-misc-symbol-partial
|
||||
\part => tex-refs.html#cmd-sectioning-part
|
||||
\pcangle => tex-refs.html#pstricks-connections
|
||||
\pcarc => tex-refs.html#pstricks-connections
|
||||
\pcbar => tex-refs.html#pstricks-connections
|
||||
\pccoil => tex-refs.html#pstricks-coils
|
||||
\pccurve => tex-refs.html#pstricks-connections
|
||||
\pcdiag => tex-refs.html#pstricks-connections
|
||||
\pcline => tex-refs.html#pstricks-connections
|
||||
\pcloop => tex-refs.html#pstricks-connections
|
||||
\pczigzag => tex-refs.html#pstricks-coils
|
||||
\per => tex-refs.html#binary-and-relational-ops-title
|
||||
\phi => tex-refs.html#greek-letters-title
|
||||
\Phi => tex-refs.html#greek-letters-title
|
||||
picture => tex-refs.html#env-picture
|
||||
\pi => tex-refs.html#greek-letters-title
|
||||
\Pi => tex-refs.html#greek-letters-title
|
||||
\pmb => tex-refs.html#amsmath
|
||||
\pmod => tex-refs.html#cmd-math-func-pmod
|
||||
\pm => tex-refs.html#binary-and-relational-ops-title
|
||||
\pnode => tex-refs.html#pstricks-nodes
|
||||
\poptabs => tex-refs.html#env-tabbing
|
||||
\prime => tex-refs.html#cmd-misc-symbol-prime
|
||||
\prod => tex-refs.html#cmd-math-symbol-prod
|
||||
\propto => tex-refs.html#binary-and-relational-ops-title
|
||||
\psarcn => tex-refs.html#pstricks-arcs
|
||||
\psarc => tex-refs.html#pstricks-arcs
|
||||
\psaxes => tex-refs.html#pstricks-axes
|
||||
\psbezier => tex-refs.html#pstricks-curves
|
||||
\psccurve => tex-refs.html#pstricks-curves
|
||||
\pscharclip => tex-refs.html#pstricks-stroking
|
||||
\pscharpath => tex-refs.html#pstricks-stroking
|
||||
\pscirclebox => tex-refs.html#pstricks-framed
|
||||
\pscircle => tex-refs.html#pstricks-arcs
|
||||
\psclip => tex-refs.html#pstricks-clipping
|
||||
\pscoil => tex-refs.html#pstricks-coils
|
||||
\psCoil => tex-refs.html#pstricks-coils
|
||||
\pscurve => tex-refs.html#pstricks-curves
|
||||
\pscustom => tex-refs.html#pstricks-basics
|
||||
\psdblframebox => tex-refs.html#pstricks-framed
|
||||
\psdots => tex-refs.html#pstricks-dots
|
||||
\psecurve => tex-refs.html#pstricks-curves
|
||||
\psellipse => tex-refs.html#pstricks-arcs
|
||||
\psframebox => tex-refs.html#pstricks-framed
|
||||
\psframe => tex-refs.html#pstricks-lines
|
||||
\psgrid => tex-refs.html#pstricks-grids
|
||||
\psi => tex-refs.html#greek-letters-title
|
||||
\Psi => tex-refs.html#greek-letters-title
|
||||
\pslabelsep => tex-refs.html#placing
|
||||
\pslbrace => tex-refs.html#pstricks-tricks
|
||||
\psline => tex-refs.html#pstricks-lines
|
||||
\pslongbox => tex-refs.html#pstricks-boxes
|
||||
\psmathboxfalse => tex-refs.html#pstricks-boxes
|
||||
\psmathboxtrue => tex-refs.html#pstricks-boxes
|
||||
\psovalbox => tex-refs.html#pstricks-framed
|
||||
\psoverlay => tex-refs.html#pstricks-overlays
|
||||
\pspicture => tex-refs.html#pictures
|
||||
\psplot => tex-refs.html#pstricks-plots
|
||||
\pspolygon => tex-refs.html#pstricks-lines
|
||||
\psrbrace => tex-refs.html#pstricks-tricks
|
||||
\pssetlength => tex-refs.html#pstricks-dimensions
|
||||
\psset => tex-refs.html#pstricks-setting
|
||||
\psshadowbox => tex-refs.html#pstricks-framed
|
||||
\ps => tex-refs.html#cmd-ps
|
||||
\pstextpath => tex-refs.html#pstricks-path
|
||||
\PSTtoEPS => tex-refs.html#pstricks-exporting
|
||||
\psverbboxfalse => tex-refs.html#pstricks-boxes
|
||||
\psverbboxtrue => tex-refs.html#pstricks-boxes
|
||||
\pswedge => tex-refs.html#pstricks-arcs
|
||||
\pszigzag => tex-refs.html#pstricks-coils
|
||||
\pushtabs => tex-refs.html#env-tabbing
|
||||
\putoverlaybox => tex-refs.html#pstricks-overlays
|
||||
\put => tex-refs.html#cmd-put
|
||||
\qdisk => tex-refs.html#pstricks-arcs
|
||||
\qline => tex-refs.html#pstricks-lines
|
||||
quotation => tex-refs.html#env-quotation
|
||||
quote => tex-refs.html#env-quote
|
||||
\radians => tex-refs.html#pstricks-dimensions
|
||||
\raggedbottom => tex-refs.html#cmd-raggedbottom-title
|
||||
\raggedleft => tex-refs.html#cmd-raggedleft
|
||||
\raggedright => tex-refs.html#cmd-raggedright
|
||||
\raisebox => tex-refs.html#cmd-raisebox
|
||||
\rangle => tex-refs.html#delimiters-title
|
||||
\rcoor => tex-refs.html#hackers
|
||||
\rcurveto => tex-refs.html#pretty-safe-tricks
|
||||
\readdata => tex-refs.html#pstricks-plots
|
||||
\refstepcounter => tex-refs.html#cmd-refstepcounter-title
|
||||
\ref => tex-refs.html#cmd-ref-title
|
||||
\restylefloat => tex-refs.html#float
|
||||
\Re => tex-refs.html#cmd-misc-symbol-re
|
||||
\rho => tex-refs.html#greek-letters-title
|
||||
\rightarrow => tex-refs.html#arrows-title
|
||||
\Rightarrow => tex-refs.html#arrows-title
|
||||
\rlineto => tex-refs.html#pretty-safe-tricks
|
||||
\RnodeRef => tex-refs.html#pstricks-nodes
|
||||
\rnode => tex-refs.html#pstricks-nodes
|
||||
\Rnode => tex-refs.html#pstricks-nodes
|
||||
\rotatedown => tex-refs.html#pstricks-rotation
|
||||
\rotateleft => tex-refs.html#pstricks-rotation
|
||||
\rotateright => tex-refs.html#pstricks-rotation
|
||||
\rotate => tex-refs.html#safe-tricks
|
||||
\rput => tex-refs.html#placing
|
||||
\rule => tex-refs.html#cmd-rule
|
||||
\samepage => tex-refs.html#cmd-samepage
|
||||
\savebox => tex-refs.html#cmd-savebox
|
||||
\savedata => tex-refs.html#pstricks-plots
|
||||
\sbox => tex-refs.html#cmd-sbox
|
||||
\scalebox => tex-refs.html#pstricks-rotation
|
||||
\scaleboxto => tex-refs.html#pstricks-rotation
|
||||
\scale => tex-refs.html#safe-tricks
|
||||
\scriptsize => tex-refs.html#sizes-title
|
||||
\searrow => tex-refs.html#arrows-title
|
||||
\sec => tex-refs.html#cmd-math-func-sec
|
||||
\section => tex-refs.html#cmd-sectioning-section
|
||||
\selectfont => tex-refs.html#low-dash-level-font-commands-title
|
||||
\setcolor => tex-refs.html#hackers
|
||||
\setcounter => tex-refs.html#cmd-setcounter-title
|
||||
\setlength => tex-refs.html#cmd-setlength
|
||||
\settodepth => tex-refs.html#cmd-settodepth
|
||||
\settoheight => tex-refs.html#cmd-settoheight
|
||||
\settowidth => tex-refs.html#cmd-settowidth
|
||||
\shortstack => tex-refs.html#cmd-shortstack
|
||||
\sigma => tex-refs.html#greek-letters-title
|
||||
\Sigma => tex-refs.html#greek-letters-title
|
||||
\signature => tex-refs.html#cmd-signature
|
||||
\simeq => tex-refs.html#binary-and-relational-ops-title
|
||||
\sim => tex-refs.html#binary-and-relational-ops-title
|
||||
\sinh => tex-refs.html#cmd-math-func-sinh
|
||||
\sin => tex-refs.html#cmd-math-func-sin
|
||||
\sloppy => tex-refs.html#cmd-sloppy
|
||||
\smallskip => tex-refs.html#cmd-smallskip
|
||||
\small => tex-refs.html#sizes-title
|
||||
\spadesuit => tex-refs.html#cmd-misc-symbol-spadsuit
|
||||
\SpecialCoor => tex-refs.html#pstricks-coordinates
|
||||
\sqrt => tex-refs.html#cmd-math-misc-sqrt
|
||||
\startbreaks => tex-refs.html#cmd-startbreaks
|
||||
\star => tex-refs.html#binary-and-relational-ops-title
|
||||
\stepcounter => tex-refs.html#cmd-stepcounter-title
|
||||
\stopbreaks => tex-refs.html#cmd-stopbreaks
|
||||
\stroke => tex-refs.html#safe-tricks
|
||||
\subparagraph => tex-refs.html#cmd-sectioning-subparagraph
|
||||
\subsection => tex-refs.html#cmd-sectioning-subsection
|
||||
\subset => tex-refs.html#binary-and-relational-ops-title
|
||||
\subsubsection => tex-refs.html#cmd-sectioning-subsubsection
|
||||
\sum => tex-refs.html#cmd-math-symbol-sum
|
||||
\sup => tex-refs.html#cmd-math-func-sup
|
||||
\surd => tex-refs.html#cmd-misc-symbol-surd
|
||||
\swapaxes => tex-refs.html#safe-tricks
|
||||
\swarrow => tex-refs.html#arrows-title
|
||||
tabbing => tex-refs.html#env-tabbing
|
||||
table => tex-refs.html#env-table
|
||||
tabular => tex-refs.html#env-tabular
|
||||
\tanh => tex-refs.html#cmd-math-func-tanh
|
||||
\tan => tex-refs.html#cmd-math-func-tan
|
||||
\tau => tex-refs.html#greek-letters-title
|
||||
\telephone => tex-refs.html#cmd-telephone
|
||||
\texorpdfstring => tex-refs.html#hyperref
|
||||
\textbf => tex-refs.html#styles-title
|
||||
\textit => tex-refs.html#styles-title
|
||||
\textmd => tex-refs.html#styles-title
|
||||
\textnormal => tex-refs.html#styles-title
|
||||
\TeXtoEPS => tex-refs.html#pstricks-exporting
|
||||
\textrm => tex-refs.html#styles-title
|
||||
\textsc => tex-refs.html#styles-title
|
||||
\textsf => tex-refs.html#styles-title
|
||||
\textsl => tex-refs.html#styles-title
|
||||
\texttt => tex-refs.html#styles-title
|
||||
\textup => tex-refs.html#styles-title
|
||||
\thanks => tex-refs.html#cmd-thanks
|
||||
thebibliography => tex-refs.html#env-thebibliography
|
||||
theorem => tex-refs.html#env-theorem
|
||||
\theta => tex-refs.html#greek-letters-title
|
||||
\Theta => tex-refs.html#greek-letters-title
|
||||
\thispagestyle => tex-refs.html#cmd-thispagestyle
|
||||
\tilde => tex-refs.html#accents-chars-math
|
||||
\times => tex-refs.html#binary-and-relational-ops-title
|
||||
\tiny => tex-refs.html#sizes-title
|
||||
titlepage => tex-refs.html#env-titlepage
|
||||
\title => tex-refs.html#cmd-title
|
||||
\totalheight => tex-refs.html#cmd-length-pre-totalheight
|
||||
\translate => tex-refs.html#safe-tricks
|
||||
\triangle => tex-refs.html#cmd-misc-symbol-triangle
|
||||
\twocolumn => tex-refs.html#cmd-twocolumn-title
|
||||
\typein => tex-refs.html#cmd-typein-title
|
||||
\typeout => tex-refs.html#cmd-typeout-title
|
||||
\underbrace => tex-refs.html#cmd-math-misc-underbrace
|
||||
\underline => tex-refs.html#cmd-math-misc-underline
|
||||
\uparrow => tex-refs.html#arrows-title
|
||||
\Uparrow => tex-refs.html#arrows-title
|
||||
\uparrow => tex-refs.html#delimiters-title
|
||||
\updownarrow => tex-refs.html#delimiters-title
|
||||
\upsilon => tex-refs.html#greek-letters-title
|
||||
\Upsilon => tex-refs.html#greek-letters-title
|
||||
\uput => tex-refs.html#placing
|
||||
\usebox => tex-refs.html#cmd-usebox
|
||||
\usecounter => tex-refs.html#cmd-usecounter-title
|
||||
\usepackage => tex-refs.html#usepackage-linkend
|
||||
\value => tex-refs.html#cmd-value-title
|
||||
\varepsilon => tex-refs.html#greek-letters-title
|
||||
\varphi => tex-refs.html#greek-letters-title
|
||||
\varpi => tex-refs.html#greek-letters-title
|
||||
\varrho => tex-refs.html#greek-letters-title
|
||||
\varsigma => tex-refs.html#greek-letters-title
|
||||
\vartheta => tex-refs.html#greek-letters-title
|
||||
\vdots => tex-refs.html#cmd-math-misc-vdots
|
||||
\vdots => tex-refs.html#ellipsis-title
|
||||
\vec => tex-refs.html#accents-chars-math
|
||||
\vector => tex-refs.html#cmd-vector
|
||||
verbatim => tex-refs.html#env-verbatim
|
||||
\verb => tex-refs.html#cmd-verb
|
||||
verse => tex-refs.html#env-verse
|
||||
\vert => tex-refs.html#delimiters-title
|
||||
\Vert => tex-refs.html#delimiters-title
|
||||
\vfill => tex-refs.html#cmd-vfill
|
||||
\vline => tex-refs.html#cmd-vline
|
||||
\vpagerefrange => tex-refs.html#varioref
|
||||
\vpageref => tex-refs.html#cmd-vpageref
|
||||
\vrefrange => tex-refs.html#varioref
|
||||
\vref => tex-refs.html#cmd-vref
|
||||
\vspace => tex-refs.html#cmd-vspace
|
||||
\widehat => tex-refs.html#accents-chars-math
|
||||
\widetilde => tex-refs.html#accents-chars-math
|
||||
\width => tex-refs.html#cmd-length-pre-width
|
||||
\wp => tex-refs.html#cmd-misc-symbol-wp
|
||||
\xi => tex-refs.html#greek-letters-title
|
||||
\Xi => tex-refs.html#greek-letters-title
|
||||
\zeta => tex-refs.html#greek-letters-title
|
@ -0,0 +1,178 @@
|
||||
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
|
||||
<class>KileWidgetHelpConfig</class>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>KileWidgetHelpConfig</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>436</width>
|
||||
<height>309</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="caption">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>m_lbLocation</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Location of TeX documentation:</string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>kcfg_location</cstring>
|
||||
</property>
|
||||
<property name="whatsThis" stdset="0">
|
||||
<string>Insert the path to the TeX documentation directory here. For example /usr/share/texmf/doc.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>kcfg_location</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>kcfg_use</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Context Sensitive Help</string>
|
||||
</property>
|
||||
<widget class="QRadioButton">
|
||||
<property name="name">
|
||||
<cstring>m_rbTeTeX</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>59</y>
|
||||
<width>358</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use your system's &TeX documentation</string>
|
||||
</property>
|
||||
<property name="buttonGroupId">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton">
|
||||
<property name="name">
|
||||
<cstring>m_rbKileRef</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>27</y>
|
||||
<width>358</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use the &Kile LaTeX reference</string>
|
||||
</property>
|
||||
<property name="buttonGroupId">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2">
|
||||
<property name="name">
|
||||
<cstring>kcfg_embedded</cstring>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>User Help</string>
|
||||
</property>
|
||||
<widget class="QRadioButton">
|
||||
<property name="name">
|
||||
<cstring>m_rbEmbedded</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<width>358</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use &embedded viewer</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton">
|
||||
<property name="name">
|
||||
<cstring>m_rbExternal</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>110</y>
|
||||
<width>401</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show help file in a &separate window</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton">
|
||||
<property name="name">
|
||||
<cstring>m_pbConfigure</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>130</width>
|
||||
<height>34</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Con&figure...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
</customwidgets>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>m_pbConfigure</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>KileWidgetHelpConfig</receiver>
|
||||
<slot>slotConfigure()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">kilehelp.h</include>
|
||||
<include location="local" impldecl="in implementation">helpconfigwidget.ui.h</include>
|
||||
</includes>
|
||||
<forwards>
|
||||
<forward>namespace KileHelp { class Help; } class avoid_compile_error</forward>
|
||||
</forwards>
|
||||
<variables>
|
||||
<variable access="private">KileHelp::Help *m_help;</variable>
|
||||
</variables>
|
||||
<slots>
|
||||
<slot access="private" specifier="nicht virtual">slotConfigure()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function specifier="non virtual">setHelp( KileHelp::Help * help )</function>
|
||||
</functions>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<includehints>
|
||||
<includehint>klineedit.h</includehint>
|
||||
</includehints>
|
||||
</UI>
|
@ -0,0 +1,23 @@
|
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation.
|
||||
**
|
||||
** If you want to add, delete, or rename functions or slots, use
|
||||
** Qt Designer to update this file, preserving your code.
|
||||
**
|
||||
** You should not define a constructor or destructor in this file.
|
||||
** Instead, write your code in functions called init() and destroy().
|
||||
** These will automatically be called by the form's constructor and
|
||||
** destructor.
|
||||
*****************************************************************************/
|
||||
|
||||
void KileWidgetHelpConfig::slotConfigure()
|
||||
{
|
||||
m_help->userHelpDialog();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void KileWidgetHelpConfig::setHelp( KileHelp::Help *help )
|
||||
{
|
||||
m_help = help;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
ADD_SUBDIRECTORY( actions )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
|
||||
|
||||
INCLUDE(KDE3Macros)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
|
||||
KDE3_INSTALL_ICONS( hicolor )
|
||||
|
@ -0,0 +1,2 @@
|
||||
SUBDIRS=actions
|
||||
KDE_ICON = AUTO
|
@ -0,0 +1,11 @@
|
||||
INCLUDE(KDE3Macros)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
|
||||
KDE3_INSTALL_ICONS( hicolor )
|
||||
|
||||
#original Makefile.am contents follow:
|
||||
|
||||
#kileiconsdir = $(kde_datadir)/kile/icons
|
||||
#kileicons_ICON = AUTO
|
@ -0,0 +1,2 @@
|
||||
kileiconsdir = $(kde_datadir)/kile/icons
|
||||
kileicons_ICON = AUTO
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,531 @@
|
||||
/***************************************************************************
|
||||
date : Dec 06 2005
|
||||
version : 0.24
|
||||
copyright : (C) 2004-2005 by Holger Danielsson, 2004 Jeroen Wijnhout
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "includegraphicsdialog.h"
|
||||
|
||||
#include <qregexp.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qvgroupbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kmessagebox.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kpushbutton.h>
|
||||
#include <kprocess.h>
|
||||
#include <klineedit.h>
|
||||
|
||||
#include "kileconfig.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileedit.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
|
||||
IncludeGraphics::IncludeGraphics(QWidget *parent, const QString &startdir, KileInfo *ki) :
|
||||
KDialogBase( Plain, i18n("Include Graphics"), Ok | Cancel, Ok, parent, 0, true, true),
|
||||
m_startdir(startdir),
|
||||
m_width(0),
|
||||
m_height(0),
|
||||
m_ki(ki),
|
||||
m_proc(0)
|
||||
{
|
||||
// Layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout(plainPage(), 6,6 );
|
||||
|
||||
// first groupbox: choose picture
|
||||
QVGroupBox* group= new QVGroupBox(i18n("File"), plainPage());
|
||||
|
||||
QWidget *widget = new QWidget(group);
|
||||
QGridLayout *grid = new QGridLayout( widget, 4,3, 6,6, "");
|
||||
grid->addRowSpacing( 0, fontMetrics().lineSpacing() );
|
||||
grid->addColSpacing( 0, fontMetrics().lineSpacing() );
|
||||
grid->setColStretch(1,1);
|
||||
|
||||
// line 1: QLabel
|
||||
QLabel *label1 = new QLabel(i18n("Picture:"), widget);
|
||||
grid->addWidget( label1, 0,0 );
|
||||
|
||||
// line 1: KLineEdit
|
||||
edit_file = new KLineEdit("",widget);
|
||||
edit_file->setMinimumWidth(300);
|
||||
grid->addWidget( edit_file, 0,1 );
|
||||
|
||||
// line 1: Choose-Box
|
||||
KPushButton *pb_choose = new KPushButton("", widget, "filechooser_button" );
|
||||
pb_choose->setPixmap( SmallIcon("fileopen") );
|
||||
|
||||
pb_choose->setFixedWidth(pb_choose->sizeHint().width()); // set width
|
||||
grid->addRowSpacing( 0, pb_choose->sizeHint().height()+5 ); // update height of line
|
||||
grid->addWidget(pb_choose,0,2);
|
||||
|
||||
// line 2: some (more or less useful) information
|
||||
QLabel *label2 = new QLabel(i18n("Info:"), widget);
|
||||
infolabel = new QLabel("---", widget);
|
||||
|
||||
grid->addWidget( label2, 1,0 );
|
||||
grid->addWidget( infolabel, 1,1 );
|
||||
|
||||
// line 3: some output options
|
||||
QLabel *label3 = new QLabel(i18n("Output:"), widget);
|
||||
|
||||
QWidget *cb_widget = new QWidget(widget);
|
||||
QGridLayout *cb_grid = new QGridLayout( cb_widget, 1,2, 0,0,"");
|
||||
cb_center = new QCheckBox(i18n("Center picture"),cb_widget);
|
||||
cb_pdftex = new QCheckBox(i18n("pdftex/pdflatex"),cb_widget);
|
||||
cb_grid->addWidget(cb_center,0,0);
|
||||
cb_grid->addWidget(cb_pdftex,0,1);
|
||||
|
||||
grid->addWidget( label3, 2,0 );
|
||||
grid->addWidget( cb_widget, 2,1 );
|
||||
|
||||
// line 4: graphics path
|
||||
QLabel *label5 = new QLabel(i18n("Path:"), widget);
|
||||
cb_graphicspath = new QCheckBox(i18n("Use \\graphicspath command of LaTeX"),widget);
|
||||
|
||||
grid->addWidget( label5, 3,0 );
|
||||
grid->addWidget( cb_graphicspath, 3,1 );
|
||||
|
||||
// second groupbox: options
|
||||
QVGroupBox* gb_opt= new QVGroupBox(i18n("Options"), plainPage());
|
||||
QWidget *widget_opt = new QWidget(gb_opt);
|
||||
QGridLayout *grid_opt = new QGridLayout( widget_opt, 2,4, 6,6, "");
|
||||
|
||||
QLabel *label7 = new QLabel(i18n("Width:"), widget_opt);
|
||||
QLabel *label8 = new QLabel(i18n("Height:"),widget_opt);
|
||||
QLabel *label9 = new QLabel(i18n("Angle:"), widget_opt);
|
||||
QLabel *label10= new QLabel(i18n("Bounding box:"), widget_opt);
|
||||
edit_width = new KLineEdit("",widget_opt);
|
||||
edit_height = new KLineEdit("",widget_opt);
|
||||
edit_angle = new KLineEdit("",widget_opt);
|
||||
edit_bb = new KLineEdit("",widget_opt);
|
||||
|
||||
grid_opt->addWidget( label7, 0,0, Qt::AlignRight );
|
||||
grid_opt->addWidget( edit_width, 0,1 );
|
||||
grid_opt->addWidget( label9, 0,2, Qt::AlignRight );
|
||||
grid_opt->addWidget( edit_angle, 0,3 );
|
||||
|
||||
grid_opt->addWidget( label8, 1,0, Qt::AlignRight );
|
||||
grid_opt->addWidget( edit_height, 1,1 );
|
||||
grid_opt->addWidget( label10, 1,2, Qt::AlignRight );
|
||||
grid_opt->addWidget( edit_bb, 1,3 );
|
||||
|
||||
// third groupbox: figure environment
|
||||
QGroupBox *gb_fig= new QGroupBox(2,Qt::Horizontal,i18n("Figure Environment"), plainPage());
|
||||
QWidget *widget_fig = new QWidget(gb_fig);
|
||||
QGridLayout *grid_fig = new QGridLayout( widget_fig, 3,2, 6,6, "");
|
||||
|
||||
QLabel *label4 = new QLabel(i18n("Figure:"), widget_fig);
|
||||
lb_label = new QLabel(i18n("Label:"), widget_fig);
|
||||
lb_caption = new QLabel(i18n("Caption:"), widget_fig);
|
||||
cb_figure = new QCheckBox(i18n("Use figure environment"),widget_fig);
|
||||
edit_label = new KLineEdit("fig:",widget_fig);
|
||||
edit_caption = new KLineEdit("",widget_fig);
|
||||
|
||||
grid_fig->addWidget( label4,0,0);
|
||||
grid_fig->addWidget( cb_figure, 0,1);
|
||||
grid_fig->addWidget( lb_label,1,0);
|
||||
grid_fig->addWidget( edit_label, 1,1);
|
||||
grid_fig->addWidget( lb_caption,2,0);
|
||||
grid_fig->addWidget( edit_caption, 2,1);
|
||||
|
||||
// add to layout
|
||||
vbox->addWidget(group);
|
||||
vbox->addWidget(gb_opt);
|
||||
vbox->addWidget(gb_fig);
|
||||
vbox->addStretch();
|
||||
|
||||
// read configuration
|
||||
readConfig();
|
||||
updateFigure();
|
||||
|
||||
// connect
|
||||
connect( pb_choose, SIGNAL( clicked() ), this, SLOT( chooseFile() ) );
|
||||
connect( cb_figure, SIGNAL(clicked()), this, SLOT(updateFigure() ) );
|
||||
|
||||
setFocusProxy( edit_file );
|
||||
}
|
||||
|
||||
IncludeGraphics::~IncludeGraphics()
|
||||
{
|
||||
delete m_proc;
|
||||
}
|
||||
|
||||
////////////////////////////// configuration data //////////////////////////////
|
||||
|
||||
void IncludeGraphics::readConfig()
|
||||
{
|
||||
cb_center->setChecked( KileConfig::igCenter() );
|
||||
cb_pdftex->setChecked( KileConfig::igPdftex() );
|
||||
cb_graphicspath->setChecked( KileConfig::igGraphicspath() );
|
||||
cb_figure->setChecked( KileConfig::igFigure() );
|
||||
|
||||
m_imagemagick = KileConfig::imagemagick();
|
||||
m_boundingbox = KileConfig::boundingbox();
|
||||
m_defaultresolution = KileConfig::resolution();
|
||||
}
|
||||
|
||||
void IncludeGraphics::writeConfig()
|
||||
{
|
||||
KileConfig::setIgCenter( cb_center->isChecked() );
|
||||
KileConfig::setIgPdftex( cb_pdftex->isChecked() );
|
||||
KileConfig::setIgGraphicspath( cb_graphicspath->isChecked() );
|
||||
KileConfig::setIgFigure( cb_figure->isChecked() );
|
||||
}
|
||||
|
||||
////////////////////////////// update figure environment //////////////////////////////
|
||||
|
||||
void IncludeGraphics::updateFigure()
|
||||
{
|
||||
bool state = cb_figure->isChecked();
|
||||
|
||||
lb_label->setEnabled(state);
|
||||
lb_caption->setEnabled(state);
|
||||
edit_label->setEnabled(state);
|
||||
edit_caption->setEnabled(state);
|
||||
}
|
||||
|
||||
////////////////////////////// determine the whole tag //////////////////////////////
|
||||
|
||||
QString IncludeGraphics::getTemplate()
|
||||
{
|
||||
QString s;
|
||||
|
||||
// state of figure and center checkbox
|
||||
bool figure = cb_figure->isChecked();
|
||||
bool center = cb_center->isChecked();
|
||||
QString indent = ( figure || center ) ? m_ki->editorExtension()->autoIndentEnvironment() : QString::null;
|
||||
|
||||
// add start of figure environment ?
|
||||
if ( figure )
|
||||
s += "\\begin{figure}\n";
|
||||
|
||||
// add start of center environment ?
|
||||
if ( center )
|
||||
{
|
||||
if ( figure )
|
||||
s += indent + "\\centering\n";
|
||||
else
|
||||
s += "\\begin{center}\n";
|
||||
}
|
||||
|
||||
// add includegraphics command
|
||||
s += indent + "\\includegraphics";
|
||||
|
||||
// add some options
|
||||
QString options = getOptions();
|
||||
if ( !options.isEmpty() )
|
||||
s += '[' + options + ']';
|
||||
|
||||
// add name of picture
|
||||
// either take the filename or try to take the relative part of the name
|
||||
QString filename = ( cb_graphicspath->isChecked() )
|
||||
? QFileInfo(edit_file->text()).fileName()
|
||||
: m_ki->relativePath(QFileInfo(m_ki->getCompileName()).dirPath(), edit_file->text());
|
||||
s += '{' + filename + "}\n";
|
||||
|
||||
// add some comments (depending of given resolution, this may be wrong!)
|
||||
QString info = getInfo();
|
||||
if (info.length() > 0)
|
||||
s += indent + info + '\n';
|
||||
|
||||
// close center environment ?
|
||||
if ( center && !figure )
|
||||
s += "\\end{center}\n";
|
||||
|
||||
// close figure environment ?
|
||||
if ( figure )
|
||||
{
|
||||
QString caption = edit_caption->text().stripWhiteSpace();
|
||||
if ( !caption.isEmpty() )
|
||||
s += indent + "\\caption{" + caption + "}\n";
|
||||
QString label = edit_label->text().stripWhiteSpace();
|
||||
if ( !label.isEmpty() && label!="fig:" )
|
||||
s += indent + "\\label{" + label + "}\n";
|
||||
s += "\\end{figure}\n";
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
QString IncludeGraphics::getFilename()
|
||||
{
|
||||
return edit_file->text();
|
||||
}
|
||||
|
||||
////////////////////////////// some calculations //////////////////////////////
|
||||
|
||||
QString IncludeGraphics::getOptions()
|
||||
{
|
||||
QString s = "";
|
||||
|
||||
if ( ! edit_width->text().isEmpty() )
|
||||
s += ",width=" + edit_width->text();
|
||||
|
||||
if ( ! edit_height->text().isEmpty() )
|
||||
s += ",height=" + edit_height->text();
|
||||
|
||||
if ( ! edit_angle->text().isEmpty() )
|
||||
s += ",angle=" + edit_angle->text();
|
||||
|
||||
// Only dvips needs the bounding box, not pdftex/pdflatex.
|
||||
// But it will be always inserted as a comment.
|
||||
if ( !edit_bb->text().isEmpty() && !cb_pdftex->isChecked() )
|
||||
s += ",bb=" + edit_bb->text();
|
||||
|
||||
if ( s.left(1) == "," )
|
||||
return s.right(s.length()-1);
|
||||
else
|
||||
return s;
|
||||
}
|
||||
|
||||
////////////////////////////// graphics info //////////////////////////////
|
||||
|
||||
QString IncludeGraphics::getInfo()
|
||||
{
|
||||
QString wcm,hcm,dpi;
|
||||
int wpx=0,hpx=0;
|
||||
|
||||
bool ok = getPictureSize(wpx,hpx,dpi,wcm,hcm);
|
||||
if ( ! ok )
|
||||
return "";
|
||||
else
|
||||
{
|
||||
QFileInfo fi( edit_file->text() );
|
||||
|
||||
return "% " + fi.baseName() + '.' + fi.extension(true)
|
||||
+ QString(": %1x%2 pixel").arg(wpx).arg(hpx)
|
||||
+ ", " + dpi + "dpi"
|
||||
+ ", " + wcm + 'x' + hcm + " cm"
|
||||
+ ", bb=" + edit_bb->text();
|
||||
}
|
||||
}
|
||||
|
||||
void IncludeGraphics::setInfo()
|
||||
{
|
||||
QString text;
|
||||
QString wcm,hcm,dpi;
|
||||
int wpx,hpx;
|
||||
|
||||
if ( !edit_file->text().isEmpty() && getPictureSize(wpx,hpx,dpi,wcm,hcm) )
|
||||
{
|
||||
text = QString("%1x%2 pixel").arg(wpx).arg(hpx)
|
||||
+ " / " + wcm + 'x' + hcm + " cm"
|
||||
+ " (" + dpi + "dpi)";
|
||||
}
|
||||
else
|
||||
text = "---";
|
||||
|
||||
// insert text
|
||||
infolabel->setText(text);
|
||||
}
|
||||
|
||||
bool IncludeGraphics::getPictureSize(int &wpx, int &hpx, QString &dpi, QString &wcm, QString &hcm)
|
||||
{
|
||||
wpx = m_width;
|
||||
hpx = m_height;
|
||||
|
||||
dpi = QString("%1").arg((int)(m_resolution+0.5));
|
||||
|
||||
// convert from inch to cm
|
||||
float w = (float)m_width / m_resolution * 2.54;
|
||||
wcm = wcm.setNum(w,'f',2);
|
||||
|
||||
float h = (float)m_height / m_resolution * 2.54;
|
||||
hcm = hcm.setNum(h,'f',2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void IncludeGraphics::chooseFile()
|
||||
{
|
||||
QString filter = ( cb_pdftex->isChecked() )
|
||||
? i18n("*.png *.jpg *.pdf|Graphics\n") // dani 31.7.2004
|
||||
+ "*.png|PNG Files\n"
|
||||
+ "*.jpg|JPG Files\n"
|
||||
+ "*.pdf|PDF Files\n"
|
||||
+ "*|All Files"
|
||||
: i18n("*.png *.jpg *.eps.gz *.eps|Graphics\n") // dani 31.7.2004
|
||||
+ "*.png|PNG Files\n"
|
||||
+ "*.jpg|JPG Files\n"
|
||||
+ "*.eps.gz|Zipped EPS Files\n"
|
||||
+ "*.eps|EPS Files\n"
|
||||
+ "*|All Files";
|
||||
|
||||
QString fn = KFileDialog::getOpenFileName( m_startdir,filter,
|
||||
this,i18n("Select File") );
|
||||
QFileInfo fi(fn);
|
||||
// insert the chosen file
|
||||
edit_file->setText( fn );
|
||||
|
||||
// could we accept the picture?
|
||||
if ( !fn.isEmpty() && fi.exists() && fi.isReadable() )
|
||||
{
|
||||
// execute the command and filter the result:
|
||||
// eps|eps.gz --> %%BoundingBox: 0 0 123 456
|
||||
// bitmaps --> w=123 h=456 dpi=789
|
||||
QString grep = " | grep -m1 \"^%%BoundingBox:\"";
|
||||
QString ext = QFileInfo(fn).extension();
|
||||
if ( ext == "eps" )
|
||||
execute( "cat " + fn + grep);
|
||||
else if ( ext == "eps.gz" )
|
||||
execute( "gunzip -c " + fn + grep);
|
||||
else
|
||||
execute("identify -format \"w=%w h=%h dpi=%x\" \"" + fn + "\"");
|
||||
}
|
||||
else{
|
||||
KILE_DEBUG() << "=== IncludeGraphics::error ====================" << endl;
|
||||
KILE_DEBUG() << " filename: '" << fn << "'" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void IncludeGraphics::execute(const QString &command)
|
||||
{
|
||||
if ( !m_boundingbox || (!m_imagemagick && command.left(8)=="identify") )
|
||||
return;
|
||||
|
||||
if(m_proc)
|
||||
delete m_proc;
|
||||
|
||||
m_proc = new KShellProcess("/bin/sh");
|
||||
m_proc->clearArguments();
|
||||
(*m_proc) << QStringList::split(' ',command);
|
||||
|
||||
connect(m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)),
|
||||
this, SLOT(slotProcessOutput(KProcess*,char*,int)) );
|
||||
connect(m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)),
|
||||
this, SLOT(slotProcessOutput(KProcess*,char*,int)) );
|
||||
connect(m_proc, SIGNAL(processExited(KProcess*)),
|
||||
this, SLOT(slotProcessExited(KProcess*)) );
|
||||
|
||||
m_output = "";
|
||||
KILE_DEBUG() << "=== IncludeGraphics::execute ====================" << endl;
|
||||
KILE_DEBUG() << " execute '" << command << "'" << endl;
|
||||
|
||||
m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
|
||||
}
|
||||
|
||||
// get all output of identify
|
||||
|
||||
void IncludeGraphics::slotProcessOutput(KProcess*,char* buffer,int buflen)
|
||||
{
|
||||
m_output += QString::fromLocal8Bit(buffer,buflen);
|
||||
}
|
||||
|
||||
// identify was called
|
||||
|
||||
void IncludeGraphics::slotProcessExited(KProcess* proc)
|
||||
{
|
||||
if ( proc->normalExit() && !proc->exitStatus() ) {
|
||||
KILE_DEBUG() << " result: " << m_output << endl;
|
||||
|
||||
// set the default resolution
|
||||
m_resolution = m_defaultresolution;
|
||||
|
||||
// analyze the result
|
||||
if ( m_output.left(14) == "%%BoundingBox:" )
|
||||
{
|
||||
edit_bb->setText( m_output.stripWhiteSpace().mid(15,m_output.length()-15) );
|
||||
|
||||
// show information
|
||||
setInfo();
|
||||
}
|
||||
else if ( m_output.left(2) == "w=" )
|
||||
{
|
||||
// dani 31.7.2004
|
||||
// older version of imagemagick (pre 6.0):
|
||||
// - doesn't care of PixelsPerCentimeter, but always works with PixelsPerInch
|
||||
// - doesn't use floating numbers as resolution
|
||||
// so the bounding box has to be calculated in a different way
|
||||
|
||||
// this regexp will accept floating point numbers as resolution
|
||||
QRegExp reg("w=(\\d+)\\s+h=(\\d+)\\s+dpi=([0-9.]+) (.*)");
|
||||
if ( reg.search(m_output) == -1 )
|
||||
return;
|
||||
|
||||
// get bounding box and resolution
|
||||
bool ok;
|
||||
m_width = (int)reg.cap(1).toInt( &ok);
|
||||
if (!ok) return;
|
||||
|
||||
m_height = (int)reg.cap(2).toInt( &ok);
|
||||
if (!ok) return;
|
||||
|
||||
float res = (float)reg.cap(3).toFloat( &ok);
|
||||
if (!ok) return;
|
||||
if ( res > 0.0 )
|
||||
m_resolution = res;
|
||||
|
||||
// look, if resolution is in PixelsPerCentimeter
|
||||
if ( reg.cap(4).stripWhiteSpace() == "PixelsPerCentimeter" )
|
||||
m_resolution *= 2.54;
|
||||
|
||||
// calc the bounding box
|
||||
int bbw = (int)( (float)m_width*72.0/m_resolution + 0.5 );
|
||||
int bbh = (int)( (float)m_height*72.0/m_resolution + 0.5 );
|
||||
|
||||
// take width and height as parameters for the bounding box
|
||||
edit_bb->setText( QString("0 0 ") + QString("%1").arg(bbw)
|
||||
+ ' '
|
||||
+ QString("%1").arg(bbh)
|
||||
);
|
||||
|
||||
// show information
|
||||
setInfo();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IncludeGraphics::slotOk()
|
||||
{
|
||||
if ( checkParameter() ) {
|
||||
writeConfig();
|
||||
accept();
|
||||
}
|
||||
}
|
||||
|
||||
bool IncludeGraphics::checkParameter()
|
||||
{
|
||||
QString filename = edit_file->text().stripWhiteSpace();
|
||||
edit_file->setText(filename);
|
||||
|
||||
if ( filename.isEmpty() )
|
||||
{
|
||||
if ( KMessageBox::warningYesNo( this, i18n("No graphics file was given. Proceed any way?") ) == KMessageBox::No ) return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QFileInfo fi( filename );
|
||||
if ( ! fi.exists() )
|
||||
{
|
||||
if ( KMessageBox::warningYesNo( this, i18n("The graphics file does not exist. Proceed any way?") ) == KMessageBox::No ) return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "includegraphicsdialog.moc"
|
||||
|
@ -0,0 +1,93 @@
|
||||
/***************************************************************************
|
||||
date : Nov 02 2005
|
||||
version : 0.23
|
||||
copyright : (C) 2004-2005 by Holger Danielsson, 2004 Jeroen Wijnhout
|
||||
email : holger.danielsson@t-online.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef INCLUDEGRAPHICSDIALOG_H
|
||||
#define INCLUDEGRAPHICSDIALOG_H
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#include <kdialogbase.h>
|
||||
|
||||
/**
|
||||
*@author dani
|
||||
*/
|
||||
|
||||
class QLabel;
|
||||
class QCheckBox;
|
||||
|
||||
class KileInfo;
|
||||
class KLineEdit;
|
||||
class KProcess;
|
||||
class KShellProcess;
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
|
||||
class IncludeGraphics : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IncludeGraphics(QWidget *parent,const QString &startdir,KileInfo *ki);
|
||||
~IncludeGraphics();
|
||||
|
||||
QString getTemplate();
|
||||
QString getFilename();
|
||||
|
||||
private slots:
|
||||
void chooseFile();
|
||||
void updateFigure();
|
||||
|
||||
void slotProcessOutput(KProcess* proc,char* buffer,int buflen);
|
||||
void slotProcessExited(KProcess* proc);
|
||||
|
||||
void slotOk();
|
||||
|
||||
private:
|
||||
void readConfig();
|
||||
void writeConfig();
|
||||
bool checkParameter();
|
||||
QString getOptions();
|
||||
QString getInfo();
|
||||
bool getPictureSize(int &wpx, int &hpx, QString &dpi, QString &wcm, QString &hcm);
|
||||
void setInfo();
|
||||
|
||||
QLabel *infolabel;
|
||||
KLineEdit *edit_file, *edit_label, *edit_caption, *edit_width, *edit_height, *edit_angle, *edit_bb;
|
||||
QCheckBox *cb_center, *cb_pdftex, *cb_figure, *cb_graphicspath;
|
||||
QLabel *lb_label, *lb_caption;
|
||||
|
||||
QString m_startdir;
|
||||
QString m_output;
|
||||
|
||||
// current picture
|
||||
int m_width,m_height;
|
||||
float m_resolution;
|
||||
|
||||
// default
|
||||
bool m_imagemagick;
|
||||
bool m_boundingbox;
|
||||
float m_defaultresolution;
|
||||
|
||||
void execute(const QString &command);
|
||||
|
||||
KileInfo *m_ki;
|
||||
KShellProcess* m_proc;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,60 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test if all possible environments/commands are grabbed for mathpreview
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
1234$ \sqrt{2}$ $a^2$
|
||||
|
||||
$ \$ % \( % \[ $$$$
|
||||
\begin{array}{ccc}
|
||||
x^2 & y^2 & z^2
|
||||
\end{array}
|
||||
$
|
||||
|
||||
\begin{equation}
|
||||
% \begin{equation} $
|
||||
a^2 \\\\\$
|
||||
\begin{array}{ccc}
|
||||
\alpha & \beta & \gamma
|
||||
\end{array}
|
||||
\end{equation}
|
||||
|
||||
$\begin{array}{ccc}
|
||||
a^2 & b^2 & c^2
|
||||
\end{array}$
|
||||
|
||||
\[
|
||||
a^2
|
||||
\] \$ $ x^2$
|
||||
|
||||
\(
|
||||
b^2 % $ test $
|
||||
\)
|
||||
|
||||
\begin{displaymath}
|
||||
\alpha + \beta + \gamma = 180° % comment
|
||||
\end{displaymath}
|
||||
|
||||
\begin{math}
|
||||
\alpha + \beta + \gamma = 180° % comment
|
||||
\end{math}
|
||||
|
||||
\begin{eqnarray}
|
||||
\zeta + \beta + \gamma = 180° % comment
|
||||
\end{eqnarray}
|
||||
|
||||
% \begin{mathtest} % has to be defined in configure-kile-commands to work
|
||||
% asdasdasd
|
||||
% \end{mathtest}
|
@ -0,0 +1,51 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: only insert special "` outside verbatim
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
\verb+ hallo """""" " " " " " +
|
||||
|
||||
\verb hallo asdasd "` "' "` "'
|
||||
|
||||
\verb+ hallo """"" + " "` "'
|
||||
|
||||
\verb+ hallo """"""" " " + " "` "' "` "' \verb+ hallo+ "` "' "` "' "` "' "`
|
||||
\verbö sdasfd " ö ""' "` "' "` "' "` "' "`
|
||||
|
||||
\verb """klh""kjsahd""" ashfdkjsdhf " "' "` "'
|
||||
\verbö"""""ö""` "' "`
|
||||
\verb#""" asdasd "`# asdasd "` "'
|
||||
"` "' verb asdasd \verb öäöäöä 2 "` "'
|
||||
|
||||
asdsda asdsad \verbl ashdkasd "" " " " l asdasd "` "'
|
||||
\verb"`
|
||||
\verb"'
|
||||
\verb
|
||||
\verbä""" ööhjakhkasdf """" """""ä "" "` "' "` "' "`
|
||||
\begin{verbatim}
|
||||
sdfsdf """
|
||||
\end{verbatim}
|
||||
|
||||
\begin{verbatim*}
|
||||
sadsdf " " " " " "
|
||||
\end{verbatim*}
|
||||
|
||||
abc \verb " ""
|
||||
|
||||
abc \verb|"""""
|
||||
|
||||
abc \verb|d" """""
|
||||
|
||||
abc \verb|def
|
@ -0,0 +1,18 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: Tests if included files are accesible thoughr the structure view
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
test test test test
|
@ -0,0 +1,112 @@
|
||||
[General]
|
||||
img_extIsRegExp=false
|
||||
img_extensions=.eps .pdf .dvi .ps .fig .gif .jpg .jpeg .png
|
||||
kileprversion=1
|
||||
kileversion=1.9
|
||||
lastDocument=syntax-math2.tex
|
||||
masterDocument=
|
||||
name=Internal Testing
|
||||
pkg_extIsRegExp=false
|
||||
pkg_extensions=.cls .sty .dtx
|
||||
src_extIsRegExp=false
|
||||
src_extensions=.tex .ltx .bib .mp
|
||||
|
||||
[Tools]
|
||||
MakeIndex=
|
||||
QuickBuild=
|
||||
|
||||
[item:env-grabbing-testing.tex]
|
||||
archive=true
|
||||
column=18
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=14
|
||||
open=true
|
||||
|
||||
[item:find-verbatim.tex]
|
||||
archive=true
|
||||
column=18
|
||||
encoding=UTF-8
|
||||
highlight=LaTeX
|
||||
line=14
|
||||
open=true
|
||||
|
||||
[item:hello.tex]
|
||||
archive=true
|
||||
column=1
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=15
|
||||
open=true
|
||||
|
||||
[item:helloo.tex]
|
||||
archive=true
|
||||
column=0
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=0
|
||||
open=true
|
||||
|
||||
[item:internaltesting.kilepr]
|
||||
archive=true
|
||||
column=47
|
||||
encoding=
|
||||
highlight=
|
||||
line=0
|
||||
open=false
|
||||
|
||||
[item:syntax-cite.tex]
|
||||
archive=true
|
||||
column=0
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=16
|
||||
open=true
|
||||
|
||||
[item:syntax-cmds.tex]
|
||||
archive=true
|
||||
column=0
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=16
|
||||
open=true
|
||||
|
||||
[item:syntax-comment-updateStruct.tex]
|
||||
archive=true
|
||||
column=15
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=14
|
||||
open=true
|
||||
|
||||
[item:syntax-generic.tex]
|
||||
archive=true
|
||||
column=48
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=14
|
||||
open=true
|
||||
|
||||
[item:syntax-math1.tex]
|
||||
archive=true
|
||||
column=0
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=17
|
||||
open=true
|
||||
|
||||
[item:syntax-math2.tex]
|
||||
archive=true
|
||||
column=0
|
||||
encoding=ISO 8859-15
|
||||
highlight=LaTeX
|
||||
line=17
|
||||
open=true
|
||||
|
||||
[item:teppich.eps]
|
||||
archive=true
|
||||
column=47
|
||||
encoding=
|
||||
highlight=
|
||||
line=0
|
||||
open=false
|
@ -0,0 +1,52 @@
|
||||
\documentclass{article}
|
||||
\usepackage{amsmath}
|
||||
% begin : Sat 11 august 2007
|
||||
% copyright : (C) 2007 by Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test if quickpreview is working
|
||||
% compiles: yes
|
||||
%
|
||||
\begin{document}
|
||||
|
||||
% math groups
|
||||
$1$
|
||||
\$ $asd$ \$
|
||||
$$222$$ % does not work because it is difficult to realize and is considered bad practice see ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
|
||||
\( 1231 \)
|
||||
\[ 1231 \]
|
||||
\ensuremath{4}
|
||||
|
||||
% environments
|
||||
\begin{equation}
|
||||
4
|
||||
\end{equation}
|
||||
\begin{displaymath}
|
||||
5
|
||||
\end{displaymath}
|
||||
\begin{align}
|
||||
6 &=6
|
||||
\end{align}
|
||||
|
||||
\begin{math}
|
||||
7
|
||||
\end{math}
|
||||
|
||||
\begin{eqnarray}
|
||||
8
|
||||
\end{eqnarray}
|
||||
|
||||
% \begin{mathtest} % has to be defined in configure-kile-commands to work
|
||||
% asdasdasd
|
||||
% \end{mathtest}
|
||||
|
||||
\end{document}
|
||||
|
@ -0,0 +1,48 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: syntax file check for optional argument of cite command
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
\begin{enumerate}
|
||||
\item This MFA is \cite[Figure 1: The Graph $G_{5a}$]{23mfa}
|
||||
|
||||
\item This MFA is \cite[ Figure 2: The Graph $G_{5b}$]{23mfa}
|
||||
|
||||
\item This MFA is \cite [Figure 3: The Graph $G_{5c}$]{23mfa}
|
||||
|
||||
\item This MFA is \cite [ Figure 4: The Graph $G_{5d}$]{23mfa}
|
||||
|
||||
\item This MFA is \cite[Figure 5:
|
||||
The Graph $G_{5e}$]{23mfa}
|
||||
|
||||
\item This MFA is \cite[Figure 6:
|
||||
The Graph $G_{5f}$]{
|
||||
23mfa}
|
||||
|
||||
\item This MFA is \cite (test) [ Figure 1: The Graph $G_{5g}$]{
|
||||
23mfa}
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
$y = \sqrt{1-x^2}$
|
||||
|
||||
\begin{thebibliography}{10}
|
||||
\bibitem{23mfa}
|
||||
Gr\"uttm\"uller M, Kalinowski T, Leck U, Hartmann S, Roberts I.T,
|
||||
\textit{Maximal flat antichains of minimum weight},
|
||||
Submitted for publication
|
||||
\end{thebibliography}
|
||||
\end{document}
|
||||
|
@ -0,0 +1,32 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test document for syntax file latex.xml
|
||||
% (syntax highlighting for \newcommand and \def)
|
||||
% compiles: no
|
||||
|
||||
\newcommand{\abc}{ $ start { % comment
|
||||
test { abc --> } } end } behind % comment
|
||||
|
||||
\newcommand{\abc}[1]{ $ start { % comment
|
||||
test { abc --> #1 } } end } behind % comment
|
||||
|
||||
\newcommand{\abc}[1][default]{ $ start { % comment
|
||||
test { abc --> #1 } } end } behind % comment
|
||||
|
||||
\def\xyz{ $ start { % comment
|
||||
test{ abc --> } } end } behind % comment
|
||||
|
||||
\def\xyz#1{ $ start { % comment
|
||||
test{ abc --> #1 } } end } behind % comment
|
||||
|
@ -0,0 +1,345 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: syntax file check for comments, has all commands updateStruct should grab
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
\usepackage{graphicx,
|
||||
import,
|
||||
amsmath}
|
||||
\usepackage{floatflt,
|
||||
pifont,url,psfrag,booktabs}
|
||||
\usepackage[english]{babel}
|
||||
\usepackage[T1]{
|
||||
fontenc}
|
||||
% you can easily test if kile grabbed all newcommands by viewing the structure view (no ERROR sections) and by codecompletion, the commands have ascending number of h's. asdf
|
||||
|
||||
\newcommand{\bla}{}
|
||||
\newcommand{\blah}{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blahh}%
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blahhh}
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blahhhh}{%
|
||||
test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blahhhhh}{
|
||||
test
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\blahhhhhh}{
|
||||
test % \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\blahhhhhhh}{% \section{ERROR}
|
||||
test \% \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
% \newcommand{\blahhhhhhhh}{test\section{ERROR}test\ensuremath{a^2 + b^2 = c^2}} as reserve
|
||||
|
||||
\newcommand{\blaeh}
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blaehh}%
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blaehhh}
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blaehhhh}{%
|
||||
test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\blaehhhhh}{
|
||||
test
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{% \section{ERROR}
|
||||
\blaehhhhhh}{test % \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\blaehhhhhhh}{% \section{ERROR}
|
||||
test \% \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
|
||||
\newcommand{\blu}[1]{}
|
||||
\newcommand{\bluh}[1]{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bluhh}[1]%
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bluhhh}[1]
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bluhhhh}[1]{%
|
||||
test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bluhhhhh}[1]{
|
||||
test
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\bluhhhhhh}[1]{
|
||||
test % \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\bluhhhhhhh}[1]{
|
||||
test \% \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
|
||||
\newcommand{\bloe}[3][stdarg]{}
|
||||
|
||||
\newcommand{\bloeh}[3][stdarg]{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bloehh}[3][stdarg]%
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bloehhh}[3][stdarg]
|
||||
{test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bloehhhh}[3][stdarg]{%
|
||||
test \section{ERROR} test \ensuremath{a^2 + b^2 = c^2}}
|
||||
\newcommand{\bloehhhhh}[3][stdarg]{
|
||||
test
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\bloehhhhhh}[3][stdarg]{
|
||||
test % \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\bloehhhhhhh}[3][stdarg]{
|
||||
test \% \section{ERROR}
|
||||
\section{ERROR}
|
||||
test
|
||||
\ensuremath{a^2 + b^2 = c^2}
|
||||
\section{ERROR}
|
||||
}
|
||||
\newcommand{\bloehhhhhhhh}[3][]{} % is also valid latex ...
|
||||
|
||||
\providecommand{\bloehhhhhhhhh}{test} % not yet supported
|
||||
|
||||
\newenvironment{hello}{test \%}{\section{ERROR}}
|
||||
\newenvironment{helloo}[2]{test \%}{\section{ERROR}}
|
||||
\newenvironment{hellooo}[3][stdarg]{test \%}{\section{ERROR}} % also not yet supported
|
||||
|
||||
\renewcommand{\section}[2]{asd} % also missing
|
||||
\input{helloo} %allowed in preamble
|
||||
|
||||
\iffalse
|
||||
\addunit{\knoelks}{knoe} % needed for fancyunits
|
||||
\fi
|
||||
|
||||
\DeclareMathOperator{\destroyer}{D}
|
||||
\DeclareMathOperator*{\destroyerr}{D}
|
||||
|
||||
\bibliographystyle{plain}
|
||||
|
||||
\begin{document}
|
||||
\input{hello}
|
||||
\input{./hello}
|
||||
\input{/home/thomas/devel/svn/office-trunk/kile/kile/internal-testing/hello} % change this to your local absolute path
|
||||
|
||||
\include{hello}
|
||||
\include{./hello}
|
||||
|
||||
\iffalse \include{/home/thomas/devel/svn/office-trunk/kile/kile/internal-testing/hello}
|
||||
\fi % http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2904, may not work with your setup
|
||||
|
||||
\import{/home/thomas/devel/svn/office-trunk/kile/kile/internal-testing}{hello}
|
||||
% new, see #128227
|
||||
|
||||
\begin{figure}[htb]
|
||||
blubb
|
||||
\includegraphics{./teppich.eps}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htb]
|
||||
\includegraphics[width=2cm,
|
||||
bb=0 0 120 101]{teppich.eps}
|
||||
\label{picture---}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[b!]
|
||||
\centering
|
||||
\psfrag{xtitle}{$\alpha$ [asasa]}
|
||||
\psfrag{ytitle}{$R$ [asdas]}
|
||||
\includegraphics{teppich.eps}
|
||||
\caption{blubb}
|
||||
\label{fig:stuff}
|
||||
\end{figure}
|
||||
|
||||
\begin{table}[h]
|
||||
\centering
|
||||
\begin{tabular}{cccc}
|
||||
$m_p$ & $R_p$ & $m_s$ & $R_s$ \\ \toprule
|
||||
0,105(6)&28,6(1,6)&69(3)&43,5(1,9) \\ \bottomrule
|
||||
\end{tabular}
|
||||
\caption{Si-Dunkelkennlinie}
|
||||
\label{tab:si-ivt-dunkel}
|
||||
\vspace{1cm}
|
||||
\end{table}
|
||||
|
||||
\label{asdf}
|
||||
\ref{asdf}
|
||||
\pageref{asdf}
|
||||
\ref{picture---}
|
||||
|
||||
\part{-1}
|
||||
\chapter{0}
|
||||
\section{A}
|
||||
\subsection{KHL}
|
||||
\subsubsection{C}
|
||||
\paragraph{% should jump to first position of textstring
|
||||
D}
|
||||
\subparagraph{E}
|
||||
|
||||
\part*{-1}
|
||||
\chapter*{0}
|
||||
\section*{A}
|
||||
\subsection*{B}
|
||||
\subsubsection*{C}
|
||||
\paragraph*{% should jump to first position of textstring
|
||||
D}
|
||||
\subparagraph*{E}
|
||||
|
||||
\iffalse
|
||||
\bibliography{test,./test,/home/thomas/devel/svn/office-trunk/kile/kile/internal-testing/test,test.bib,./test.bib,test2.bib} % where test2.bib lies in a directory referenced in $BIBINPUTS
|
||||
\fi
|
||||
|
||||
%\section{111}
|
||||
%\section{%222}
|
||||
\%%\section{333}
|
||||
\%%\section{%444}
|
||||
\%\section{555}
|
||||
\%\section{666}
|
||||
\\\section{777}
|
||||
\\\section{%888
|
||||
999} adsdfgsdfg sdfgsfdga sadfgsdf
|
||||
\\\%\section{aaa}
|
||||
\\\%\section{%bbb
|
||||
ccc}
|
||||
|
||||
% \section{ERROR}
|
||||
% \section{ERROR} \% \section{ERROR}
|
||||
% % \section{ERROR}
|
||||
\% \section{blubb}
|
||||
\% \section{blahh} % \section{ERROR}
|
||||
\% \section{nix} \% \section{garnix}
|
||||
ab % \section{ERROR}
|
||||
bc \% \section{hallo} % \section{ERROR}
|
||||
de % \section{ERROR} % \section{ERROR}
|
||||
|
||||
\section{% \section{ERROR}
|
||||
comment}
|
||||
|
||||
\section{%
|
||||
comment}
|
||||
|
||||
Test 1
|
||||
|
||||
\includegraphics[width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 2
|
||||
|
||||
\includegraphics[
|
||||
width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 3
|
||||
|
||||
\includegraphics[
|
||||
width=2cm,
|
||||
bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
|
||||
Test 4
|
||||
|
||||
\includegraphics[%
|
||||
width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
|
||||
Test 5
|
||||
|
||||
\includegraphics[%
|
||||
width=2cm,
|
||||
bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 6
|
||||
|
||||
\includegraphics[width=2cm, % kommentar {abc}
|
||||
bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
|
||||
Test 7
|
||||
|
||||
\includegraphics[width=2cm,% kommentar {abc}
|
||||
bb=0 0 120 101 % kommentar def
|
||||
]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 8
|
||||
|
||||
\includegraphics
|
||||
[width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 9
|
||||
|
||||
\includegraphics %
|
||||
[width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
Test 10
|
||||
|
||||
\% \includegraphics %
|
||||
[width=2cm,bb=0 0 120 101]{teppich.eps}
|
||||
% teppich.eps: 160x135 pixel, 96dpi, 4.23x3.57 cm, bb=0 0 120 101
|
||||
|
||||
\begin{thebibliography}{bbxsec}
|
||||
\bibitem{prop}
|
||||
T.~Lohse et al., {\em An Experiment to Study CP Violation in the
|
||||
$B$ System Using an Internal Target at the HERA Proton Ring},
|
||||
Proposal, {\bf DESY-PRC 94/02} (1994).
|
||||
\bibitem{PDG} Particle Data Group, Review of Particle Properties,
|
||||
Eur. Phys. J. {\bf C15} (2000).
|
||||
\bibitem{bbxsec} P.~Nason, S.~Dawson and K.R.~Ellis,
|
||||
\bf{303}{1988}{607};
|
||||
{\bf B327} (1989) 49; {\bf B335} (1990) 260.
|
||||
\end{thebibliography} % taken from http://www-hera-b.desy.de/general/publications/hb2k/report/target/target.bib
|
@ -0,0 +1,82 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test document for syntax file latex.xml
|
||||
% (syntax highlighting for mathmode)
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
{
|
||||
% basic math mode
|
||||
\[blah \alpha\] xyz \par
|
||||
\(blah \alpha\) xyz \par
|
||||
$blah \alpha$ xyz \par
|
||||
$$blah \alpha$$ xyz \par
|
||||
|
||||
% one space at the end
|
||||
\[blah \alpha \] xyz \par
|
||||
\(blah \alpha \) xyz \par
|
||||
$blah \alpha $ xyz \par
|
||||
$$blah \alpha $$ xyz \par
|
||||
|
||||
% one space at the start
|
||||
\[ blah \alpha\] xyz \par
|
||||
\( blah \alpha\) xyz \par
|
||||
$ blah \alpha$ xyz \par
|
||||
$$ blah \alpha$$ xyz \par
|
||||
|
||||
% a bit more advanced
|
||||
\(blah \alpha \command[sad\alpha]{sad\alpha}\) xyz
|
||||
\[blah \alpha \command[sad\alpha]{sad\alpha}\] xyz
|
||||
$blah \alpha \command[sad\alpha]{sad\alpha}$ xyz
|
||||
$$blah \alpha \command[sad\alpha]{sad\alpha}$$ xyz
|
||||
|
||||
\(blah \alpha \command[sad\alpha]{sad\alpha} \) xyz
|
||||
\[blah \alpha \command[sad\alpha]{sad\alpha} \] xyz
|
||||
$blah \alpha \command[sad\alpha]{sad\alpha} $ xyz
|
||||
$$blah \alpha \command[sad\alpha]{sad\alpha} $$ xyz
|
||||
|
||||
\( blah \alpha\command[sad\alpha]{sad\alpha} \) xyz
|
||||
\[ blah \alpha\command[sad\alpha]{sad\alpha} \] xyz
|
||||
$ blah \alpha\command[sad\alpha]{sad\alpha} $ xyz
|
||||
$$ blah \alpha\command[sad\alpha]{sad\alpha} $$ xyz
|
||||
}
|
||||
|
||||
% equations
|
||||
{
|
||||
\begin{equation} xyz
|
||||
blah \alpha
|
||||
\end{equation} xyz
|
||||
% in one line
|
||||
\begin{equation} xyz blah \alpha\end{equation} xyz
|
||||
% two in one line
|
||||
\begin{equation} xyz blah \alpha\end{equation} xyz \begin{equation} xyz blah \alpha\end{equation} xyz
|
||||
|
||||
% with additional environments inside
|
||||
\begin{eqnarray} blah
|
||||
\begin{split}
|
||||
(blah) blah \alpha & blah \\
|
||||
\text{sdfsdf}
|
||||
\end{split}
|
||||
\end{eqnarray} xyz
|
||||
}
|
||||
|
||||
% out of bug reports:
|
||||
{
|
||||
% #119617
|
||||
$$\phi_\ccc\circ\phi_a=(\ccc*\phi)_a\circ\phi_\ccc$$
|
||||
\begin{equation} a=b\nonumber\end{equation}
|
||||
xyz
|
||||
\[blah blah \qedhere\] xyz
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 9 october 2006
|
||||
% copyright : (C) 2006 by Holger Danielsson, Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test document for syntax file latex.xml
|
||||
% (syntax highlighting for mathmode)
|
||||
% compiles: no
|
||||
%
|
||||
|
||||
\newcommand{\abc}{def}
|
||||
\renewcommand{\ghi}{jkl}
|
||||
\definecolor{refkey}{rgb}{1,0,0}
|
||||
|
||||
\newcommandasd{\mno}{pqr}
|
||||
\renewcommandasd{\stu}{vwx}
|
||||
\definecolorasd{labelkey}{rgb}{0,0,1}
|
||||
|
||||
$50 \$abc\\text{qwe}xyz$xyz \par
|
||||
|
||||
$50 \$abc\text{qwe}xyz$xyz \par
|
||||
$50 \$abc\text{qwe}$xyz \par
|
||||
$50 \$abc\mbox{qw\,e}xyz$xyz \par
|
||||
$50 \$abc\mbox{qw\enskip}xyz$xyz \par
|
||||
$50 \$abc\text{qw\cmd{def}}xyz$xyz \par
|
||||
$50 \$abc\text{qw\cmd{def\textbf{ghi}}}xyz$xyz \par
|
||||
$50 \$abc\text{qw\cmd{def\{\%ghi}}xyz$xyz \par
|
||||
$50 \$abc\text{qw\cmd{def\}\$ghi}}xyz$xyz \par
|
||||
$50 \$abc\text{qwe}\alpha$xyz \par
|
||||
|
||||
$50 \$abc\text{qw%\cmd{def\textbf{ghi}}}xyz$xyz \par
|
||||
\cmd{def\textbf{ghi}}}xyz$xyz \par
|
||||
|
||||
$$50 \$abc\text{qwe}xyz$$xyz \par
|
||||
$$50 \$abc\text{qwe}$$xyz \par
|
||||
$$50 \$abc\text{qwe}\alpha$$xyz \par
|
||||
|
||||
\[50\%\alpha\mbox{qwe}xyz\]xyz \par
|
||||
\[50\%\alpha\mbox{qwe}\alpha\]xyz \par
|
||||
|
||||
\begin{equation}50\%\alpha \intertext{qwe}xyz\end{equation}xyz \par
|
||||
\begin{equation}50\%\alpha \intertext{qwe}\alpha\end{equation}xyz \par
|
||||
|
||||
$50\%\mbox{abc\textbf{def}}$xyz \par
|
||||
|
@ -0,0 +1,67 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 12 february 2008
|
||||
% copyright : (C) 2008 by Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test document for syntax file latex.xml
|
||||
% turn off syntax-HL inside noweb blocks
|
||||
% compiles: no
|
||||
|
||||
\begin{document}
|
||||
|
||||
\latexCmd
|
||||
$ \alpha + \beta = \gamma $
|
||||
|
||||
<<SomeName,echo=F>>=
|
||||
code line
|
||||
code line$var
|
||||
var$var2
|
||||
class$varname
|
||||
output LaTeX
|
||||
@ %defs
|
||||
|
||||
\latexCmd
|
||||
$ \alpha + \beta = \gamma $
|
||||
|
||||
<<SomeName,echo=F>>=
|
||||
code line
|
||||
code line$var
|
||||
var$var2
|
||||
class$varname
|
||||
output LaTeX
|
||||
@
|
||||
\latexCmd
|
||||
$ \alpha + \beta = \gamma $
|
||||
|
||||
<<SomeName,echo=F>>=
|
||||
code line
|
||||
code line$var
|
||||
var$var2
|
||||
class$varname
|
||||
output LaTeX
|
||||
@ %defs
|
||||
|
||||
\latexCmd
|
||||
$ \alpha + \beta = \gamma $
|
||||
|
||||
<<SomeName,echo=F>>=
|
||||
code line
|
||||
code line$var
|
||||
var$var2
|
||||
class$varname
|
||||
output LaTeX
|
||||
@ %defs
|
||||
|
||||
\latexCmd
|
||||
$ \alpha + \beta = \gamma $
|
||||
|
||||
\end{document}
|
||||
|
@ -0,0 +1,30 @@
|
||||
% /***************************************************************************
|
||||
% begin : Mon 12 february 2008
|
||||
% copyright : (C) 2008 by Thomas Braun
|
||||
% ***************************************************************************/
|
||||
%
|
||||
% /***************************************************************************
|
||||
% * *
|
||||
% * This program is free software; you can redistribute it and/or modify *
|
||||
% * it under the terms of the GNU General Public License as published by *
|
||||
% * the Free Software Foundation; either version 2 of the License, or *
|
||||
% * (at your option) any later version. *
|
||||
% * *
|
||||
% ***************************************************************************/
|
||||
% description: test document for syntax file latex.xml
|
||||
% highlight & and @{} in tabular like environments
|
||||
% compiles: no
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{tabular}{lcr@{3cm}}
|
||||
a & b & c & d
|
||||
\end{tabular}
|
||||
|
||||
\begin{tabular}{lcr@{3cm}}
|
||||
a & b & c & d
|
||||
\end{mpsupertabular}
|
||||
|
||||
|
||||
\end{document}
|
||||
|
@ -0,0 +1,281 @@
|
||||
%!PS-Adobe-3.0 EPSF-3.0
|
||||
%%BoundingBox: 0 0 64 64
|
||||
%%HiResBoundingBox: 0.000000 0.000000 64.000000 64.000000
|
||||
%.............................................
|
||||
%%Creator: ESP Ghostscript 81503 (epswrite)
|
||||
%%CreationDate: 2006/10/13 23:15:31
|
||||
%%DocumentData: Clean7Bit
|
||||
%%LanguageLevel: 2
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
% This copyright applies to everything between here and the %%EndProlog:
|
||||
% Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
|
||||
%%BeginResource: procset GS_epswrite_2_0_1001
|
||||
/GS_epswrite_2_0_1001 80 dict dup begin
|
||||
/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
|
||||
4 index eq and{ pop pop pop}{ PageSize dup 1
|
||||
5 -1 roll put 0 4 -1 roll put dup null eq {false} {dup where} ifelse{ exch get exec}
|
||||
{ pop/setpagedevice where
|
||||
{ pop 1 dict dup /PageSize PageSize put setpagedevice}
|
||||
{ /setpage where{ pop PageSize aload pop pageparams 3 {exch pop} repeat
|
||||
setpage}if}ifelse}ifelse}ifelse} bind def
|
||||
/!{bind def}bind def/#{load def}!/N/counttomark #
|
||||
/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}!
|
||||
/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}!
|
||||
/w/setlinewidth #/J/setlinecap #
|
||||
/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat #
|
||||
/m/moveto #/l/lineto #/c/rcurveto #
|
||||
/p{N 2 idiv{N -2 roll rlineto}repeat}!
|
||||
/P{N 0 gt{N -2 roll moveto p}if}!
|
||||
/h{p closepath}!/H{P closepath}!
|
||||
/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}!
|
||||
/re{4 -2 roll m exch dup lx exch ly neg lx h}!
|
||||
/^{3 index neg 3 index neg}!
|
||||
/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}!
|
||||
/q/gsave #/Q/grestore #/rf{re fill}!
|
||||
/Y{P clip newpath}!/Y*{P eoclip newpath}!/rY{re Y}!
|
||||
/|={pop exch 4 1 roll 1 array astore cvx 3 array astore cvx exch 1 index def exec}!
|
||||
/|{exch string readstring |=}!
|
||||
/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}!
|
||||
/@/currentfile #/${+ @ |}!
|
||||
/B{{2 copy string{readstring pop}aload pop 4 array astore cvx
|
||||
3 1 roll}repeat pop pop true}!
|
||||
/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}!
|
||||
/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}!
|
||||
/Ic{exch Ix false 3 colorimage}!
|
||||
/F{/Columns counttomark 3 add -2 roll/Rows exch/K -1/BlackIs1 true>>
|
||||
/CCITTFaxDecode filter}!/FX{<</EndOfBlock false F}!
|
||||
/X{/ASCII85Decode filter}!/@X{@ X}!/&2{2 index 2 index}!
|
||||
/@F{@ &2<<F}!/@C{@X &2 FX}!
|
||||
/$X{+ @X |}!/&4{4 index 4 index}!/$F{+ @ &4<<F |}!/$C{+ @X &4 FX |}!
|
||||
/IC{3 1 roll 10 dict begin 1{/ImageType/Interpolate/Decode/DataSource
|
||||
/ImageMatrix/BitsPerComponent/Height/Width}{exch def}forall
|
||||
currentdict end image}!
|
||||
/~{@ read {pop} if}!
|
||||
end def
|
||||
%%EndResource
|
||||
/pagesave null def
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
GS_epswrite_2_0_1001 begin
|
||||
/pagesave save store 197 dict begin
|
||||
0.1 0.1 scale
|
||||
%%EndPageSetup
|
||||
gsave mark
|
||||
Q q
|
||||
0 0 250000 250000 re
|
||||
Y
|
||||
q[639.92 0 0 639.92 0 0]concat
|
||||
64 64 8[64 0 0 -64 0 64]@X false 3
|
||||
colorimage
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^"@%Jj@$kG[ZAtp*
|
||||
Xhr`.e)\p5m*t"_d,+30f'0H[i0^n#GalTKIBFo#Plj4%!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FdDoJ,h]^!'Gc:6A/!UW0t!=
|
||||
gue1rp&"7Oqsa:Ume$AAo(qS>q;gu=i9U-lkk<Wip!VjlcJS37h=8G:n?U:$H_AGBD57A%KE+,b
|
||||
!'Gc34FdDoJ,h]^!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W*!4FdDoJ,h]^!'Gc34FdDoJ/V7E
|
||||
GacIphX9CipZCr>kj\E5o(q\CqWm_KlLF]6nG2/5pu1T6h<FXdkOmBdo[)Rgbhhp2h!r;8n@mKB
|
||||
]$p)Td-RRGjBd_T'MXPe4FdDoJ,h]^!'Gc34FdDoJH,ZLs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^
|
||||
!'GcF98\%d`6R91f]Mk]kk<p!pYtQ6jR2g*n+c)7q<%/AjmMp(mJ,Z,pYP3/g?81\jn7']oZlCd
|
||||
b2)X.g@2r1n%I9>\C0cNcg7jZl`/(lU;Q,#N4f]lM#]Yg!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^
|
||||
!'Gc34FdDoJ-%oc;h)!ae*G99o$QFfeE$8Sk4RKmp>5*.i9U-rm.]N+pYtQ6iTp6qlM'-!p=e^&
|
||||
fB)\Sj7L^Wo??(^aP?='g$lc-n%7':[aFKJcKq[VlD_khUrDPj_WR)li';=`!^2)74FdDoJ,h]^
|
||||
!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W*!4FdDoJ,h]^!'Gc34Fe/@NK13k_V"@tg[WGBo$6.`dGjcIjRh'cp"AO$gZ\@dl1Wrtp>,!,
|
||||
h!+Oekk<Zkp"&6se)U)IiUb:No#]\W`S0gtfC-E'm^U^4[*S*Cc0MFQlDM\eUVuAf_<76#k*<R>
|
||||
CmiEW8rE[3J,h]^!'Gc34FdDoJH,ZLs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gca@[sC9jL`q0^Xhkkg$m&:n]K\Yc/8*=iUbOYo[W$p
|
||||
f&cSVk4RBhp"8F"fB2bWjn.'`o[;ajcf"E=ht"nFn]';P_V"@lf'g3!m^CL0ZHhg>bNl.KlD;Ma
|
||||
Tu6&`^uh#tjcd::O14/!X4eb$R/f@"!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34FdDoJ,h]^5]N^(b3?=\m'tL2][ZAbfC-W1nAa5Q
|
||||
akcL2hX\tMo?cIfdc0lIj7Lg\o[Djmdc0oHiq(OUo?Q7abMMg2h!rA;nA<iI^XhkceF'fnmBb.*
|
||||
YKZ=5b3GnFl(c2\T>Kc[^ZLipjcR+7NOIi&Zf-J<hCiK9!'Gc34FdDoJ,h]^!'Gf3s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34FdDoJ44U]WQ=>,bNlIZm'Y4,
|
||||
\^KlXeF(-(n&*fI`S0h&h!rPCo$#t]c/8*;i:>1Oo?Q:ccJS3;ht"tIo#]_Xa4p.&g@2u3n%[HB
|
||||
]@?8Ydd=Efm'+b#Xifq.aQ]P?kb5oWSA=9S^#bKjjH$h2Mm_Q"ZJgD=i-h]`123Wd4FdDoJ,h]^
|
||||
!'Gf3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FfM1VP:uk
|
||||
VoS&&am-%Qla"h&[F"9Ndd=]sm_@?A_:\4og$lu7nAj;RaP?=-h=8VCn]BVWakZF-h!rG>n\s5O
|
||||
_qFOpfC-H(m^q!:\C0cOcg7p]l`J@qWlaP'`p'59kaoWRR_S!N]]G9djGgV-M6u5pZ/C/8hgDK]
|
||||
G,X1HA"ircJ,h]^!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W*!4FdDoJ,h]^
|
||||
!'GcZ?(.1pjIjERUrDPra6BYIlEAFtZHhgEd-S9jmCLd7^")Pcf'gH,n&!`H_qFOtg$lr6nAO&M
|
||||
`7aXtg$ll2nA*ZE^=MbceF'osm^LU2[*S*Dc0MOUl`/(lVoS%s`9<i1kF96KQbDLE]&\p^j,:>)
|
||||
LU,ljYi'u4hg2<ZFf4&5U=gMeQN0-u!'Gc34FdDoJH,ZLs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
!'Gc34FdDoJ,h]^&P@t<Z.te^k+0?NTu6&h`TX8@l)VtlY0?4:c0Ma_m'b=/\^KlWe*alum_76>
|
||||
^Xhkgf'gE+n%[HB^Xhkff'g<&m_%';]$p)Wdd=KimBb.*Yg)L9bNc+LlDM\eUW)Gi_WRH)k*WmE
|
||||
Pe6"<\`8XWieXr"KX'HcY2=W-hKPsTF/I`2UYB7FdL8X'!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!!'Gc34FdDoJ-%lbCRN>/]&]0ijdNsHT#'T`_rmi7kblJcWlaP.bNc=Ula"h&
|
||||
[*S*IdI"HlmCC[4]$p)Ze*aitm^q!:]$p)Ye*acpmC1L1[F"9Hcg7p^l`\OuXNKh-aQfYCl(c5]
|
||||
TYfl_^uh'!jd!L>Oh'P5\)W@QieFbtK!4*\Xl"E(hK>aPEM_H-U=s:Qfh7"8!Bku64FdDoJ,h]^
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34FdDoJ3%VJN4.`3]]HTLmC:U3]@?8^eaC3'n%mZF
|
||||
_qFOrf^PublE8=rYg)L=cKhg_m'P+*[F"9Kd-\9hmE+/RcJ\<=ht#"Ko#on\b2)X1h=8SAn]'>R
|
||||
][ZAH`p'8:kb,fUSA=9T^?(Znjc[49Njn&,[GltIiIeAmJ$%UTX58'!h/fIKDPPs$T\="Lfj^H'
|
||||
-tB(R4FdDoJ,h]^!'Gf3s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34Fdi1M1)DYM6u67_rq("s8W-!
|
||||
s8W-!s8W-!s8W-!s8W,lq#%&1l)DbgX30_0bNc7Sl`\OuYg)L=c0N@&nG`Fes8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8Drr\^Kl>_s!`0kFB?MRD.dK]]G<fjH$e1Mm_Q"Zf-SBi..ufI&u1LWSMZogi0(D
|
||||
Cn]QrT@mbFfO(&u<ftc87#1h*J,h]^!'Gf3s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34Fg(S\:UpB
|
||||
KsK[/_<:jus8W-!s8W-!s8W-!s8W-!s8W,kq#$o*kbZ;_VoS&#aQ]_HlDr%lXNKh5c0P&tr;Zfs
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s30?jTYfl`_<7<&k*WjDQ+Q+?\`Ag\j,:>)LpQ&nZ/C2:hgMT_
|
||||
H)f_DVql?hghie?BqX0kS_7G@fNjlr=d@PnDmB@*J,h]^!'Gc34FmJ3s8W-!s8W-!s8N']J,h]^
|
||||
!'GcA8W.hlgjcH`K!4+%^ZPRrs8W-!s8W-!s8W-!s8W-!s8W,kq#$c$kFofVU;Z8k`TX/<kbcAa
|
||||
VoS&YlM(>Ys8W-!s8W-!s8W-!s8W-!s8W-!s8V'EpR]4aSA=9T^?1cqjcmC<Oh'M4\)WCSieXr"
|
||||
KX'HdYMXc1hg2<ZG,X5;V;,s`gM<M:B:dddS(M&8f34Kk<g;-2O4">(M?#bh!'Gc34FmJ3s8W-!
|
||||
s8W*!4FdDoJ,h]^!'GcsGI)Onh0Z3ZJ$%Uq^#f:os8W-!s8W-!s8W-!s8W-!s8W,jq#$Sqk+'6L
|
||||
T#'T^_WRT0kFofV^t8&Ts8W-!s8W-!s8W-!s8W-!s8W-!s8W,ip\^c(kaK6JQbDLG]]>9fjH-n3
|
||||
NORr*[GltJiInJoJZms[Xl"H)hKPpSF/I`2UYBRXg1[,3A=V:[Rb(f2el\3f<0Ga-O4,RmXT1J6
|
||||
!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^"@%NQS^hh[gj#gSH`Q"g]]K1ns8W-!s8W-!s8W-!s8W-!
|
||||
s8W,jp\^>ijd<aCRD.dO^ZM'%k,-/_p\Ojgs8W-!s8W-!s8W-!s8W-!s8W-!r;HVsbNkM.jd!L>
|
||||
PIfh;\`8a[j,CG+M6u8sZJgJ@i..ufIB;=PWnqruh/fIKE2;6)U"X1Pfk$`-@@GhSR+GK+el@pa
|
||||
;39:%NmgCNbQ:"]!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^,@-mXU>'[agiTILGH'D]]&`nks8W-!
|
||||
s8W-!s8W-!s8W-!s8W,ip\^/aj-.(8Pe6"B]]GKnjl,S#s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
_:\4@]B#-djH7"5O14//[c31PieXr"KsBThYi(&7hgMT_HE,hFW82Nlgi0(DCnfWtTA!kIfjUB&
|
||||
?C9>JQI]*$eP_OZ:QNstN7(1Qd2#`N!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^7")[^T\=7WgMs%D
|
||||
FJdiS\E!Vhs8W-!s8W-!s8W-!s8W-!s8W,ip\^#Zif:M.OLX>5\`:HUn,NFfs8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s4QT.Oh'M5\DrUYj,CG+MRDH"Zf-YEiInGnJZn!]Xl"N,hKc-WG,X5<VVH-dgMEV<
|
||||
BqX0kS_7JAfNsut>F*iAPgr]qe524T9T@IkMU=hJcmik=!'Gc34FdDoJH,ZL!'Gc34FdDoJ,qfa
|
||||
>a<`LT%RkOg23S=E2;6I[c7>es8W-!s8W-!s8W-!s8W-!s8W,hpAB`QiJP#%Mm_Q9_<:[mrr<#u
|
||||
s8W-!s8W-!s8W-!s8W-!s8VNZqieVPN4.`([Gm%MieXr"L9fckZ/C5;i.%oeIB;=PX58*#h0#XO
|
||||
Ei%Q0UYBUYg1d24AY%L`S(M)9f3=Tm=Hq?8P13<idnPhN8W2"cM:"VDcoHTt!Bku64FdDoJ,h]^
|
||||
!'Gc34FdDoJ.bV>@%,\WSChGFfkI,5CnfX?[,M&bs8W-!s8W-!s8W-!s8W-!s8W,hpA9NIi.\Gp
|
||||
M6u7(n+m"`s8W-!s8W-!s8W-!s8W-!s8W,rr;N;(kD6J'LU5roZJgMBi.J8lJZn!]Y2=Z/hg;E\
|
||||
H)f\DW82Qmgi91GDPPs%U"X1Pfk6o0LU5s9`TXAFl<0D&<0Ga/Ojm*cdn,JG7Z#MZLX85<cT6['
|
||||
$V?BZ4FdDoJ,h]^!'Gc34FdDoJ0\Nt>aO#KRFbo;fO^W,BV3t3ZJki`s8W-!s8W-!s8W-!s8W-!
|
||||
s8W,gpA9?Ahghle_:S/Us8W-!s8W-!s8W-!s8W-!s8W-!s8W,+cg6=ii.J8lK!=0aYMar6hgV]b
|
||||
IB;:PX58-%h05gRFf4#8V;-$cgMN\>C7s9nT@o76j6?+0s8W-!s8VfgrDo-4;39;Zk4O,'hF<@L
|
||||
6\j#QL!Mi4c8U9u'j%"-4FdDoJ,h]^!'Gc34FdDoJ22&J=I%E@Qe#N3f3t0$A=_A)Yi,Q]s8W-!
|
||||
s8W-!s8W-!s8W-!s8W,gp%s'9hO)"<rVlfrs8W-!s8W-!s8W-!s8W-!s8W-!d,FSHY2=`3hg_cc
|
||||
I]_LUXPS<)hKl3YGcBMBW82TogiB:IE2;6+UYBRXg1d25AtI\6[Gq,_rr<#us8W-!s8VfgrDJd-
|
||||
A";3Os8VfgrE#665D@EGK?cH,bqsmo*+>oK4FdDoJ,h]^!'Gc34FdDoJ3/%h<Kks8Q.9*)em=`q
|
||||
@%,\sXl'0Ys8W-!s8W-!s8W-!s8W-!s8W,fp%s-;hWsb/s8W-!s8W-!s8W-!s8W-!s8W-!s60"K
|
||||
JZn!YX583(hKl3YH)f\FWSMcsh0#XOFJdi6V;-$cgMWe@Cn]QtT\=%Mfk$`-@[l$-lhCGZs8N#t
|
||||
f]Ml,s8VfgrD/L'B:dfUrr<#us-pdc4G1p>J^--%bqXUi+_\:a4FdDoJ,h]^!'Gc34FdDoJ3\V&
|
||||
;39:,P13QteQS9i>aX)hX5<mVs8W-!s8W-!s8W-!s8W-!s8W,fp%u_^nGiOgs8W-!s8W-!s8W-!
|
||||
s8W-!s8VlkrJe8GGGs>@W82Wqh0#XOFJmo8VVH3ggi9.EDkl'(U>'LXg1m;7BV3shS_7MCfO:6$
|
||||
C7s;[s8W-!s-LF\?'s7Ds8VfgrC`-u7uG^Biq39Ns1QtN3J#I5J'B`rbV"4b,Ak*o4FdDoJ,h]^
|
||||
!'Gc34FdDoJ3nn19od\!OOI-ke5hd`=I%E]WSRUSs8W-!s8W-!s8W-!s8W-!s8W,srVlfrs8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8Sq7k]3NTEi%Q3V;-'egi0(DDku-*UYBX[gMES;C7s9pTA!qLfk$`-
|
||||
A";1[S(M)9f3F]oDkl(es8W-!s';#C>*db>s8VfgrCDgn6\j$tdI$u6s1d.R2Lit,IEX<ib:@h[
|
||||
,B(Bu4FdDoJ,h]^!'Gc34FdDoJ3ek38W2"jNRCU`do)=X<0GaRVqh=Ps8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,mq>GW?hJK"AD5,d%U=sFXg2!D9CSBHsT\=+Pfk6o0
|
||||
AtI[dS_.GAfO:6$?^]MOR+GN-el\3f>aO%=rVliss,jkQ<g2)6s8VcfrBuIg9o[WcnG3+as/3p%
|
||||
14@A"HHRg`as_GT+`G6u4FdDoJ,h]^!'Gc34FdDoJ3AJ+7>]D_MpY1VdS>hO:ls.GV;2+Ns8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Ud8okU8TBV3skT@mkKfk6o0
|
||||
AtI[eS_7PDfOLE'@@PnWRb(l6f3FZn>*d`AQ.8p"ePq^];N]JMh!tFEs8N#tf]Ml,s8VuorjpSH
|
||||
mIU2Ss8W-!s(@qV07(elGfhFXaWtuM*cAgp4FdDoJ,h]^!'Gc34FdDoJ2hts6&*`SLs\_Md7K8E
|
||||
9T@J<U>,_Js8W-!s8W-!s8W-!s8W-!s8W,hpA<n;q#CBos8W-!s8W-!s8W-!s8W-!s8W-!s1$ME
|
||||
A";1]SCh;?fOC?&@@PnWRb(o7f3Xls?'s5JQe#<*el\3f<g2'5P13Ble524T:6*e5SCm?(qu?]r
|
||||
s8W-!s8W-!s8W-!s8W-!s8T^\mOrn0.sT2bG0)"OaWY]G)J["e4FdDoJ,h]^!'Gc34FdDoJ1u/^
|
||||
4bV-HL<i5Bcp`f=8;bf0T\BGGs8W-!s8W-!s8W-!s8W-!s8W,coD3X/h>-sHs8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8N&uPe6!_RFbc4f3Ocq>aX)HQe#?+ele<i=I%E<PgrctePhX\;N]I*O4-jadnGbL
|
||||
8W2"eMU>e!f@/dPs8W-!s8W-!s8W-!r;HVqb3Cg4bq"%]-[*TWFNG\Ha;o6?(1arU4FdDoJ,h]^
|
||||
!'Gc34FdDoJ1,9D3J#I<K?c]8cU!<46\s*%T%X/Ds8W-!s8W-!s8W-!s8W-!s8W,bo(l@MeXO>9
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!p\Oi2VqbF?el\3f=Hq?;PgrfueQ%g`;j,X.Ojm6idnc%R
|
||||
9od[qNRCCVdRT2B7>]DZLX8;@cp!-/?CBE!Z/L_Pj*I`^7>]DDH-7[^asVAS,]q-OEl]8>`u8g7
|
||||
&72XB4FdDoJ,h]^!'Gc34FdDoJ0&1$21Nk1JB^-,c96g+5D@EnSCmlAs8W-!s8W-!s8W-!s8W-!
|
||||
s8W,bo(l1Edo)=XaP?=cs8W-!s8W-!s8W-!s8W-!s8W-!s8W,[meC+Uf2Rp_;j#R-Ojm6ie527U
|
||||
:QNt!Nmg[]dRoJH8W2"eMU=kKd6i]96&*`MK[2c5c8pO%2h9.0Ia'WqbV+=d/:#DfGKM7TaWklJ
|
||||
+E>ICDoWc5`YN@/$Wa2+4FdDoJ,h]^!'Gc34FdDoJ.kqT0mq2%I`s^"brL@#4+babRFhK=s8W-!
|
||||
s8W-!s8W-!s8W-!s8W,ao(l%>dS5_M>F*k+o(rCds8W-!s8W-!s8W-!s8W-!s8W-!s8U*nnPG:q
|
||||
:6*dtNmg[]dS#SJ8rV1iMpb+Qd:/Tt\C0cSdd=NkmC(F0[F"<Jd-S-cm'G"(ZHhgAc0V[Zl`\Ou
|
||||
Y06.5bNc.Nl:[)a*,ik8D8m?,`=lt(#>U`g4FdDoJ,h]^!'Gc34FdDoJ-\]+/U>MnHcn0lbVXdn
|
||||
2LitVQe)3:s8W-!s8W-!s8W-!s8W-!s8W,anbPb5d7B/B8W2#?W87FNrr<#us8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s.7'i8W2"gMpY(Qd79)A7>]D[LsSMEcu>f8s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s'qSO)/R;.CW-p#`"-Lu"%8+K4FdDoJ,h]^!'Gc34FdDoJ,qfa
|
||||
-?I-VGfhXbb:n:d14@AKQ.H!8s8W-!s8W-!s8W-!s8W-!s8W,`nbPS-cpNT87#92YLs`!:kl:\_
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8;ipG,X4bLsSMEcpEN76&*`NL!Mr9cYT?0s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s'V;I'l(]#BZ(En_[Bqf!'Pl54FdDoJ,h]^
|
||||
s8W*!4FdDoJ,h]^(h'WrG0)1Wat.e[/pb]@PL]^5s8W-!s8W-!s8W-!s8W-!s8W,`nbG>$cT[$.
|
||||
5D@EKL!N/Cd*gqGs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!n+HQYPLVjMcTQs-4G1p@K$HB-c;p.Z
|
||||
Z-DX>c0MRWl`\OuY06.5bNl7PlDr(mX3'Y,am,kHlDVbfVoS&!`p';<kWssM&ST)mB#>!e_?O#@
|
||||
!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^$Vm'6F3#YLaX;8R.<ip3OOX=1s8W-!s8W-!s8W-!s8W-!
|
||||
s8W,_nG,(qc8pO%3eGX=K$HK2c;]tVo(W(^s8W-!s8W-!s8W-!s8W-!s8W-!s8W,LjRk`kcT$L$
|
||||
2h9.2J'Bj"bqjdl147;"Hd"*gb:S"_.sT2cGKM:UaWtuM,'(aIEQ9)<`uAp9(i72,CW-s$`"6S"
|
||||
%;!EaA&8IZ_#d/m!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^!Bu)TD8IH:a<PcI-$77'Nmn%.s8W-!
|
||||
s8W-!s8W-!s8W-!s8W,_nG+nibVajo2Lit0J'Bp&br:0tH)fa$s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8T7FlSO(714@A$I*=9kb:e1b/U>MkH-7^_as_GU-?[EUFNG_Ja<5KD*cT.=DT3Q2`YWF0
|
||||
'PbT!BZ(En_[L(n$"LgV@DN%O]Dt*H!'Gc34FdDoJH,ZLs8W*!4FdDoJ,h]^!'GcB=/R$V`u]3?
|
||||
+E>IpN7.b+s8W-!s8W-!s8W-!s8W-!s8W,^nG+_ab:n:d0mq2"I*=?obVFUj1O[KMbNo3.s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s*q3//pb\mH-7^_asqVXE2;7RnbVSBqK&Oh,'(c7dd>]Lp"8F"
|
||||
fB2bXjn76ep"&6tf&cSTjRq'aoLOnf"^o.K?GHP9UB!E,!'Gc34FdDoJH,ZLs8W-!s8N']J,h]^
|
||||
!'Gc66AQFn`#<L4*,ikeM:)A's8W-!s8W-!s8W-!s8W-!s8W,]n+eGXat%_Z/:#AiH-7dbb:\+a
|
||||
/pb]"JBcm6pAb0ms8W-!s8W-!s8W-!s8W-!s8W-!s7lHh<0G`ZG0)+SaX))OkOA<Is8W-!s7H*a
|
||||
*cT0Pk4ScSs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s&5'0!a`YB>eU2'L]BPf!'Gc34FmJ3s8W-!
|
||||
s8W-!s8N']J,h]^!'Gc34FdiAW"s0f(Mq&WLX?)$s8W-!s8W-!s8W-!s8W-!s8W,]n+e8PaX2/P
|
||||
-[*T[G0).UashPW.<io`GKNaDe+ie<s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!jR2e"Ia''Wa<>TF
|
||||
`nU%`s8W-!s3]iu)/[CFjn8ZRs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s%ng,!+!A?:Sn+SJ,h]^
|
||||
!'Gc34FmJ3s8W-!s8W-!s8W-!rr>03!'Gc34FdJuL(Iq3'5>B9H-;Ykk*s-JS&"0V^uh0&k+0?O
|
||||
S\aKM\Dn`Qa<GZG,'1gMF3#SIa<YlL,]q-RFNGeMa_[^*TYflb_WRT/kF]WST>Kc`_WRQ.kFTNQ
|
||||
T#'T%T%P-&`uK$<.sT3lZf-_Hi@/un'PbTqS(M_Vgi'"CDPPs'U>'LXg1m;7BqO*mT@mkLfcbCW
|
||||
!*d)95DB/#J,h]^!'Gf3s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34FdDoJ-Jc=%VETiB>bEr`"Qk(
|
||||
'l(]'CW.-,`>NO4)K!J5DT3Z7`uT*=*H9%?E5s&>`uf<A+*#=CEQ92A`uf<A+*#=CEQ9/?`u]3?
|
||||
*cT.?DoWl:`uK!:)fEY6D8mE/`YWI1(2Ll'C;gj#`"?\$&8/okB#>$f_[9nj#\(XT@DN(R_#drY
|
||||
!+!A??,-GG^]7ZU!(r^\4FdDoJ,h]^!'Gf3s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]_
|
||||
#[4MBAA\jf_[g@s&8/ooBZ(Qu`"Zt*'l(]'CW.*+`>EF2)/R;1D8mK2`Yr^6)K*P5DT3W5`Z&g8
|
||||
)K*P5DT3T3`Yr^6)/[A1CrR<.`><=/(2Ll(C;gm$`=lt(&ST)oB>b9l_[U1p$Y7*\A&8I[_$4;`
|
||||
"CJtH?GHPH^]7ZU!+!A??,-GG^]7B=!'Gf44FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
!'Gc34FdDoJ,h]^!C2DF?G$SR_?sei$tR6bA]#!i_[gCt&8/onBZ(Nt`"Qk''PYN#C;gp&`>*.,
|
||||
(2Ll)CW.')`>37.(2Ll)CW.$'`>*.,'PbT$BuLa"`"Hb%&ST)oB>b<m_[^:r%;!EbAAS[`_?aVf
|
||||
#@YFP@)2qP^]@cW!+!A??,-GG^]7ZU!+!A??,-GD])Y*O!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W*!4FdDoJ,h]^!'Gc47?I^[^BS)^#@YFS@_rI^_@'nk$tR6bA]#!h_[^:r
|
||||
%q`]jB>b?o`"6S"&ST)pBZ(Kr`"?\$&ST)pB>b?o`"6S"%qicjB#>*j_[U1p$t[<aAAS[`_?j_h
|
||||
#\(XU@DN+T_$",]!a`YC?,-GG^]7ZU!+!A??,-GG^]7ZU!+!A?>e^8,O8qCn!'Gc34FdDoJH,ZL
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FdE&QiUL.!a`YF?blnR_$4>a
|
||||
#@YFS@_rF\_?j_h$=gp\AAS^b_@0tm$tR6aA]"pf_[L+o$tR6aAA\dc_@'nk$Y7*]A&8O^_?aVf
|
||||
#\(XU@DN.U_$+5_"(/hF?GHSI^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!>>8=0B>J,h]^
|
||||
!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rr>03!'Gc34FdDoJ,i31
|
||||
!+!>>?,-JH^]IiX!a`YE?bceO_$+5_"^o.N@DN.V_$=Db#@YFR@DN1W_$=Db#@YFR@DN1W_$4>a
|
||||
#%>=O@)3"S_$",]"(/hF?GHSJ^]@`V!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZT
|
||||
!(r[[4FdDoJ,h]^!'Gf3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rr>03
|
||||
!'Gc34FdDoJ,h]^!(`IW>e^8E^]7ZU!+!A??,-GG^]@`V!F<JA?GHVK^]IiX!a`YD?GHVK^]IiX
|
||||
!a`YD?GHVK^]IiX!FEPB?,-JH^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GF^Apfl!'Gc34FdDoJ,h]^!'Gf3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gc37$%CP])Z-P!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A?>.Xc&O8qCn!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W*!4FdDoJ,h]^!'Gc34FdDsLB(>Y!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!*-6'5_f>%J,h]^!'Gc34FdDoJH,ZLs8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FdDoJ,h]_
|
||||
!(r^\>J'rA^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GE]DtQn!'Gf44FdDoJ,h]^!'Gc34FmJ3s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
!'Gc34FdDoJ,h]^!'Gc35DB/6V>sl8!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!*m5<:Sn+VL&a>d!'Gc34FdDoJ,h]^
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W*!4FdDoJ,h]^!'Gc34FdDoJ,hij!)B9h>Isl@^]7ZU!+!A??,-GG^]7ZU
|
||||
!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GE])YU$!'l>?4FdDoJ,h]^
|
||||
!'Gc34FdDoJH,ZLs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8N']J,h]^!'Gc34FdDoJ,h]^!'Gc34b<Z(PlO^^
|
||||
!*d)9?,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7ZU!+!A??,-GG^]7TO!)ffs8!O';JcIo`
|
||||
!'Gc34FdDoJ,h]^!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gf46Atn9RK--[!*$*$=0qs1\H#gF!*Zu7=h+N6ZiF(.!)KEk8X]WGMuYtk
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8N']J,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FmJ3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!!'Gc34FdDoJ,h]^
|
||||
!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^!'Gc34FdDoJ,h]^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!~>
|
||||
Q
|
||||
cleartomark end end pagesave restore showpage
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
%%Pages: 1
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,337 @@
|
||||
/***************************************************************************
|
||||
begin : sam jui 13 09:50:06 CEST 2002
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : wijnhout@science.uva.nl
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILE_H
|
||||
#define KILE_H
|
||||
|
||||
#include <kdeversion.h>
|
||||
#include <kate/view.h>
|
||||
#include <kate/document.h>
|
||||
#include <dcopobject.h>
|
||||
#include <kparts/mainwindow.h>
|
||||
#include <kparts/partmanager.h>
|
||||
#include <kparts/part.h>
|
||||
|
||||
#include <qsplitter.h>
|
||||
#include <qwidget.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qwidgetstack.h>
|
||||
#include <qstring.h>
|
||||
#include <qtoolbox.h>
|
||||
|
||||
#include "kileappIface.h"
|
||||
#include "docpart.h"
|
||||
#include "kilefileselect.h"
|
||||
#include "kileinfo.h"
|
||||
#include "symbolview.h"
|
||||
|
||||
#include "latexoutputinfo.h"
|
||||
#include "latexoutputfilter.h"
|
||||
|
||||
#include "codecompletion.h" // code completion (dani)
|
||||
#include "kileedit.h" // advanced editor (dani)
|
||||
#include "kilehelp.h" // kile help (dani)
|
||||
#include "quickpreview.h"
|
||||
#include "kileabbrevview.h"
|
||||
|
||||
#define ID_HINTTEXT 301
|
||||
#define ID_LINE_COLUMN 302
|
||||
|
||||
#define KILERC_VERSION 6
|
||||
|
||||
class QFileInfo;
|
||||
class QTimer;
|
||||
class QSignalMapper;
|
||||
class QIconViewItem;
|
||||
|
||||
class KToolBar;
|
||||
class KAction;
|
||||
class KActionMenu;
|
||||
class KRecentFilesAction;
|
||||
class KToggleFullScreenAction;
|
||||
class KToggleToolBarAction;
|
||||
class KMultiTabBar;
|
||||
|
||||
class KileLyxServer;
|
||||
class KileEventFilter;
|
||||
class KileProject;
|
||||
class KileProjectItem;
|
||||
class KileProjectView;
|
||||
class TemplateItem;
|
||||
class KileAutoSaveJob;
|
||||
class KileErrorHandler;
|
||||
class KileSideBar;
|
||||
|
||||
namespace KileAction { class TagData; }
|
||||
namespace KileDocument { class Info; class TextInfo; class Extensions; }
|
||||
namespace KileTool { class Manager; class Factory; }
|
||||
namespace KileWidget { class LogMsg; class Output; class Konsole; class Structure; }
|
||||
|
||||
//TODO remove once we stop supporting pre 1.7 user tools
|
||||
struct userItem
|
||||
{
|
||||
QString name, tag;
|
||||
};
|
||||
|
||||
/**
|
||||
* @author Jeroen Wijnhout
|
||||
**/
|
||||
|
||||
/**
|
||||
* The Kile main class. It acts as the mainwindow, information manager and DCOP interface.
|
||||
**/
|
||||
class Kile : public KParts::MainWindow, public KileAppDCOPIface, public KileInfo
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Kile( bool allowRestore = true, QWidget *parent = 0, const char *name = 0 );
|
||||
~Kile();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @param line : Jump to give line in current editor (can be called via DCOP interface).
|
||||
**/
|
||||
void setLine( const QString &line);
|
||||
void setCursor(const KURL &, int, int);
|
||||
void setActive();
|
||||
int run(const QString &);
|
||||
int runWith(const QString &, const QString &);
|
||||
void runArchiveTool();
|
||||
void runArchiveTool(const KURL&);
|
||||
void openDocument(const QString & url);
|
||||
void fileSelected(const QString & url) { openDocument(url); } //backwards compatibility
|
||||
void closeDocument();
|
||||
void showTip();
|
||||
|
||||
/* actions */
|
||||
private:
|
||||
void showEvent(QShowEvent *e);
|
||||
void hideEvent(QHideEvent *e);
|
||||
QWidget *m_focusWidget;
|
||||
|
||||
void setupStatusBar();
|
||||
void setupSideBar();
|
||||
void setupProjectView();
|
||||
void setupStructureView();
|
||||
void setupScriptsManagementView();
|
||||
void setupSymbolViews();
|
||||
void enableSymbolViewMFUS();
|
||||
void disableSymbolViewMFUS();
|
||||
void setupAbbreviationView();
|
||||
void setupBottomBar();
|
||||
void setupGraphicTools();
|
||||
void setupPreviewTools();
|
||||
void setupActions();
|
||||
void setupTools();
|
||||
void setupUserTagActions();
|
||||
void cleanUpActionList(QPtrList<KAction> &, const QStringList & tools);
|
||||
|
||||
bool kateCompletionPlugin();
|
||||
void checkKateSettings();
|
||||
|
||||
void initMenu();
|
||||
void setMenuItems(QStringList &list, QMap<QString,bool> &dict);
|
||||
void updateMenu();
|
||||
void updateActionList(QPtrList<KAction> *list, bool state);
|
||||
QMap<QString,bool> m_dictMenuAction, m_dictMenuFile, m_dictMenuProject;
|
||||
|
||||
KToolBar *m_toolsToolBar;
|
||||
KActionMenu *m_menuUserTags;
|
||||
QValueList<KileAction::TagData> m_listUserTags;
|
||||
QValueList<userItem> m_listUserTools;
|
||||
QPtrList<KAction> m_listUserTagsActions, m_listQuickActions, m_listCompilerActions, m_listConverterActions, m_listViewerActions, m_listOtherActions;
|
||||
KAction *m_actionEditTag;
|
||||
KActionSeparator *m_actionEditSeparator;
|
||||
KAction *m_paStop, *m_paPrint;
|
||||
KToggleAction *ModeAction, *WatchFileAction;
|
||||
KToggleAction *m_actionMessageView;
|
||||
KRecentFilesAction *m_actRecentFiles;
|
||||
KToggleFullScreenAction *m_pFullScreen;
|
||||
|
||||
/* GUI */
|
||||
private:
|
||||
//widgets
|
||||
KileSideBar *m_sideBar;
|
||||
KileAbbrevView *m_kileAbbrevView;
|
||||
QWidgetStack *m_topWidgetStack;
|
||||
QSplitter *m_horizontalSplitter, *m_verticalSplitter;
|
||||
QToolBox *m_toolBox;
|
||||
SymbolView *m_symbolViewMFUS, *m_symbolViewRelation, *m_symbolViewArrows, *m_symbolViewMiscMath, *m_symbolViewMiscText, *m_symbolViewOperators, *m_symbolViewUser, *m_symbolViewDelimiters, *m_symbolViewGreek, *m_symbolViewSpecial, *m_symbolViewCyrillic;
|
||||
|
||||
//parts
|
||||
KParts::PartManager *m_partManager;
|
||||
QString m_wantState, m_currentState;
|
||||
|
||||
private slots:
|
||||
void toggleMode();
|
||||
void toggleWatchFile();
|
||||
void showEditorWidget();
|
||||
void refreshStructure();
|
||||
|
||||
void helpLaTex();
|
||||
|
||||
private slots:
|
||||
bool resetPart();
|
||||
void activePartGUI(KParts::Part *);
|
||||
void showToolBars(const QString &);
|
||||
void enableKileGUI(bool);
|
||||
void slotToggleFullScreen();
|
||||
|
||||
public slots:
|
||||
void prepareForPart(const QString &);
|
||||
|
||||
/* config */
|
||||
private:
|
||||
KConfig *m_config;
|
||||
int m_horSplitRight, m_horSplitLeft, m_verSplitTop, m_verSplitBottom;
|
||||
QStringList m_recentFilesList, m_listDocsOpenOnStart, m_listProjectsOpenOnStart;
|
||||
|
||||
void setViewerToolBars();
|
||||
signals:
|
||||
/**
|
||||
* Emit this signal when the configuration is changed. Classes that read and write to the global KConfig object
|
||||
* should connect to this signal so they can update their settings.
|
||||
**/
|
||||
void configChanged();
|
||||
|
||||
private slots:
|
||||
void restoreFilesAndProjects(bool allowRestore);
|
||||
void readGUISettings();
|
||||
void readUserSettings();
|
||||
void readRecentFileSettings();
|
||||
void saveSettings();
|
||||
|
||||
void readConfig();
|
||||
|
||||
void generalOptions();
|
||||
void configureKeys();
|
||||
void configureToolbars();
|
||||
void slotPerformCheck();
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* Activates (sets up the GUI for the editor part) the view.
|
||||
* @param updateStruct If true, force an update of the structure view.
|
||||
**/
|
||||
void activateView(QWidget* view , bool updateStruct = true);
|
||||
|
||||
void focusLog();
|
||||
void focusOutput();
|
||||
void focusKonsole();
|
||||
void focusEditor();
|
||||
void focusPreview();
|
||||
|
||||
void sideOrBottomBarChanged(bool visible);
|
||||
|
||||
public slots:
|
||||
bool queryExit();
|
||||
bool queryClose();
|
||||
|
||||
void changeInputEncoding();
|
||||
|
||||
void newStatus(const QString& = QString::null);
|
||||
void updateModeStatus();
|
||||
void newCaption();
|
||||
void citeViewBib();
|
||||
|
||||
public slots:
|
||||
void openProject(const QString& proj);
|
||||
|
||||
private:
|
||||
KRecentFilesAction *m_actRecentProjects;
|
||||
|
||||
//
|
||||
// documentinfo
|
||||
//
|
||||
private slots:
|
||||
void showDocInfo(Kate::Document *doc = 0);
|
||||
void convertToASCII(Kate::Document *doc = 0);
|
||||
void convertToEnc(Kate::Document *doc = 0);
|
||||
|
||||
public:
|
||||
int lineNumber();
|
||||
|
||||
/* autosave */
|
||||
private slots:
|
||||
void autoSaveAll();
|
||||
void enableAutosave(bool);
|
||||
|
||||
private:
|
||||
QTimer *m_AutosaveTimer;
|
||||
|
||||
private slots:
|
||||
void runTool();
|
||||
|
||||
void cleanAll(KileDocument::TextInfo *docinfo = 0);
|
||||
void cleanBib();
|
||||
|
||||
void findInFiles();
|
||||
void findInProjects();
|
||||
void grepItemSelected(const QString &abs_filename, int line);
|
||||
|
||||
/* insert tags */
|
||||
private slots:
|
||||
/**
|
||||
* @param td Inserts the TagData td into the current editor.
|
||||
*
|
||||
* It can wrap a tag around selected text.
|
||||
**/
|
||||
void insertTag(const KileAction::TagData& td);
|
||||
/**
|
||||
* @param td Inserts the TagData td into the current editor
|
||||
* @param pkgs list of packages needed for this command
|
||||
*
|
||||
* warns if latex packages in pkgs are not included in the document
|
||||
**/
|
||||
void insertTag(const KileAction::TagData& td, const QStringList& pkgs);
|
||||
/**
|
||||
* An overloaded member function, behaves essentially as above.
|
||||
**/
|
||||
void insertTag(const QString& tagB, const QString& tagE, int dx, int dy);
|
||||
void insertAmsTag(const KileAction::TagData& td);
|
||||
void insertText(const QString &text, const QStringList &pkgs);
|
||||
void insertText(const QString &text);
|
||||
|
||||
void quickTabular();
|
||||
void quickArray();
|
||||
void quickTabbing();
|
||||
void quickDocument();
|
||||
void quickFloat();
|
||||
void quickMathenv();
|
||||
void quickPostscript();
|
||||
void quickTabulardialog(bool tabularenv);
|
||||
|
||||
void editUserMenu();
|
||||
|
||||
void includeGraphics();
|
||||
|
||||
private:
|
||||
KileLyxServer *m_lyxserver;
|
||||
|
||||
private:
|
||||
KileErrorHandler *m_errorHandler;
|
||||
|
||||
// QuickPreview
|
||||
private slots:
|
||||
void slotQuickPreview(int type);
|
||||
|
||||
void quickPreviewEnvironment() { slotQuickPreview(KileTool::qpEnvironment); }
|
||||
void quickPreviewSelection() { slotQuickPreview(KileTool::qpSelection); }
|
||||
void quickPreviewSubdocument() { slotQuickPreview(KileTool::qpSubdocument); }
|
||||
void quickPreviewMathgroup() { slotQuickPreview(KileTool::qpMathgroup); }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,515 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<include>qapplication.h</include>
|
||||
<include>qstring.h</include>
|
||||
<include>qtextcodec.h</include>
|
||||
<include>qdir.h</include>
|
||||
|
||||
<kcfgfile name="kilerc"/>
|
||||
|
||||
<group name="VersionInfo">
|
||||
<entry name="RCVersion" type="Int">
|
||||
<label>The resource file version.</label>
|
||||
<default>0</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Geometries">
|
||||
<entry name="horizontalSplitterLeft" type="Int">
|
||||
<label></label>
|
||||
<default>100</default>
|
||||
</entry>
|
||||
<entry name="horizontalSplitterRight" type="Int">
|
||||
<label></label>
|
||||
<default>350</default>
|
||||
</entry>
|
||||
<entry name="verticalSplitterTop" type="Int">
|
||||
<label></label>
|
||||
<default>350</default>
|
||||
</entry>
|
||||
<entry name="verticalSplitterBottom" type="Int">
|
||||
<label></label>
|
||||
<default>100</default>
|
||||
</entry>
|
||||
<entry name="MainwindowWidth" type="Int">
|
||||
<label>The main window's width.</label>
|
||||
<default code="true">
|
||||
QApplication::desktop()->screenGeometry().width() - 100
|
||||
</default>
|
||||
</entry>
|
||||
<entry name="MainwindowHeight" type="Int">
|
||||
<label>The main window's height.</label>
|
||||
<default code="true">
|
||||
QApplication::desktop()->screenGeometry().height() - 100
|
||||
</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Structure">
|
||||
<entry name="DefaultLevel" type="Int">
|
||||
<label>The expansion level for the structure view.</label>
|
||||
<default>5</default>
|
||||
</entry>
|
||||
<entry name="SvShowLabels" type="Bool">
|
||||
<label>Show label commands in the structure view</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvShowReferences" type="Bool">
|
||||
<label>Show undefined references in the structure view</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SvShowBibitems" type="Bool">
|
||||
<label>Show bibitems commands in the structure view</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvShowGraphics" type="Bool">
|
||||
<label>Show includegraphics commands in the structure view</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvShowFloats" type="Bool">
|
||||
<label>Show float environments in the structure view</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvShowInputFiles" type="Bool">
|
||||
<label>Show file input commands in the structure view</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvShowSectioningLabels" type="Bool">
|
||||
<label>Show labels as child of sectioning items in the structure view</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SvShowTodo" type="Bool">
|
||||
<label>Show TODO and FIXME comments</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="SvOpenLabels" type="Bool">
|
||||
<label>Open the parent item for all labels in the structure view as default</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SvOpenReferences" type="Bool">
|
||||
<label>Open the parent item for all undefined references in the structure view</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SvOpenBibitems" type="Bool">
|
||||
<label>Open the parent item for all bibitems in the structure view as default</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SvOpenTodo" type="Bool">
|
||||
<label>Open the parent item for all TODO and FIXME comments as default</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Tools">
|
||||
<entry name="RunLyxServer" type="Bool">
|
||||
<label>Whether to run the Lyx server.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="TeXPaths" type="String">
|
||||
<label>Holds the TEXINPUTS environment variable.</label>
|
||||
<whatsthis>Set the TEXINPUTS environment variable here. TEXINPUTS should be a colon-separated list of all paths TeX should look for additional packages and/or files. You do not have to add :$TEXINPUTS at the end.</whatsthis>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="PreviewTeXPaths" type="String">
|
||||
<label>Holds the TEXINPUTS environment variable for QuickPreview tools.</label>
|
||||
<whatsthis>Set the TEXINPUTS environment variable for QuickPreview tools here. TEXINPUTS should be a colon-separated list of all paths TeX should look for additional packages and/or files. You do not have to add :$TEXINPUTS at the end.</whatsthis>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="BibInputPaths" type="String">
|
||||
<label>Holds th BIBINPUTS environment variable.</label>
|
||||
<whatsthis>Set the BIBINPUTS environment variable here. BIBINPUTS should be a colon-separated list of all paths bibtex should look for additional .bib files. You do not have to add :$BIBINPUTS at the end.</whatsthis>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="BstInputPaths" type="String">
|
||||
<label>Holds th BSTINPUTS environment variable.</label>
|
||||
<whatsthis>Set the BSTINPUTS environment variable here. BSTINPUTS should be a colon-separated list of all paths bibtex should look for additional .bst files. You do not have to add :$BSTINPUTS at the end.</whatsthis>
|
||||
<default></default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Show">
|
||||
<entry name="BottomBar" type="Bool">
|
||||
<label>Whether to show the bottom bar.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="BottomBarSize" type="Int">
|
||||
<label>Height of the bottombar.</label>
|
||||
<default>200</default>
|
||||
</entry>
|
||||
<entry name="SideBarSize" type="Int">
|
||||
<label>Width of the sidebar.</label>
|
||||
<default>300</default>
|
||||
</entry>
|
||||
<entry name="SideBar" type="Bool">
|
||||
<label>Whether to show the side bar.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="HideProblemBadBox" type="Bool">
|
||||
<label>Whether to show Bad Box warnings in the LogMsg view.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="HideProblemWarning" type="Bool">
|
||||
<label>Whether to show (La)TeX warnings in the LogMsg view.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="SelectedLeftView" type="Int">
|
||||
<label>The identifier of the selected view in the left pane.</label>
|
||||
<default>1</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Editor Ext">
|
||||
<entry name="CompleteEnvironment" type="Bool">
|
||||
<label>Automatic completion \begin{env} with \end{env}.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="envIndentation" type="Bool">
|
||||
<label>Enable auto indentation of environemnts</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="envIndentSpaces" type="Bool">
|
||||
<label>Use spaces instead of a tabulator to autoindent environments</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="envIndentNumSpaces" type="Int">
|
||||
<label>Use this number of spaces to autoindent environments</label>
|
||||
<default>1</default>
|
||||
</entry>
|
||||
<entry name="ShowUserCommands" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="InsertDoubleQuotes" type="Bool">
|
||||
<label>Automatic insertion of double quotes.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="DoubleQuotes" type="Int">
|
||||
<label>Language dependent type of double quotes.</label>
|
||||
<default>0</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="IncludeGraphics">
|
||||
<entry name="igCenter" type="Bool">
|
||||
<label>Center the graphics.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="igPdftex" type="Bool">
|
||||
<label>Use PdfTeX or PdfLaTeX.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="igGraphicspath" type="Bool">
|
||||
<label>Filename is relative to a path given in graphicspath command.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="igFigure" type="Bool">
|
||||
<label>Embed the graphics in a figure environment.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="imagemagick" type="Bool">
|
||||
<label>Whether ImageMagick is installed.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="boundingbox" type="Bool">
|
||||
<label>Try to determine the bounding box from the picture.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="resolution" type="Int">
|
||||
<label>The default image resolution.</label>
|
||||
<default>300</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Help">
|
||||
<entry name="location" type="String">
|
||||
<label>Location of the TeX documentation.</label>
|
||||
<default>/usr/share/texmf/doc</default>
|
||||
</entry>
|
||||
<entry name="use" type="Int">
|
||||
<label>Use the system's TeX reference for the contextual help.</label>
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="embedded" type="Int">
|
||||
<label>Use embedded viewer for user help.</label>
|
||||
<default>1</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Files">
|
||||
<entry name="DefaultEncoding" type="String">
|
||||
<label>The default encoding.</label>
|
||||
<default>invalid</default>
|
||||
</entry>
|
||||
<entry name="Restore" type="Bool">
|
||||
<label>Reopen files and projects on startup.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="Autosave" type="Bool">
|
||||
<label>Automatic save.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CleanUpAfterClose" type="Bool">
|
||||
<label>Automatically clean-up files after close.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="AutosaveInterval" type="Int">
|
||||
<label>The autosave interval in minutes.</label>
|
||||
<default>10</default>
|
||||
</entry>
|
||||
<entry name="CleanUpFileExtensions" type="String">
|
||||
<label>The file extensions to clean on exit.</label>
|
||||
<default>.log .aux .lof .lot .bit .idx .glo .blg .ilg .toc .ind</default>
|
||||
</entry>
|
||||
<entry name="LastDocument" type="Path">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="InputEncoding" type="String">
|
||||
<label></label>
|
||||
<default code="true">
|
||||
QString::fromLatin1(QTextCodec::codecForLocale()->name())
|
||||
</default>
|
||||
</entry>
|
||||
<entry name="lastDir" type="Path">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="User">
|
||||
<entry name="Author" type="String">
|
||||
<label>The Author template variable.</label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="DocumentClassOptions" type="String">
|
||||
<label>The Documentclass template variable.</label>
|
||||
<default>a4paper,10pt</default>
|
||||
</entry>
|
||||
<entry name="TemplateEncoding" type="String">
|
||||
<label>The Input encoding template variable.</label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="DefaultProjectLocation" type="String">
|
||||
<label>The default location where the projects must be created.</label>
|
||||
<default code="true">
|
||||
QDir::home().absPath()
|
||||
</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Complete">
|
||||
<entry name="CompleteEnabled" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CompleteCursor" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CompleteBullets" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CompleteCloseEnv" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CompleteAuto" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="CompleteAutoText" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="completeAutoAbbrev" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="completeShowAbbrev" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="completeCitationMove" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="CompleteAutoThreshold" type="Int">
|
||||
<label></label>
|
||||
<default>3</default>
|
||||
</entry>
|
||||
<entry name="CompleteAutoTextThreshold" type="Int">
|
||||
<label></label>
|
||||
<default>3</default>
|
||||
</entry>
|
||||
<entry name="CompleteChangedLists" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="CompleteChangedCommands" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="CompleteTex" type="StringList">
|
||||
<label></label>
|
||||
<default>1-latex-document,1-tex</default>
|
||||
</entry>
|
||||
<entry name="CompleteDict" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="CompleteAbbrev" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="autoInsertDollar" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="FilesOpenOnStart">
|
||||
<entry name="Master" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="QuickPreview">
|
||||
<entry name="previewTask" type="String">
|
||||
<label></label>
|
||||
<default>LaTeX ---> DVI</default>
|
||||
</entry>
|
||||
<entry name="dvipng" type="Bool">
|
||||
<label>Whether Dvipng is installed.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="convert" type="Bool">
|
||||
<label>Whether Convert is installed.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="dvipngResolution" type="String">
|
||||
<label></label>
|
||||
<default>120</default>
|
||||
</entry>
|
||||
<entry name="envPreviewInWidget" type="Bool">
|
||||
<label>Show preview of environments in bottom bar.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="selPreviewInWidget" type="Bool">
|
||||
<label>Show preview of selected text in bottom bar.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="mathgroupPreviewInWidget" type="Bool">
|
||||
<label>Show preview of mathgroups in bottom bar.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="envPreviewTool" type="Int">
|
||||
<label>Conversion tool for preview of environments in bottom bar.</label>
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="selPreviewTool" type="Int">
|
||||
<label>Conversion tool for preview of selected text in bottom bar.</label>
|
||||
<default>0</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="QuickDocument">
|
||||
<entry name="userClasses" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="documentClass" type="String">
|
||||
<label></label>
|
||||
<default>article</default>
|
||||
</entry>
|
||||
<entry name="encoding" type="String">
|
||||
<label></label>
|
||||
<default>latin1</default>
|
||||
</entry>
|
||||
<entry name="optionsArticle" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsBook" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsReport" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsLetter" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsScrartcl" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsScrbook" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsScrreprt" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsProsper" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="optionsBeamer" type="String">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="QuickDocument/Packages">
|
||||
<entry name="packagesList" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="KileGrepDialog">
|
||||
<entry name="LastSearchItems" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="LastSearchPaths" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="LastSearchTemplates" type="StringList">
|
||||
<label></label>
|
||||
<default></default>
|
||||
</entry>
|
||||
<entry name="GrepRecursive" type="Bool">
|
||||
<label></label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="KileConfigDialog">
|
||||
<entry name="UnfoldConfigTree" type="Bool">
|
||||
<label></label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Scripting">
|
||||
<entry name="ScriptingEnabled" type="Bool">
|
||||
<label>Enable the scripting support.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="TimeLimitEnabled" type="Bool">
|
||||
<label>Set a time limit for the execution of scripts.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="TimeLimit" type="Int">
|
||||
<label>Time limit for the execution of scripts.</label>
|
||||
<default>5</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="MostUsedSymbols">
|
||||
<entry name="numSymbolsMFUS" type="UInt">
|
||||
<label>Number of symbols to store in the Most Frequently Used Symbols view.</label>
|
||||
<default>30</default>
|
||||
</entry>
|
||||
<entry name="displayMFUS" type="Bool">
|
||||
<label>Display the Most Frequently Used Symbols view.</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="clearMFUS" type="Bool">
|
||||
<label>Clear the list of the most frequently used symbols whilst closing Kile.</label>
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
@ -0,0 +1,319 @@
|
||||
/***************************************************************************
|
||||
begin : Feb 24 2007
|
||||
copyright : 2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kileabbrevview.h"
|
||||
|
||||
#include <klistview.h>
|
||||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include <qheader.h>
|
||||
#include <qlayout.h>
|
||||
#include <qregexp.h>
|
||||
#include <qvalidator.h>
|
||||
#include <qfile.h>
|
||||
|
||||
KileAbbrevView::KileAbbrevView(QWidget *parent, const char *name)
|
||||
: KListView(parent, name), m_changes(false)
|
||||
{
|
||||
|
||||
addColumn(i18n("Short"));
|
||||
addColumn(QString::null);
|
||||
addColumn(i18n("Expanded Text"));
|
||||
setAllColumnsShowFocus(true);
|
||||
setFullWidth(true);
|
||||
|
||||
setItemsMovable(false); // default: true
|
||||
//setAcceptDrops(false); // default: false
|
||||
//setDragEnabled(false); // default: false
|
||||
//setShadeSortColumn(true); // default: true
|
||||
header()->setMovingEnabled(false); // default: true
|
||||
|
||||
m_popup = new QPopupMenu( this );
|
||||
|
||||
connect(this, SIGNAL(mouseButtonClicked(int,QListViewItem *,const QPoint &,int)),
|
||||
this, SLOT(slotMouseButtonClicked(int,QListViewItem *,const QPoint &,int)));
|
||||
|
||||
connect(this, SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint &)),
|
||||
this, SLOT(slotContextMenu(KListView *,QListViewItem *,const QPoint &)));
|
||||
}
|
||||
|
||||
KileAbbrevView::~KileAbbrevView()
|
||||
{
|
||||
}
|
||||
//////////////////// init abbreviation view with wordlists ////////////////////
|
||||
|
||||
|
||||
void KileAbbrevView::init(const QStringList *globallist, const QStringList *locallist)
|
||||
{
|
||||
setUpdatesEnabled(false);
|
||||
clear();
|
||||
addWordlist(globallist,true);
|
||||
addWordlist(locallist,false);
|
||||
setUpdatesEnabled(true);
|
||||
|
||||
m_changes = false;
|
||||
}
|
||||
|
||||
void KileAbbrevView::addWordlist(const QStringList *wordlist, bool global)
|
||||
{
|
||||
QString type = ( global ) ? QString::null : "*";
|
||||
|
||||
QStringList::ConstIterator it;
|
||||
for ( it=wordlist->begin(); it!=wordlist->end(); ++it )
|
||||
{
|
||||
int index = (*it).find( '=' );
|
||||
if ( index >= 0 )
|
||||
{
|
||||
insertItem( new KListViewItem(this,(*it).left(index),type,(*it).right( (*it).length()-index-1 )) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// save local abbreviation list ////////////////////
|
||||
|
||||
void KileAbbrevView::saveLocalAbbreviation(const QString &filename)
|
||||
{
|
||||
if ( ! m_changes )
|
||||
return;
|
||||
|
||||
KILE_DEBUG() << "=== KileAbbrevView::saveLocalAbbreviation ===================" << endl;
|
||||
// create the file
|
||||
QFile abbrevfile(filename);
|
||||
if ( ! abbrevfile.open( IO_WriteOnly ) )
|
||||
return;
|
||||
|
||||
QTextStream stream( &abbrevfile );
|
||||
stream << "# abbreviation mode: editable abbreviations\n";
|
||||
stream << "# dani/2007\n";
|
||||
|
||||
//QTextCodec *codec = QTextCodec::codecForName(m_ki->activeTextDocument()->encoding().ascii());
|
||||
// stream.setCodec(codec);
|
||||
|
||||
QListViewItemIterator it( this );
|
||||
while ( it.current() )
|
||||
{
|
||||
if ( it.current()->text(KileAbbrevView::ALVlocal) == "*" )
|
||||
{
|
||||
stream << it.current()->text(KileAbbrevView::ALVabbrev)
|
||||
<< "="
|
||||
<< it.current()->text(KileAbbrevView::ALVexpansion)
|
||||
<< "\n";
|
||||
}
|
||||
++it;
|
||||
}
|
||||
abbrevfile.close();
|
||||
|
||||
m_changes = false;
|
||||
}
|
||||
|
||||
//////////////////// find abbreviation ////////////////////
|
||||
|
||||
bool KileAbbrevView::findAbbreviation(const QString &abbrev)
|
||||
{
|
||||
QListViewItemIterator it( this );
|
||||
while ( it.current() )
|
||||
{
|
||||
if ( it.current()->text(KileAbbrevView::ALVabbrev) == abbrev )
|
||||
return true;
|
||||
|
||||
++it;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////// item clicked ////////////////////
|
||||
|
||||
void KileAbbrevView::slotMouseButtonClicked(int button, QListViewItem *item, const QPoint &, int)
|
||||
{
|
||||
if ( button==1 && item )
|
||||
{
|
||||
emit( sendText( item->text(KileAbbrevView::ALVexpansion) ) );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// context menu ////////////////////
|
||||
|
||||
void KileAbbrevView::slotContextMenu(KListView *, QListViewItem *item, const QPoint &pos)
|
||||
{
|
||||
m_popup->clear();
|
||||
m_popup->disconnect();
|
||||
|
||||
m_popup->insertItem(i18n("&Add"),ALVadd);
|
||||
if ( item && item->text(ALVlocal)== "*" )
|
||||
{
|
||||
m_popup->insertSeparator();
|
||||
m_popup->insertItem(i18n("&Edit"),ALVedit);
|
||||
m_popup->insertSeparator();
|
||||
m_popup->insertItem(i18n("&Delete"),ALVdelete);
|
||||
}
|
||||
|
||||
connect(m_popup, SIGNAL(activated(int)), this, SLOT(slotPopupAbbreviation(int)));
|
||||
|
||||
// show context menu
|
||||
m_popup->exec(pos);
|
||||
}
|
||||
|
||||
void KileAbbrevView::addAbbreviation(const QString &abbrev, const QString &expansion)
|
||||
{
|
||||
insertItem( new KListViewItem(this,abbrev,"*",expansion) );
|
||||
QString newAbbrev = abbrev + '=' + expansion;
|
||||
|
||||
emit( updateAbbrevList(QString::null,newAbbrev) );
|
||||
m_changes = true;
|
||||
}
|
||||
|
||||
void KileAbbrevView::changeAbbreviation(KListViewItem *item, const QString &abbrev, const QString &expansion)
|
||||
{
|
||||
if ( item )
|
||||
{
|
||||
QString oldAbbrev = item->text(ALVabbrev) + '=' + item->text(ALVexpansion);
|
||||
QString newAbbrev = abbrev + '=' + expansion;
|
||||
item->setText(ALVabbrev,abbrev);
|
||||
item->setText(ALVexpansion,expansion);
|
||||
|
||||
emit( updateAbbrevList(oldAbbrev,newAbbrev) );
|
||||
m_changes = true;
|
||||
}
|
||||
}
|
||||
|
||||
void KileAbbrevView::deleteAbbreviation(KListViewItem *item)
|
||||
{
|
||||
QString abbrev = item->text(ALVabbrev);
|
||||
QString message = i18n("Delete the abbreviation '%1'?").arg(abbrev);
|
||||
if ( KMessageBox::questionYesNo( this,
|
||||
"<center>" + message + "</center>",
|
||||
i18n("Delete Abbreviation") ) == KMessageBox::Yes )
|
||||
{
|
||||
QString s = item->text(ALVabbrev) + '=' + item->text(ALVexpansion);
|
||||
delete item;
|
||||
|
||||
emit( updateAbbrevList(s,QString::null) );
|
||||
m_changes = true;
|
||||
}
|
||||
}
|
||||
|
||||
void KileAbbrevView::slotPopupAbbreviation(int id)
|
||||
{
|
||||
KListViewItem *item = (KListViewItem *)selectedItem();
|
||||
|
||||
int mode = ALVnone;
|
||||
if ( id == ALVadd )
|
||||
mode = ALVadd;
|
||||
else if ( id==ALVedit && item )
|
||||
mode = ALVedit;
|
||||
else if ( id==ALVdelete && item )
|
||||
deleteAbbreviation(item);
|
||||
|
||||
if ( mode != ALVnone )
|
||||
{
|
||||
KileAbbrevInputDialog *dialog = new KileAbbrevInputDialog(this,item,mode);
|
||||
if ( dialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
QString abbrev,expansion;
|
||||
dialog->abbreviation(abbrev,expansion);
|
||||
if ( mode == ALVadd )
|
||||
addAbbreviation(abbrev,expansion);
|
||||
else
|
||||
changeAbbreviation(item,abbrev,expansion);
|
||||
}
|
||||
delete dialog;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// add/edit abbreviation ////////////////////
|
||||
|
||||
KileAbbrevInputDialog::KileAbbrevInputDialog(KileAbbrevView *listview, KListViewItem *item, int mode, const char *name )
|
||||
: KDialogBase(listview,name, true, i18n("Add Abbreviation"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true),
|
||||
m_listview(listview), m_abbrevItem(item), m_mode(mode)
|
||||
{
|
||||
QWidget *page = new QWidget(this);
|
||||
setMainWidget(page);
|
||||
QVBoxLayout *vl = new QVBoxLayout(page, 0, spacingHint());
|
||||
|
||||
if ( m_mode == KileAbbrevView::ALVedit )
|
||||
{
|
||||
setCaption( i18n("Edit Abbreviation") );
|
||||
m_abbrev = m_abbrevItem->text(KileAbbrevView::ALVabbrev);
|
||||
m_expansion = m_abbrevItem->text(KileAbbrevView::ALVexpansion);
|
||||
}
|
||||
|
||||
QLabel *abbrev = new QLabel(i18n("&Abbreviation:"),page);
|
||||
QLabel *expansion = new QLabel(i18n("&Expanded Text:"),page);
|
||||
m_leAbbrev = new KLineEdit(m_abbrev,page);
|
||||
m_leExpansion = new KLineEdit(m_expansion,page);
|
||||
|
||||
vl->addWidget(abbrev);
|
||||
vl->addWidget(m_leAbbrev);
|
||||
vl->addWidget(expansion);
|
||||
vl->addWidget(m_leExpansion);
|
||||
vl->addSpacing(8);
|
||||
|
||||
abbrev->setBuddy(m_leAbbrev);
|
||||
expansion->setBuddy(m_leExpansion);
|
||||
|
||||
QRegExp reg("[a-zA-Z0-9]+");
|
||||
QRegExpValidator *abbrevValidator = new QRegExpValidator(reg,this);
|
||||
m_leAbbrev->setValidator(abbrevValidator);
|
||||
|
||||
connect(m_leAbbrev,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(slotTextChanged(const QString &)));
|
||||
connect(m_leExpansion,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(slotTextChanged(const QString &)));
|
||||
|
||||
slotTextChanged(QString::null);
|
||||
m_leAbbrev->setFocus();
|
||||
page->setMinimumWidth(350);
|
||||
}
|
||||
|
||||
KileAbbrevInputDialog::~KileAbbrevInputDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void KileAbbrevInputDialog::abbreviation(QString &abbrev, QString &expansion)
|
||||
{
|
||||
abbrev = m_leAbbrev->text();
|
||||
expansion = m_leExpansion->text().stripWhiteSpace();
|
||||
}
|
||||
|
||||
void KileAbbrevInputDialog::slotTextChanged(const QString &)
|
||||
{
|
||||
bool state = ( m_mode == KileAbbrevView::ALVadd )
|
||||
? ! m_listview->findAbbreviation( m_leAbbrev->text() ) : true;
|
||||
state = state && !m_leAbbrev->text().isEmpty() && !m_leExpansion->text().isEmpty();
|
||||
|
||||
enableButton(KDialogBase::Ok,state);
|
||||
}
|
||||
|
||||
void KileAbbrevInputDialog::slotOk()
|
||||
{
|
||||
QString abbrev = m_leAbbrev->text();
|
||||
QString expansion = m_leExpansion->text().stripWhiteSpace();
|
||||
|
||||
if ( abbrev.isEmpty() || expansion.isEmpty() )
|
||||
{
|
||||
KMessageBox::error( this, i18n("Empty strings are not allowed.") );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( abbrev!=m_abbrev || expansion!=m_expansion )
|
||||
accept();
|
||||
else
|
||||
reject();
|
||||
}
|
||||
|
||||
|
||||
#include "kileabbrevview.moc"
|
@ -0,0 +1,95 @@
|
||||
/***************************************************************************
|
||||
begin : Feb 24 2007
|
||||
copyright : 2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEABBREVVIEW_H
|
||||
#define KILEABBREVVIEW_H
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpopupmenu.h>
|
||||
|
||||
#include <klineedit.h>
|
||||
#include <klistbox.h>
|
||||
#include <klistview.h>
|
||||
#include <kdialogbase.h>
|
||||
|
||||
//////////////////// KlistView for abbreviations ////////////////////
|
||||
|
||||
class KileAbbrevView : public KListView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum { ALVabbrev=0, ALVlocal=1, ALVexpansion=2 };
|
||||
enum { ALVnone=0, ALVadd=1, ALVedit=2, ALVdelete=3 };
|
||||
|
||||
KileAbbrevView(QWidget *parent=0, const char *name=0);
|
||||
~KileAbbrevView();
|
||||
|
||||
void init(const QStringList *globallist, const QStringList *locallist);
|
||||
bool findAbbreviation(const QString &abbrev);
|
||||
void saveLocalAbbreviation(const QString &filename);
|
||||
|
||||
signals:
|
||||
void updateAbbrevList(const QString &ds, const QString &as);
|
||||
void sendText(const QString &text);
|
||||
|
||||
private slots:
|
||||
void slotMouseButtonClicked(int button, QListViewItem *item, const QPoint &pos, int);
|
||||
void slotContextMenu(KListView *, QListViewItem *item, const QPoint &pos);
|
||||
void slotPopupAbbreviation(int id);
|
||||
|
||||
private:
|
||||
QPopupMenu* m_popup;
|
||||
bool m_changes;
|
||||
|
||||
void addAbbreviation(const QString &abbrev, const QString &expansion);
|
||||
void changeAbbreviation(KListViewItem *item,const QString &abbrev, const QString &expansion);
|
||||
void deleteAbbreviation(KListViewItem *item);
|
||||
|
||||
void addWordlist(const QStringList *wordlist, bool global);
|
||||
|
||||
};
|
||||
|
||||
//////////////////// add/edit dialog for abbreviations ////////////////////
|
||||
|
||||
class KileAbbrevInputDialog : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileAbbrevInputDialog(KileAbbrevView *listview, KListViewItem *item, int mode, const char *name=0);
|
||||
~KileAbbrevInputDialog();
|
||||
|
||||
void abbreviation(QString &abbrev, QString &expansion);
|
||||
|
||||
private:
|
||||
KileAbbrevView *m_listview;
|
||||
KListViewItem *m_abbrevItem;
|
||||
KLineEdit *m_leAbbrev;
|
||||
KLineEdit *m_leExpansion;
|
||||
|
||||
int m_mode;
|
||||
QString m_abbrev, m_expansion;
|
||||
|
||||
public slots:
|
||||
void slotOk();
|
||||
|
||||
private slots:
|
||||
void slotTextChanged(const QString &text);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,394 @@
|
||||
/***************************************************************************
|
||||
begin : 2003-07-01 17:33:00 CEST 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2005-07-26 dani
|
||||
// - cleanup dialog
|
||||
// - added new action 'ShowLabel'
|
||||
|
||||
// 2007-03-12 dani
|
||||
// - use KileDocument::Extensions
|
||||
|
||||
#include "kileactions.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#include <klineedit.h>
|
||||
#include <kglobal.h>
|
||||
#include <kcombobox.h>
|
||||
#include <kpushbutton.h>
|
||||
#include <klocale.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <kiconloader.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kileinfo.h"
|
||||
#include "kiledocmanager.h"
|
||||
|
||||
namespace KileAction
|
||||
{
|
||||
|
||||
////////////////
|
||||
// Tag //
|
||||
////////////////
|
||||
Tag::Tag( const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent
|
||||
, const char *name, const QString &tagBegin, const QString &tagEnd
|
||||
, int dx, int dy, const QString &description)
|
||||
: KAction(text, cut, parent, name),
|
||||
m_data(text,tagBegin, tagEnd, dx, dy, description)
|
||||
{
|
||||
init(receiver,slot);
|
||||
}
|
||||
|
||||
Tag::Tag( const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent
|
||||
, const char *name, const QString &tagBegin, const QString &tagEnd
|
||||
, int dx, int dy, const QString &description)
|
||||
: KAction(text, pix, cut, parent, name),
|
||||
m_data(text,tagBegin, tagEnd, dx, dy, description)
|
||||
{
|
||||
init(receiver,slot);
|
||||
}
|
||||
|
||||
Tag::Tag( const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent
|
||||
, const char *name, const TagData& data)
|
||||
: KAction(text, cut, parent, name),
|
||||
m_data(data)
|
||||
{
|
||||
init(receiver,slot);
|
||||
}
|
||||
|
||||
Tag::Tag( const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent
|
||||
, const char *name, const TagData& data)
|
||||
: KAction(text, pix, cut, parent, name),
|
||||
m_data(data)
|
||||
{
|
||||
init(receiver,slot);
|
||||
}
|
||||
|
||||
Tag::~Tag()
|
||||
{
|
||||
}
|
||||
|
||||
void Tag::init(const QObject *receiver, const char *slot)
|
||||
{
|
||||
connect(this, SIGNAL(activated()), SLOT(emitData()));
|
||||
connect(this, SIGNAL(activated(const KileAction::TagData&)), receiver, slot);
|
||||
}
|
||||
|
||||
void Tag::emitData()
|
||||
{
|
||||
emit(activated(m_data));
|
||||
}
|
||||
|
||||
////////////////
|
||||
// InputTag //
|
||||
////////////////
|
||||
InputTag::InputTag(KileInfo* ki, const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent, uint options
|
||||
, const QString &tagBegin, const QString &tagEnd
|
||||
, int dx, int dy, const QString &description, const QString &hint, const QString &alter)
|
||||
: Tag(text, cut, receiver, slot, parent, name, tagBegin, tagEnd, dx, dy, description), m_ki(ki),
|
||||
m_parent(wparent), m_options(options), m_hint(hint), m_alter(alter)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
InputTag::InputTag( KileInfo* ki, const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const QString &tagBegin, const QString &tagEnd
|
||||
, int dx, int dy, const QString &description, const QString &hint, const QString &alter)
|
||||
: Tag(text, pix, cut, receiver, slot, parent, name, tagBegin, tagEnd, dx, dy, description), m_ki(ki),
|
||||
m_parent(wparent), m_options(options), m_hint(hint), m_alter(alter)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
InputTag::InputTag( KileInfo* ki, const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const TagData& data, const QString &hint, const QString &alter)
|
||||
: Tag(text,cut,receiver, slot, parent, name,data), m_ki(ki),
|
||||
m_parent(wparent), m_options(options), m_hint(hint), m_alter(alter)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
InputTag::InputTag( KileInfo* ki, const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const TagData& data, const QString &hint, const QString &alter)
|
||||
: Tag(text, pix, cut,receiver, slot, parent, name,data), m_ki(ki),
|
||||
m_parent(wparent), m_options(options), m_hint(hint), m_alter(alter)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
InputTag::~InputTag()
|
||||
{
|
||||
}
|
||||
|
||||
void InputTag::init()
|
||||
{
|
||||
m_history.clear();
|
||||
}
|
||||
|
||||
void InputTag::emitData()
|
||||
{
|
||||
KILE_DEBUG() << "InputTag::emitData() " << m_ki->getName() << endl;
|
||||
|
||||
InputDialog *dlg = new InputDialog(m_data.text, m_options, m_history, m_hint, m_alter, m_ki, m_parent, "input_dialog");
|
||||
if (dlg->exec())
|
||||
{
|
||||
if ( (! dlg->tag().isEmpty()) && hasHistory()) addToHistory(dlg->tag());
|
||||
|
||||
TagData td(m_data);
|
||||
|
||||
td.tagBegin.replace("%R",dlg->tag());
|
||||
td.tagEnd.replace("%R",dlg->tag());
|
||||
|
||||
QString alt = dlg->useAlternative() ? "*" : "";
|
||||
td.tagBegin.replace("%A", alt);
|
||||
td.tagEnd.replace("%A", alt);
|
||||
|
||||
if ( dlg->useLabel() )
|
||||
{
|
||||
td.tagEnd += dlg->label();
|
||||
td.dy++;
|
||||
}
|
||||
|
||||
if (dlg->usedSelection())
|
||||
m_ki->clearSelection();
|
||||
|
||||
// if a filename was given for a \input- or \include-command,
|
||||
// the cursor is moved out of the braces
|
||||
if ( (m_options & KileAction::ShowBrowseButton) && !dlg->tag().isEmpty() )
|
||||
td.dx += dlg->tag().length() + 1;
|
||||
|
||||
// insert tag
|
||||
emit(activated(td));
|
||||
// refresh document structure and project tree when a file was inserted
|
||||
if ( dlg->useAddProjectFile() )
|
||||
{
|
||||
m_ki->docManager()->projectAddFile( QFileInfo(m_ki->getCompileName()).dirPath(true) + '/' + dlg->tag() );
|
||||
}
|
||||
}
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
InputDialog
|
||||
*/
|
||||
InputDialog::InputDialog(const QString &caption, uint options, const QStringList& history, const QString& hint, const QString& alter, KileInfo *ki, QWidget *parent, const char *name)
|
||||
: KDialogBase (parent, name, true, caption, KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true), m_ki(ki)
|
||||
{
|
||||
QString newcaption = caption;
|
||||
setCaption(newcaption.remove("&"));
|
||||
m_labelprefix = ( newcaption == "chapter" ) ? "chap:" : "sec:";
|
||||
|
||||
m_usedSelection = false;
|
||||
|
||||
QWidget *page = new QWidget(this);
|
||||
setMainWidget(page);
|
||||
QGridLayout *gbox = new QGridLayout( page, 6,3,5,5,"");
|
||||
|
||||
QLabel *lb = new QLabel(hint, page);
|
||||
gbox->addMultiCellWidget(lb,0,0,0,2);
|
||||
|
||||
m_tag=QString::null;
|
||||
QWidget *focus;
|
||||
if ( (options & KileAction::KeepHistory) || (options & KileAction::FromLabelList) || (options & KileAction::FromBibItemList) )
|
||||
{
|
||||
KComboBox *input = new KComboBox(true, page, "input_dialog_input");
|
||||
input->setCompletionMode(KGlobalSettings::CompletionAuto);
|
||||
input->setMinimumWidth(300);
|
||||
focus = input;
|
||||
|
||||
connect(input, SIGNAL(textChanged(const QString&)), this, SLOT(setTag(const QString&)));
|
||||
connect(this, SIGNAL(setInput(const QString&)), input, SLOT(setEditText(const QString&)));
|
||||
if ( options & KileAction::ShowBrowseButton )
|
||||
gbox->addWidget(input,1,0);
|
||||
else
|
||||
gbox->addMultiCellWidget(input,1,1,0,2);
|
||||
|
||||
const QStringList *list;
|
||||
|
||||
if (options & KileAction::FromLabelList)
|
||||
{
|
||||
list = ki->allLabels();
|
||||
input->insertStringList(*list);
|
||||
m_tag = list->first();
|
||||
}
|
||||
else
|
||||
if (options & KileAction::FromBibItemList)
|
||||
{
|
||||
list = ki->allBibItems();
|
||||
input->insertStringList(*list);
|
||||
m_tag = list->first();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (history.size()>0)
|
||||
{
|
||||
input->insertStringList(history);
|
||||
m_tag = history.first();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
KLineEdit *input = new KLineEdit(page);
|
||||
input->setMinimumWidth(300);
|
||||
focus = input;
|
||||
|
||||
connect(input, SIGNAL(textChanged(const QString&)), this, SLOT(setTag(const QString&)));
|
||||
connect(this, SIGNAL(setInput(const QString&)), input, SLOT(setText(const QString&)));
|
||||
if ( options & KileAction::ShowBrowseButton )
|
||||
gbox->addWidget(input,1,0);
|
||||
else
|
||||
gbox->addMultiCellWidget(input,1,1,0,2);
|
||||
|
||||
input->setText(ki->getSelection());
|
||||
m_usedSelection=true;
|
||||
}
|
||||
|
||||
if (focus)
|
||||
lb->setBuddy(focus);
|
||||
|
||||
if ( options & KileAction::ShowBrowseButton)
|
||||
{
|
||||
KPushButton *pbutton = new KPushButton("", page);
|
||||
pbutton->setPixmap( SmallIcon("fileopen") );
|
||||
gbox->addWidget(pbutton,1,2);
|
||||
gbox->setColSpacing(1,8);
|
||||
gbox->setColSpacing(2, pbutton->sizeHint().width()+5 );
|
||||
connect(pbutton, SIGNAL(clicked()), this, SLOT(slotBrowse()));
|
||||
}
|
||||
|
||||
if ( options & KileAction::ShowAlternative)
|
||||
{
|
||||
QCheckBox * m_checkbox = new QCheckBox(alter, page, "input_dialog_checkbox");
|
||||
connect(m_checkbox, SIGNAL(clicked()), this, SLOT(slotAltClicked()));
|
||||
m_useAlternative=false;
|
||||
gbox->addMultiCellWidget(m_checkbox,2,2,0,2);
|
||||
}
|
||||
|
||||
m_edLabel = 0L;
|
||||
m_useLabel = ( options & KileAction::ShowLabel );
|
||||
if ( m_useLabel )
|
||||
{
|
||||
// Label
|
||||
QLabel *label = new QLabel(i18n("&Label:"),page);
|
||||
m_edLabel = new KLineEdit("",page);
|
||||
m_edLabel->setMinimumWidth(300);
|
||||
m_edLabel->setText(m_labelprefix);
|
||||
label->setBuddy(m_edLabel);
|
||||
gbox->addMultiCellWidget(label,3,3,0,2);
|
||||
gbox->addMultiCellWidget(m_edLabel,4,4,0,2);
|
||||
}
|
||||
|
||||
m_useAddProjectFile = ( options & KileAction::AddProjectFile );
|
||||
|
||||
gbox->setRowStretch(5,1);
|
||||
gbox->setColStretch(0,1);
|
||||
|
||||
focus->setFocus();
|
||||
}
|
||||
|
||||
|
||||
InputDialog::~InputDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void InputDialog::slotBrowse()
|
||||
{
|
||||
QString fn;
|
||||
QFileInfo fi(m_ki->getCompileName());
|
||||
|
||||
// Called from InputDialog after a \input- or \include command:
|
||||
// so we are only looking for a LaTeX source document
|
||||
QString filter = m_ki->extensions()->latexDocumentFileFilter() + '\n' + "*|" + i18n("All Files");
|
||||
|
||||
fn = KFileDialog::getOpenFileName(fi.absFilePath(), filter, this,i18n("Select File") );
|
||||
if ( !fn.isEmpty() )
|
||||
{
|
||||
QString path = m_ki->relativePath(fi.dirPath(), fn);
|
||||
|
||||
// if the file has no extension, we add the default TeX extension
|
||||
if ( QFileInfo(path).extension().isEmpty() )
|
||||
path += m_ki->extensions()->latexDocumentDefault();
|
||||
|
||||
setTag(path);
|
||||
emit(setInput(path));
|
||||
}
|
||||
}
|
||||
|
||||
void InputDialog::slotAltClicked()
|
||||
{
|
||||
m_useAlternative = !m_useAlternative;
|
||||
}
|
||||
|
||||
void InputDialog::setTag(const QString &tag)
|
||||
{
|
||||
m_tag = tag;
|
||||
}
|
||||
|
||||
QString InputDialog::label()
|
||||
{
|
||||
if ( m_edLabel )
|
||||
{
|
||||
QString label = m_edLabel->text().stripWhiteSpace();
|
||||
if ( !label.isEmpty() && label!=m_labelprefix )
|
||||
return "\\label{" + label + "}\n";
|
||||
}
|
||||
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
/////////////////
|
||||
// SelectTag //
|
||||
/////////////////
|
||||
|
||||
Select::Select(const QString &text, const KShortcut &cut, KActionCollection *parent, const char *name )
|
||||
: KSelectAction(text,cut,parent,name)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
void Select::init()
|
||||
{
|
||||
connect(this, SIGNAL(activated(const QString&)), SLOT(emitData(const QString &)));
|
||||
}
|
||||
|
||||
void Select::emitData(const QString & name)
|
||||
{
|
||||
m_dict[name]->activate();
|
||||
}
|
||||
|
||||
void Select::setItems(QPtrList<KAction>& list)
|
||||
{
|
||||
QStringList tmp;
|
||||
|
||||
for (uint i=0; i < list.count(); ++i)
|
||||
{
|
||||
tmp.append(list.at(i)->text());
|
||||
m_dict.insert(list.at(i)->text(), list.at(i));
|
||||
}
|
||||
|
||||
KSelectAction::setItems(tmp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "kileactions.moc"
|
@ -0,0 +1,197 @@
|
||||
/***************************************************************************
|
||||
begin : 2003-07-01 17:33:00 CEST 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef KILEACTIONS_H
|
||||
#define KILEACTIONS_H
|
||||
|
||||
#include <qdict.h>
|
||||
|
||||
#include <kaction.h>
|
||||
#include <kdialogbase.h>
|
||||
#include <klineedit.h>
|
||||
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
|
||||
class KileInfo;
|
||||
|
||||
namespace KileAction
|
||||
{
|
||||
|
||||
enum { KeepHistory=1, ShowAlternative=2, ShowBrowseButton=4, FromLabelList=8, FromBibItemList=16, ShowLabel=32, AddProjectFile=64};
|
||||
/*
|
||||
TagData
|
||||
*/
|
||||
|
||||
class TagData
|
||||
{
|
||||
public:
|
||||
TagData(const QString &t, const QString &tB = QString::null, const QString &tE = QString::null, int x = 0, int y = 0, const QString &desc = QString::null)
|
||||
: text(t), tagBegin(tB), tagEnd(tE), dx(x), dy(y), description(desc) {}
|
||||
|
||||
TagData() : text(QString::null), tagBegin(QString::null), tagEnd(QString::null), dx(0), dy(0), description(QString::null) {}
|
||||
|
||||
QString text;
|
||||
QString tagBegin, tagEnd;
|
||||
int dx,dy;
|
||||
QString description;
|
||||
};
|
||||
|
||||
class Tag : public KAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//constructors
|
||||
Tag(const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name
|
||||
, const QString &tagBegin, const QString &tagEnd = QString::null, int dx=0, int dy=0, const QString &description = QString::null);
|
||||
|
||||
Tag(const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name
|
||||
, const QString &tagBegin, const QString &tagEnd = QString::null, int dx=0, int dy=0, const QString &description = QString::null);
|
||||
|
||||
Tag(const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name
|
||||
, const TagData& data);
|
||||
|
||||
Tag(const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name
|
||||
, const TagData& data);
|
||||
|
||||
~Tag();
|
||||
|
||||
private:
|
||||
void init(const QObject *receiver = 0, const char *slot = 0);
|
||||
|
||||
signals:
|
||||
//sends along tagdata so that receiver knows what to insert
|
||||
void activated(const KileAction::TagData&);
|
||||
|
||||
private slots:
|
||||
//emits the activated(TagData) signal
|
||||
virtual void emitData();
|
||||
|
||||
protected:
|
||||
TagData m_data;
|
||||
};
|
||||
|
||||
/*
|
||||
InputTag: adds a history list and options for a input dialog to TagData
|
||||
*/
|
||||
class InputTag : public Tag
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//constructors
|
||||
InputTag(KileInfo* ki, const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const QString &tagBegin, const QString &tagEnd = QString::null, int dx=0, int dy=0, const QString &description = QString::null, const QString &hint = QString::null, const QString &alter = QString::null);
|
||||
|
||||
InputTag(KileInfo* ki, const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const QString &tagBegin, const QString &tagEnd = QString::null, int dx=0, int dy=0, const QString &description = QString::null, const QString &hint = QString::null, const QString &alter = QString::null);
|
||||
|
||||
InputTag(KileInfo* ki, const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const TagData& data, const QString &hint = QString::null, const QString &alter = QString::null);
|
||||
|
||||
InputTag(KileInfo* ki, const QString &text, const QString& pix, const KShortcut &cut, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name, QWidget *wparent,uint options
|
||||
, const TagData& data, const QString &hint = QString::null, const QString &alter = QString::null);
|
||||
|
||||
~InputTag();
|
||||
|
||||
bool hasHistory() {return (m_options & KeepHistory); }
|
||||
bool hasAlternative() { return (m_options & ShowAlternative); }
|
||||
bool hasBrowseButton() { return (m_options & ShowBrowseButton); }
|
||||
|
||||
void addToHistory(const QString& str) { if ( m_history.first() != str ) m_history.prepend(str); }
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
//emits the activated(TagData) signal
|
||||
virtual void emitData();
|
||||
|
||||
private:
|
||||
KileInfo *m_ki;
|
||||
QStringList m_history;
|
||||
QWidget *m_parent;
|
||||
uint m_options;
|
||||
QString m_hint;
|
||||
QString m_alter;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
InputDialog
|
||||
*/
|
||||
class InputDialog : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InputDialog(const QString &caption, uint options, const QStringList& history, const QString &hint, const QString &alter, KileInfo *ki, QWidget *parent=0, const char *name=0);
|
||||
~InputDialog();
|
||||
|
||||
bool useAlternative() {return m_useAlternative;}
|
||||
bool useLabel() {return m_useLabel;}
|
||||
bool useAddProjectFile() {return m_useAddProjectFile;}
|
||||
|
||||
public slots:
|
||||
void slotBrowse();
|
||||
void slotAltClicked();
|
||||
|
||||
void setTag(const QString&);
|
||||
|
||||
signals:
|
||||
void setInput(const QString&);
|
||||
|
||||
public:
|
||||
QString tag() { return m_tag; }
|
||||
QString label();
|
||||
bool usedSelection() { return m_usedSelection; }
|
||||
|
||||
KLineEdit *m_edLabel;
|
||||
|
||||
private:
|
||||
QString m_tag;
|
||||
QString m_labelprefix;
|
||||
bool m_useAlternative,m_useLabel,m_usedSelection,m_useAddProjectFile;
|
||||
KileInfo *m_ki;
|
||||
};
|
||||
|
||||
class Select : public KSelectAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//constructors
|
||||
Select(const QString &text, const KShortcut &cut, KActionCollection *parent, const char *name);
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
signals:
|
||||
void activated(const KAction&);
|
||||
|
||||
public slots:
|
||||
void setItems(QPtrList<KAction> &);
|
||||
|
||||
private slots:
|
||||
void emitData(const QString&);
|
||||
|
||||
private:
|
||||
QDict<KAction> m_dict;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,36 @@
|
||||
/***************************************************************************
|
||||
begin : sam sep 28 2002
|
||||
copyright : (C) 2002 - 2003 by Pascal Brachet, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef KILEAPPDCOPIFACE_H
|
||||
#define KILEAPPDCOPIFACE_H
|
||||
|
||||
#include <dcopobject.h>
|
||||
|
||||
class KileAppDCOPIface : virtual public DCOPObject
|
||||
{
|
||||
K_DCOP
|
||||
|
||||
k_dcop:
|
||||
virtual void openDocument(const QString &)=0;
|
||||
virtual void insertText(const QString &)=0;
|
||||
virtual void fileSelected(const QString &)=0; //backwards compatibility
|
||||
virtual void closeDocument()=0;
|
||||
virtual void openProject(const QString &)=0;
|
||||
virtual void setLine( const QString &)=0;
|
||||
virtual void setActive()=0;
|
||||
virtual int run(const QString &)=0;
|
||||
virtual int runWith(const QString &, const QString &)=0;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,54 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Apr 21 2002
|
||||
copyright : (C) 2002 - 2003 by Pascal Brachet, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kileapplication.h"
|
||||
|
||||
#include <kglobal.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <kate/document.h>
|
||||
|
||||
#include <qframe.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpainter.h>
|
||||
#include <qfont.h>
|
||||
#include <qfontmetrics.h>
|
||||
|
||||
static QFrame *pix=0;
|
||||
static QWidget *splash=0;
|
||||
|
||||
|
||||
KileApplication::KileApplication()
|
||||
{
|
||||
QRect screen = QApplication::desktop()->screenGeometry();
|
||||
QPixmap pm(KGlobal::dirs()->findResource("appdata","pics/kile_splash.png"));
|
||||
splash = new QWidget( 0, "splash", WDestructiveClose | WStyle_Customize | WStyle_NoBorder | WX11BypassWM | WStyle_StaysOnTop );
|
||||
pix=new QFrame(splash,"pix",QWidget::WStyle_NoBorder | QWidget::WStyle_Customize);
|
||||
pix->setBackgroundPixmap(pm);
|
||||
pix->setLineWidth(0);
|
||||
pix->setGeometry( 0,0,398, 120 );
|
||||
splash->adjustSize();
|
||||
splash->setCaption( "Kile" );
|
||||
splash->move( screen.center() - QPoint( splash->width() / 2, splash->height() / 2 ) );
|
||||
splash->show();
|
||||
}
|
||||
KileApplication::~KileApplication(){
|
||||
}
|
||||
|
||||
void KileApplication::closeSplash()
|
||||
{
|
||||
splash->hide();
|
||||
delete splash;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Apr 21 2002
|
||||
copyright : (C) 2002 - 2003 by Pascal Brachet, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEAPPLICATION_H
|
||||
#define KILEAPPLICATION_H
|
||||
|
||||
#include <kapplication.h>
|
||||
|
||||
/**
|
||||
*@author Pascal Brachet
|
||||
*/
|
||||
|
||||
class KileApplication : public KApplication
|
||||
{
|
||||
public:
|
||||
KileApplication();
|
||||
~KileApplication();
|
||||
static void closeSplash();
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,4 @@
|
||||
File=kile.kcfg
|
||||
ClassName=KileConfig
|
||||
Singleton=true
|
||||
Mutators=true
|
@ -0,0 +1,357 @@
|
||||
/***************************************************************************
|
||||
begin : Wed Jun 6 2001
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
(C) 2005-2007 by Holger Danielsson
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2005-12-02 dani
|
||||
// - put configuration of Kile and Kate together in one dialog
|
||||
// - items are shown as a tree list
|
||||
// - encoding config page and spelling page are removed,
|
||||
// because settings are also avaiblable with Kate
|
||||
// - geometry of the dialog are saved and restored, because
|
||||
// the initial values may be bad in some languages
|
||||
|
||||
// 2007-03-17 dani
|
||||
// - add support for auto insert $
|
||||
// - move graphics config to a separate page
|
||||
|
||||
#include "kileconfigdialog.h"
|
||||
|
||||
#include <qvbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtextcodec.h>
|
||||
|
||||
#include <kdeversion.h>
|
||||
#include <klocale.h>
|
||||
#include <ksconfig.h>
|
||||
#include <kiconloader.h>
|
||||
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kiletoolconfigwidget.h"
|
||||
#include "kileviewmanager.h"
|
||||
#include "helpconfigwidget.h"
|
||||
#include "latexconfigwidget.h"
|
||||
#include "generalconfigwidget.h"
|
||||
#include "previewconfigwidget.h"
|
||||
#include "scriptingconfigwidget.h"
|
||||
#include "kileconfig.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileedit.h"
|
||||
|
||||
#include "kiledebug.h"
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
Config::Config(KConfig *config, KileInfo *ki, QWidget* parent)
|
||||
: KDialogBase( KDialogBase::TreeList, Qt::WStyle_DialogBorder,
|
||||
parent, "kileconfiguration", true, i18n("Configure"), Ok|Cancel, Ok ),
|
||||
m_config(config),
|
||||
m_ki(ki)
|
||||
{
|
||||
m_config->sync();
|
||||
|
||||
// we need a dialog manager
|
||||
m_manager = new KConfigDialogManager(this,KileConfig::self());
|
||||
|
||||
setShowIconsInTreeList(true);
|
||||
addConfigFolder(i18n("Kile"),"kile");
|
||||
addConfigFolder(i18n("LaTeX"),"tex");
|
||||
addConfigFolder(i18n("Tools"),"gear");
|
||||
addConfigFolder(i18n("Editor"),"edit");
|
||||
|
||||
// setup all configuration pages
|
||||
setupGeneralOptions();
|
||||
setupCodeCompletion(); // complete configuration (dani)
|
||||
setupHelp();
|
||||
setupScripting();
|
||||
|
||||
setupLatex();
|
||||
setupEnvironment();
|
||||
setupGraphics();
|
||||
setupStructure();
|
||||
setupSymbolView();
|
||||
|
||||
setupTools();
|
||||
setupQuickPreview(); // QuickPreview (dani)
|
||||
|
||||
setupEditor();
|
||||
enableButtonSeparator(true);
|
||||
|
||||
// calculate size for opening
|
||||
if ( ! m_config->hasGroup("KileConfigDialog") )
|
||||
incInitialSize(QSize(50,0));
|
||||
else
|
||||
setInitialSize( configDialogSize("KileConfigDialog") );
|
||||
|
||||
// setup connections
|
||||
//connect(m_manager, SIGNAL(widgetModified()), this, SLOT(slotWidgetModified()));
|
||||
connect(this, SIGNAL(okClicked()), m_manager, SLOT(updateSettings()));
|
||||
}
|
||||
|
||||
Config::~Config()
|
||||
{
|
||||
saveDialogSize("KileConfigDialog");
|
||||
delete m_manager;
|
||||
}
|
||||
|
||||
void Config::show()
|
||||
{
|
||||
if ( KileConfig::unfoldConfigTree() )
|
||||
unfoldTreeList();
|
||||
m_manager->updateWidgets();
|
||||
KDialogBase::show();
|
||||
}
|
||||
|
||||
//////////////////// add a new folder ////////////////////
|
||||
|
||||
void Config::addConfigFolder(const QString §ion,const QString &icon)
|
||||
{
|
||||
QStringList path;
|
||||
path << section;
|
||||
|
||||
#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
|
||||
setFolderIcon(path, SmallIcon(icon, KIcon::SizeSmallMedium));
|
||||
#else
|
||||
setFolderIcon(path, SmallIcon(icon));
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////// add a new page ////////////////////
|
||||
|
||||
void Config::addConfigPage(QWidget *page,
|
||||
const QString §ionName,const QString &itemName,
|
||||
const QString &pixmapName, const QString &header,
|
||||
bool addSpacer)
|
||||
{
|
||||
KILE_DEBUG() << "slot: add config page item=" << itemName << endl;
|
||||
|
||||
// add page
|
||||
QStringList path;
|
||||
path << sectionName << itemName;
|
||||
|
||||
QVBox *vbox = addVBoxPage(path, header,
|
||||
#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
|
||||
SmallIcon(pixmapName,KIcon::SizeSmallMedium)
|
||||
#else
|
||||
SmallIcon(pixmapName)
|
||||
#endif
|
||||
);
|
||||
vbox->setSpacing(0);
|
||||
vbox->setMargin(0);
|
||||
page->reparent(((QWidget*)vbox),0,QPoint());
|
||||
if ( addSpacer )
|
||||
{
|
||||
QFrame *spacer = new QFrame(vbox);
|
||||
vbox->setStretchFactor(spacer,1);
|
||||
}
|
||||
|
||||
// add to the dialog manager
|
||||
m_manager->addWidget(page);
|
||||
}
|
||||
|
||||
//////////////////// General Options ////////////////////
|
||||
|
||||
void Config::setupGeneralOptions()
|
||||
{
|
||||
generalPage = new KileWidgetGeneralConfig(0, "LaTeX");
|
||||
addConfigPage(generalPage,i18n("Kile"),i18n("General"),"configure",i18n("General Settings"));
|
||||
}
|
||||
|
||||
//////////////////// Tools Configuration ////////////////////
|
||||
|
||||
void Config::setupTools()
|
||||
{
|
||||
toolPage = new KileWidget::ToolConfig(m_ki->toolManager(), 0);
|
||||
|
||||
addConfigPage(toolPage,i18n("Tools"),i18n("Build"),"launch",i18n("Build"),false);
|
||||
}
|
||||
|
||||
//////////////////// Scripting ////////////////////
|
||||
|
||||
void Config::setupScripting()
|
||||
{
|
||||
scriptingPage = new KileWidgetScriptingConfig(this, "Scripting");
|
||||
addConfigPage(scriptingPage,i18n("Kile"),i18n("Scripting"),"exec",i18n("Scripting Support"));
|
||||
}
|
||||
|
||||
//////////////////// LaTeX specific editing options ////////////////////
|
||||
|
||||
//////////////////// Complete configuration (dani) ////////////////////
|
||||
|
||||
void Config::setupCodeCompletion()
|
||||
{
|
||||
completePage = new ConfigCodeCompletion(m_config,m_ki->logWidget());
|
||||
completePage->readConfig();
|
||||
|
||||
addConfigPage(completePage,i18n("Kile"),i18n("Complete"),"source",i18n("Code Completion"));
|
||||
}
|
||||
|
||||
//////////////////// QuickPreview (dani) ////////////////////
|
||||
|
||||
void Config::setupQuickPreview()
|
||||
{
|
||||
previewPage = new KileWidgetPreviewConfig(m_config,m_ki->quickPreview(),0);
|
||||
previewPage->readConfig();
|
||||
|
||||
addConfigPage(previewPage,i18n("Tools"),i18n("Preview"),"preview",i18n("Quick Preview"));
|
||||
}
|
||||
|
||||
void Config::setupHelp()
|
||||
{
|
||||
helpPage = new KileWidgetHelpConfig(0);
|
||||
helpPage->setHelp(m_ki->help());
|
||||
|
||||
addConfigPage(helpPage,i18n("Kile"),i18n("Help"),"help");
|
||||
}
|
||||
|
||||
//////////////////// LaTeX environments ////////////////////
|
||||
|
||||
void Config::setupLatex()
|
||||
{
|
||||
latexPage = new KileWidgetLatexConfig(0, "LaTeX");
|
||||
latexPage->kcfg_DoubleQuotes->insertStringList( m_ki->editorExtension()->doubleQuotesList() );
|
||||
latexPage->setLatexCommands(m_config,m_ki->latexCommands());
|
||||
|
||||
addConfigPage(latexPage,i18n("LaTeX"),i18n("General"),"configure");
|
||||
}
|
||||
|
||||
void Config::setupEnvironment()
|
||||
{
|
||||
envPage = new KileWidgetEnvironmentConfig(0, "LaTeX");
|
||||
addConfigPage(envPage,i18n("LaTeX"),i18n("Environments"),"environment");
|
||||
}
|
||||
|
||||
void Config::setupGraphics()
|
||||
{
|
||||
graphicsPage = new KileWidgetGraphicsConfig(0, "Graphics");
|
||||
graphicsPage->m_lbImagemagick->setText( ( KileConfig::imagemagick() ) ? i18n("installed") : i18n("not installed") );
|
||||
|
||||
addConfigPage(graphicsPage,i18n("LaTeX"),i18n("Graphics"),"graphicspage");
|
||||
}
|
||||
|
||||
void Config::setupStructure()
|
||||
{
|
||||
structurePage = new KileWidgetStructureViewConfig(0, "StructureView");
|
||||
addConfigPage(structurePage,i18n("LaTeX"),i18n("Structure View"),"view_tree");
|
||||
}
|
||||
|
||||
void Config::setupSymbolView()
|
||||
{
|
||||
symbolViewPage = new KileWidgetSymbolViewConfig(0, "SymbolView");
|
||||
addConfigPage(symbolViewPage,i18n("LaTeX"),i18n("Symbol View"),"math0");
|
||||
}
|
||||
|
||||
//////////////////// Editor ////////////////////
|
||||
|
||||
void Config::setupEditor()
|
||||
{
|
||||
Kate::View *view = m_ki->viewManager()->currentTextView();
|
||||
m_editorOpened = ( view != 0L );
|
||||
m_editorSettingsChanged = false;
|
||||
|
||||
if ( ! m_editorOpened )
|
||||
return;
|
||||
|
||||
editorPages.setAutoDelete(false);
|
||||
editorPages.clear();
|
||||
|
||||
KTextEditor::ConfigInterfaceExtension *iface;
|
||||
iface = dynamic_cast<KTextEditor::ConfigInterfaceExtension *>( view->getDoc() );
|
||||
|
||||
QStringList path;
|
||||
for (uint i=0; i<iface->configPages(); i++)
|
||||
{
|
||||
path.clear();
|
||||
path << i18n("Editor") << iface->configPageName(i);
|
||||
|
||||
// create a new vbox page and add the config page
|
||||
#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
|
||||
QVBox *page = addVBoxPage(path,iface->configPageFullName(i), iface->configPagePixmap(i,KIcon::SizeSmallMedium) );
|
||||
#else
|
||||
QVBox *page = addVBoxPage(path,iface->configPageFullName(i), iface->configPagePixmap(i) );
|
||||
#endif
|
||||
KTextEditor::ConfigPage *configPage = iface->configPage(i,page);
|
||||
connect( configPage, SIGNAL(changed()), this, SLOT(slotChanged()) );
|
||||
editorPages.append(configPage);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// encoding ////////////////////
|
||||
|
||||
QString Config::readKateEncoding()
|
||||
{
|
||||
m_config->setGroup("Kate Document Defaults");
|
||||
return m_config->readEntry("Encoding",QString::null);
|
||||
}
|
||||
|
||||
void Config::syncKileEncoding()
|
||||
{
|
||||
QString enc = readKateEncoding();
|
||||
if ( enc.isEmpty() )
|
||||
enc = QString::fromLatin1(QTextCodec::codecForLocale()->name());
|
||||
KileConfig::setDefaultEncoding( enc );
|
||||
}
|
||||
//////////////////// slots ////////////////////
|
||||
|
||||
void Config::slotOk()
|
||||
{
|
||||
KILE_DEBUG() << " slot ok (" << m_manager->hasChanged() << "," << m_editorSettingsChanged << ")" << endl;
|
||||
|
||||
// editor settings are only available, when at least one document is opened
|
||||
if ( m_editorOpened && m_editorSettingsChanged )
|
||||
{
|
||||
for (uint i=0; i<editorPages.count(); i++)
|
||||
editorPages.at(i)->apply();
|
||||
m_ki->viewManager()->currentTextView()->getDoc()->writeConfig();
|
||||
|
||||
// take Kate's encoding for Kile
|
||||
syncKileEncoding();
|
||||
}
|
||||
|
||||
// Kile settings
|
||||
toolPage->writeConfig(); // config all tools
|
||||
completePage->writeConfig(); // Complete configuration (dani)
|
||||
previewPage->writeConfig(); // Quick Preview (dani)
|
||||
|
||||
m_config->sync();
|
||||
emit okClicked(); // Otherwise, the KConfigXT machine doesn't start...
|
||||
|
||||
// oder m_manager->updateSettings();
|
||||
accept();
|
||||
}
|
||||
|
||||
void Config::slotCancel()
|
||||
{
|
||||
KILE_DEBUG() << " slot cancel" << endl;
|
||||
m_config->rollback();
|
||||
accept();
|
||||
}
|
||||
|
||||
void Config::slotChanged()
|
||||
{
|
||||
KILE_DEBUG() << " slot changed" << endl;
|
||||
m_editorSettingsChanged = true;
|
||||
}
|
||||
|
||||
/*
|
||||
void Config::slotWidgetModified()
|
||||
{
|
||||
KILE_DEBUG() << "slot: widget modified --> " << m_manager->hasChanged() << endl;
|
||||
//emit widgetModified();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#include "kileconfigdialog.moc"
|
@ -0,0 +1,124 @@
|
||||
/***************************************************************************
|
||||
begin : Wed Jun 6 2001
|
||||
copyright : (C) 2003 by Jeroen Wijnout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef TOOLSOPTIONSDIALOG_H
|
||||
#define TOOLSOPTIONSDIALOG_H
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <kdeversion.h>
|
||||
|
||||
#include <ktexteditor/configinterfaceextension.h>
|
||||
#include <kconfigdialogmanager.h>
|
||||
|
||||
#include "configcodecompletion.h" // code completion (dani)
|
||||
#include "previewconfigwidget.h" // QuickPreview (dani)
|
||||
#include "envconfigwidget.h" // environments (dani)
|
||||
#include "graphicsconfigwidget.h" // graphics (dani)
|
||||
#include "structureconfigwidget.h" // structure view (dani)
|
||||
#include "symbolviewconfig.h"
|
||||
|
||||
class QFrame;
|
||||
class KConfig;
|
||||
|
||||
namespace KileWidget { class ToolConfig; }
|
||||
class KileWidgetHelpConfig;
|
||||
class KileWidgetLatexConfig;
|
||||
class KileWidgetGeneralConfig;
|
||||
class KileWidgetEnvironmentConfig;
|
||||
class KileWidgetGraphicsConfig;
|
||||
class KileWidgetStructureViewConfig;
|
||||
class KileWidgetScriptingConfig;
|
||||
|
||||
namespace KileTool { class Manager; }
|
||||
|
||||
namespace KileDialog
|
||||
{
|
||||
class Config : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Config( KConfig *config, KileInfo *ki, QWidget* parent = 0);
|
||||
~Config();
|
||||
|
||||
virtual void show();
|
||||
|
||||
//signals:
|
||||
// void widgetModified();
|
||||
|
||||
private slots:
|
||||
void slotOk();
|
||||
void slotCancel();
|
||||
void slotChanged();
|
||||
|
||||
private:
|
||||
// dialog manager
|
||||
KConfigDialogManager *m_manager;
|
||||
|
||||
KConfig *m_config;
|
||||
KileInfo *m_ki;
|
||||
|
||||
bool m_editorSettingsChanged;
|
||||
bool m_editorOpened;
|
||||
|
||||
KileWidget::ToolConfig *toolPage;
|
||||
|
||||
// CodeCompletion (dani)
|
||||
ConfigCodeCompletion *completePage;
|
||||
KileWidgetPreviewConfig *previewPage;
|
||||
|
||||
KileWidgetHelpConfig *helpPage;
|
||||
KileWidgetLatexConfig *latexPage;
|
||||
KileWidgetGeneralConfig *generalPage;
|
||||
KileWidgetEnvironmentConfig *envPage;
|
||||
KileWidgetGraphicsConfig *graphicsPage;
|
||||
KileWidgetStructureViewConfig *structurePage;
|
||||
KileWidgetSymbolViewConfig *symbolViewPage;
|
||||
KileWidgetScriptingConfig *scriptingPage;
|
||||
|
||||
|
||||
// setup configuration
|
||||
void addConfigFolder(const QString §ion,const QString &icon);
|
||||
|
||||
void addConfigPage( QWidget *page,
|
||||
const QString §ionName,const QString &itemName,
|
||||
const QString &pixmapName, const QString &header=QString::null,
|
||||
bool addSpacer = true );
|
||||
|
||||
void setupGeneralOptions();
|
||||
void setupTools();
|
||||
void setupLatex();
|
||||
void setupCodeCompletion();
|
||||
void setupQuickPreview();
|
||||
void setupHelp();
|
||||
void setupEditor();
|
||||
void setupEnvironment();
|
||||
void setupGraphics();
|
||||
void setupStructure();
|
||||
void setupSymbolView();
|
||||
void setupScripting();
|
||||
|
||||
// write configuration
|
||||
void writeGeneralOptionsConfig();
|
||||
|
||||
// synchronize encoding
|
||||
QString readKateEncoding();
|
||||
void syncKileEncoding();
|
||||
|
||||
// editor pages
|
||||
QPtrList<KTextEditor::ConfigPage> editorPages;
|
||||
};
|
||||
}
|
||||
#endif
|
@ -0,0 +1,23 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net) *
|
||||
***************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILECONSTANTS_H
|
||||
#define KILECONSTANTS_H
|
||||
|
||||
namespace KileDocument {
|
||||
enum Type {Undefined, Text, LaTeX, BibTeX, Script};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,21 @@
|
||||
/***************************************************************************
|
||||
* begin : 26.09.2007
|
||||
* copyright : (C) Thomas Braun
|
||||
* email : braun _aeht_ physik.fu-berlin.de
|
||||
****************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#include <kdebug.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define KILE_DEBUG(A) if (true); else kdDebug()
|
||||
#else
|
||||
#define KILE_DEBUG(A) kdDebug(A)
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,245 @@
|
||||
//
|
||||
// C++ Interface: kiledocmanager
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>, (C) 2004
|
||||
// Michel Ludwig <michel.ludwig@kdemail.net>, (C) 2006
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEDOCUMENTKILEDOCMANAGER_H
|
||||
#define KILEDOCUMENTKILEDOCMANAGER_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include "kileconstants.h"
|
||||
#include "kileproject.h"
|
||||
|
||||
class KURL;
|
||||
class KFileItem;
|
||||
class KProgressDialog;
|
||||
namespace Kate { class Document; class View;}
|
||||
|
||||
class TemplateItem;
|
||||
class KileInfo;
|
||||
class KileProjectItem;
|
||||
class KileProjectItemList;
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
class Info;
|
||||
class TextInfo;
|
||||
|
||||
/**
|
||||
@author Jeroen Wijnhout
|
||||
*/
|
||||
class Manager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Manager(KileInfo *info, QObject *parent = 0, const char *name = 0);
|
||||
~Manager();
|
||||
|
||||
public slots:
|
||||
Kate::View* createNewJScript();
|
||||
Kate::View* createNewLaTeXDocument();
|
||||
|
||||
//files
|
||||
void newDocumentStatus(Kate::Document *doc);
|
||||
|
||||
/**
|
||||
* Creates a new file on disk.
|
||||
**/
|
||||
void fileNew(const KURL &);
|
||||
void fileNew();
|
||||
|
||||
void fileSelected(const KURL &);
|
||||
void fileSelected(const KileProjectItem * item);
|
||||
void fileSelected(const KFileItem *file);
|
||||
|
||||
void fileOpen();
|
||||
void fileOpen(const KURL& url, const QString & encoding = QString::null, int index = -1);
|
||||
|
||||
void fileSave();
|
||||
void fileSaveAs(Kate::View* = 0L);
|
||||
void fileSaveCopyAs();
|
||||
|
||||
void saveURL(const KURL &);
|
||||
void fileSaveAll(bool amAutoSaving = false, bool disUntitled = false);
|
||||
|
||||
bool fileCloseAllOthers();
|
||||
bool fileCloseAll();
|
||||
bool fileClose(const KURL & url);
|
||||
bool fileClose(Kate::Document *doc = 0L, bool closingproject = false);
|
||||
|
||||
//templates
|
||||
Kate::View* loadTemplate(TemplateItem*);
|
||||
void createTemplate();
|
||||
void removeTemplate();
|
||||
void replaceTemplateVariables(QString &line);
|
||||
|
||||
//projects
|
||||
void projectNew();
|
||||
KileProject* projectOpen();
|
||||
|
||||
/**
|
||||
* @param openProjectItemViews Opens project files in the editor iff openProjectItemViews is set to 'true'.
|
||||
**/
|
||||
KileProject* projectOpen(const KURL&, int = 0, int = 1, bool openProjectItemViews = true);
|
||||
|
||||
/**
|
||||
* @param openProjectItemViews Opens project files in the editor iff openProjectItemViews is set to 'true'.
|
||||
**/
|
||||
void projectOpenItem(KileProjectItem *item, bool openProjectItemViews = true);
|
||||
|
||||
/**
|
||||
* Saves the state of the project, if @param project is zero, the active project is saved.
|
||||
**/
|
||||
void projectSave(KileProject * project = 0);
|
||||
void projectAddFiles(const KURL &);
|
||||
void projectAddFiles(KileProject * project = 0,const KURL & url = KURL());
|
||||
void toggleArchive(KileProjectItem *);
|
||||
void buildProjectTree(KileProject *project = 0);
|
||||
void buildProjectTree(const KURL &);
|
||||
void projectOptions(const KURL &);
|
||||
void projectOptions(KileProject *project = 0);
|
||||
bool projectClose(const KURL & url = KURL());
|
||||
bool projectCloseAll();
|
||||
|
||||
void projectShow();
|
||||
void projectRemoveFiles();
|
||||
void projectShowFiles();
|
||||
void projectAddFile(QString filename, bool graphics=false);
|
||||
void projectOpenAllFiles();
|
||||
void projectOpenAllFiles(const KURL &);
|
||||
|
||||
KileProject* selectProject(const QString &);
|
||||
|
||||
void addProject(const KileProject *project);
|
||||
void addToProject(const KURL &);
|
||||
void addToProject(KileProject *, const KURL &);
|
||||
void removeFromProject(const KileProjectItem *);
|
||||
void storeProjectItem(KileProjectItem *item, Kate::Document *doc);
|
||||
|
||||
void cleanUpTempFiles(const KURL &url, bool silent = false);
|
||||
|
||||
void openDroppedURLs(QDropEvent *e);
|
||||
|
||||
signals:
|
||||
void projectTreeChanged(const KileProject *);
|
||||
void closingDocument(KileDocument::Info *);
|
||||
void documentInfoCreated(KileDocument::Info *);
|
||||
|
||||
void updateStructure(bool needToParse, KileDocument::Info*);
|
||||
void updateModeStatus();
|
||||
void updateReferences(KileDocument::Info *);
|
||||
|
||||
void documentStatusChanged(Kate::Document *, bool, unsigned char reason);
|
||||
|
||||
void addToRecentFiles(const KURL &);
|
||||
void addToRecentProjects(const KURL &);
|
||||
void removeFromRecentProjects(const KURL &);
|
||||
|
||||
void startWizard();
|
||||
|
||||
void printMsg(int type, const QString & message, const QString &tool = "Kile" );
|
||||
|
||||
void removeFromProjectView(const KURL &);
|
||||
void removeFromProjectView(const KileProject *);
|
||||
void removeItemFromProjectView(const KileProjectItem *, bool);
|
||||
void addToProjectView(const KURL &);
|
||||
void addToProjectView(KileProjectItem *item);
|
||||
void addToProjectView(const KileProject *);
|
||||
|
||||
public:
|
||||
QPtrList<KileProject>* projects() { return &m_projects; }
|
||||
QPtrList<TextInfo>* textDocumentInfos() { return &m_textInfoList; }
|
||||
|
||||
Kate::Document* docFor(const KURL &url);
|
||||
|
||||
Info* getInfo() const;
|
||||
// FIXME: "path" should be changed to a URL, i.e. only the next but one function
|
||||
// should be used
|
||||
TextInfo* textInfoFor(const QString &path) const;
|
||||
TextInfo* textInfoForURL(const KURL& url);
|
||||
TextInfo* textInfoFor(Kate::Document* doc) const;
|
||||
void updateInfos();
|
||||
|
||||
KileProject* projectFor(const KURL &projecturl);
|
||||
KileProject* projectFor(const QString & name);
|
||||
KileProject* activeProject();
|
||||
bool isProjectOpen();
|
||||
void updateProjectReferences(KileProject *project);
|
||||
QStringList getProjectFiles();
|
||||
|
||||
KileProjectItem* activeProjectItem();
|
||||
/**
|
||||
* Finds the project item for the file with URL @param url.
|
||||
* @returns a pointer to the project item, 0 if this file does not belong to a project
|
||||
**/
|
||||
KileProjectItem* itemFor(const KURL &url, KileProject *project = 0) const;
|
||||
KileProjectItem* itemFor(Info *docinfo, KileProject *project = 0) const;
|
||||
KileProjectItem* selectProjectFileItem(const QString &label);
|
||||
KileProjectItemList* selectProjectFileItems(const QString &label);
|
||||
|
||||
KileProjectItemList* itemsFor(Info *docinfo) const;
|
||||
|
||||
static const KURL symlinkFreeURL(const KURL& url);
|
||||
|
||||
protected:
|
||||
void mapItem(TextInfo *docinfo, KileProjectItem *item);
|
||||
|
||||
void trashDoc(TextInfo *docinfo, Kate::Document *doc = 0L);
|
||||
|
||||
TextInfo* createTextDocumentInfo(KileDocument::Type type, const KURL &url, const KURL& baseDirectory = KURL());
|
||||
void recreateTextDocumentInfo(TextInfo *oldinfo);
|
||||
|
||||
/**
|
||||
* Tries to remove and delete a TextInfo object. The TextInfo object will only be deleted if it isn't referenced
|
||||
* by any project item or if is is only referenced by a project that should be closed.
|
||||
* @param closingproject Indicates whether the TextInfo object should be removed as part of a project close
|
||||
* operation.
|
||||
* @warning This method does not close or delete any Kate documents that are associated with the TextInfo object !
|
||||
**/
|
||||
bool removeTextDocumentInfo(TextInfo *docinfo, bool closingproject = false);
|
||||
Kate::Document* createDocument(const QString& name, const KURL& url, TextInfo *docinfo, const QString & encoding, const QString & highlight);
|
||||
|
||||
/**
|
||||
* Creates a document with the specified text.
|
||||
*
|
||||
* @param extension The extension of the file that should be created without leading "."
|
||||
**/
|
||||
Kate::View* createDocumentWithText(const QString& text, KileDocument::Type type = KileDocument::Text, const QString& extension = QString::null, const KURL& baseDirectory = KURL());
|
||||
|
||||
Kate::View* loadText(KileDocument::Type type, const QString& name, const KURL &url, const QString & encoding = QString::null, bool create = true, const QString & highlight = QString::null, const QString &text = QString::null, int index = -1, const KURL& baseDirectory = KURL());
|
||||
Kate::View* loadItem(KileDocument::Type type, KileProjectItem *item, const QString & text = QString::null, bool openProjectItemViews = true);
|
||||
|
||||
private:
|
||||
QPtrList<TextInfo> m_textInfoList;
|
||||
KileInfo *m_ki;
|
||||
QPtrList<KileProject> m_projects;
|
||||
KProgressDialog *m_kpd;
|
||||
|
||||
void dontOpenWarning(KileProjectItem *item, const QString &action, const QString &filetype);
|
||||
void cleanupDocumentInfoForProjectItems(KileDocument::Info *info);
|
||||
|
||||
QStringList autosaveWarnings;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,389 @@
|
||||
/*************************************************************************************
|
||||
begin : Sun Jul 20 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
|
||||
(C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net)
|
||||
*************************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEDOCUMENTINFO_H
|
||||
#define KILEDOCUMENTINFO_H
|
||||
|
||||
#include <kate/document.h>
|
||||
#include "kiledebug.h"
|
||||
#include <klistview.h>
|
||||
#include <kurl.h>
|
||||
#include <kdialogbase.h>
|
||||
#include <latexcmd.h>
|
||||
|
||||
#include "kileconstants.h"
|
||||
#include "kileextensions.h"
|
||||
|
||||
#define TEX_CAT0 '\\'
|
||||
#define TEX_CAT1 '{'
|
||||
#define TEX_CAT2 '}'
|
||||
#define TEX_CAT3 '$'
|
||||
#define TEX_CAT4 '&'
|
||||
#define TEX_CAT6 '#'
|
||||
#define TEX_CAT7 '^'
|
||||
#define TEX_CAT8 '_'
|
||||
#define TEX_CAT13 '~'
|
||||
#define TEX_CAT14 '%'
|
||||
|
||||
#define SIZE_STAT_ARRAY 6
|
||||
|
||||
namespace KileStruct
|
||||
{
|
||||
//Different types of elements in the structure view
|
||||
enum
|
||||
{
|
||||
None = 0x1, Label = 0x2, Sect = 0x4, Input = 0x8,
|
||||
BibItem = 0x10, Bibliography = 0x20, Package = 0x40, NewCommand = 0x80,
|
||||
Graphics = 0x100, Reference = 0x200, BeginEnv = 0x400, EndEnv = 0x800,
|
||||
BeginFloat = 0x1000, EndFloat = 0x2000, Caption = 0x4000, BeamerFrame = 0x8000,
|
||||
BeamerBeginFrame = 0x10000, BeamerEndFrame = 0x20000, BeamerFrametitle = 0x40000, BeamerBeginBlock = 0x80000,
|
||||
ToDo = 0x100000, FixMe = 0x200000, NewEnvironment = 0x400000
|
||||
};
|
||||
|
||||
//Different levels (in the parent-child hierarchy) in the structure view
|
||||
enum
|
||||
{
|
||||
Hidden = -4, NotSpecified = -3, Object = -2, File = -1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenience class to store info about how LaTeX elements should appear in the
|
||||
* structure view. A QMap<QString, KileStructData> should be created, so that the
|
||||
* actual LaTeX elements can be mapped to this class.
|
||||
**/
|
||||
class KileStructData
|
||||
{
|
||||
public:
|
||||
KileStructData(int lvl = 0, int tp = KileStruct::None, QString px = QString::null, QString fldr = "root" ) : level(lvl), type(tp), pix(px), folder(fldr) {}
|
||||
/** At which level the element should be visible **/
|
||||
int level;
|
||||
/** The type of element (see @ref KileStruct) **/
|
||||
int type;
|
||||
/** The name of the icon that goes with this element. The icon is located using SmallIcon(pix). **/
|
||||
QString pix, folder;
|
||||
};
|
||||
|
||||
/**
|
||||
* KileDocument::Info is a decorator class for the Document class. We can't derive a class from an interface
|
||||
* without implementing the interface, a decorator class is a way to add some functionality to the Document class.
|
||||
**/
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
struct BracketResult
|
||||
{
|
||||
BracketResult() : option(QString::null), value(QString::null), line(0), col(0) {}
|
||||
QString option, value;
|
||||
int line, col;
|
||||
};
|
||||
|
||||
struct TodoResult
|
||||
{
|
||||
int type;
|
||||
uint colTag;
|
||||
uint colComment;
|
||||
QString comment;
|
||||
};
|
||||
|
||||
class Info : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static bool containsInvalidCharacters(const KURL&);
|
||||
static KURL repairInvalidCharacters(const KURL&, bool checkForFileExistence = true);
|
||||
static KURL repairExtension(const KURL&, bool checkForFileExistence = true);
|
||||
static KURL makeValidTeXURL(const KURL & url, bool istexfile, bool checkForFileExistence = true);
|
||||
static KURL renameIfExist(const KURL& url);
|
||||
|
||||
public:
|
||||
Info();
|
||||
~Info();
|
||||
|
||||
const QStringList* labels() const{ return &m_labels; }
|
||||
const QStringList* bibItems() const { return &m_bibItems; }
|
||||
const QStringList* dependencies() const {return &m_deps; }
|
||||
const QStringList* bibliographies() const { return &m_bibliography; }
|
||||
const QStringList* packages() const { return &m_packages; }
|
||||
const QStringList* newCommands() const { return &m_newCommands; }
|
||||
|
||||
QString lastModifiedFile(const QStringList *list = 0L);
|
||||
|
||||
bool openStructureLabels() { return m_openStructureLabels; }
|
||||
bool openStructureReferences() { return m_openStructureReferences; }
|
||||
bool openStructureBibitems() { return m_openStructureBibitems; }
|
||||
bool openStructureTodo() { return m_openStructureTodo; }
|
||||
|
||||
bool showStructureLabels() { return m_showStructureLabels; }
|
||||
|
||||
|
||||
const QString & preamble() const { return m_preamble; }
|
||||
|
||||
virtual bool isLaTeXRoot() { return m_bIsRoot; }
|
||||
|
||||
virtual KURL url();
|
||||
|
||||
virtual void updateStructLevelInfo();
|
||||
|
||||
void setBaseDirectory(const KURL& url);
|
||||
const KURL& getBaseDirectory() const;
|
||||
|
||||
virtual bool isTextDocument();
|
||||
virtual Type getType();
|
||||
|
||||
/**
|
||||
* Returns a file filter suitable for loading and saving files of this class' type.
|
||||
**/
|
||||
virtual QString getFileFilter() const;
|
||||
|
||||
virtual bool isDocumentTypePromotionAllowed();
|
||||
void setDocumentTypePromotionAllowed(bool b);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Never call this function directly, use KileWidget::Structure::update(KileDocument::Info *, bool) instead
|
||||
**/
|
||||
virtual void updateStruct();
|
||||
virtual void updateBibItems();
|
||||
|
||||
signals:
|
||||
void urlChanged(KileDocument::Info* info, const KURL& url);
|
||||
void isrootChanged(bool);
|
||||
|
||||
void foundItem(const QString &title, uint line, uint column, int type, int level, uint startline, uint startcol,
|
||||
const QString & pix, const QString & folder);
|
||||
void doneUpdating();
|
||||
void depChanged();
|
||||
void completed(KileDocument::Info* info);
|
||||
|
||||
protected slots:
|
||||
void slotCompleted();
|
||||
|
||||
protected:
|
||||
void count(const QString line, long *stat);
|
||||
|
||||
protected:
|
||||
enum State
|
||||
{
|
||||
stStandard=0, stComment=1, stControlSequence=3, stControlSymbol=4,
|
||||
stCommand=5,stEnvironment=6
|
||||
};
|
||||
|
||||
protected:
|
||||
bool m_bIsRoot;
|
||||
QStringList m_labels;
|
||||
QStringList m_bibItems;
|
||||
QStringList m_deps, m_depsPrev;
|
||||
QStringList m_bibliography;
|
||||
QStringList m_packages;
|
||||
QStringList m_newCommands;
|
||||
QString m_preamble;
|
||||
QMap<QString,KileStructData> m_dictStructLevel;
|
||||
KURL m_url;
|
||||
KConfig *m_config;
|
||||
bool m_showStructureLabels;
|
||||
bool m_showStructureBibitems;
|
||||
bool m_showStructureGraphics;
|
||||
bool m_showStructureFloats;
|
||||
bool m_showStructureReferences;
|
||||
bool m_showStructureInputFiles;
|
||||
bool m_showStructureTodo;
|
||||
bool m_showSectioningLabels;
|
||||
bool m_openStructureLabels;
|
||||
bool m_openStructureReferences;
|
||||
bool m_openStructureBibitems;
|
||||
bool m_openStructureTodo;
|
||||
KURL m_baseDirectory;
|
||||
bool documentTypePromotionAllowed;
|
||||
Extensions *m_extensions;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The URL of a text document is managed directly by the corresponding Kate::Document.
|
||||
**/
|
||||
class TextInfo : public Info
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @param defaultHighlightMode the highlight mode that will be set automatically
|
||||
* once a new document is installed
|
||||
**/
|
||||
TextInfo(Kate::Document *doc, Extensions *extensions, const QString& defaultHighlightMode = QString::null);
|
||||
virtual ~TextInfo();
|
||||
|
||||
/**
|
||||
* @returns the document for which this class is a decorator
|
||||
**/
|
||||
const Kate::Document* getDoc() const;
|
||||
Kate::Document* getDoc();
|
||||
void setDoc(Kate::Document *doc);
|
||||
void detach();
|
||||
|
||||
/**
|
||||
* Used by @ref KileDocInfoDlg to display statistics of the Document.
|
||||
* @returns an array with some statistical data of the document.
|
||||
* The array is filled as follows: [0] = #c in words, [1] = #c in latex commands and environments,
|
||||
[2] = #c whitespace, [3] = #words, [4] = # latex_commands, [5] = latex_environments **/
|
||||
|
||||
virtual const long* getStatistics();
|
||||
|
||||
/**
|
||||
* @returns the URL of the Kate::Document.
|
||||
**/
|
||||
virtual KURL url();
|
||||
|
||||
virtual Type getType();
|
||||
|
||||
bool isTextDocument();
|
||||
|
||||
void setHighlightMode(const QString & highlight = QString::null);
|
||||
|
||||
void setDefaultHightlightMode(const QString& string);
|
||||
|
||||
/**
|
||||
* "Overridden" method that installs custom event filters by using the "installEventFilters"
|
||||
* method.
|
||||
* @warning Only this method should be used to create new views for text documents !
|
||||
* @return NULL if no document is set (m_doc == NULL)
|
||||
**/
|
||||
KTextEditor::View* createView(QWidget *parent, const char *name=0);
|
||||
|
||||
protected slots:
|
||||
void slotFileNameChanged();
|
||||
|
||||
protected:
|
||||
Kate::Document *m_doc;
|
||||
long *m_arStatistics;
|
||||
QString m_defaultHighlightMode;
|
||||
|
||||
QString matchBracket(QChar c, uint &, uint &);
|
||||
QString getTextline(uint line, TodoResult &todo);
|
||||
void searchTodoComment(const QString &s, uint startpos, TodoResult &todo);
|
||||
|
||||
/**
|
||||
* Installs an event filter on a view. Subclasses can override this method to
|
||||
* provide custom event filters. The default implementation does nothing. Whenever this
|
||||
* method is overridden, "removeInstalledEventFilters" should be overridden as well.
|
||||
* @param view the view that is considered
|
||||
**/
|
||||
virtual void installEventFilters(KTextEditor::View *view);
|
||||
|
||||
/**
|
||||
* Removes the event filters that were previously installed by the "installEventFilters"
|
||||
* function. Subclasses can override this method to remove custom event filters. The
|
||||
* default implementation does nothing.
|
||||
* @param view the view that is considered
|
||||
**/
|
||||
virtual void removeInstalledEventFilters(KTextEditor::View *view);
|
||||
|
||||
/**
|
||||
* Installs the event filters on all the views that are currently open for the
|
||||
* managed document object. The function "installEventFilters(KTextEditor::View *view)
|
||||
* function is used for a specific view.
|
||||
**/
|
||||
void installEventFilters();
|
||||
|
||||
/**
|
||||
* Removes the event filters from all the views that are currently open for the
|
||||
* managed document object. The function "removeInstalledEventFilters(KTextEditor::View *view)
|
||||
* function is used for a specific view.
|
||||
**/
|
||||
void removeInstalledEventFilters();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class LaTeXInfo : public TextInfo
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* @param eventFilter the event filter that will be installed on managed documents
|
||||
**/
|
||||
LaTeXInfo(Kate::Document *doc, Extensions *extensions, LatexCommands *commands, const QObject* eventFilter);
|
||||
virtual ~LaTeXInfo();
|
||||
|
||||
const long* getStatistics();
|
||||
|
||||
virtual Type getType();
|
||||
|
||||
virtual QString getFileFilter() const;
|
||||
|
||||
public slots:
|
||||
virtual void updateStruct();
|
||||
|
||||
protected:
|
||||
LatexCommands *m_commands;
|
||||
const QObject *m_eventFilter;
|
||||
|
||||
virtual void updateStructLevelInfo();
|
||||
virtual void checkChangedDeps();
|
||||
/**
|
||||
* Installs a custom event filter.
|
||||
**/
|
||||
virtual void installEventFilters(KTextEditor::View *view);
|
||||
|
||||
/**
|
||||
* Revmoves the custom event filter.
|
||||
**/
|
||||
virtual void removeInstalledEventFilters(KTextEditor::View *view);
|
||||
|
||||
private:
|
||||
BracketResult matchBracket(uint &, uint &);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class BibInfo : public TextInfo
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BibInfo (Kate::Document *doc, Extensions *extensions, LatexCommands* commands);
|
||||
virtual ~BibInfo();
|
||||
|
||||
virtual bool isLaTeXRoot();
|
||||
|
||||
virtual Type getType();
|
||||
|
||||
virtual QString getFileFilter() const;
|
||||
|
||||
public slots:
|
||||
virtual void updateStruct();
|
||||
};
|
||||
|
||||
class ScriptInfo : public TextInfo
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScriptInfo(Kate::Document *doc, Extensions *extensions);
|
||||
virtual ~ScriptInfo();
|
||||
|
||||
virtual bool isLaTeXRoot();
|
||||
|
||||
virtual Type getType();
|
||||
|
||||
virtual QString getFileFilter() const;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,260 @@
|
||||
/***************************************************************************
|
||||
date : Feb 20 2007
|
||||
version : 0.45
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEEDIT_H
|
||||
#define KILEEDIT_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qregexp.h>
|
||||
#include <qmap.h>
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <kate/document.h>
|
||||
|
||||
#include "kilestructurewidget.h"
|
||||
#include "codecompletion.h"
|
||||
#include "latexcmd.h"
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
class KileInfo;
|
||||
namespace KileAction { class TagData; }
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
class EditorExtension : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EditorExtension(KileInfo *);
|
||||
~EditorExtension();
|
||||
|
||||
enum EnvType { EnvNone, EnvList, EnvTab, EnvCrTab };
|
||||
|
||||
enum SelectMode { smTex, smLetter, smWord, smNospace };
|
||||
|
||||
void readConfig(void);
|
||||
|
||||
void insertTag(const KileAction::TagData& data, Kate::View *view);
|
||||
|
||||
QString getTextLineReal(Kate::Document *doc, uint row);
|
||||
void gotoBullet(bool backwards, Kate::View *view = 0L);
|
||||
|
||||
void gotoEnvironment(bool backwards, Kate::View *view = 0L);
|
||||
void matchEnvironment(Kate::View *view = 0L);
|
||||
void closeEnvironment(Kate::View *view = 0L);
|
||||
void closeAllEnvironments(Kate::View *view = 0L);
|
||||
void selectEnvironment(bool inside, Kate::View *view = 0L);
|
||||
void deleteEnvironment(bool inside, Kate::View *view = 0L);
|
||||
QString autoIndentEnvironment() { return m_envAutoIndent; }
|
||||
|
||||
void gotoTexgroup(bool backwards, Kate::View *view = 0L);
|
||||
void selectTexgroup(bool inside, Kate::View *view = 0L);
|
||||
void deleteTexgroup(bool inside, Kate::View *view = 0L);
|
||||
|
||||
const QStringList doubleQuotesList() { return m_quoteList; }
|
||||
|
||||
// get current word
|
||||
bool getCurrentWord(Kate::Document *doc,uint row,uint col, SelectMode mode,QString &word,uint &x1,uint &x2);
|
||||
QString getEnvironmentText(uint &row, uint &col, QString &name, Kate::View *view = 0L);
|
||||
bool hasEnvironment(Kate::View *view = 0L);
|
||||
|
||||
// complete environment
|
||||
bool eventInsertEnvironment(Kate::View *view);
|
||||
|
||||
// mathgroup
|
||||
QString getMathgroupText(uint &row, uint &col, Kate::View *view = 0L);
|
||||
bool hasMathgroup(Kate::View *view = 0L);
|
||||
|
||||
public slots:
|
||||
void insertIntelligentNewline(Kate::View *view = 0L);
|
||||
|
||||
void selectEnvInside() { selectEnvironment(true); }
|
||||
void selectEnvOutside() { selectEnvironment(false); }
|
||||
void deleteEnvInside() { deleteEnvironment(true); }
|
||||
void deleteEnvOutside() {deleteEnvironment(false); }
|
||||
void gotoBeginEnv() { gotoEnvironment(true); }
|
||||
void gotoEndEnv() { gotoEnvironment(false); }
|
||||
void matchEnv() { matchEnvironment(); }
|
||||
void closeEnv() {closeEnvironment(); }
|
||||
void closeAllEnv() {closeAllEnvironments(); }
|
||||
|
||||
void selectTexgroupInside() { selectTexgroup(true); }
|
||||
void selectTexgroupOutside() { selectTexgroup(false); }
|
||||
void deleteTexgroupInside() { deleteTexgroup(true); }
|
||||
void deleteTexgroupOutside() { deleteTexgroup(false); }
|
||||
void gotoBeginTexgroup() { gotoTexgroup(true); }
|
||||
void gotoEndTexgroup() { gotoTexgroup(false); }
|
||||
void matchTexgroup(Kate::View *view = 0L);
|
||||
void closeTexgroup(Kate::View *view = 0L);
|
||||
|
||||
void selectParagraph(Kate::View *view = 0L);
|
||||
void selectLine(Kate::View *view = 0L);
|
||||
void selectWord(SelectMode mode = smTex, Kate::View *view = 0L);
|
||||
void deleteParagraph(Kate::View *view = 0L);
|
||||
void deleteEndOfLine(Kate::View *view = 0L);
|
||||
void deleteWord(SelectMode mode = smTex, Kate::View *view = 0L);
|
||||
|
||||
void selectMathgroup(Kate::View *view = 0L);
|
||||
void deleteMathgroup(Kate::View *view = 0L);
|
||||
|
||||
void nextBullet(Kate::View* view = 0L);
|
||||
void prevBullet(Kate::View* view = 0L);
|
||||
void insertBullet(Kate::View* view = 0L);
|
||||
|
||||
void gotoLine(Kate::View *view = 0L);
|
||||
void gotoNextParagraph(Kate::View *view = 0L);
|
||||
void gotoPrevParagraph(Kate::View *view = 0L);
|
||||
|
||||
void gotoNextSectioning();
|
||||
void gotoPrevSectioning();
|
||||
void sectioningCommand(KileListViewItem *item, int id);
|
||||
|
||||
bool insertDoubleQuotes();
|
||||
void initDoubleQuotes();
|
||||
|
||||
void insertIntelligentTabulator();
|
||||
private:
|
||||
|
||||
enum EnvTag { EnvBegin, EnvEnd };
|
||||
|
||||
enum EnvPos { EnvLeft, EnvInside, EnvRight };
|
||||
|
||||
enum MathTag { mmNoMathMode, mmMathDollar, mmMathParen, mmDisplaymathParen, mmMathEnv, mmDisplaymathEnv };
|
||||
|
||||
struct EnvData
|
||||
{
|
||||
uint row;
|
||||
uint col;
|
||||
QString name;
|
||||
uint len;
|
||||
EnvPos cpos;
|
||||
EnvTag tag;
|
||||
EnvType type;
|
||||
};
|
||||
|
||||
struct MathData
|
||||
{
|
||||
uint row;
|
||||
uint col;
|
||||
uint len;
|
||||
uint numdollar;
|
||||
MathTag tag;
|
||||
QString envname;
|
||||
};
|
||||
|
||||
struct BracketData
|
||||
{
|
||||
uint row;
|
||||
uint col;
|
||||
bool open;
|
||||
};
|
||||
|
||||
QRegExp m_reg;
|
||||
bool m_overwritemode;
|
||||
QString m_envAutoIndent;
|
||||
|
||||
// change cursor position
|
||||
bool increaseCursorPosition(Kate::Document *doc, uint &row, uint &col);
|
||||
bool decreaseCursorPosition(Kate::Document *doc, uint &row, uint &col);
|
||||
|
||||
// check position
|
||||
bool isValidBackslash(Kate::Document *doc, uint row, uint col);
|
||||
bool isCommentPosition(Kate::Document *doc, uint row, uint col);
|
||||
bool isEnvironmentPosition(Kate::Document *doc, uint row, uint col,EnvData &env);
|
||||
|
||||
// find environment tags
|
||||
bool findBeginEnvironment(Kate::Document *doc, uint row, uint col,EnvData &env);
|
||||
bool findEndEnvironment(Kate::Document *doc, uint row, uint col,EnvData &env);
|
||||
bool findEnvironmentTag(Kate::Document *doc, uint row, uint col,EnvData &env, bool backwards=false);
|
||||
bool findOpenedEnvironment(uint &row,uint &col, QString &envname, Kate::View *view);
|
||||
QStringList findOpenedEnvironmentList(Kate::View *view, bool position = false);
|
||||
|
||||
// get current environment
|
||||
bool getEnvironment(bool inside, EnvData &envbegin, EnvData &envend,Kate::View *view);
|
||||
bool expandSelectionEnvironment(bool inside, Kate::View *view);
|
||||
|
||||
// find brackets
|
||||
bool isBracketPosition(Kate::Document *doc, uint row, uint col, BracketData &bracket);
|
||||
bool findOpenBracket(Kate::Document *doc, uint row, uint col, BracketData &bracket);
|
||||
bool findCloseBracket(Kate::Document *doc, uint row, uint col, BracketData &bracket);
|
||||
bool findCloseBracketTag(Kate::Document *doc, uint row, uint col,BracketData &bracket);
|
||||
bool findOpenBracketTag(Kate::Document *doc, uint row, uint col, BracketData &bracket);
|
||||
|
||||
// find math tags
|
||||
bool isOpeningMathTagPosition(Kate::Document *doc, uint row, uint col, MathData &mathdata);
|
||||
bool isClosingMathTagPosition(Kate::Document *doc, uint row, uint col, MathData &mathdata);
|
||||
bool findOpenMathTag(Kate::Document *doc, uint row, uint col, QRegExp ®, MathData &mathdata);
|
||||
bool findCloseMathTag(Kate::Document *doc, uint row, uint col, QRegExp ®, MathData &mathdata);
|
||||
bool checkMathtags(const MathData &begin,const MathData &end);
|
||||
|
||||
// mathgroup
|
||||
bool getMathgroup(Kate::View *view, uint &row1, uint &col1, uint &row2, uint &col2);
|
||||
|
||||
// get current Texgroup
|
||||
bool getTexgroup(bool inside, BracketData &open, BracketData &close, Kate::View *view);
|
||||
|
||||
// find current paragraph
|
||||
bool findCurrentTexParagraph(uint &startline, uint &endline, Kate::View *view);
|
||||
|
||||
// sectioning commands
|
||||
void gotoSectioning(bool backwards, Kate::View *view = 0L);
|
||||
bool findEndOfDocument(Kate::Document *doc, uint row,uint col, uint &rowFound, uint &colFound);
|
||||
|
||||
// check environment type
|
||||
KileDocument::LatexCommands *m_latexCommands;
|
||||
bool shouldCompleteEnv(const QString &envname, Kate::View *view);
|
||||
QString getWhiteSpace(const QString &s);
|
||||
|
||||
// verbatim text
|
||||
bool insideVerb(Kate::View *view);
|
||||
bool insideVerbatim(Kate::View *view);
|
||||
|
||||
// complete environments
|
||||
QRegExp m_regexpEnter;
|
||||
|
||||
// double Quotes
|
||||
bool m_dblQuotes;
|
||||
QStringList m_quoteList;
|
||||
QString m_leftDblQuote, m_rightDblQuote;
|
||||
|
||||
// help
|
||||
void readHelpList(QString const &filename);
|
||||
|
||||
Kate::View *determineView(Kate::View *);
|
||||
|
||||
KileInfo *m_ki;
|
||||
|
||||
//code completion
|
||||
public slots:
|
||||
void completeWord();
|
||||
void completeEnvironment();
|
||||
void completeAbbreviation();
|
||||
|
||||
public:
|
||||
CodeCompletion* complete() const { return m_complete; }
|
||||
|
||||
private:
|
||||
CodeCompletion *m_complete;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,213 @@
|
||||
/***************************************************************************
|
||||
begin : Tue May 25 2004
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kileerrorhandler.h"
|
||||
|
||||
#include <ktabwidget.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qregexp.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kurl.h>
|
||||
#include <kate/document.h>
|
||||
#include <kate/view.h>
|
||||
|
||||
#include "kiletool_enums.h"
|
||||
#include "kilelogwidget.h"
|
||||
#include "kileoutputwidget.h"
|
||||
#include "kileinfo.h"
|
||||
#include "latexoutputfilter.h"
|
||||
#include "latexoutputinfo.h"
|
||||
#include "kiledocmanager.h"
|
||||
#include "kilesidebar.h"
|
||||
|
||||
KileErrorHandler::KileErrorHandler(QObject *parent, KileInfo *info, const char *name)
|
||||
: QObject(parent, name), m_ki(info), m_nCurrentError(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
KileErrorHandler::~KileErrorHandler()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void KileErrorHandler::reset()
|
||||
{
|
||||
m_ki->setLogPresent(false);
|
||||
m_nCurrentError = -1;
|
||||
}
|
||||
|
||||
void KileErrorHandler::ViewLog()
|
||||
{
|
||||
m_ki->outputView()->showPage(m_ki->logWidget());
|
||||
m_ki->setLogPresent(false);
|
||||
|
||||
QString cn = m_ki->getCompileName();
|
||||
if ( m_ki->outputFilter()->source() != cn )
|
||||
{
|
||||
m_ki->outputFilter()->setSource(cn);
|
||||
m_ki->outputFilter()->Run(cn.replace(QRegExp("\\..*$"),".log"));
|
||||
}
|
||||
|
||||
QString log = m_ki->outputFilter()->log();
|
||||
|
||||
if (!log.isNull())
|
||||
{
|
||||
m_ki->logWidget()->setText(log);
|
||||
m_ki->logWidget()->highlight();
|
||||
m_ki->logWidget()->scrollToBottom();
|
||||
m_ki->setLogPresent(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ki->logWidget()->printProblem(KileTool::Error, i18n("Cannot open log file; did you run LaTeX?"));
|
||||
}
|
||||
}
|
||||
|
||||
void KileErrorHandler::jumpToFirstError()
|
||||
{
|
||||
int sz = m_ki->outputInfo()->size();
|
||||
for (int i = 0; i < sz; ++i )
|
||||
{
|
||||
if ( (*m_ki->outputInfo())[i].type() == LatexOutputInfo::itmError )
|
||||
{
|
||||
jumpToProblem(&(*m_ki->outputInfo())[i]);
|
||||
m_nCurrentError = i;
|
||||
m_ki->logWidget()->highlightByIndex(i, sz, -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KileErrorHandler::jumpToProblem(OutputInfo *info)
|
||||
{
|
||||
QString file = m_ki->getFullFromPrettyName(info->source());
|
||||
|
||||
if ( !file.isNull() )
|
||||
{
|
||||
m_ki->docManager()->fileOpen(KURL::fromPathOrURL(file));
|
||||
int line = info->sourceLine() > 0 ? (info->sourceLine() - 1) : 0;
|
||||
|
||||
Kate::Document *doc = m_ki->docManager()->docFor(KURL::fromPathOrURL(file));
|
||||
if ( doc )
|
||||
{
|
||||
Kate::View* view = (Kate::View*)doc->views().first();
|
||||
if (view) view->setCursorPosition(line, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KileErrorHandler::showLogResults(const QString &src)
|
||||
{
|
||||
m_ki->logWidget()->clear();
|
||||
m_ki->setLogPresent(false);
|
||||
m_ki->outputFilter()->setSource(src);
|
||||
QFileInfo fi(src);
|
||||
QString lf = fi.dirPath(true) + '/' + fi.baseName(true) + ".log";
|
||||
m_ki->logWidget()->printMsg(KileTool::Info, i18n("Detecting errors (%1), please wait ...").arg(lf), i18n("Log") );
|
||||
if ( ! m_ki->outputFilter()->Run( lf ) )
|
||||
{
|
||||
|
||||
m_ki->outputFilter()->setSource(QString::null);
|
||||
return;
|
||||
}
|
||||
else
|
||||
m_ki->logWidget()->printMsg(KileTool::Info, i18n("Done."), i18n("Log") );
|
||||
}
|
||||
|
||||
void KileErrorHandler::jumpToProblem(int type, bool forward)
|
||||
{
|
||||
static LatexOutputInfoArray::iterator it;
|
||||
|
||||
//if the current log file does not belong to the files the user is viewing
|
||||
//reparse the correct log file
|
||||
QString cn = m_ki->getCompileName();
|
||||
bool correctlogfile = (cn == m_ki->outputFilter()->source());
|
||||
if ( ! correctlogfile ) showLogResults(cn);
|
||||
|
||||
if (!m_ki->outputInfo()->isEmpty())
|
||||
{
|
||||
int sz = m_ki->outputInfo()->size();
|
||||
int pl = forward ? 1 : -1;
|
||||
bool found = false;
|
||||
|
||||
//look for next problem of requested type
|
||||
for ( int i = 0; i < sz; ++i )
|
||||
{
|
||||
//always look at the whole outputInfo array, but start
|
||||
//at the problem adjacent to the current error
|
||||
//if we go beyond the bounds of the array we use
|
||||
//a simple "modulo" calculation to get within bounds again
|
||||
int index = (m_nCurrentError + (i + 1) *pl) % sz;
|
||||
while ( index < 0 ) index += sz;
|
||||
|
||||
if ( (*m_ki->outputInfo())[index].type() == type )
|
||||
{
|
||||
m_nCurrentError = index;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !found ) return;
|
||||
|
||||
//If the log file is being viewed, use this to jump to the errors,
|
||||
//otherwise, use the error summary display
|
||||
if (m_ki->logPresent())
|
||||
m_ki->logWidget()->highlight( (*m_ki->outputInfo())[m_nCurrentError].outputLine(), pl );
|
||||
else
|
||||
m_ki->logWidget()->highlightByIndex(m_nCurrentError, sz, pl);
|
||||
|
||||
jumpToProblem(&(*m_ki->outputInfo())[m_nCurrentError]);
|
||||
}
|
||||
|
||||
if (m_ki->outputInfo()->isEmpty() && correctlogfile)
|
||||
{
|
||||
m_ki->logWidget()->append("\n<font color=\"#008800\">"+ i18n("No LaTeX errors detected.") + "</font>");
|
||||
}
|
||||
}
|
||||
|
||||
void KileErrorHandler::NextError()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmError, true);
|
||||
}
|
||||
|
||||
void KileErrorHandler::PreviousError()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmError, false);
|
||||
}
|
||||
|
||||
void KileErrorHandler::NextWarning()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmWarning, true);
|
||||
}
|
||||
|
||||
void KileErrorHandler::PreviousWarning()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmWarning, false);
|
||||
}
|
||||
|
||||
void KileErrorHandler::NextBadBox()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmBadBox, true);
|
||||
}
|
||||
|
||||
void KileErrorHandler::PreviousBadBox()
|
||||
{
|
||||
jumpToProblem(LatexOutputInfo::itmBadBox, false);
|
||||
}
|
||||
|
||||
#include "kileerrorhandler.moc"
|
@ -0,0 +1,60 @@
|
||||
/***************************************************************************
|
||||
begin : Tue May 25 2004
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEERRORHANDLER_H
|
||||
#define KILEERRORHANDLER_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
/**
|
||||
@author Jeroen Wijnhout
|
||||
*/
|
||||
|
||||
class KileInfo;
|
||||
class OutputInfo;
|
||||
|
||||
class KileErrorHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KileErrorHandler(QObject *parent, KileInfo *info, const char *name = 0);
|
||||
|
||||
~KileErrorHandler();
|
||||
|
||||
/* log view, error handling */
|
||||
private slots:
|
||||
void ViewLog();
|
||||
void NextError();
|
||||
void PreviousError();
|
||||
void NextWarning();
|
||||
void PreviousWarning();
|
||||
void NextBadBox();
|
||||
void PreviousBadBox();
|
||||
|
||||
private:
|
||||
void jumpToProblem(int type, bool);
|
||||
void jumpToProblem(OutputInfo *);
|
||||
|
||||
public slots:
|
||||
void jumpToFirstError();
|
||||
void reset();
|
||||
void showLogResults(const QString &);
|
||||
|
||||
private:
|
||||
KileInfo *m_ki;
|
||||
int m_nCurrentError;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,71 @@
|
||||
//
|
||||
// C++ Implementation: kileeventfilter
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>, (C) 2004
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
|
||||
// 2007-03-17 dani
|
||||
// - select a single LaTeX command with CTRL+MouseDblClick-left
|
||||
// (such a double click on the middle part '\def' of '\abd\def\ghi'
|
||||
// will select only '\def\', not the whole text, as it does now)
|
||||
|
||||
#include "kileeventfilter.h"
|
||||
|
||||
#include <qevent.h>
|
||||
|
||||
#include <kate/view.h>
|
||||
#include <kate/document.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kileedit.h"
|
||||
#include "kileconfig.h"
|
||||
|
||||
KileEventFilter::KileEventFilter(KileDocument::EditorExtension *edit) : m_edit(edit)
|
||||
{
|
||||
readConfig();
|
||||
}
|
||||
|
||||
void KileEventFilter::readConfig()
|
||||
{
|
||||
m_bCompleteEnvironment = KileConfig::completeEnvironment();
|
||||
}
|
||||
|
||||
// KateViewInternal as a child of Kate::View has the focus
|
||||
// This was set with Kate::View::setFocusProxy(viewInternal)
|
||||
|
||||
bool KileEventFilter::eventFilter(QObject *o, QEvent *e)
|
||||
{
|
||||
if ( e->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *ke = (QKeyEvent*) e;
|
||||
if ( ke->key()==Qt::Key_QuoteDbl && ke->ascii()==Qt::Key_QuoteDbl )
|
||||
{
|
||||
return m_edit->insertDoubleQuotes();
|
||||
}
|
||||
if ( m_bCompleteEnvironment && ke->key()==Qt::Key_Return && ke->state()==0)
|
||||
{
|
||||
return m_edit->eventInsertEnvironment( (Kate::View*) o->parent() );
|
||||
}
|
||||
}
|
||||
else if ( e->type() == QEvent::MouseButtonDblClick)
|
||||
{
|
||||
QMouseEvent *me = (QMouseEvent*) e;
|
||||
if ( me->button()==LeftButton && ((me->state() & Qt::ControlButton) == Qt::ControlButton) )
|
||||
{
|
||||
m_edit->selectWord(KileDocument::EditorExtension::smTex);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//pass this event on
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#include "kileeventfilter.moc"
|
@ -0,0 +1,46 @@
|
||||
//
|
||||
// C++ Interface: kileeventfilter
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
//
|
||||
// Author: Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>, (C) 2004
|
||||
//
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
#ifndef KILEEVENTFILTER_H
|
||||
#define KILEEVENTFILTER_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qregexp.h>
|
||||
|
||||
class QEvent;
|
||||
|
||||
namespace Kate {class View; }
|
||||
namespace KileDocument { class EditorExtension; };
|
||||
|
||||
/**
|
||||
* This class is capable of intercepting key-strokes from the editor. It can complete a \begin{env}
|
||||
* with a \end{env} when enter is pressed.
|
||||
**/
|
||||
class KileEventFilter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileEventFilter(KileDocument::EditorExtension *edit);
|
||||
|
||||
public slots:
|
||||
void readConfig();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *o, QEvent *e);
|
||||
|
||||
private:
|
||||
bool m_bCompleteEnvironment;
|
||||
KileDocument::EditorExtension *m_edit;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,167 @@
|
||||
/***************************************************************************
|
||||
begin : Mar 12 2007
|
||||
copyright : 2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kileextensions.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
//////////////////// Extensions ////////////////////
|
||||
|
||||
Extensions::Extensions()
|
||||
{
|
||||
m_documents = ".tex .ltx .latex .dtx .ins";
|
||||
m_packages = ".cls .sty";
|
||||
m_bibtex = ".bib";
|
||||
m_metapost = ".mp";
|
||||
m_script = ".js";
|
||||
m_project = ".kilepr";
|
||||
//m_images = ".eps .pdf .dvi .ps .fig .gif .jpg .jpeg .png";
|
||||
m_images = ".eps .jpg .jpeg .png .pdf .ps .fig .gif";
|
||||
|
||||
m_latexDefault = ".tex";
|
||||
m_bibtexDefault = ".bib";
|
||||
m_metapostDefault = ".mp";
|
||||
m_scriptDefault = ".js";
|
||||
m_projectDefault = ".kilepr";
|
||||
}
|
||||
|
||||
//////////////////// file filter ////////////////////
|
||||
|
||||
QString Extensions::fileFilter(uint type)
|
||||
{
|
||||
QString ext,text;
|
||||
switch ( type )
|
||||
{
|
||||
case LATEX_EXT_DOC:
|
||||
ext = m_documents;
|
||||
text = i18n("(La)TeX Source Files");
|
||||
break;
|
||||
case LATEX_EXT_PKG:
|
||||
ext = m_packages;
|
||||
text = i18n("(La)TeX Packages");
|
||||
break;
|
||||
case LATEX_EXT_BIB:
|
||||
ext = m_bibtex;
|
||||
text = i18n("BibTeX Files");
|
||||
break;
|
||||
case LATEX_EXT_MP:
|
||||
ext = m_metapost;
|
||||
text = i18n("Metapost Files");
|
||||
break;
|
||||
case LATEX_EXT_JS:
|
||||
ext = m_script;
|
||||
text = i18n("Kile Script Files");
|
||||
break;
|
||||
case LATEX_EXT_PROJ:
|
||||
ext = m_project;
|
||||
text = i18n("Kile Project Files");
|
||||
break;
|
||||
default:
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
ext.replace(".","*.");
|
||||
return ext + '|' + text;
|
||||
}
|
||||
|
||||
//////////////////// document type ////////////////////
|
||||
|
||||
bool Extensions::isTexFile(const QString &fileName) const
|
||||
{
|
||||
//TODO use mimetype
|
||||
QString ext = '.' + QFileInfo(fileName).extension(false);
|
||||
return isLatexDocument(ext) || isLatexPackage(ext);
|
||||
}
|
||||
|
||||
bool Extensions::isBibFile(const QString &fileName) const
|
||||
{
|
||||
QString ext = '.' + QFileInfo(fileName).extension(false);
|
||||
return isBibtex(ext);
|
||||
}
|
||||
|
||||
bool Extensions::isScriptFile(const QString &fileName) const
|
||||
{
|
||||
QString ext = '.' + QFileInfo(fileName).extension(false);
|
||||
return isScript(ext);
|
||||
}
|
||||
|
||||
bool Extensions::isProjectFile(const QString &fileName) const
|
||||
{
|
||||
QString ext = '.' + QFileInfo(fileName).extension(false);
|
||||
return isProject(ext);
|
||||
}
|
||||
|
||||
bool Extensions::validExtension(const QString &ext, const QString &extensions) const
|
||||
{
|
||||
QStringList extlist = QStringList::split(" ",extensions);
|
||||
for ( QStringList::ConstIterator it=extlist.begin(); it!=extlist.end(); ++it )
|
||||
{
|
||||
if ( (*it) == ext )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Type Extensions::determineDocumentType(const KURL& url) const
|
||||
{
|
||||
if ( isTexFile(url) )
|
||||
{
|
||||
return KileDocument::LaTeX;
|
||||
}
|
||||
else if ( isBibFile(url) )
|
||||
{
|
||||
return KileDocument::BibTeX;
|
||||
}
|
||||
else if ( isScriptFile(url) )
|
||||
{
|
||||
return KileDocument::Script;
|
||||
}
|
||||
else
|
||||
{
|
||||
return KileDocument::Text;
|
||||
}
|
||||
}
|
||||
|
||||
QString Extensions::defaultExtensionForDocumentType(KileDocument::Type type) const
|
||||
{
|
||||
switch(type) {
|
||||
case KileDocument::LaTeX:
|
||||
return m_latexDefault;
|
||||
|
||||
case KileDocument::BibTeX:
|
||||
return m_bibtexDefault;
|
||||
|
||||
case KileDocument::Script:
|
||||
return m_scriptDefault;
|
||||
|
||||
case KileDocument::Text:
|
||||
/* fall through */
|
||||
case KileDocument::Undefined:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
/***************************************************************************
|
||||
begin : Mar 12 2007
|
||||
copyright : 2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEEXTENSIONS_H
|
||||
#define KILEEXTENSIONS_H
|
||||
|
||||
#include "kileconstants.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <kurl.h>
|
||||
|
||||
namespace KileDocument
|
||||
{
|
||||
|
||||
class Extensions
|
||||
{
|
||||
public:
|
||||
Extensions();
|
||||
~Extensions() {}
|
||||
|
||||
enum { LATEX_EXT_DOC=1, LATEX_EXT_PKG=2, LATEX_EXT_BIB=4, LATEX_EXT_IMG=8, LATEX_EXT_MP=16, LATEX_EXT_JS=32, LATEX_EXT_PROJ=64 };
|
||||
|
||||
QString latexDocuments() { return m_documents; }
|
||||
QString latexPackages() { return m_packages; }
|
||||
QString bibtex() { return m_bibtex; }
|
||||
QString images() { return m_images; }
|
||||
QString metapost() { return m_metapost; }
|
||||
|
||||
QString latexDocumentDefault() { return m_latexDefault; }
|
||||
QString bibtexDefault() { return m_bibtexDefault; }
|
||||
QString metapostDefault() { return m_metapostDefault; }
|
||||
|
||||
QString latexDocumentFileFilter() { return fileFilter(LATEX_EXT_DOC); }
|
||||
QString latexPackageFileFilter() { return fileFilter(LATEX_EXT_PKG); }
|
||||
QString bibtexFileFilter() { return fileFilter(LATEX_EXT_BIB); }
|
||||
QString imageFileFilter() { return fileFilter(LATEX_EXT_IMG); }
|
||||
QString metapostFileFilter() { return fileFilter(LATEX_EXT_MP); }
|
||||
QString scriptFileFilter() { return fileFilter(LATEX_EXT_JS); }
|
||||
QString projectFileFilter() { return fileFilter(LATEX_EXT_PROJ); }
|
||||
|
||||
bool isTexFile(const QString &fileName) const;
|
||||
bool isTexFile(const KURL &url) const { return isTexFile(url.fileName()); }
|
||||
bool isBibFile(const QString &fileName) const;
|
||||
bool isBibFile(const KURL &url) const { return isBibFile(url.fileName()); }
|
||||
bool isScriptFile(const QString &fileName) const;
|
||||
bool isScriptFile(const KURL & url) const { return isScriptFile(url.fileName()); }
|
||||
bool isProjectFile(const QString &fileName) const;
|
||||
bool isProjectFile(const KURL &url) const { return isProjectFile(url.fileName()); }
|
||||
|
||||
bool isLatexDocument(const QString &ext) const { return validExtension(ext,m_documents); }
|
||||
bool isLatexPackage(const QString &ext) const { return validExtension(ext,m_packages); }
|
||||
bool isImage(const QString &ext) const { return validExtension(ext,m_images); }
|
||||
|
||||
KileDocument::Type determineDocumentType(const KURL &url) const;
|
||||
QString defaultExtensionForDocumentType(KileDocument::Type type) const;
|
||||
|
||||
private:
|
||||
QString m_documents, m_packages;
|
||||
QString m_bibtex, m_metapost;
|
||||
QString m_images, m_script;
|
||||
QString m_project;
|
||||
|
||||
QString m_latexDefault, m_bibtexDefault;
|
||||
QString m_metapostDefault, m_scriptDefault;
|
||||
QString m_projectDefault;
|
||||
|
||||
bool isBibtex(const QString &ext) const { return validExtension(ext,m_bibtex); }
|
||||
bool isMetapost(const QString &ext) const { return validExtension(ext,m_metapost); }
|
||||
bool isScript(const QString &ext) const { return validExtension(ext,m_script); }
|
||||
bool isProject(const QString &ext) const { return validExtension(ext,m_project); }
|
||||
bool validExtension(const QString &ext, const QString &extensions) const;
|
||||
|
||||
QString fileFilter(uint type);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,169 @@
|
||||
/***************************************************************************
|
||||
begin : Wed Aug 14 2002
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email :
|
||||
|
||||
from Kate (C) 2001 by Matt Newell
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2007-03-12 dani
|
||||
// - use KileDocument::Extensions
|
||||
|
||||
#include "kilefileselect.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
#include <qstrlist.h>
|
||||
#include <qtooltip.h>
|
||||
|
||||
#include <ktoolbar.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kprotocolinfo.h>
|
||||
#include <kconfig.h>
|
||||
#include <kglobal.h>
|
||||
#include <klocale.h>
|
||||
#include <kcombobox.h>
|
||||
#include <kcharsets.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kileconfig.h"
|
||||
|
||||
KileFileSelect::KileFileSelect(KileDocument::Extensions *extensions, QWidget *parent, const char *name ) : QWidget(parent,name)
|
||||
{
|
||||
QVBoxLayout* lo = new QVBoxLayout(this);
|
||||
|
||||
KToolBar *toolbar = new KToolBar(this, "fileselectortoolbar");
|
||||
lo->addWidget(toolbar);
|
||||
|
||||
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
|
||||
cmbPath->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
|
||||
cmpl = new KURLCompletion(KURLCompletion::DirCompletion);
|
||||
cmbPath->setCompletionObject( cmpl );
|
||||
lo->addWidget(cmbPath);
|
||||
|
||||
dir = new KDirOperator(KURL(), this, "operator");
|
||||
connect(dir, SIGNAL(fileSelected(const KFileItem*)), this, SIGNAL(fileSelected(const KFileItem*)));
|
||||
dir->setView(KFile::Simple);
|
||||
dir->setMode(KFile::Files);
|
||||
|
||||
// KileFileSelect filter for sidebar
|
||||
QString filter = extensions->latexDocuments()
|
||||
+ ' ' + extensions->latexPackages()
|
||||
+ ' ' + extensions->bibtex()
|
||||
+ ' ' + extensions->metapost();
|
||||
filter.replace(".","*.");
|
||||
dir->setNameFilter(filter);
|
||||
|
||||
KActionCollection *coll = dir->actionCollection();
|
||||
// some shortcuts of diroperator that clashes with Kate
|
||||
coll->action( "delete" )->setShortcut( KShortcut( ALT + Key_Delete ) );
|
||||
coll->action( "reload" )->setShortcut( KShortcut( ALT + Key_F5 ) );
|
||||
coll->action( "back" )->setShortcut( KShortcut( ALT + SHIFT + Key_Left ) );
|
||||
coll->action( "forward" )->setShortcut( KShortcut( ALT + SHIFT + Key_Right ) );
|
||||
// some consistency - reset up for dir too
|
||||
coll->action( "up" )->setShortcut( KShortcut( ALT + SHIFT + Key_Up ) );
|
||||
coll->action( "home" )->setShortcut( KShortcut( CTRL + ALT + Key_Home ) );
|
||||
|
||||
coll->action("home")->plug(toolbar);
|
||||
coll->action("up")->plug(toolbar);
|
||||
coll->action("back")->plug(toolbar);
|
||||
coll->action("forward")->plug(toolbar);
|
||||
|
||||
toolbar->insertButton("fileopen", 0, true , i18n( "Open selected" ));
|
||||
connect(toolbar, SIGNAL(clicked(int)), this, SLOT(clickedToolbar(int)));
|
||||
|
||||
lo->addWidget(dir);
|
||||
lo->setStretchFactor(dir, 2);
|
||||
|
||||
m_comboEncoding = new KComboBox( false, this, "comboEncoding" );
|
||||
QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
|
||||
m_comboEncoding->setEditable( true );
|
||||
m_comboEncoding->insertStringList( availableEncodingNames );
|
||||
QToolTip::add(m_comboEncoding, i18n("Set encoding"));
|
||||
lo->addWidget(m_comboEncoding);
|
||||
|
||||
connect( cmbPath, SIGNAL( urlActivated( const KURL& )),this, SLOT( cmbPathActivated( const KURL& ) ));
|
||||
connect( cmbPath, SIGNAL( returnPressed( const QString& )), this, SLOT( cmbPathReturnPressed( const QString& ) ));
|
||||
connect(dir, SIGNAL(urlEntered(const KURL&)), this, SLOT(dirUrlEntered(const KURL&)) );
|
||||
}
|
||||
|
||||
KileFileSelect::~KileFileSelect()
|
||||
{
|
||||
delete cmpl;
|
||||
}
|
||||
|
||||
void KileFileSelect::readConfig()
|
||||
{
|
||||
QString lastDir = KileConfig::lastDir();
|
||||
QFileInfo ldi(lastDir);
|
||||
if ( ! ldi.isReadable() ) dir->home();
|
||||
else setDir(KURL::fromPathOrURL(lastDir));
|
||||
}
|
||||
|
||||
void KileFileSelect::writeConfig()
|
||||
{
|
||||
KileConfig::setLastDir(dir->url().path());
|
||||
}
|
||||
|
||||
void KileFileSelect::setView(KFile::FileView view)
|
||||
{
|
||||
dir->setView(view);
|
||||
}
|
||||
|
||||
void KileFileSelect::cmbPathActivated( const KURL& u )
|
||||
{
|
||||
dir->setURL( u, true );
|
||||
}
|
||||
|
||||
void KileFileSelect::cmbPathReturnPressed( const QString& u )
|
||||
{
|
||||
dir->setFocus();
|
||||
dir->setURL( KURL(u), true );
|
||||
}
|
||||
|
||||
void KileFileSelect::dirUrlEntered( const KURL& u )
|
||||
{
|
||||
cmbPath->removeURL( u );
|
||||
QStringList urls = cmbPath->urls();
|
||||
urls.prepend( u.url() );
|
||||
while ( urls.count() >= (uint)cmbPath->maxItems() )
|
||||
urls.remove( urls.last() );
|
||||
cmbPath->setURLs( urls );
|
||||
}
|
||||
|
||||
void KileFileSelect::focusInEvent(QFocusEvent*)
|
||||
{
|
||||
dir->setFocus();
|
||||
}
|
||||
|
||||
void KileFileSelect::setDir( KURL u )
|
||||
{
|
||||
dir->setURL(u, true);
|
||||
}
|
||||
|
||||
void KileFileSelect::clickedToolbar(int i)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
QPtrListIterator<KFileItem> it(*dir->selectedItems());
|
||||
while ( it.current() != 0 )
|
||||
{
|
||||
emit(fileSelected(*it));
|
||||
++it;
|
||||
}
|
||||
|
||||
dir->view()->clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
#include "kilefileselect.moc"
|
@ -0,0 +1,77 @@
|
||||
/***************************************************************************
|
||||
begin : Wed Aug 14 2002
|
||||
copyright : (C) 2002 - 2003 by Pascal Brachet, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
|
||||
from Kate (C) 2001 by Matt Newell
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEFILESELECT_H
|
||||
#define KILEFILESELECT_H
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <kfile.h>
|
||||
#include <kdiroperator.h>
|
||||
#include <kurlcombobox.h>
|
||||
#include <kurlcompletion.h>
|
||||
#include <kurl.h>
|
||||
|
||||
#include "kileextensions.h"
|
||||
|
||||
/**
|
||||
*@author Jeroen Wijnhout
|
||||
*/
|
||||
|
||||
class KFileItem;
|
||||
class KComboBox;
|
||||
|
||||
class KileFileSelect : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileFileSelect(KileDocument::Extensions *extensions, QWidget *parent=0, const char *name=0);
|
||||
~KileFileSelect();
|
||||
|
||||
void setView(KFile::FileView);
|
||||
KDirOperator * dirOperator(){return dir;}
|
||||
KComboBox* comboEncoding() { return m_comboEncoding; }
|
||||
|
||||
public slots:
|
||||
void setDir(KURL);
|
||||
void readConfig();
|
||||
void writeConfig();
|
||||
|
||||
private slots:
|
||||
void cmbPathActivated( const KURL& u );
|
||||
void cmbPathReturnPressed( const QString& u );
|
||||
void dirUrlEntered( const KURL& u );
|
||||
|
||||
void clickedToolbar(int);
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent*);
|
||||
|
||||
signals:
|
||||
void fileSelected(const KFileItem*);
|
||||
|
||||
private:
|
||||
KURLComboBox *cmbPath;
|
||||
KDirOperator * dir;
|
||||
KComboBox *m_comboEncoding;
|
||||
QToolButton *home, *up, *back, *forward;
|
||||
KURLCompletion *cmpl;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,886 @@
|
||||
/* This file is part of the kile project
|
||||
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
|
||||
Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
|
||||
Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
|
||||
Copyright (C) 2003 Jan-Marek Glogowski <glogow@stud.fbi.fh-darmstadt.de>
|
||||
Copyright (C) 2005 Holger Danielsson <holger.danielsson@versanet.de>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2 as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
Original from kdebase / kate
|
||||
|
||||
changes: 2005-11-27 (dani)
|
||||
- add a search for all files of a Kile project
|
||||
(done with one grep command for each file)
|
||||
- dialog is now based on KDialogBase
|
||||
- an item of the resultbox ist opened when it's highlightened
|
||||
(no double click is needed anymore)
|
||||
- dialog is deleted after work to minimize resources
|
||||
- added additional search modes for environments, labels etc.
|
||||
- fixed some bugs (f.e. two slashes at the end of directory
|
||||
names, jumping to the wrong line, wrong pattern lists)
|
||||
- add some editable template modes to search for LaTeX commands
|
||||
- add some predined modes to search for environments, graphics,
|
||||
labels, and references, either all of them or some special ones
|
||||
|
||||
(in other words: most parts have changed to work perfectly with Kile ...)
|
||||
*/
|
||||
|
||||
// 2007-03-12 dani
|
||||
// - use KileDocument::Extensions
|
||||
|
||||
#include "kilegrepdialog.h"
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qlayout.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlabel.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qevent.h>
|
||||
#include <qregexp.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#include <kcombobox.h>
|
||||
#include <kapplication.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kbuttonbox.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <kprocess.h>
|
||||
#include <klocale.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kurlrequester.h>
|
||||
#include <kurlcompletion.h>
|
||||
#include <klineedit.h>
|
||||
#include <klistbox.h>
|
||||
#include "kiledebug.h"
|
||||
|
||||
#include "kileconfig.h"
|
||||
#include "kileproject.h"
|
||||
#include "kiledocmanager.h"
|
||||
#include "kileextensions.h"
|
||||
|
||||
KileGrepDialog::KileGrepDialog(QWidget *parent, KileInfo *ki, KileGrep::Mode mode, const char *name)
|
||||
: KDialogBase (parent, name, false, QString::null, 0, Ok, false ),
|
||||
m_ki(ki), m_mode(mode), childproc(0), m_grepJobs(0)
|
||||
{
|
||||
QWidget *page = new QWidget(this);
|
||||
setMainWidget(page);
|
||||
//setWFlags( Qt::WStyle_StaysOnTop );
|
||||
|
||||
// build dialog
|
||||
QVBoxLayout *vbox = new QVBoxLayout( page,5,KDialog::spacingHint() );
|
||||
|
||||
// project groupbox
|
||||
QGroupBox *projectgroup = new QGroupBox( i18n("Project"),page);
|
||||
projectgroup->setColumnLayout(0, Qt::Vertical );
|
||||
projectgroup->layout()->setSpacing( 6 );
|
||||
projectgroup->layout()->setMargin( 11 );
|
||||
QGridLayout *projectgrouplayout = new QGridLayout( projectgroup->layout() );
|
||||
projectgrouplayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel *project_label = new QLabel(i18n("Name:"), projectgroup);
|
||||
int labelwidth = project_label->sizeHint().width();
|
||||
|
||||
QLabel *projectdir_label = new QLabel(i18n("Directory:"), projectgroup);
|
||||
if ( projectdir_label->sizeHint().width() > labelwidth )
|
||||
labelwidth = projectdir_label->sizeHint().width();
|
||||
|
||||
projectname_label = new QLabel(projectgroup);
|
||||
projectdirname_label = new QLabel(projectgroup);
|
||||
|
||||
projectgrouplayout->addWidget(project_label, 0,0, AlignLeft | AlignVCenter);
|
||||
projectgrouplayout->addWidget(projectname_label, 0,1, AlignLeft | AlignVCenter);
|
||||
projectgrouplayout->addWidget(projectdir_label, 1,0, AlignLeft | AlignVCenter);
|
||||
projectgrouplayout->addWidget(projectdirname_label, 1,1, AlignLeft | AlignVCenter);
|
||||
projectgrouplayout->setColStretch(1,1);
|
||||
|
||||
// search groupbox
|
||||
QGroupBox *searchgroup = new QGroupBox( i18n("Search"),page);
|
||||
searchgroup->setColumnLayout(0, Qt::Vertical );
|
||||
searchgroup->layout()->setSpacing( 6 );
|
||||
searchgroup->layout()->setMargin( 11 );
|
||||
QGridLayout *searchgrouplayout = new QGridLayout( searchgroup->layout() );
|
||||
searchgrouplayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel *pattern_label = new QLabel(i18n("Pattern:"), searchgroup);
|
||||
if ( pattern_label->sizeHint().width() > labelwidth )
|
||||
labelwidth = pattern_label->sizeHint().width();
|
||||
|
||||
pattern_combo = new KComboBox(true, searchgroup);
|
||||
pattern_combo->setInsertionPolicy(KComboBox::NoInsertion);
|
||||
pattern_combo->setFocus();
|
||||
pattern_combo->setMinimumSize(pattern_combo->sizeHint());
|
||||
pattern_label->setBuddy(pattern_combo);
|
||||
|
||||
QLabel *template_label = new QLabel(i18n("Template:"), searchgroup);
|
||||
if ( template_label->sizeHint().width() > labelwidth )
|
||||
labelwidth = template_label->sizeHint().width();
|
||||
|
||||
QStringList templatemode_list;
|
||||
templatemode_list << i18n("Normal")
|
||||
<< i18n("Command")
|
||||
<< i18n("Command[]")
|
||||
<< i18n("Environment")
|
||||
<< i18n("Image")
|
||||
<< i18n("Label")
|
||||
<< i18n("Reference")
|
||||
<< i18n("File")
|
||||
;
|
||||
|
||||
QBoxLayout *template_layout = new QHBoxLayout(4);
|
||||
template_combo = new KComboBox(false, searchgroup);
|
||||
template_combo->insertStringList(templatemode_list);
|
||||
template_combo->adjustSize();
|
||||
template_combo->setFixedSize(template_combo->size());
|
||||
template_layout->addWidget(template_combo);
|
||||
m_lastTemplateIndex = 0;
|
||||
|
||||
template_edit = new KLineEdit(searchgroup);
|
||||
template_edit->setText("%s");
|
||||
template_edit->setMinimumSize(template_edit->sizeHint());
|
||||
template_label->setBuddy(template_edit);
|
||||
template_layout->addWidget(template_edit);
|
||||
|
||||
searchgrouplayout->addWidget(pattern_label, 0,0, AlignLeft | AlignVCenter);
|
||||
searchgrouplayout->addWidget(pattern_combo, 0,1);
|
||||
searchgrouplayout->addWidget(template_label, 1,0, AlignLeft | AlignVCenter);
|
||||
searchgrouplayout->addLayout(template_layout, 1,1);
|
||||
|
||||
// filter groupbox
|
||||
QGroupBox *filtergroup = new QGroupBox( i18n("Directory Options"),page);
|
||||
filtergroup->setColumnLayout(0, Qt::Vertical );
|
||||
filtergroup->layout()->setSpacing( 6 );
|
||||
filtergroup->layout()->setMargin( 11 );
|
||||
QGridLayout *filtergrouplayout = new QGridLayout( filtergroup->layout() );
|
||||
filtergrouplayout->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel *files_label = new QLabel(i18n("Filter:"), filtergroup);
|
||||
if ( files_label->sizeHint().width() > labelwidth )
|
||||
labelwidth = files_label->sizeHint().width();
|
||||
|
||||
filter_combo = new KComboBox(true, filtergroup);
|
||||
filter_combo->setMinimumSize(filter_combo->sizeHint());
|
||||
files_label->setBuddy(filter_combo->focusProxy());
|
||||
|
||||
QLabel *dir_label = new QLabel(i18n("Directory:"), filtergroup);
|
||||
if ( dir_label->sizeHint().width() > labelwidth )
|
||||
labelwidth = dir_label->sizeHint().width();
|
||||
|
||||
QBoxLayout *dir_layout = new QHBoxLayout(3);
|
||||
dir_combo = new KURLRequester( new KComboBox(true, filtergroup), filtergroup, "dir combo" );
|
||||
dir_combo->completionObject()->setMode(KURLCompletion::DirCompletion);
|
||||
dir_combo->setMode(KFile::Directory|KFile::LocalOnly|KFile::ExistingOnly);
|
||||
dir_label->setBuddy(dir_combo);
|
||||
dir_layout->addWidget(dir_combo);
|
||||
|
||||
recursive_box = new QCheckBox(i18n("Scan directories recursively"), filtergroup);
|
||||
recursive_box->setMinimumWidth(recursive_box->sizeHint().width());
|
||||
|
||||
filtergrouplayout->addWidget(files_label, 2,0, AlignLeft | AlignVCenter);
|
||||
filtergrouplayout->addWidget(filter_combo, 2, 1);
|
||||
filtergrouplayout->addWidget(dir_label, 3,0, AlignLeft | AlignVCenter);
|
||||
filtergrouplayout->addLayout(dir_layout, 3,1);
|
||||
filtergrouplayout->addMultiCellWidget(recursive_box, 4,4, 1,2);
|
||||
filtergrouplayout->setColStretch(1,1);
|
||||
|
||||
// result box
|
||||
resultbox = new KListBox(page);
|
||||
resultbox->setMinimumHeight(150);
|
||||
|
||||
// button box
|
||||
KButtonBox *actionbox = new KButtonBox(page, Qt::Horizontal);
|
||||
search_button = actionbox->addButton(i18n("&Search"));
|
||||
search_button->setDefault(true);
|
||||
search_button->setEnabled(false);
|
||||
clear_button = actionbox->addButton(i18n("&Clear"));
|
||||
clear_button->setEnabled(false);
|
||||
actionbox->addStretch();
|
||||
#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
|
||||
close_button = actionbox->addButton(KStdGuiItem::close());
|
||||
#else
|
||||
close_button = actionbox->addButton(i18n("Cl&ose"));
|
||||
#endif
|
||||
actionbox->layout();
|
||||
|
||||
// adjust labels
|
||||
project_label->setFixedWidth(labelwidth);
|
||||
projectdir_label->setFixedWidth(labelwidth);
|
||||
pattern_label->setFixedWidth(labelwidth);
|
||||
template_label->setFixedWidth(labelwidth);
|
||||
files_label->setFixedWidth(labelwidth);
|
||||
dir_label->setFixedWidth(labelwidth);
|
||||
|
||||
if ( m_mode == KileGrep::Project )
|
||||
{
|
||||
filtergroup->hide();
|
||||
vbox->addWidget(projectgroup);
|
||||
vbox->addWidget(searchgroup);
|
||||
}
|
||||
else
|
||||
{
|
||||
projectgroup->hide();
|
||||
vbox->addWidget(searchgroup);
|
||||
vbox->addWidget(filtergroup);
|
||||
}
|
||||
vbox->addWidget(resultbox);
|
||||
vbox->addWidget(actionbox);
|
||||
|
||||
// Produces error messages like
|
||||
// QListBox::property( "text" ) failed:
|
||||
// property invalid or does not exist
|
||||
// Anyone an idea?
|
||||
KAcceleratorManager::manage( this );
|
||||
|
||||
QWhatsThis::add(pattern_combo,
|
||||
i18n("Enter the regular expression you want to search for here.<br>"
|
||||
"Possible meta characters are:<br>"
|
||||
"<ul>"
|
||||
"<li> <b>.</b> - Matches any character</li>"
|
||||
"<li> <b>^</b> - Matches the beginning of a line</li>"
|
||||
"<li> <b>$</b> - Matches the end of a line</li>"
|
||||
"<li> <b>\\\\\\<</b> - Matches the beginning of a word</li>"
|
||||
"<li> <b>\\\\\\></b> - Matches the end of a word</li>"
|
||||
"</ul>"
|
||||
"The following repetition operators exist:"
|
||||
"<ul>"
|
||||
"<li> <b>?</b> - The preceding item is matched at most once</li>"
|
||||
"<li> <b>*</b> - The preceding item is matched zero or more times</li>"
|
||||
"<li> <b>+</b> - The preceding item is matched one or more times</li>"
|
||||
"<li> <b>{<i>n</i>}</b> - The preceding item is matched exactly <i>n</i> times</li>"
|
||||
"<li> <b>{<i>n</i>,}</b> - The preceding item is matched <i>n</i> or more times</li>"
|
||||
"<li> <b>{,<i>n</i>}</b> - The preceding item is matched at most <i>n</i> times</li>"
|
||||
"<li> <b>{<i>n</i>,<i>m</i>}</b> - The preceding item is matched at least <i>n</i>, "
|
||||
"but at most <i>m</i> times.</li>"
|
||||
"</ul>"
|
||||
"Furthermore, backreferences to bracketed subexpressions are "
|
||||
"available via the notation \\\\<i>n</i>."
|
||||
));
|
||||
QWhatsThis::add(filter_combo,
|
||||
i18n("Enter the file name pattern of the files to search here. "
|
||||
"You may give several patterns separated by commas."));
|
||||
QWhatsThis::add(template_combo,
|
||||
i18n("Choose one search mode. For the first modes, the search pattern is "
|
||||
"build from the editable template, where '%s' is replaced by the given pattern.<br><br>"
|
||||
"There are additional fixed predefined modes for environments, graphics, labels, references "
|
||||
"and input files. If the pattern is empty, Kile will search for all commands of this mode. "
|
||||
"If a pattern is given, it will be inserted as a parameter. F.e., in environment mode with "
|
||||
"pattern 'center', Kile will search for '\\begin{center}' and in graphics mode with "
|
||||
"pattern '.*\\.png', Kile will search for all png files."));
|
||||
QWhatsThis::add(template_edit,
|
||||
i18n("For the first three modes you can choose a template for the pattern from the combo box "
|
||||
"and edit it here. The string %s in the template is replaced "
|
||||
"by the pattern input field, resulting in the regular expression "
|
||||
"to search for. In all other modes this template is ignored."));
|
||||
QWhatsThis::add(dir_combo,
|
||||
i18n("Enter the directory which contains the files you want to search in."));
|
||||
QWhatsThis::add(recursive_box,
|
||||
i18n("Check this box to search in all subdirectories."));
|
||||
QWhatsThis::add(resultbox,
|
||||
i18n("The results of the grep run are listed here. Select a "
|
||||
"filename/line number combination with a mouse click on the item "
|
||||
"or with the cursor to show the respective line in the editor."));
|
||||
|
||||
// read config and setup dialog for both modes
|
||||
readConfig();
|
||||
if ( m_mode == KileGrep::Directory )
|
||||
{
|
||||
setCaption(i18n("Find in Files"));
|
||||
setupDirectory();
|
||||
}
|
||||
else
|
||||
{
|
||||
setCaption(i18n("Find in Project"));
|
||||
setupProject();
|
||||
}
|
||||
|
||||
pattern_combo->setEditText(QString::null);
|
||||
template_edit->setText(template_list[0]);
|
||||
slotPatternTextChanged(QString::null);
|
||||
|
||||
connect( pattern_combo->lineEdit(), SIGNAL(textChanged ( const QString & )),
|
||||
SLOT( slotPatternTextChanged( const QString & )));
|
||||
connect( template_combo, SIGNAL(activated(int)),
|
||||
SLOT(slotTemplateActivated(int)) );
|
||||
connect( resultbox, SIGNAL(highlighted(const QString&)),
|
||||
SLOT(slotItemSelected(const QString&)) );
|
||||
|
||||
connect( search_button, SIGNAL(clicked()), SLOT(slotSearch()) );
|
||||
connect( clear_button, SIGNAL(clicked()), SLOT(slotClear()) );
|
||||
connect( close_button, SIGNAL(clicked()), SIGNAL(closeClicked()) );
|
||||
|
||||
connect( this, SIGNAL(closeClicked()), SLOT(slotClose()) );
|
||||
connect( this, SIGNAL(finished()), SLOT(slotFinished()) );
|
||||
|
||||
resize(450,sizeHint().height());
|
||||
KILE_DEBUG() << "==KileGrepDialog (create dialog)=============================" << endl;
|
||||
}
|
||||
|
||||
KileGrepDialog::~KileGrepDialog()
|
||||
{
|
||||
KILE_DEBUG() << "==KileGrepDialog (delete dialog)=============================" << endl;
|
||||
writeConfig();
|
||||
delete childproc;
|
||||
}
|
||||
|
||||
///////////////////// config /////////////////////
|
||||
|
||||
void KileGrepDialog::readConfig()
|
||||
{
|
||||
pattern_combo->insertStringList( readList(KileGrep::SearchItems) );
|
||||
|
||||
QString labels = getCommandList(KileDocument::CmdAttrLabel);
|
||||
QString references = getCommandList(KileDocument::CmdAttrReference);
|
||||
template_list = readList(KileGrep::SearchTemplates) ;
|
||||
if ( template_list.count() != 3 )
|
||||
{
|
||||
template_list.clear();
|
||||
template_list << "%s" << "\\\\%s\\{" << "\\\\%s(\\[[^]]*\\])?\\{";
|
||||
}
|
||||
template_list << "\\\\begin\\{" // to be closed with "%s\\}"
|
||||
<< "\\\\includegraphics(\\[[^]]*\\])?\\{"
|
||||
<< "\\\\(label" + labels + ")\\{"
|
||||
<< "\\\\(ref|pageref|vref|vpageref|fref|Fref|eqref" + references + ")(\\[[^]]*\\])?\\{"
|
||||
<< "\\\\(input|include)\\{"
|
||||
;
|
||||
|
||||
if ( m_mode == KileGrep::Directory )
|
||||
{
|
||||
dir_combo->comboBox()->insertStringList( readList(KileGrep::SearchPaths) );
|
||||
recursive_box->setChecked( KileConfig::grepRecursive() );
|
||||
}
|
||||
}
|
||||
|
||||
void KileGrepDialog::writeConfig()
|
||||
{
|
||||
KileConfig::setLastSearchItems( getListItems(pattern_combo) );
|
||||
|
||||
QStringList list;
|
||||
list << template_list[0] << template_list[1] << template_list[2];
|
||||
KileConfig::setLastSearchTemplates( list );
|
||||
|
||||
if ( m_mode == KileGrep::Directory )
|
||||
{
|
||||
KileConfig::setLastSearchPaths( getListItems(dir_combo->comboBox()) );
|
||||
KileConfig::setGrepRecursive( recursive_box->isChecked() );
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// setup search modes /////////////////////
|
||||
|
||||
void KileGrepDialog::setupDirectory()
|
||||
{
|
||||
setDirName( QDir::home().absPath() );
|
||||
|
||||
// use a filter for 'find in files' dialog
|
||||
KileDocument::Extensions *extensions = m_ki->extensions();
|
||||
QString filter = extensions->latexDocumentFileFilter() + '\n'
|
||||
+ extensions->latexPackageFileFilter() + '\n'
|
||||
+ extensions->bibtexFileFilter() + '\n'
|
||||
+ extensions->metapostFileFilter() + '\n'
|
||||
+ "*|" + i18n("All Files");
|
||||
setFilter(filter);
|
||||
}
|
||||
|
||||
void KileGrepDialog::setupProject()
|
||||
{
|
||||
KileProject *project = m_ki->docManager()->activeProject();
|
||||
if ( project )
|
||||
{
|
||||
m_projectOpened = true;
|
||||
m_projectdir = project->baseURL().path();
|
||||
projectname_label->setText( project->name() );
|
||||
projectdirname_label->setText( m_projectdir );
|
||||
|
||||
m_projectfiles.clear();
|
||||
m_projectfiles = m_ki->docManager()->getProjectFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_projectOpened = false;
|
||||
projectname_label->setText( i18n("no project opened") );
|
||||
projectdirname_label->setText( QString::null );
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// read entries /////////////////////
|
||||
|
||||
QStringList KileGrepDialog::readList(KileGrep::List listtype)
|
||||
{
|
||||
QStringList strings,result;
|
||||
|
||||
bool stripSlash = false;
|
||||
switch ( listtype )
|
||||
{
|
||||
case KileGrep::SearchItems:
|
||||
strings = KileConfig::lastSearchItems();
|
||||
break;
|
||||
case KileGrep::SearchPaths:
|
||||
strings = KileConfig::lastSearchPaths();
|
||||
stripSlash = true;
|
||||
break;
|
||||
case KileGrep::SearchTemplates:
|
||||
strings = KileConfig::lastSearchTemplates();
|
||||
break;
|
||||
}
|
||||
|
||||
while (strings.count() > 0)
|
||||
{
|
||||
if ( stripSlash && strings[0].right(1)=="/" )
|
||||
strings[0].truncate( strings[0].length()-1 );
|
||||
if ( ! strings[0].isEmpty() )
|
||||
result.append(strings[0]);
|
||||
strings.remove(strings[0]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
///////////////////// item selected /////////////////////
|
||||
|
||||
void KileGrepDialog::slotItemSelected(const QString& item)
|
||||
{
|
||||
KILE_DEBUG() << "\tgrep: start item selected" << endl;
|
||||
int pos;
|
||||
QString filename, linenumber;
|
||||
|
||||
QString str = item;
|
||||
if ( (pos = str.find(':')) != -1)
|
||||
{
|
||||
filename = str.left(pos);
|
||||
str = str.right(str.length()-1-pos);
|
||||
if ( (pos = str.find(':')) != -1)
|
||||
{
|
||||
linenumber = str.left(pos);
|
||||
if ( m_mode == KileGrep::Project )
|
||||
emit itemSelected(m_projectdir + '/' + filename,linenumber.toInt());
|
||||
else
|
||||
//emit itemSelected(lastSearchPaths[0] + "/" + filename,linenumber.toInt());
|
||||
emit itemSelected(dir_combo->comboBox()->text(0) + '/' + filename,linenumber.toInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// grep /////////////////////
|
||||
|
||||
void KileGrepDialog::startGrep()
|
||||
{
|
||||
childproc = new KProcess();
|
||||
childproc->setUseShell(true);
|
||||
|
||||
if ( m_mode == KileGrep::Project )
|
||||
{
|
||||
QString command = buildProjectCommand() + ' ' + KProcess::quote(m_projectfiles[m_grepJobs-1]);
|
||||
KILE_DEBUG() << "\tgrep (project): " << command << endl;
|
||||
(*childproc) << QStringList::split(' ',command);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString command = buildFilesCommand();
|
||||
KILE_DEBUG() << "\tgrep (files): " << command << endl;
|
||||
(*childproc) << QStringList::split(' ', command);
|
||||
}
|
||||
m_grepJobs--;
|
||||
|
||||
connect( childproc, SIGNAL(processExited(KProcess *)),
|
||||
SLOT(childExited()) );
|
||||
connect( childproc, SIGNAL(receivedStdout(KProcess *, char *, int)),
|
||||
SLOT(receivedOutput(KProcess *, char *, int)) );
|
||||
connect( childproc, SIGNAL(receivedStderr(KProcess *, char *, int)),
|
||||
SLOT(receivedErrOutput(KProcess *, char *, int)) );
|
||||
|
||||
childproc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
|
||||
}
|
||||
|
||||
void KileGrepDialog::processOutput()
|
||||
{
|
||||
int pos;
|
||||
while ( (pos = buf.find('\n')) != -1)
|
||||
{
|
||||
QString item = buf.left(pos);
|
||||
if ( ! item.isEmpty() )
|
||||
{
|
||||
if ( m_mode == KileGrep::Project )
|
||||
{
|
||||
if ( item.find(m_projectdir + '/') == 0 )
|
||||
resultbox->insertItem( item.mid(m_projectdir.length()+1) );
|
||||
else
|
||||
resultbox->insertItem(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
resultbox->insertItem( item.mid(dir_combo->url().length()+1) );
|
||||
}
|
||||
}
|
||||
buf = buf.right(buf.length()-pos-1);
|
||||
}
|
||||
kapp->processEvents();
|
||||
}
|
||||
|
||||
void KileGrepDialog::receivedOutput(KProcess */*proc*/, char *buffer, int buflen)
|
||||
{
|
||||
buf += QString::fromLocal8Bit(buffer, buflen);
|
||||
processOutput();
|
||||
}
|
||||
|
||||
void KileGrepDialog::receivedErrOutput(KProcess */*proc*/, char *buffer, int buflen)
|
||||
{
|
||||
errbuf += QString::fromLocal8Bit( buffer, buflen );
|
||||
}
|
||||
|
||||
void KileGrepDialog::childExited()
|
||||
{
|
||||
// int status = childproc->exitStatus();
|
||||
|
||||
if ( ! errbuf.isEmpty() )
|
||||
{
|
||||
KMessageBox::information( parentWidget(),
|
||||
i18n("<strong>Error:</strong><p>") + errbuf,
|
||||
i18n("Grep Tool Error") );
|
||||
errbuf.truncate(0);
|
||||
}
|
||||
else
|
||||
finish();
|
||||
}
|
||||
|
||||
void KileGrepDialog::finish()
|
||||
{
|
||||
buf += '\n';
|
||||
processOutput();
|
||||
if ( childproc )
|
||||
{
|
||||
delete childproc;
|
||||
childproc = 0;
|
||||
}
|
||||
|
||||
if ( shouldRestart() )
|
||||
{
|
||||
startGrep();
|
||||
}
|
||||
else
|
||||
{
|
||||
updateLists();
|
||||
|
||||
resultbox->unsetCursor();
|
||||
clear_button->setEnabled( resultbox->count() > 0 );
|
||||
search_button->setText( i18n("&Search") );
|
||||
slotPatternTextChanged( pattern_combo->lineEdit()->text() );
|
||||
}
|
||||
}
|
||||
|
||||
void KileGrepDialog::updateLists()
|
||||
{
|
||||
updateListItems(pattern_combo);
|
||||
if ( m_mode==KileGrep::Directory )
|
||||
{
|
||||
updateListItems(dir_combo->comboBox());
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// build commands /////////////////////
|
||||
|
||||
QString KileGrepDialog::getPattern()
|
||||
{
|
||||
QString pattern;
|
||||
int template_mode = template_combo->currentItem();
|
||||
if ( template_mode < KileGrep::tmEnv )
|
||||
{
|
||||
pattern = template_edit->text();
|
||||
if ( pattern.isEmpty() )
|
||||
pattern = pattern_combo->currentText();
|
||||
else
|
||||
pattern.replace("%s", pattern_combo->currentText());
|
||||
}
|
||||
else
|
||||
{
|
||||
pattern = template_list[template_mode];
|
||||
if ( ! pattern_combo->currentText().isEmpty() )
|
||||
pattern += pattern_combo->currentText() + "\\}";
|
||||
}
|
||||
|
||||
return pattern;
|
||||
}
|
||||
|
||||
QString KileGrepDialog::getShellPattern()
|
||||
{
|
||||
QString pattern = getPattern();
|
||||
pattern.replace("'", "'\\''");
|
||||
return '\'' + pattern + '\'';
|
||||
//return KProcess::quote(pattern);
|
||||
}
|
||||
|
||||
|
||||
QString KileGrepDialog::buildFilesCommand()
|
||||
{
|
||||
QString files, files_temp;
|
||||
|
||||
if (filter_combo->currentItem() >= 0)
|
||||
files_temp = filter_list[filter_combo->currentItem()];
|
||||
else
|
||||
files_temp = filter_combo->currentText();
|
||||
|
||||
if (files_temp.right(1) != ",")
|
||||
files_temp = files_temp + ',';
|
||||
|
||||
QStringList tokens = QStringList::split ( ",", files_temp, false );
|
||||
QStringList::Iterator it = tokens.begin();
|
||||
if (it != tokens.end())
|
||||
{
|
||||
files = " '" + (*it) + '\'';
|
||||
++it;
|
||||
}
|
||||
|
||||
for ( ; it != tokens.end(); ++it )
|
||||
files = files + " -o -name " + '\'' + (*it) + '\'';
|
||||
|
||||
QString shell_command;
|
||||
shell_command += "find ";
|
||||
shell_command += KProcess::quote(dir_combo->url());
|
||||
shell_command += " \\( -name ";
|
||||
shell_command += files;
|
||||
shell_command += " \\)";
|
||||
if (!recursive_box->isChecked())
|
||||
shell_command += " -maxdepth 1";
|
||||
shell_command += " -exec grep -n -E -I -H -e " + getShellPattern() + " {} \\;";
|
||||
|
||||
return shell_command;
|
||||
}
|
||||
|
||||
QString KileGrepDialog::buildProjectCommand()
|
||||
{
|
||||
return "grep -n -E -I -H -e " + getShellPattern();
|
||||
}
|
||||
|
||||
///////////////////// Search /////////////////////
|
||||
|
||||
void KileGrepDialog::slotSearch()
|
||||
{
|
||||
KILE_DEBUG() << "\tgrep: start slot search" << endl;
|
||||
slotClear ();
|
||||
|
||||
if ( template_combo->currentItem()<KileGrep::tmEnv && pattern_combo->currentText().isEmpty() )
|
||||
return;
|
||||
|
||||
if ( childproc && childproc->isRunning() )
|
||||
{
|
||||
childproc->kill();
|
||||
return;
|
||||
}
|
||||
|
||||
KILE_DEBUG() << "\tgrep: start new search" << endl;
|
||||
QRegExp re( getPattern() );
|
||||
if ( ! re.isValid() )
|
||||
{
|
||||
KMessageBox::error( 0, i18n("Invalid regular expression: %1").arg(re.errorString()), i18n("Grep Tool Error") );
|
||||
return;
|
||||
}
|
||||
|
||||
resultbox->setCursor( QCursor(Qt::WaitCursor) );
|
||||
search_button->setText( i18n("&Cancel") );
|
||||
if ( template_combo->currentItem() < KileGrep::tmEnv)
|
||||
template_list[m_lastTemplateIndex] = template_edit->text();
|
||||
|
||||
// start grep command
|
||||
m_grepJobs = ( m_mode == KileGrep::Project ) ? m_projectfiles.count() : 1;
|
||||
startGrep();
|
||||
}
|
||||
|
||||
void KileGrepDialog::slotSearchFor(const QString &pattern)
|
||||
{
|
||||
slotClear();
|
||||
pattern_combo->setEditText(pattern);
|
||||
slotSearch();
|
||||
}
|
||||
|
||||
void KileGrepDialog::slotClear()
|
||||
{
|
||||
//KILE_DEBUG() << "\tgrep: slot clear" << endl;
|
||||
clearGrepJobs();
|
||||
resultbox->clear();
|
||||
finish();
|
||||
}
|
||||
|
||||
void KileGrepDialog::slotClose()
|
||||
{
|
||||
//KILE_DEBUG() << "\tgrep: slot close" << endl;
|
||||
clearGrepJobs();
|
||||
finish();
|
||||
delayedDestruct();
|
||||
}
|
||||
|
||||
void KileGrepDialog::slotFinished()
|
||||
{
|
||||
//KILE_DEBUG() << "\tgrep: slot finished" << endl;
|
||||
finish();
|
||||
delayedDestruct();
|
||||
}
|
||||
|
||||
///////////////////// templates /////////////////////
|
||||
|
||||
void KileGrepDialog::slotPatternTextChanged(const QString &)
|
||||
{
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
void KileGrepDialog::slotTemplateActivated(int index)
|
||||
{
|
||||
if ( index < KileGrep::tmEnv)
|
||||
{
|
||||
template_list[m_lastTemplateIndex] = template_edit->text();
|
||||
template_edit->setText( template_list[index] );
|
||||
}
|
||||
else
|
||||
{
|
||||
template_edit->setText(QString::null);
|
||||
}
|
||||
m_lastTemplateIndex = index;
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
void KileGrepDialog::updateWidgets()
|
||||
{
|
||||
bool search_state = (m_mode==KileGrep::Directory) || (m_mode==KileGrep::Project && m_projectOpened);
|
||||
|
||||
if ( template_combo->currentItem() < KileGrep::tmEnv )
|
||||
{
|
||||
template_edit->setEnabled(true);
|
||||
search_button->setEnabled( search_state && !pattern_combo->currentText().isEmpty() );
|
||||
}
|
||||
else
|
||||
{
|
||||
template_edit->setEnabled(false);
|
||||
search_button->setEnabled( search_state );
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// directory /////////////////////
|
||||
|
||||
void KileGrepDialog::setDirName(const QString &dir)
|
||||
{
|
||||
KComboBox *combo = dir_combo->comboBox();
|
||||
|
||||
if ( findListItem(combo,dir) < 0 )
|
||||
combo->insertItem(dir);
|
||||
if ( combo->text(0) != dir)
|
||||
slotClear();
|
||||
}
|
||||
|
||||
///////////////////// filter /////////////////////
|
||||
|
||||
void KileGrepDialog::setFilter(const QString &filter)
|
||||
{
|
||||
filter_list.clear();
|
||||
filter_combo->clear();
|
||||
if ( !filter.isEmpty() )
|
||||
{
|
||||
QStringList filter_lst = QStringList::split("\n", filter);
|
||||
for (QStringList::Iterator it = filter_lst.begin();
|
||||
it != filter_lst.end(); ++it)
|
||||
{
|
||||
QStringList filter_split = QStringList::split("|", *it);
|
||||
filter_list.append(filter_split[0]);
|
||||
filter_combo->insertItem(filter_split[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KileGrepDialog::appendFilter(const QString &name, const QString &filter)
|
||||
{
|
||||
filter_combo->insertItem(name);
|
||||
filter_list.append(filter);
|
||||
}
|
||||
|
||||
///////////////////// template /////////////////////
|
||||
|
||||
void KileGrepDialog::appendTemplate(const QString &name, const QString ®exp)
|
||||
{
|
||||
template_combo->insertItem(name);
|
||||
template_list.append(regexp);
|
||||
}
|
||||
|
||||
void KileGrepDialog::clearTemplates()
|
||||
{
|
||||
template_combo->clear();
|
||||
template_list.clear();
|
||||
}
|
||||
|
||||
///////////////////// KComboBox /////////////////////
|
||||
|
||||
QStringList KileGrepDialog::getListItems(KComboBox *combo)
|
||||
{
|
||||
QStringList list;
|
||||
for ( int i=0; i<combo->count() && i<KILEGREP_MAX; ++i )
|
||||
list.append( combo->text(i) );
|
||||
return list;
|
||||
}
|
||||
|
||||
int KileGrepDialog::findListItem(KComboBox *combo, const QString &s)
|
||||
{
|
||||
for ( int i=0; i<combo->count(); ++i )
|
||||
{
|
||||
if ( combo->text(i) == s )
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void KileGrepDialog::updateListItems(KComboBox *combo)
|
||||
{
|
||||
QString s = combo->currentText();
|
||||
if ( s.isEmpty() )
|
||||
return;
|
||||
|
||||
int index = findListItem(combo,s);
|
||||
if ( index > 0 ) // combo already contains s
|
||||
{
|
||||
combo->removeItem(index); // remove this item
|
||||
}
|
||||
else if ( index == -1 ) // combo doesn't contain s
|
||||
{
|
||||
if ( combo->count() >= KILEGREP_MAX )
|
||||
combo->removeItem( combo->count()-1 ); // remove last item
|
||||
}
|
||||
|
||||
if ( index != 0 )
|
||||
{
|
||||
combo->insertItem(s,0); // insert this item as first item
|
||||
combo->setCurrentItem(0); // and select it
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////// template /////////////////////
|
||||
|
||||
QString KileGrepDialog::getCommandList(KileDocument::CmdAttribute attrtype)
|
||||
{
|
||||
QStringList cmdlist;
|
||||
QStringList::ConstIterator it;
|
||||
|
||||
// get info about user defined references
|
||||
KileDocument::LatexCommands *cmd = m_ki->latexCommands();
|
||||
cmd->commandList(cmdlist,attrtype,true);
|
||||
|
||||
// build list of references
|
||||
QString commands = QString::null;
|
||||
for ( it=cmdlist.begin(); it != cmdlist.end(); ++it )
|
||||
{
|
||||
commands += '|' + (*it).mid(1);
|
||||
}
|
||||
return commands;
|
||||
}
|
||||
|
||||
|
||||
#include "kilegrepdialog.moc"
|
@ -0,0 +1,136 @@
|
||||
/* This file is part of the kile project
|
||||
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
|
||||
Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
|
||||
Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
|
||||
Copyright (C) 2003 Jan-Marek Glogowski <glogow@stud.fbi.fh-darmstadt.de>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2 as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
Original from kdebase / kate
|
||||
*/
|
||||
|
||||
#ifndef __KILE_GREP_DIALOG_H_
|
||||
#define __KILE_GREP_DIALOG_H_
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include "kileinfo.h"
|
||||
#include "latexcmd.h"
|
||||
|
||||
class QCheckBox;
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
class QEvent;
|
||||
|
||||
class KComboBox;
|
||||
class KLineEdit;
|
||||
class KProcess;
|
||||
class KURLRequester;
|
||||
class KListBox;
|
||||
|
||||
#define KILEGREP_MAX 12
|
||||
|
||||
namespace KileGrep
|
||||
{
|
||||
enum Mode { Project=0, Directory };
|
||||
enum List { SearchItems=0, SearchPaths, SearchTemplates };
|
||||
enum TemplateMode { tmNormal=0,tmCommand,tmCommandWithOption,tmEnv,tmGraphics,tmLabel,tmRefs,tmFiles };
|
||||
}
|
||||
|
||||
class KileGrepDialog : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileGrepDialog(QWidget *parent, KileInfo *ki, KileGrep::Mode mode, const char *name = 0);
|
||||
~KileGrepDialog();
|
||||
|
||||
void appendFilter(const QString &name, const QString &filter);
|
||||
|
||||
void appendTemplate(const QString &name, const QString ®exp);
|
||||
void clearTemplates();
|
||||
|
||||
public slots:
|
||||
void slotSearchFor(const QString &pattern);
|
||||
|
||||
signals:
|
||||
void itemSelected(const QString &abs_filename, int line);
|
||||
|
||||
private:
|
||||
KileInfo *m_ki;
|
||||
KileGrep::Mode m_mode;
|
||||
KProcess *childproc;
|
||||
int m_grepJobs;
|
||||
|
||||
void readConfig();
|
||||
void writeConfig();
|
||||
|
||||
QStringList getListItems(KComboBox *combo);
|
||||
int findListItem(KComboBox *combo, const QString &s);
|
||||
void updateListItems(KComboBox *combo);
|
||||
|
||||
void processOutput();
|
||||
void finish();
|
||||
|
||||
void startGrep();
|
||||
bool shouldRestart() { return (m_grepJobs > 0); }
|
||||
void clearGrepJobs() { m_grepJobs = 0; }
|
||||
QString buildFilesCommand();
|
||||
QString buildProjectCommand();
|
||||
QString getPattern();
|
||||
QString getShellPattern();
|
||||
QString getCommandList(KileDocument::CmdAttribute attrtype);
|
||||
|
||||
void setupDirectory();
|
||||
void setupProject();
|
||||
void setDirName(const QString &dir);
|
||||
void setFilter(const QString &filter);
|
||||
QStringList readList(KileGrep::List listtype);
|
||||
void updateLists();
|
||||
void updateWidgets();
|
||||
|
||||
QStringList m_projectfiles;
|
||||
QString m_projectdir;
|
||||
bool m_projectOpened;
|
||||
|
||||
QLabel *projectname_label, *projectdirname_label;
|
||||
KLineEdit *template_edit;
|
||||
KComboBox *filter_combo, *pattern_combo, *template_combo;
|
||||
KURLRequester *dir_combo;
|
||||
QCheckBox *recursive_box;
|
||||
KListBox *resultbox;
|
||||
QPushButton *search_button, *clear_button, *close_button;
|
||||
QString buf;
|
||||
QString errbuf;
|
||||
QStringList lastSearchPaths;
|
||||
QStringList filter_list;
|
||||
QStringList template_list;
|
||||
int m_lastTemplateIndex;
|
||||
|
||||
private slots:
|
||||
void childExited();
|
||||
void receivedOutput(KProcess *proc, char *buffer, int buflen);
|
||||
void receivedErrOutput(KProcess *proc, char *buffer, int buflen);
|
||||
void slotItemSelected(const QString&);
|
||||
void slotSearch();
|
||||
void slotClear();
|
||||
void slotClose();
|
||||
void slotFinished();
|
||||
void slotPatternTextChanged(const QString &);
|
||||
void slotTemplateActivated(int index);
|
||||
};
|
||||
|
||||
#endif // __KILE_GREP_DIALOG_H_
|
@ -0,0 +1,362 @@
|
||||
/***************************************************************************
|
||||
date : Feb 12 2007
|
||||
version : 0.30
|
||||
copyright : (C) 2004-2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilehelp.h"
|
||||
|
||||
#include <qdir.h>
|
||||
#include <qfile.h>
|
||||
#include <qtextstream.h>
|
||||
#include <qregexp.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <kglobal.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include "kiledebug.h"
|
||||
#include <klocale.h>
|
||||
#include <kate/document.h>
|
||||
|
||||
#include "kiletool_enums.h"
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kileviewmanager.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kilelogwidget.h"
|
||||
#include "kilestdtools.h"
|
||||
#include "kileconfig.h"
|
||||
|
||||
|
||||
// tbraun 27.06.2007
|
||||
// it _looks_ like texlive 2007 has the same layout than texlive 2005 so don't get confused about the variable names :)
|
||||
|
||||
namespace KileHelp
|
||||
{
|
||||
|
||||
Help::Help(KileDocument::EditorExtension *edit) : m_edit(edit), m_userhelp(0L)
|
||||
{
|
||||
readHelpList("latex-kile.lst",m_dictHelpKile);
|
||||
initTexDocumentation();
|
||||
}
|
||||
|
||||
Help::~Help()
|
||||
{
|
||||
delete m_userhelp;
|
||||
}
|
||||
|
||||
void Help::initTexDocumentation()
|
||||
{
|
||||
// use documentation for teTeX v2.x, v3.x or TexLive2005
|
||||
m_texdocPath = KileConfig::location();
|
||||
|
||||
// first check for TexLive2005
|
||||
QString texref = m_texdocPath + "/english/tex-refs";
|
||||
QDir dir(texref);
|
||||
if ( dir.exists() )
|
||||
{
|
||||
// we found TexLive2005
|
||||
m_texVersion = TEXLIVE2005;
|
||||
m_texReference = "/english/tex-refs/";
|
||||
readHelpList("latex-texlive-3.9.lst",m_dictHelpTex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// now we check for tetex3
|
||||
dir.setPath(m_texdocPath + "/latex/tex-refs");
|
||||
if ( dir.exists() )
|
||||
{
|
||||
m_texVersion = TETEX3;
|
||||
// check if this is buggy tetex3.0 or an updated version with subdirectory 'html'
|
||||
dir.setPath(m_texdocPath + "/latex/tex-refs/html");
|
||||
m_texReference = ( dir.exists() )
|
||||
? "/latex/tex-refs/html/" : "/latex/tex-refs/";
|
||||
readHelpList("latex-tetex3.lst",m_dictHelpTex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we set it to tetex2 (what else should it be?)
|
||||
m_texVersion = TETEX2;
|
||||
m_texReference = "/latex/latex2e-html/";
|
||||
readHelpList("latex-tetex.lst",m_dictHelpTex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////// update path to TeX documentation //////////////////////
|
||||
|
||||
void Help::update()
|
||||
{
|
||||
if ( m_texdocPath != KileConfig::location() )
|
||||
initTexDocumentation();
|
||||
}
|
||||
|
||||
////////////////////// set parameter/initialize user help //////////////////////
|
||||
|
||||
void Help::setUserhelp(KileTool::Manager *manager, KMenuBar *menubar)
|
||||
{
|
||||
m_manager = manager;
|
||||
m_userhelp = new UserHelp(manager,menubar);
|
||||
}
|
||||
|
||||
void Help::enableUserhelpEntries(bool state)
|
||||
{
|
||||
if ( m_userhelp )
|
||||
m_userhelp->enableUserHelpEntries(state);
|
||||
}
|
||||
////////////////////// show help //////////////////////
|
||||
|
||||
void Help::showHelpFile(const QString ¶meter)
|
||||
{
|
||||
KileTool::ViewHTML *tool = new KileTool::ViewHTML("ViewHTML", m_manager, false);
|
||||
tool->setFlags(KileTool::NeedSourceExists | KileTool::NeedSourceRead);
|
||||
//FIXME strip the #label part of the source (not the target),
|
||||
//somehow this is already done somewhere (by accident),
|
||||
//bad to rely on it
|
||||
tool->setMsg(KileTool::NeedSourceExists, i18n("Sorry, could not find the teTeX documentation at %1; set the correct path in Settings->Configure Kile->Help."));
|
||||
tool->setSource(parameter);
|
||||
tool->setTargetPath(QFileInfo(parameter).fileName());
|
||||
tool->prepareToRun();
|
||||
m_manager->run(tool);
|
||||
}
|
||||
|
||||
void Help::helpKeyword()
|
||||
{
|
||||
//FIXME: we should have a better way to access the current view
|
||||
helpKeyword(m_manager->info()->viewManager()->currentTextView());
|
||||
}
|
||||
|
||||
////////////////////// Help: TexDoc //////////////////////
|
||||
|
||||
void Help::helpDocBrowser()
|
||||
{
|
||||
KileDialog::TexDocDialog *dlg = new KileDialog::TexDocDialog();
|
||||
dlg->exec();
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
////////////////////// Help: TeTeX //////////////////////
|
||||
|
||||
void Help::helpTexGuide()
|
||||
{
|
||||
QString filename;
|
||||
|
||||
switch ( m_texVersion )
|
||||
{
|
||||
case TEXLIVE2005:
|
||||
filename = "english/texlive-en/live.html";
|
||||
break;
|
||||
case TETEX3:
|
||||
filename = "index.html";
|
||||
break;
|
||||
case TETEX2:
|
||||
filename = "newhelpindex.html";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
showHelpFile( m_texdocPath + '/' + filename );
|
||||
}
|
||||
|
||||
////////////////////// Help: LaTeX //////////////////////
|
||||
|
||||
void Help::helpLatex(Type type)
|
||||
{
|
||||
QString link;
|
||||
|
||||
if ( m_texVersion == TEXLIVE2005)
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case HelpLatexIndex:
|
||||
link = "tex-refs.html#latex";
|
||||
break;
|
||||
case HelpLatexCommand:
|
||||
link = "tex-refs.html#tex-refs-idx";
|
||||
break;
|
||||
case HelpLatexSubject:
|
||||
link = "tex-refs.html#commands";
|
||||
break;
|
||||
case HelpLatexEnvironment:
|
||||
link = "tex-refs.html#env-latex";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ( m_texVersion == TETEX3)
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case HelpLatexIndex:
|
||||
link = "latex.html#latex";
|
||||
break;
|
||||
case HelpLatexCommand:
|
||||
link = "appendices.html#tex-refs-idx";
|
||||
break;
|
||||
case HelpLatexSubject:
|
||||
link = "latex.html#commands";
|
||||
break;
|
||||
case HelpLatexEnvironment:
|
||||
link = "latex.html#environments";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case HelpLatexCommand:
|
||||
link = "ltx-2.html#cmd";
|
||||
break;
|
||||
case HelpLatexSubject:
|
||||
link = "ltx-2.html#subj";
|
||||
break;
|
||||
case HelpLatexEnvironment:
|
||||
link = "ltx-2.html#env";
|
||||
break;
|
||||
case HelpLatexIndex:
|
||||
link = "ltx-2.html";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// show help file
|
||||
QString texversion;
|
||||
if ( m_texVersion == TEXLIVE2005 )
|
||||
texversion = "TexLive 2005";
|
||||
else if ( m_texVersion == TETEX3 )
|
||||
texversion = "teTeX v3.x";
|
||||
else
|
||||
texversion = "teTeX v2.x";
|
||||
KILE_DEBUG() << "TeX Version: "<< texversion << " link=" << link << endl;
|
||||
|
||||
showHelpFile( m_texdocPath + m_texReference + link );
|
||||
}
|
||||
|
||||
////////////////////// Help: Keyword //////////////////////
|
||||
|
||||
// Context help: user either Kile LaTeX help or the help files shipped with teTeX,
|
||||
void Help::helpKeyword(Kate::View *view) // dani 04.08.2004
|
||||
{
|
||||
int type = (0 == KileConfig::use()) ? HelpKileRefs : HelpTexRefs;
|
||||
switch ( type )
|
||||
{
|
||||
case HelpTexRefs:
|
||||
helpTexRefsKeyword(view);
|
||||
break;
|
||||
case HelpKileRefs:
|
||||
helpKileRefsKeyword(view);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Help::helpTexRefsKeyword(Kate::View *view)
|
||||
{
|
||||
QString word = getKeyword(view);
|
||||
KILE_DEBUG() << "keyword: " << word << endl;
|
||||
if ( !word.isNull() && m_dictHelpTex.contains(word) )
|
||||
{
|
||||
KILE_DEBUG() << "about to show help for " << word << " (section " << m_dictHelpTex[word] << " )" << endl;
|
||||
showHelpFile( m_texdocPath + m_texReference + m_dictHelpTex[word] );
|
||||
}
|
||||
else
|
||||
noHelpAvailableFor(word);
|
||||
}
|
||||
|
||||
void Help::helpKileRefsKeyword(Kate::View *view)
|
||||
{
|
||||
QString kilehelp = KGlobal::dirs()->findResource("html","en/kile/latexhelp.html");
|
||||
KILE_DEBUG() << "kilehelp = " << kilehelp << endl;
|
||||
if ( ! kilehelp.isEmpty() )
|
||||
{
|
||||
QString word = getKeyword(view);
|
||||
KILE_DEBUG() << "word = " << word << " " << m_dictHelpKile.contains(word) << endl;
|
||||
if ( !word.isNull() && m_dictHelpKile.contains(word) )
|
||||
{
|
||||
showHelpFile( kilehelp + '#' + m_dictHelpKile[word] );
|
||||
}
|
||||
else
|
||||
noHelpAvailableFor(word);
|
||||
}
|
||||
}
|
||||
|
||||
void Help::noHelpAvailableFor(const QString &word)
|
||||
{
|
||||
m_manager->info()->logWidget()->printMsg(KileTool::Error, i18n("Sorry, no help available for %1.").arg(word), i18n("Help"));
|
||||
}
|
||||
|
||||
QString Help::getKeyword(Kate::View *view)
|
||||
{
|
||||
if ( !view )
|
||||
return QString::null;
|
||||
|
||||
// get current position
|
||||
uint row,col,col1,col2;
|
||||
QString word;
|
||||
Kate::Document *doc = view->getDoc();
|
||||
view->cursorPositionReal(&row,&col);
|
||||
|
||||
if ( m_edit->getCurrentWord(doc,row,col,KileDocument::EditorExtension::smTex,word,col1,col2) )
|
||||
// There is no starred keyword in the references. So if // dani 04.08.2004
|
||||
// we find one, we better try the unstarred keyword.
|
||||
if ( word.right(1) == "*" )
|
||||
return word.left( word.length()-1 );
|
||||
else
|
||||
return word;
|
||||
else
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
//////////////////// read help lists ////////////////////
|
||||
|
||||
void Help::readHelpList(const QString &filename,QMap<QString,QString> &map)
|
||||
{
|
||||
QString file = KGlobal::dirs()->findResource("appdata","help/" + filename);
|
||||
if ( file.isEmpty() )
|
||||
{
|
||||
KILE_DEBUG() << " file not found: " << filename << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
KILE_DEBUG() << " read file: " << filename << endl;
|
||||
QRegExp reg("\\s*(\\S+)\\s*=>\\s*(\\S+)");
|
||||
|
||||
QFile f(file);
|
||||
if ( f.open(IO_ReadOnly) )
|
||||
{ // file opened successfully
|
||||
QTextStream t( &f ); // use a text stream
|
||||
while ( ! t.eof() )
|
||||
{ // until end of file...
|
||||
QString s = t.readLine().stripWhiteSpace(); // line of text excluding '\n'
|
||||
if ( ! (s.isEmpty() || s.at(0)=='#') )
|
||||
{
|
||||
int pos = reg.search(s);
|
||||
if ( pos != -1 )
|
||||
{
|
||||
map[reg.cap(1)] = reg.cap(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "kilehelp.moc"
|
@ -0,0 +1,109 @@
|
||||
/***************************************************************************
|
||||
date : Feb 12 2007
|
||||
version : 0.30
|
||||
copyright : (C) 2004-2007 by Holger Danielsson
|
||||
email : holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEHELP_H
|
||||
#define KILEHELP_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qmap.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#include <kconfig.h>
|
||||
#include <kmenubar.h>
|
||||
#include <kate/view.h>
|
||||
#include "kileedit.h"
|
||||
|
||||
#include "userhelp.h"
|
||||
#include "texdocdialog.h"
|
||||
#include "usermenudialog.h"
|
||||
#include "kiletool.h"
|
||||
#include "kiletoolmanager.h"
|
||||
|
||||
/**
|
||||
*@author Holger Danielsson
|
||||
*/
|
||||
|
||||
namespace KileDocument { class EditorExtension; }
|
||||
|
||||
namespace KileHelp
|
||||
{
|
||||
|
||||
enum Type
|
||||
{
|
||||
HelpKileRefs,
|
||||
HelpTexRefs,
|
||||
HelpLatexIndex,
|
||||
HelpLatexCommand,
|
||||
HelpLatexSubject,
|
||||
HelpLatexEnvironment
|
||||
};
|
||||
|
||||
enum TexVersion
|
||||
{
|
||||
TETEX2,
|
||||
TETEX3,
|
||||
TEXLIVE2005
|
||||
};
|
||||
|
||||
class Help : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Help(KileDocument::EditorExtension *edit);
|
||||
~Help();
|
||||
|
||||
void setUserhelp(KileTool::Manager *manager, KMenuBar *menubar);
|
||||
void update();
|
||||
|
||||
// calls for help
|
||||
void helpKeyword(Kate::View *view);
|
||||
void noHelpAvailableFor(const QString &word);
|
||||
void userHelpDialog() { m_userhelp->userHelpDialog(); }
|
||||
void enableUserhelpEntries(bool state);
|
||||
public slots:
|
||||
void helpTexGuide();
|
||||
void helpLatexIndex() { helpLatex(KileHelp::HelpLatexIndex); }
|
||||
void helpLatexCommand() { helpLatex(KileHelp::HelpLatexCommand); }
|
||||
void helpLatexSubject() { helpLatex(KileHelp::HelpLatexSubject); }
|
||||
void helpLatexEnvironment() { helpLatex(KileHelp::HelpLatexEnvironment); }
|
||||
void helpKeyword();
|
||||
void helpDocBrowser();
|
||||
|
||||
private:
|
||||
KileTool::Manager *m_manager;
|
||||
KileDocument::EditorExtension *m_edit;
|
||||
UserHelp *m_userhelp;
|
||||
|
||||
TexVersion m_texVersion;
|
||||
QString m_texReference;
|
||||
QString m_texdocPath;
|
||||
|
||||
QMap<QString,QString> m_dictHelpKile;
|
||||
QMap<QString,QString> m_dictHelpTex;
|
||||
|
||||
void initTexDocumentation();
|
||||
void readHelpList(const QString &filename,QMap<QString,QString> &map);
|
||||
void showHelpFile(const QString ¶meter);
|
||||
|
||||
void helpLatex(KileHelp::Type type);
|
||||
void helpTexRefsKeyword(Kate::View *view);
|
||||
void helpKileRefsKeyword(Kate::View *view);
|
||||
QString getKeyword(Kate::View *view);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,468 @@
|
||||
/***************************************************************************
|
||||
begin : Thu Jul 17 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2007-03-12 dani
|
||||
// - use KileDocument::Extensions
|
||||
|
||||
#include "kileinfo.h"
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qobject.h>
|
||||
|
||||
#include <kate/document.h>
|
||||
#include <kate/view.h>
|
||||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
|
||||
#include "kilestructurewidget.h"
|
||||
#include "kiledocmanager.h"
|
||||
#include "kileviewmanager.h"
|
||||
#include "kiledocumentinfo.h"
|
||||
#include "kileproject.h"
|
||||
#include "kileuntitled.h"
|
||||
#include "kilejscript.h"
|
||||
#include "editorkeysequencemanager.h"
|
||||
#include "templates.h"
|
||||
|
||||
#include <kstandarddirs.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qstring.h>
|
||||
|
||||
KileInfo::KileInfo(QWidget *parent) :
|
||||
m_manager(0L),
|
||||
m_jScriptManager(0L),
|
||||
m_toolFactory(0L),
|
||||
m_texKonsole(0L),
|
||||
m_edit(0L),
|
||||
m_parentWidget(parent),
|
||||
m_currentTarget(QString::null)
|
||||
{
|
||||
m_docManager = new KileDocument::Manager(this, parent, "KileDocument::Manager");
|
||||
m_viewManager= new KileView::Manager(this, parent, "KileView::Manager");
|
||||
m_templateManager = new KileTemplate::Manager(this, parent, "KileTemplate::Manager");
|
||||
m_editorKeySequenceManager = new KileEditorKeySequence::Manager(this, parent, "KileEditorKeySequence::Manager");
|
||||
QObject::connect(m_docManager, SIGNAL(documentStatusChanged(Kate::Document*, bool, unsigned char)), m_viewManager, SLOT(reflectDocumentStatus(Kate::Document*, bool, unsigned char)));
|
||||
}
|
||||
|
||||
KileInfo::~KileInfo()
|
||||
{
|
||||
}
|
||||
|
||||
Kate::Document * KileInfo::activeTextDocument() const
|
||||
{
|
||||
Kate::View *view = viewManager()->currentTextView();
|
||||
if (view) return view->getDoc(); else return 0L;
|
||||
}
|
||||
|
||||
QString KileInfo::getName(Kate::Document *doc, bool shrt)
|
||||
{
|
||||
KILE_DEBUG() << "===KileInfo::getName(Kate::Document *doc, bool " << shrt << ")===" << endl;
|
||||
QString title=QString::null;
|
||||
|
||||
if (!doc)
|
||||
doc = activeTextDocument();
|
||||
if (doc)
|
||||
{
|
||||
KILE_DEBUG() << "url " << doc->url().path() << endl;
|
||||
title = shrt ? doc->url().fileName() : doc->url().path();
|
||||
//work around for bug in KatePart, use docName and not url
|
||||
//reloading the file after is it changed on disc by another application
|
||||
//cause the URL to be empty for a short while
|
||||
if ( title.isEmpty() )
|
||||
title = shrt ? QFileInfo(doc->docName()).fileName() : doc->docName();
|
||||
}
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
QString KileInfo::getCompileName(bool shrt /* = false */)
|
||||
{
|
||||
KileProject *project = docManager()->activeProject();
|
||||
|
||||
if (m_singlemode)
|
||||
{
|
||||
if (project)
|
||||
{
|
||||
if (project->masterDocument().length() > 0)
|
||||
{
|
||||
KURL master = KURL::fromPathOrURL(project->masterDocument());
|
||||
if (shrt) return master.fileName();
|
||||
else return master.path();
|
||||
}
|
||||
else
|
||||
{
|
||||
KileProjectItem *item = project->rootItem(docManager()->activeProjectItem());
|
||||
if (item)
|
||||
{
|
||||
KURL url = item->url();
|
||||
if (shrt) return url.fileName();
|
||||
else return url.path();
|
||||
}
|
||||
else
|
||||
return QString::null;
|
||||
}
|
||||
}
|
||||
else
|
||||
return getName(activeTextDocument(), shrt);
|
||||
}
|
||||
else
|
||||
{
|
||||
QFileInfo fi(m_masterName);
|
||||
if (shrt)
|
||||
return fi.fileName();
|
||||
else
|
||||
return m_masterName;
|
||||
}
|
||||
}
|
||||
|
||||
QString KileInfo::getFullFromPrettyName(const QString & name)
|
||||
{
|
||||
if(name.isNull())
|
||||
return name;
|
||||
|
||||
QString file = name;
|
||||
|
||||
if (file.left(2) == "./" )
|
||||
{
|
||||
file = QFileInfo(outputFilter()->source()).dirPath(true) + '/' + file.mid(2);
|
||||
}
|
||||
|
||||
if (file[0] != '/' )
|
||||
{
|
||||
file = QFileInfo(outputFilter()->source()).dirPath(true) + '/' + file;
|
||||
}
|
||||
|
||||
QFileInfo fi(file);
|
||||
if ( file.isNull() || fi.isDir() || (! fi.exists()) || (! fi.isReadable()))
|
||||
{
|
||||
// - call from logwidget or error handling, which
|
||||
// tries to determine the LaTeX source file
|
||||
bool found = false;
|
||||
QStringList extlist = QStringList::split( " ", m_extensions->latexDocuments() );
|
||||
for ( QStringList::Iterator it=extlist.begin(); it!=extlist.end(); ++it )
|
||||
{
|
||||
QString name = file + (*it);
|
||||
if ( QFileInfo(name).exists() )
|
||||
{
|
||||
file = name;
|
||||
fi.setFile(name);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( ! found )
|
||||
file = QString::null;
|
||||
}
|
||||
|
||||
if ( ! fi.isReadable() ) return QString::null;
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
KURL::List KileInfo::getParentsFor(KileDocument::Info *info)
|
||||
{
|
||||
KileProjectItemList *items = docManager()->itemsFor(info);
|
||||
KURL::List list;
|
||||
for ( uint i = 0; i < items->count(); ++i)
|
||||
if (items->at(i)->parent()) list.append(items->at(i)->parent()->url());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::retrieveList(const QStringList* (KileDocument::Info::*getit)() const, KileDocument::Info * docinfo /* = 0L */)
|
||||
{
|
||||
m_listTemp.clear();
|
||||
|
||||
if (docinfo == 0L) docinfo = docManager()->getInfo();
|
||||
KileProjectItem *item = docManager()->itemFor(docinfo, docManager()->activeProject());
|
||||
|
||||
KILE_DEBUG() << "Kile::retrieveList()" << endl;
|
||||
if (item)
|
||||
{
|
||||
const KileProject *project = item->project();
|
||||
const KileProjectItem *root = project->rootItem(item);
|
||||
if (root)
|
||||
{
|
||||
KILE_DEBUG() << "\tusing root item " << root->url().fileName() << endl;
|
||||
|
||||
QPtrList<KileProjectItem> children;
|
||||
children.append(root);
|
||||
root->allChildren(&children);
|
||||
|
||||
const QStringList *list;
|
||||
|
||||
for (uint i=0; i < children.count(); ++i)
|
||||
{
|
||||
KILE_DEBUG() << "\t" << children.at(i)->url().fileName() << endl;
|
||||
list = (children.at(i)->getInfo()->*getit)();
|
||||
if (list)
|
||||
{
|
||||
for (uint i=0; i < list->count(); ++i)
|
||||
m_listTemp << (*list)[i];
|
||||
}
|
||||
}
|
||||
|
||||
return &m_listTemp;
|
||||
}
|
||||
else
|
||||
return &m_listTemp;
|
||||
}
|
||||
else if (docinfo)
|
||||
{
|
||||
m_listTemp = *((docinfo->*getit)());
|
||||
return &m_listTemp;
|
||||
}
|
||||
else
|
||||
return &m_listTemp;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allLabels(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::allLabels()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::labels;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allBibItems(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::allBibItems()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::bibItems;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allBibliographies(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::bibliographies()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::bibliographies;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allDependencies(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::dependencies()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::dependencies;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allNewCommands(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::newCommands()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::newCommands;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
const QStringList* KileInfo::allPackages(KileDocument::Info * info)
|
||||
{
|
||||
KILE_DEBUG() << "Kile::allPackages()" << endl;
|
||||
const QStringList* (KileDocument::Info::*p)() const=&KileDocument::Info::packages;
|
||||
const QStringList* list = retrieveList(p, info);
|
||||
return list;
|
||||
}
|
||||
|
||||
QString KileInfo::lastModifiedFile(KileDocument::Info * info)
|
||||
{
|
||||
if (info == 0) info = docManager()->getInfo();
|
||||
const QStringList *list = allDependencies(info);
|
||||
return info->lastModifiedFile(list);
|
||||
}
|
||||
|
||||
QString KileInfo::documentTypeToString(KileDocument::Type type)
|
||||
{
|
||||
switch(type) {
|
||||
case KileDocument::Undefined:
|
||||
return i18n("Undefined");
|
||||
case KileDocument::Text:
|
||||
return i18n("Text");
|
||||
case KileDocument::LaTeX:
|
||||
return i18n("LaTeX");
|
||||
case KileDocument::BibTeX:
|
||||
return i18n("BibTeX");
|
||||
case KileDocument::Script:
|
||||
return i18n("Script");
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool KileInfo::similarOrEqualURL(const KURL &validurl, const KURL &testurl)
|
||||
{
|
||||
if ( testurl.isEmpty() || testurl.path().isEmpty() ) return false;
|
||||
|
||||
bool absolute = testurl.path().startsWith("/");
|
||||
return (
|
||||
(validurl == testurl) ||
|
||||
(!absolute && validurl.path().endsWith(testurl.path()))
|
||||
);
|
||||
}
|
||||
|
||||
bool KileInfo::isOpen(const KURL & url)
|
||||
{
|
||||
KILE_DEBUG() << "==bool KileInfo::isOpen(const KURL & url)=============" << endl;
|
||||
uint cnt = viewManager()->textViews().count();
|
||||
|
||||
for ( uint i = 0; i < cnt; ++i)
|
||||
{
|
||||
if ( viewManager()->textView(i)->getDoc() && similarOrEqualURL(viewManager()->textView(i)->getDoc()->url(), url) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KileInfo::projectIsOpen(const KURL & url)
|
||||
{
|
||||
KileProject *project = docManager()->projectFor(url);
|
||||
|
||||
return project != 0 ;
|
||||
}
|
||||
|
||||
QString KileInfo::getSelection() const
|
||||
{
|
||||
Kate::Document *doc = activeTextDocument();
|
||||
|
||||
if (doc && doc->hasSelection())
|
||||
{
|
||||
return doc->selection();
|
||||
}
|
||||
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
void KileInfo::clearSelection() const
|
||||
{
|
||||
Kate::Document *doc = activeTextDocument();
|
||||
|
||||
if (doc && doc->hasSelection())
|
||||
{
|
||||
doc->removeSelectedText();
|
||||
}
|
||||
}
|
||||
|
||||
QString KileInfo::expandEnvironmentVars(const QString &str)
|
||||
{
|
||||
static QRegExp reEnvVars("\\$(\\w+)");
|
||||
QString result = str;
|
||||
int index = -1;
|
||||
while ( (index = str.find(reEnvVars, index + 1)) != -1 )
|
||||
result.replace(reEnvVars.cap(0),getenv(reEnvVars.cap(1).local8Bit()));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QString KileInfo::checkOtherPaths(const QString &path,const QString &file, int type)
|
||||
{
|
||||
KILE_DEBUG() << "QString KileInfo::checkOtherPaths(const QString &path,const QString &file, int type)" << endl;
|
||||
QStringList inputpaths;
|
||||
QString configpaths;
|
||||
QFileInfo info;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case bibinputs:
|
||||
configpaths = KileConfig::bibInputPaths() + ":$BIBINPUTS";
|
||||
break;
|
||||
case texinputs:
|
||||
configpaths = KileConfig::teXPaths() + ":$TEXINPUTS";
|
||||
break;
|
||||
case bstinputs:
|
||||
configpaths = KileConfig::bstInputPaths() + ":$BSTINPUTS";
|
||||
break;
|
||||
default:
|
||||
KILE_DEBUG() << "Unknown type in checkOtherPaths" << endl;
|
||||
return QString::null;
|
||||
break;
|
||||
}
|
||||
|
||||
inputpaths = QStringList::split( ":", expandEnvironmentVars(configpaths));
|
||||
inputpaths.prepend(path);
|
||||
|
||||
// the first match is supposed to be the correct one
|
||||
for ( QStringList::Iterator it = inputpaths.begin(); it != inputpaths.end(); ++it )
|
||||
{
|
||||
KILE_DEBUG() << "path is " << *it << "and file is " << file << endl;
|
||||
info.setFile((*it) + '/' + file);
|
||||
if(info.exists())
|
||||
{
|
||||
KILE_DEBUG() << "filepath after correction is: " << info.dirPath() << endl;
|
||||
return info.absFilePath();
|
||||
}
|
||||
}
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString KileInfo::relativePath(const QString basepath, const QString & file)
|
||||
{
|
||||
KURL url = KURL::fromPathOrURL(file);
|
||||
QString path = url.directory();
|
||||
QString filename = url.fileName();
|
||||
|
||||
KILE_DEBUG() <<"===findRelativeURL==================" << endl;
|
||||
KILE_DEBUG() << "\tbasepath : " << basepath << " path: " << path << endl;
|
||||
|
||||
QStringList basedirs = QStringList::split("/", basepath, false);
|
||||
QStringList dirs = QStringList::split("/", path, false);
|
||||
|
||||
uint nDirs = dirs.count();
|
||||
//uint nBaseDirs = basedirs.count();
|
||||
|
||||
while ( dirs.count() > 0 && basedirs.count() > 0 && dirs[0] == basedirs[0] )
|
||||
{
|
||||
dirs.pop_front();
|
||||
basedirs.pop_front();
|
||||
}
|
||||
|
||||
/*KILE_DEBUG() << "\tafter" << endl;
|
||||
for (uint i=0; i < basedirs.count(); ++i)
|
||||
{
|
||||
KILE_DEBUG() << "\t\tbasedirs " << i << ": " << basedirs[i] << endl;
|
||||
}
|
||||
|
||||
for (uint i=0; i < dirs.count(); ++i)
|
||||
{
|
||||
KILE_DEBUG() << "\t\tdirs " << i << ": " << dirs[i] << endl;
|
||||
}*/
|
||||
|
||||
if (nDirs != dirs.count() )
|
||||
{
|
||||
path = dirs.join("/");
|
||||
|
||||
//KILE_DEBUG() << "\tpath : " << path << endl;
|
||||
|
||||
if (basedirs.count() > 0)
|
||||
{
|
||||
for (uint j=0; j < basedirs.count(); ++j)
|
||||
{
|
||||
path = "../" + path;
|
||||
}
|
||||
}
|
||||
|
||||
if ( path.length()>0 && path.right(1) != "/" ) path = path + '/';
|
||||
|
||||
path = path+filename;
|
||||
}
|
||||
else //assume an absolute path was requested
|
||||
{
|
||||
path = url.path();
|
||||
}
|
||||
|
||||
KILE_DEBUG() << "\trelative path : " << path << endl;
|
||||
|
||||
return path;
|
||||
}
|
@ -0,0 +1,180 @@
|
||||
/***************************************************************************
|
||||
begin : Thu Jul 17 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEINFO_H
|
||||
#define KILEINFO_H
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qmap.h>
|
||||
#include <qscrollview.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
#include <kurl.h>
|
||||
|
||||
#include "kileconstants.h"
|
||||
#include "kileextensions.h"
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kilestdtools.h"
|
||||
#include "latexoutputfilter.h"
|
||||
#include "latexoutputinfo.h"
|
||||
#include "latexcmd.h"
|
||||
#include "kileconfig.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace KileDocument { class Info; }
|
||||
class KileProject;
|
||||
class KileProjectItem;
|
||||
class KileProjectItemList;
|
||||
class KileFileSelect;
|
||||
class KileEventFilter;
|
||||
|
||||
namespace Kate { class Document;}
|
||||
|
||||
class KileBottomBar;
|
||||
namespace KileDocument { class Extensions; class Manager; class EditorExtension; }
|
||||
namespace KileView { class Manager; }
|
||||
namespace KileWidget { class Structure; class Konsole; class ScriptsManagement; class PreviewWidget; }
|
||||
namespace KileTool { class QuickPreview; }
|
||||
namespace KileHelp { class Help; }
|
||||
namespace KileJScript { class Manager; }
|
||||
namespace KileEditorKeySequence { class Manager; }
|
||||
namespace KileTemplate { class Manager; }
|
||||
|
||||
class KileInfo
|
||||
{
|
||||
|
||||
public:
|
||||
KileInfo(QWidget *parent);
|
||||
virtual ~KileInfo();
|
||||
|
||||
public:
|
||||
enum {bibinputs = 0,bstinputs, texinputs};
|
||||
QString getName(Kate::Document *doc = 0, bool shrt = false);
|
||||
QString getShortName(Kate::Document *doc = 0) { return getName(doc, true); }
|
||||
QString getCompileName(bool shrt = false);
|
||||
QString getFullFromPrettyName(const QString & name);
|
||||
KURL::List getParentsFor(KileDocument::Info *);
|
||||
bool getSinglemode() { return m_singlemode; }
|
||||
|
||||
QString getCurrentTarget() const { return m_currentTarget; }
|
||||
void setTarget(const QString &target) { m_currentTarget=target; }
|
||||
|
||||
virtual Kate::Document* activeTextDocument() const;
|
||||
|
||||
QString getSelection() const;
|
||||
void clearSelection() const;
|
||||
|
||||
virtual const QStringList* allLabels(KileDocument::Info * info = 0L);
|
||||
virtual const QStringList* allBibItems(KileDocument::Info * info = 0L);
|
||||
virtual const QStringList* allBibliographies(KileDocument::Info * info = 0L);
|
||||
virtual const QStringList* allDependencies(KileDocument::Info * info = 0L);
|
||||
virtual const QStringList* allNewCommands(KileDocument::Info * info = 0L);
|
||||
virtual const QStringList* allPackages(KileDocument::Info * info = 0L);
|
||||
|
||||
QString lastModifiedFile(KileDocument::Info * info = 0L);
|
||||
|
||||
static QString documentTypeToString(KileDocument::Type type);
|
||||
|
||||
private:
|
||||
const QStringList* retrieveList(const QStringList* (KileDocument::Info::*getit)() const, KileDocument::Info * docinfo = 0L);
|
||||
QStringList m_listTemp;
|
||||
|
||||
public:
|
||||
bool similarOrEqualURL(const KURL &validurl, const KURL &testurl);
|
||||
bool isOpen(const KURL & url);
|
||||
bool projectIsOpen(const KURL & );
|
||||
|
||||
bool watchFile() { return m_bWatchFile; }
|
||||
bool logPresent() { return m_logPresent; }
|
||||
void setLogPresent(bool pr) { m_logPresent = pr; }
|
||||
|
||||
LatexOutputFilter * outputFilter() { return m_outputFilter; }
|
||||
LatexOutputInfoArray * outputInfo() { return m_outputInfo; }
|
||||
|
||||
virtual int lineNumber() = 0;
|
||||
|
||||
QString relativePath(const QString basepath, const QString & file);
|
||||
|
||||
KileWidget::Structure *structureWidget() { return m_kwStructure; }
|
||||
KileWidget::Konsole *texKonsole() { return m_texKonsole; }
|
||||
KileWidget::Output *outputWidget() { return m_outputWidget; }
|
||||
KileBottomBar *outputView() { return m_bottomBar; }
|
||||
KileWidget::LogMsg *logWidget() { return m_logWidget; }
|
||||
KileWidget::PreviewWidget *previewWidget () { return m_previewWidget; }
|
||||
|
||||
KileDocument::Manager* docManager() const { return m_docManager; }
|
||||
KileView::Manager* viewManager() const { return m_viewManager; }
|
||||
KileTool::Manager* toolManager() const { return m_manager; }
|
||||
KileJScript::Manager* scriptManager() const { return m_jScriptManager; }
|
||||
KileEditorKeySequence::Manager* editorKeySequenceManager() const { return m_editorKeySequenceManager; }
|
||||
KileTool::Factory* toolFactory() const { return m_toolFactory; }
|
||||
KileDocument::EditorExtension *editorExtension() const { return m_edit; }
|
||||
KileDocument::LatexCommands *latexCommands() const { return m_latexCommands; }
|
||||
KileHelp::Help *help() const { return m_help; }
|
||||
KileTool::QuickPreview *quickPreview() const { return m_quickPreview; }
|
||||
KileDocument::Extensions *extensions() const { return m_extensions; }
|
||||
KileTemplate::Manager *templateManager() const { return m_templateManager; }
|
||||
|
||||
//FIXME:refactor
|
||||
KileFileSelect* fileSelector() const { return m_fileSelector; }
|
||||
KileEventFilter* eventFilter() const { return m_eventFilter; }
|
||||
|
||||
QWidget *parentWidget() const { return m_parentWidget; }
|
||||
|
||||
static QString expandEnvironmentVars(const QString &variable);
|
||||
static QString checkOtherPaths(const QString &path,const QString &file, int type);
|
||||
static QString checkOtherPaths(const KURL &url,const QString &file, int type){ return checkOtherPaths(url.path(),file, type); }
|
||||
protected:
|
||||
KileDocument::Manager *m_docManager;
|
||||
KileView::Manager *m_viewManager;
|
||||
KileTool::Manager *m_manager;
|
||||
KileTemplate::Manager *m_templateManager;
|
||||
KileJScript::Manager *m_jScriptManager;
|
||||
KileEditorKeySequence::Manager *m_editorKeySequenceManager;
|
||||
KileTool::Factory *m_toolFactory;
|
||||
KileWidget::Konsole *m_texKonsole;
|
||||
KileWidget::Output *m_outputWidget;
|
||||
KileWidget::LogMsg *m_logWidget;
|
||||
KileWidget::ScriptsManagement *m_scriptsManagementWidget;
|
||||
KileBottomBar *m_bottomBar;
|
||||
KileWidget::PreviewWidget *m_previewWidget;
|
||||
QScrollView *m_previewView;
|
||||
|
||||
KileHelp::Help *m_help;
|
||||
KileDocument::EditorExtension *m_edit;
|
||||
KileDocument::LatexCommands *m_latexCommands;
|
||||
KileDocument::Extensions *m_extensions;
|
||||
KileTool::QuickPreview *m_quickPreview;
|
||||
|
||||
QWidget *m_parentWidget;
|
||||
|
||||
bool m_singlemode;
|
||||
QString m_masterName;
|
||||
|
||||
QString m_currentTarget;
|
||||
|
||||
bool m_bWatchFile, m_logPresent;
|
||||
|
||||
LatexOutputFilter *m_outputFilter;
|
||||
LatexOutputInfoArray *m_outputInfo;
|
||||
|
||||
KileWidget::Structure *m_kwStructure;
|
||||
KileFileSelect *m_fileSelector;
|
||||
KileEventFilter* m_eventFilter;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,795 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2006, 2007 by Michel Ludwig (michel.ludwig@kdemail.net) *
|
||||
***************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilejscript.h"
|
||||
|
||||
/*
|
||||
* KJS uses a garbage collection mechanism.
|
||||
*/
|
||||
#include <kjs/lookup.h>
|
||||
|
||||
#include <kconfig.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kinputdialog.h>
|
||||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kstandarddirs.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <qevent.h>
|
||||
#include <qdir.h>
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qtextstream.h>
|
||||
#include <qvaluelist.h>
|
||||
|
||||
#include "kileconfig.h"
|
||||
#include "kileedit.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileversion.h"
|
||||
#include "kileviewmanager.h"
|
||||
#include "editorkeysequencemanager.h"
|
||||
|
||||
// Modified declaration from <khtml/ecma/kjs_proxy.h>
|
||||
// Acknowledgements go to:
|
||||
// Copyright (C) 1999 Harri Porten (porten@kde.org)
|
||||
// Copyright (C) 2001 Peter Kelly (pmk@post.com)
|
||||
|
||||
class KJSCPUGuard {
|
||||
public:
|
||||
KJSCPUGuard() {}
|
||||
void start(unsigned int msec=5000, unsigned int i_msec=0);
|
||||
void stop();
|
||||
private:
|
||||
void (*oldAlarmHandler)(int);
|
||||
static void alarmHandler(int);
|
||||
itimerval oldtv;
|
||||
};
|
||||
|
||||
// Modified implementation originating from <khtml/ecma/kjs_proxy.cpp>
|
||||
// Acknowledgements go to:
|
||||
// Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
|
||||
// Copyright (C) 2001,2003 Peter Kelly (pmk@post.com)
|
||||
// Copyright (C) 2001-2003 David Faure (faure@kde.org)
|
||||
void KJSCPUGuard::start(unsigned int ms, unsigned int i_ms)
|
||||
{
|
||||
oldAlarmHandler = signal(SIGVTALRM, alarmHandler);
|
||||
itimerval tv = {
|
||||
{ i_ms / 1000, (i_ms % 1000) * 1000 },
|
||||
{ ms / 1000, (ms % 1000) * 1000 }
|
||||
};
|
||||
setitimer(ITIMER_VIRTUAL, &tv, &oldtv);
|
||||
}
|
||||
|
||||
void KJSCPUGuard::stop()
|
||||
{
|
||||
setitimer(ITIMER_VIRTUAL, &oldtv, 0L);
|
||||
signal(SIGVTALRM, oldAlarmHandler);
|
||||
}
|
||||
|
||||
void KJSCPUGuard::alarmHandler(int) {
|
||||
KJS::ExecState::requestTerminate();
|
||||
}
|
||||
|
||||
|
||||
namespace KJS {
|
||||
// Taken from <khtml/ecma/kjs_binding.cpp>
|
||||
// Acknowledgements go to:
|
||||
// Copyright (C) 1999-2003 Harri Porten (porten@kde.org)
|
||||
// Copyright (C) 2001-2003 David Faure (faure@kde.org)
|
||||
// Copyright (C) 2003 Apple Computer, Inc.
|
||||
UString::UString(const QString &d) {
|
||||
unsigned int len = d.length();
|
||||
UChar *dat = new UChar[len];
|
||||
memcpy(dat, d.unicode(), len * sizeof(UChar));
|
||||
rep = UString::Rep::create(dat, len);
|
||||
}
|
||||
|
||||
QString UString::qstring() const {
|
||||
return QString((QChar*) data(), size());
|
||||
}
|
||||
|
||||
QConstString UString::qconststring() const {
|
||||
return QConstString((QChar*) data(), size());
|
||||
}
|
||||
}
|
||||
|
||||
namespace KJS {
|
||||
class KileJSObjectFunc; // forward declaration
|
||||
}
|
||||
|
||||
class KileJSObject : public KJS::ObjectImp {
|
||||
friend class KJS::KileJSObjectFunc;
|
||||
public:
|
||||
KileJSObject(KJS::ExecState *exec, KileInfo *kileInfo);
|
||||
virtual ~KileJSObject();
|
||||
|
||||
// there are no non-functional properties
|
||||
// KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const;
|
||||
|
||||
// KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
|
||||
|
||||
// void put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value& value, int attr = KJS::None);
|
||||
|
||||
// void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value& value, int attr);
|
||||
|
||||
virtual const KJS::ClassInfo *classInfo() const;
|
||||
|
||||
enum {
|
||||
CurrentTextDocument,
|
||||
GetInputValue
|
||||
};
|
||||
|
||||
static const KJS::ClassInfo info;
|
||||
|
||||
protected:
|
||||
KileInfo *m_kileInfo;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
namespace KJS {
|
||||
class KileTextDocumentJSObjectFunc; // forward declaration
|
||||
}
|
||||
|
||||
class KileTextDocumentJSObject : public KJS::ObjectImp {
|
||||
friend class KJS::KileTextDocumentJSObjectFunc;
|
||||
public:
|
||||
KileTextDocumentJSObject(KJS::ExecState *exec, Kate::View* view, KileInfo *kileInfo);
|
||||
|
||||
virtual ~KileTextDocumentJSObject();
|
||||
|
||||
// there are no non-functional properties
|
||||
// KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const;
|
||||
|
||||
// KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
|
||||
|
||||
// void put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value& value, int attr = KJS::None);
|
||||
|
||||
// void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value& value, int attr);
|
||||
|
||||
virtual const KJS::ClassInfo *classInfo() const;
|
||||
|
||||
enum {
|
||||
InsertBullet,
|
||||
InsertText,
|
||||
NextBullet,
|
||||
PreviousBullet,
|
||||
CursorLeft,
|
||||
CursorRight,
|
||||
Up,
|
||||
Down,
|
||||
CursorLine,
|
||||
CursorColumn,
|
||||
SetCursorLine,
|
||||
SetCursorColumn,
|
||||
Backspace
|
||||
};
|
||||
|
||||
|
||||
static const KJS::ClassInfo info;
|
||||
|
||||
protected:
|
||||
Kate::View* view;
|
||||
KileInfo *m_kileInfo;
|
||||
};
|
||||
|
||||
|
||||
#include "kilejscript.lut.h"
|
||||
|
||||
|
||||
/*
|
||||
* The number of supplied arguments is checked automatically.
|
||||
*/
|
||||
|
||||
|
||||
// Only functional properties:
|
||||
/*
|
||||
@begin KileJSObjectProtoTable 2
|
||||
currentTextDocument KileJSObject::CurrentTextDocument DontDelete|Function 0
|
||||
getInputValue KileJSObject::GetInputValue DontDelete|Function 2
|
||||
@end
|
||||
*/
|
||||
|
||||
// Non-functional properties go here:
|
||||
/*
|
||||
@begin KileJSObjectTable 0
|
||||
@end
|
||||
*/
|
||||
|
||||
DEFINE_PROTOTYPE("KileJSObject", KileJSObjectProto)
|
||||
IMPLEMENT_PROTOFUNC(KileJSObjectFunc)
|
||||
IMPLEMENT_PROTOTYPE(KileJSObjectProto, KileJSObjectFunc)
|
||||
|
||||
const KJS::ClassInfo KileJSObject::info = {"KileJSObject", 0, &KileJSObjectTable, 0};
|
||||
|
||||
KileJSObject::KileJSObject(KJS::ExecState *exec, KileInfo *kileInfo) : ObjectImp(KileJSObjectProto::self(exec)), m_kileInfo(kileInfo) {
|
||||
}
|
||||
|
||||
KileJSObject::~KileJSObject() {
|
||||
}
|
||||
|
||||
const KJS::ClassInfo* KileJSObject::classInfo() const {
|
||||
return &info;
|
||||
}
|
||||
|
||||
/*
|
||||
KJS::Value KileJSObject::get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const {
|
||||
return KJS::lookupGetValue<KileJSObject, KJS::ObjectImp>(exec, propertyName, &KileJSObjectTable, this);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
KJS::Value KileJSObject::getValueProperty(KJS::ExecState *exec, int token) const
|
||||
{
|
||||
if (!m_kileInfo) {
|
||||
return KJS::Undefined();
|
||||
}
|
||||
switch (token) {
|
||||
|
||||
}
|
||||
return KJS::Undefined();
|
||||
}
|
||||
*/
|
||||
|
||||
KJS::Value KJS::KileJSObjectFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args) {
|
||||
KJS_CHECK_THIS(KileJSObject, thisObj);
|
||||
// KileJSObject *obj = static_cast<KileJSObject *>(thisObj.imp())->doc;
|
||||
KileInfo* kileInfo = static_cast<KileJSObject*>(thisObj.imp())->m_kileInfo;
|
||||
if(!kileInfo) {
|
||||
return KJS::Undefined();
|
||||
}
|
||||
QString caption, label, value;
|
||||
KileTextDocumentJSObject *kileViewJSObject;
|
||||
Kate::View *kateView;
|
||||
switch (id) {
|
||||
case KileJSObject::CurrentTextDocument:
|
||||
kateView = kileInfo->viewManager()->currentTextView();
|
||||
if(kateView == 0L) {
|
||||
return KJS::Null();
|
||||
}
|
||||
else {
|
||||
kileViewJSObject = new KileTextDocumentJSObject(exec, kateView, kileInfo);
|
||||
return KJS::Object(kileViewJSObject);
|
||||
}
|
||||
break;
|
||||
case KileJSObject::GetInputValue:
|
||||
caption = args[0].toString(exec).qstring();
|
||||
label = args[1].toString(exec).qstring();
|
||||
if(caption.isEmpty()) {
|
||||
caption = i18n("Enter Value");
|
||||
}
|
||||
if(label.isEmpty()) {
|
||||
label = i18n("Please enter a value");
|
||||
}
|
||||
value = KInputDialog::getText(caption, label, QString(), 0, 0L);
|
||||
return KJS::String(value);
|
||||
break;
|
||||
}
|
||||
return KJS::Undefined();
|
||||
}
|
||||
|
||||
|
||||
// Only functional properties:
|
||||
/*
|
||||
@begin KileTextDocumentJSObjectProtoTable 13
|
||||
#
|
||||
insertText KileTextDocumentJSObject::InsertText DontDelete|Function 1
|
||||
insertBullet KileTextDocumentJSObject::InsertBullet DontDelete|Function 0
|
||||
nextBullet KileTextDocumentJSObject::NextBullet DontDelete|Function 0
|
||||
previousBullet KileTextDocumentJSObject::PreviousBullet DontDelete|Function 0
|
||||
cursorLeft KileTextDocumentJSObject::CursorLeft DontDelete|Function 0
|
||||
cursorRight KileTextDocumentJSObject::CursorRight DontDelete|Function 0
|
||||
up KileTextDocumentJSObject::Up DontDelete|Function 0
|
||||
down KileTextDocumentJSObject::Down DontDelete|Function 0
|
||||
cursorLine KileTextDocumentJSObject::CursorLine DontDelete|Function 0
|
||||
cursorColumn KileTextDocumentJSObject::CursorColumn DontDelete|Function 0
|
||||
setCursorLine KileTextDocumentJSObject::SetCursorLine DontDelete|Function 1
|
||||
setCursorColumn KileTextDocumentJSObject::SetCursorColumn DontDelete|Function 1
|
||||
backspace KileTextDocumentJSObject::Backspace DontDelete|Function 0
|
||||
#
|
||||
@end
|
||||
*/
|
||||
|
||||
// Non-functional properties go here:
|
||||
/*
|
||||
@begin KileTextDocumentJSObjectTable 0
|
||||
@end
|
||||
*/
|
||||
|
||||
|
||||
DEFINE_PROTOTYPE("KileTextDocumentJSObject", KileTextDocumentJSObjectProto)
|
||||
IMPLEMENT_PROTOFUNC(KileTextDocumentJSObjectFunc)
|
||||
IMPLEMENT_PROTOTYPE(KileTextDocumentJSObjectProto, KileTextDocumentJSObjectFunc)
|
||||
|
||||
KileTextDocumentJSObject::KileTextDocumentJSObject(KJS::ExecState *exec, Kate::View* view, KileInfo *kileInfo) : ObjectImp(KileTextDocumentJSObjectProto::self(exec)), view(view), m_kileInfo(kileInfo) {
|
||||
}
|
||||
|
||||
KileTextDocumentJSObject::~KileTextDocumentJSObject() {
|
||||
}
|
||||
|
||||
/*
|
||||
KJS::Value KileTextDocumentJSObject::get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const {
|
||||
return KJS::lookupGetValue<KileTextDocumentJSObject, KJS::ObjectImp>(exec, propertyName, &KileTextDocumentJSObjectTable, this);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
KJS::Value KileTextDocumentJSObject::getValueProperty(KJS::ExecState *exec, int token) const {
|
||||
return KJS::Undefined ();
|
||||
}
|
||||
*/
|
||||
|
||||
KJS::Value KJS::KileTextDocumentJSObjectFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args) {
|
||||
KJS_CHECK_THIS(KileTextDocumentJSObject, thisObj);
|
||||
|
||||
// KileJSObject *obj = static_cast<KileJSObject *>(thisObj.imp())->doc;
|
||||
KileInfo* kileInfo = static_cast<KileTextDocumentJSObject *>(thisObj.imp())->m_kileInfo;
|
||||
Kate::View* view = ((KileTextDocumentJSObject*)(thisObj.imp()))->view;
|
||||
uint col, line;
|
||||
switch (id) {
|
||||
case KileTextDocumentJSObject::InsertText:
|
||||
view->insertText(args[0].toString(exec).qstring());
|
||||
break;
|
||||
case KileTextDocumentJSObject::InsertBullet:
|
||||
kileInfo->editorExtension()->insertBullet(view);
|
||||
break;
|
||||
case KileTextDocumentJSObject::NextBullet:
|
||||
kileInfo->editorExtension()->nextBullet(view);
|
||||
break;
|
||||
case KileTextDocumentJSObject::PreviousBullet:
|
||||
kileInfo->editorExtension()->prevBullet(view);
|
||||
break;
|
||||
case KileTextDocumentJSObject::CursorRight:
|
||||
view->cursorRight();
|
||||
break;
|
||||
case KileTextDocumentJSObject::CursorLeft:
|
||||
view->cursorLeft();
|
||||
break;
|
||||
case KileTextDocumentJSObject::Up:
|
||||
view->up();
|
||||
break;
|
||||
case KileTextDocumentJSObject::Down:
|
||||
view->down();
|
||||
break;
|
||||
case KileTextDocumentJSObject::CursorLine:
|
||||
view->cursorPositionReal(&line, &col);
|
||||
return KJS::Number(line);
|
||||
break;
|
||||
case KileTextDocumentJSObject::CursorColumn:
|
||||
view->cursorPositionReal(&line, &col);
|
||||
return KJS::Number(col);
|
||||
break;
|
||||
case KileTextDocumentJSObject::SetCursorLine:
|
||||
view->cursorPositionReal(&line, &col);
|
||||
view->setCursorPositionReal(args[0].toUInt32(exec), col);
|
||||
break;
|
||||
case KileTextDocumentJSObject::SetCursorColumn:
|
||||
view->cursorPositionReal(&line, &col);
|
||||
view->setCursorPositionReal(line, args[0].toUInt32(exec));
|
||||
break;
|
||||
case KileTextDocumentJSObject::Backspace:
|
||||
view->backspace();
|
||||
break;
|
||||
}
|
||||
|
||||
return KJS::Undefined();
|
||||
}
|
||||
|
||||
|
||||
const KJS::ClassInfo* KileTextDocumentJSObject::classInfo() const {
|
||||
return &info;
|
||||
}
|
||||
|
||||
const KJS::ClassInfo KileTextDocumentJSObject::info = {"KileTextDocumentJSObject", 0, &KileTextDocumentJSObjectTable, 0};
|
||||
|
||||
namespace KileJScript {
|
||||
|
||||
////////////////////////////// JScript //////////////////////////////
|
||||
|
||||
/* The IDs of the scripts are used to maintain correct bindings with KAction objects, i.e. for example, we
|
||||
* want to make sure the action script_execution_0 always refers to same script (the script with id 0 !), even
|
||||
* after reloading all the scripts.
|
||||
*/
|
||||
|
||||
JScript::JScript(unsigned int id, const QString& file) : m_id(id), m_file(file), m_action(NULL) {
|
||||
m_name = KGlobal::dirs()->relativeLocation("appdata", file);
|
||||
if(m_name.startsWith("scripts")) {
|
||||
m_name = m_name.mid(8); // remove "scripts" + path separator
|
||||
}
|
||||
if(m_name.endsWith(".js")) { // remove the extension
|
||||
m_name = m_name.left(m_name.length() - 3);
|
||||
}
|
||||
}
|
||||
|
||||
QString JScript::getName() const {
|
||||
return m_name;
|
||||
}
|
||||
|
||||
QString JScript::getCode() const {
|
||||
QFile qFile(m_file);
|
||||
if(qFile.open(IO_ReadOnly)) {
|
||||
QTextStream inputStream(&qFile);
|
||||
// inputStream.setEncoding(QTextStream::UnicodeUTF8);
|
||||
QString code = inputStream.read();
|
||||
qFile.close();
|
||||
return code;
|
||||
}
|
||||
else {
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
QString JScript::getFileName() const {
|
||||
return m_file;
|
||||
}
|
||||
|
||||
unsigned int JScript::getID() const {
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void JScript::setID(unsigned int id) {
|
||||
m_id = id;
|
||||
}
|
||||
|
||||
void JScript::setActionObject(KAction* action) {
|
||||
m_action = action;
|
||||
}
|
||||
|
||||
const KAction* JScript::getActionObject() const {
|
||||
return m_action;
|
||||
}
|
||||
|
||||
KAction* JScript::getActionObject() {
|
||||
return m_action;
|
||||
}
|
||||
|
||||
void JScript::setKeySequence(const QString& str) {
|
||||
m_keySequence = str;
|
||||
}
|
||||
|
||||
QString JScript::getKeySequence() const {
|
||||
return m_keySequence;
|
||||
}
|
||||
|
||||
////////////////////////////// JScriptEnvironment //////////////////////////////
|
||||
|
||||
JScriptEnvironment::JScriptEnvironment(KileInfo *kileInfo) : m_interpreter(new KJS::Interpreter()), m_kileJSObject(new KJS::Object(new KileJSObject(m_interpreter->globalExec(), kileInfo))), m_kileInfo(kileInfo) {
|
||||
// no garbage collection because of an external reference
|
||||
m_interpreter->globalObject().put(m_interpreter->globalExec(), "kile", *m_kileJSObject, KJS::DontDelete|KJS::Internal);
|
||||
}
|
||||
|
||||
|
||||
JScriptEnvironment::~JScriptEnvironment() {
|
||||
//kileJSObject->imp() will be deleted during the next garbage cleanup
|
||||
delete m_kileJSObject;
|
||||
delete m_interpreter;
|
||||
}
|
||||
|
||||
void JScriptEnvironment::execute(const QString& s) {
|
||||
bool useGuard = KileConfig::timeLimitEnabled();
|
||||
uint timeLimit = (uint)KileConfig::timeLimit();
|
||||
KJSCPUGuard guard;
|
||||
if(useGuard) {
|
||||
guard.start(timeLimit*1000);
|
||||
}
|
||||
Completion completion = m_interpreter->evaluate(s);
|
||||
if(useGuard) {
|
||||
guard.stop();
|
||||
}
|
||||
if(completion.complType() == Throw) {
|
||||
Value value = completion.value();
|
||||
if(value.type() == ObjectType) {
|
||||
Object o = Object::dynamicCast(value);
|
||||
if(o.isValid()) {
|
||||
Value lineValue = o.get(m_interpreter->globalExec(), "line");
|
||||
if(lineValue.type() == NumberType) {
|
||||
KMessageBox::sorry(0L, i18n("The following exception has occurred at line %1 during execution of the script:\n%2").arg(lineValue.toInt32(m_interpreter->globalExec())).arg(value.toString(m_interpreter->globalExec()).qstring()), i18n("Exception"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
KMessageBox::sorry(0L, i18n("The following exception has occurred during execution of the script:\n%1").arg(value.toString(m_interpreter->globalExec()).qstring()), i18n("Exception"));
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////// Manager //////////////////////////////
|
||||
|
||||
Manager::Manager(KileInfo *kileInfo, KConfig *config, KActionCollection *actionCollection, QObject *parent, const char *name) : QObject(parent, name), m_jScriptDirWatch(NULL), m_kileInfo(kileInfo), m_config(config), m_actionCollection(actionCollection) {
|
||||
// create a local scripts directory if it doesn't exist yet
|
||||
m_localJScriptDir = locateLocal("appdata", "scripts/", true);
|
||||
m_jScriptDirWatch = new KDirWatch(this, "KileJScript::Manager::JScriptDirWatch");
|
||||
connect(m_jScriptDirWatch, SIGNAL(dirty(const QString&)), this, SLOT(scanJScriptDirectories()));
|
||||
connect(m_jScriptDirWatch, SIGNAL(created(const QString&)), this, SLOT(scanJScriptDirectories()));
|
||||
connect(m_jScriptDirWatch, SIGNAL(deleted(const QString&)), this, SLOT(scanJScriptDirectories()));
|
||||
m_jScriptDirWatch->startScan();
|
||||
}
|
||||
|
||||
Manager::~Manager() {
|
||||
delete m_jScriptDirWatch;
|
||||
|
||||
//still need to delete the scripts
|
||||
for(QValueList<JScript*>::iterator it = m_jScriptList.begin(); it != m_jScriptList.end(); ++it) {
|
||||
delete *it;
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::executeJScript(const JScript *script) {
|
||||
JScriptEnvironment env(m_kileInfo);
|
||||
// demonstrate repainting bug:
|
||||
/*KMessageBox::information(0L, "works!!!");
|
||||
m_kileInfo->viewManager()->currentView()->down();
|
||||
m_kileInfo->viewManager()->currentView()->down();
|
||||
m_kileInfo->viewManager()->currentView()->down();
|
||||
m_kileInfo->viewManager()->currentView()->down();
|
||||
m_kileInfo->viewManager()->currentView()->down();*/
|
||||
QString code = script->getCode();
|
||||
QRegExp endOfLineExp("(\r\n)|\n|\r");
|
||||
int i = code.find(endOfLineExp);
|
||||
QString firstLine = (i >= 0 ? code.left(i) : code);
|
||||
QRegExp requiredVersionTagExp("(kile-version:\\s*)(\\d+\\.\\d+(.\\d+)?)");
|
||||
if(requiredVersionTagExp.search(firstLine) != -1) {
|
||||
QString requiredKileVersion = requiredVersionTagExp.cap(2);
|
||||
if(compareVersionStrings(requiredKileVersion, kileFullVersion) > 0) {
|
||||
KMessageBox::sorry(0L, i18n("Version %1 of Kile is at least required to execute the script \"%2\". The execution has been aborted.").arg(requiredKileVersion).arg(script->getName()), i18n("Version Error"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
env.execute(code);
|
||||
}
|
||||
|
||||
void Manager::executeJScript(unsigned int id) {
|
||||
QMap<unsigned int, JScript*>::iterator i = m_idScriptMap.find(id);
|
||||
if(i != m_idScriptMap.end()) {
|
||||
executeJScript(*i);
|
||||
}
|
||||
}
|
||||
|
||||
const JScript* Manager::getScript(unsigned int id) {
|
||||
QMap<unsigned int, JScript*>::iterator i = m_idScriptMap.find(id);
|
||||
return ((i != m_idScriptMap.end()) ? (*i) : NULL);
|
||||
}
|
||||
|
||||
void Manager::scanJScriptDirectories() {
|
||||
if(!KileConfig::scriptingEnabled()) {
|
||||
return;
|
||||
}
|
||||
deleteJScripts();
|
||||
populateDirWatch();
|
||||
|
||||
m_config->setGroup("Scripts");
|
||||
QValueList<unsigned int> idList = readUnsignedIntListEntry("IDs");
|
||||
unsigned int maxID = 0;
|
||||
QMap<QString, unsigned int> pathIDMap;
|
||||
QMap<unsigned int, bool> takenIDMap;
|
||||
for(QValueList<unsigned int>::iterator i = idList.begin(); i != idList.end(); ++i) {
|
||||
QString fileName = m_config->readPathEntry("Script" + QString::number(*i));
|
||||
if(!fileName.isEmpty()) {
|
||||
unsigned int id = *i;
|
||||
pathIDMap[fileName] = id;
|
||||
takenIDMap[id] = true;
|
||||
maxID = QMAX(maxID, id);
|
||||
}
|
||||
}
|
||||
m_config->setGroup(QString());
|
||||
|
||||
QStringList scriptFileNamesList = KGlobal::dirs()->findAllResources("appdata", "scripts/*.js", true, true);
|
||||
for(QStringList::iterator i = scriptFileNamesList.begin(); i != scriptFileNamesList.end(); ++i) {
|
||||
registerScript(*i, pathIDMap, takenIDMap, maxID);
|
||||
}
|
||||
//rewrite the IDs that are currently in use
|
||||
writeIDs();
|
||||
m_actionCollection->readShortcutSettings("Shortcuts");
|
||||
emit jScriptsChanged();
|
||||
}
|
||||
|
||||
void Manager::deleteJScripts() {
|
||||
QValueList<JScript*> scriptList = m_jScriptList;
|
||||
m_jScriptList.clear(); // pretend that there are no scripts left
|
||||
QStringList keySequenceList;
|
||||
for(QValueList<JScript*>::iterator it = scriptList.begin(); it != scriptList.end(); ++it) {
|
||||
keySequenceList.push_back((*it)->getKeySequence());
|
||||
}
|
||||
m_idScriptMap.clear();
|
||||
m_kileInfo->editorKeySequenceManager()->removeKeySequence(keySequenceList);
|
||||
for(QValueList<JScript*>::iterator it = scriptList.begin(); it != scriptList.end(); ++it) {
|
||||
KAction *action = (*it)->getActionObject();
|
||||
if(action) {
|
||||
action->unplugAll();
|
||||
delete action;
|
||||
}
|
||||
delete *it;
|
||||
}
|
||||
emit jScriptsChanged();
|
||||
}
|
||||
|
||||
QValueList<JScript*> Manager::getJScripts() {
|
||||
return m_jScriptList;
|
||||
}
|
||||
|
||||
void Manager::registerScript(const QString& fileName, QMap<QString, unsigned int>& pathIDMap, QMap<unsigned int, bool>& takenIDMap, unsigned int &maxID) {
|
||||
unsigned int id;
|
||||
QMap<QString, unsigned int>::iterator it = pathIDMap.find(fileName);
|
||||
if(it != pathIDMap.end()) {
|
||||
id = *it;
|
||||
}
|
||||
else {
|
||||
id = findFreeID(takenIDMap, maxID);
|
||||
pathIDMap[fileName] = id;
|
||||
takenIDMap[id] = true;
|
||||
maxID = QMAX(maxID, id);
|
||||
}
|
||||
JScript* script = new JScript(id, fileName);
|
||||
m_jScriptList.push_back(script);
|
||||
m_idScriptMap[id] = script;
|
||||
// start with setting up the key sequence
|
||||
m_config->setGroup("Scripts");
|
||||
QString editorKeySequence = m_config->readEntry("Script" + QString::number(id) + "KeySequence");
|
||||
m_config->setGroup(QString());
|
||||
if(!editorKeySequence.isEmpty()) {
|
||||
script->setKeySequence(editorKeySequence);
|
||||
m_kileInfo->editorKeySequenceManager()->addAction(editorKeySequence, new KileEditorKeySequence::ExecuteJScriptAction(script, this));
|
||||
}
|
||||
// now set up a regular action object
|
||||
ScriptExecutionAction *action = new ScriptExecutionAction(id, this, m_actionCollection);
|
||||
script->setActionObject(action);
|
||||
}
|
||||
|
||||
void Manager::writeConfig() {
|
||||
// don't delete the key sequence settings if scripting has been disabled
|
||||
if(!KileConfig::scriptingEnabled()) {
|
||||
return;
|
||||
}
|
||||
m_config->deleteGroup("Scripts");
|
||||
writeIDs();
|
||||
// write the key sequences
|
||||
m_config->setGroup("Scripts");
|
||||
for(QValueList<JScript*>::iterator i = m_jScriptList.begin(); i != m_jScriptList.end(); ++i) {
|
||||
m_config->writeEntry("Script" + QString::number((*i)->getID()) + "KeySequence", (*i)->getKeySequence());
|
||||
}
|
||||
m_config->setGroup(QString());
|
||||
}
|
||||
|
||||
void Manager::setEditorKeySequence(JScript* script, const QString& keySequence) {
|
||||
if(keySequence.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if(script) {
|
||||
QString oldSequence = script->getKeySequence();
|
||||
if(oldSequence == keySequence) {
|
||||
return;
|
||||
}
|
||||
m_kileInfo->editorKeySequenceManager()->removeKeySequence(oldSequence);
|
||||
script->setKeySequence(keySequence);
|
||||
m_kileInfo->editorKeySequenceManager()->addAction(keySequence, new KileEditorKeySequence::ExecuteJScriptAction(script, this));
|
||||
writeConfig();
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::removeEditorKeySequence(JScript* script) {
|
||||
if(script) {
|
||||
QString keySequence = script->getKeySequence();
|
||||
if(keySequence.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
script->setKeySequence(QString());
|
||||
m_kileInfo->editorKeySequenceManager()->removeKeySequence(keySequence);
|
||||
writeConfig();
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::populateDirWatch() {
|
||||
QStringList jScriptDirectories = KGlobal::dirs()->findDirs("appdata", "scripts");
|
||||
for(QStringList::iterator i = jScriptDirectories.begin(); i != jScriptDirectories.end(); ++i) {
|
||||
// FIXME: future KDE versions could support the recursive
|
||||
// watching of directories out of the box.
|
||||
addDirectoryToDirWatch(*i);
|
||||
}
|
||||
//we do not remove the directories that were once added as this apparently causes some strange
|
||||
//bugs (on KDE 3.5.x)
|
||||
}
|
||||
|
||||
QString Manager::getLocalJScriptDirectory() const {
|
||||
return m_localJScriptDir;
|
||||
}
|
||||
|
||||
void Manager::readConfig() {
|
||||
deleteJScripts();
|
||||
scanJScriptDirectories();
|
||||
}
|
||||
|
||||
QValueList<unsigned int> Manager::readUnsignedIntListEntry(const QString& key) {
|
||||
QValueList<unsigned int> toReturn;
|
||||
QStringList stringList = m_config->readListEntry(key);
|
||||
for(QStringList::iterator i = stringList.begin(); i != stringList.end(); ++i) {
|
||||
toReturn.push_back((*i).toUInt());
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
void Manager::writeEntry(const QString& key, const QValueList<unsigned int>& l) {
|
||||
QStringList stringList;
|
||||
for(QValueList<unsigned int>::const_iterator i = l.begin(); i != l.end(); ++i) {
|
||||
stringList.push_back(QString::number(*i));
|
||||
}
|
||||
m_config->writeEntry(key, stringList);
|
||||
}
|
||||
|
||||
unsigned int Manager::findFreeID(const QMap<unsigned int, bool>& takenIDMap, unsigned int maxID) {
|
||||
if(takenIDMap.size() == 0) {
|
||||
return 0;
|
||||
}
|
||||
// maxID should have a real meaning now
|
||||
for(unsigned int i = 0; i < maxID; ++i) {
|
||||
if(takenIDMap.find(i) == takenIDMap.end()) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return (maxID + 1);
|
||||
}
|
||||
|
||||
void Manager::writeIDs() {
|
||||
m_config->setGroup("Scripts");
|
||||
//delete old entries
|
||||
QValueList<unsigned int> idList = readUnsignedIntListEntry("IDs");
|
||||
for(QValueList<unsigned int>::iterator i = idList.begin(); i != idList.end(); ++i) {
|
||||
m_config->deleteEntry("Script" + QString::number(*i));
|
||||
}
|
||||
//write new ones
|
||||
idList.clear();
|
||||
for(QMap<unsigned int, JScript*>::iterator i = m_idScriptMap.begin(); i != m_idScriptMap.end(); ++i) {
|
||||
unsigned int id = i.key();
|
||||
idList.push_back(id);
|
||||
m_config->writePathEntry("Script" + QString::number(id), (*i)->getFileName());
|
||||
}
|
||||
writeEntry("IDs", idList);
|
||||
m_config->setGroup(QString());
|
||||
}
|
||||
|
||||
void Manager::addDirectoryToDirWatch(const QString& dir) {
|
||||
//FIXME: no recursive watching and no watching of files as it isn't implemented
|
||||
// yet
|
||||
if(!m_jScriptDirWatch->contains(dir)) {
|
||||
m_jScriptDirWatch->addDir(dir, false, false);
|
||||
}
|
||||
QDir qDir(dir);
|
||||
QStringList list = qDir.entryList(QDir::Dirs);
|
||||
for(QStringList::iterator i = list.begin(); i != list.end(); ++i) {
|
||||
QString subdir = *i;
|
||||
if(subdir != "." && subdir != "..") {
|
||||
addDirectoryToDirWatch(qDir.filePath(subdir));
|
||||
}
|
||||
}
|
||||
}
|
||||
////////////////////////////// ScriptExecutionAction //////////////////////////////
|
||||
|
||||
ScriptExecutionAction::ScriptExecutionAction(unsigned int id, KileJScript::Manager *manager, KActionCollection* parent) : KAction(QString(), KShortcut(), NULL, NULL, parent, QString("script_execution_" + QString::number(id)).ascii()), m_manager(manager), m_id(id) {
|
||||
const KileJScript::JScript *script = m_manager->getScript(m_id);
|
||||
Q_ASSERT(script);
|
||||
setText(i18n("Execution of %1").arg(script->getName()));
|
||||
connect(this, SIGNAL(activated()), this, SLOT(executeScript()));
|
||||
}
|
||||
|
||||
ScriptExecutionAction::~ScriptExecutionAction() {
|
||||
}
|
||||
|
||||
void ScriptExecutionAction::executeScript() {
|
||||
m_manager->executeJScript(m_id);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "kilejscript.moc"
|
@ -0,0 +1,284 @@
|
||||
/**************************************************************************
|
||||
* Copyright (C) 2006, 2007 by Michel Ludwig (michel.ludwig@kdemail.net) *
|
||||
***************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEJSCRIPT_H
|
||||
#define KILEJSCRIPT_H
|
||||
|
||||
#include <qmap.h>
|
||||
#include <qobject.h>
|
||||
|
||||
#include <kjs/interpreter.h>
|
||||
#include <kjs/object.h>
|
||||
|
||||
#include <kaction.h>
|
||||
#include <kconfig.h>
|
||||
#include <kdirwatch.h>
|
||||
|
||||
#include <qvaluelist.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
class KileInfo;
|
||||
|
||||
namespace KileJScript {
|
||||
|
||||
/**
|
||||
* This class represents a JavaScript script.
|
||||
**/
|
||||
class JScript {
|
||||
public:
|
||||
/**
|
||||
* Constructs a new JavaScript script.
|
||||
* @param file the file that contains the script
|
||||
**/
|
||||
JScript(unsigned int id, const QString& file);
|
||||
|
||||
/**
|
||||
* Returns the code of this script, i.e. the file is read and its contents are
|
||||
* returned.
|
||||
**/
|
||||
QString getCode() const;
|
||||
|
||||
/**
|
||||
* Returns the name of the script (the base name of the file).
|
||||
**/
|
||||
QString getName() const;
|
||||
|
||||
/**
|
||||
* Returns the file of the script (the full path, including the base name).
|
||||
**/
|
||||
QString getFileName() const;
|
||||
|
||||
/**
|
||||
* Returns the unique identifier of this script.
|
||||
**/
|
||||
unsigned int getID() const;
|
||||
|
||||
/**
|
||||
* Sets the unique identifier of this script.
|
||||
**/
|
||||
void setID(unsigned int id);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
**/
|
||||
void setActionObject(KAction* action);
|
||||
|
||||
const KAction* getActionObject() const;
|
||||
|
||||
KAction* getActionObject();
|
||||
|
||||
void setKeySequence(const QString& str);
|
||||
QString getKeySequence() const;
|
||||
|
||||
protected:
|
||||
unsigned int m_id;
|
||||
QString m_code;
|
||||
QString m_file;
|
||||
QString m_name;
|
||||
KAction *m_action;
|
||||
QString m_keySequence;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class represents the JavaScript environment that is used to execute Kile's scripts
|
||||
* in.
|
||||
**/
|
||||
class JScriptEnvironment {
|
||||
public:
|
||||
/**
|
||||
* Constructs a new environment.
|
||||
**/
|
||||
JScriptEnvironment(KileInfo *kileInfo);
|
||||
~JScriptEnvironment();
|
||||
|
||||
/**
|
||||
* Executes JavaScript code in this environment.
|
||||
* @param c the code that should be executed
|
||||
**/
|
||||
void execute(const QString& c);
|
||||
|
||||
protected:
|
||||
KJS::Interpreter *m_interpreter;
|
||||
KJS::Object* m_kileJSObject;
|
||||
KileInfo *m_kileInfo;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class handles the scripting functionality in Kile.
|
||||
**/
|
||||
class Manager : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructs a new Manager object.
|
||||
**/
|
||||
Manager(KileInfo *info, KConfig *config, KActionCollection *actionCollection, QObject *parent = 0, const char *name = 0);
|
||||
virtual ~Manager();
|
||||
|
||||
/**
|
||||
* Executes a script in Kile's scripting environment.
|
||||
* @param script the script that should be executed
|
||||
**/
|
||||
void executeJScript(const JScript *script);
|
||||
|
||||
/**
|
||||
* Executes a script in Kile's scripting environment.
|
||||
* @param id the id of the script that should be executed
|
||||
**/
|
||||
void executeJScript(unsigned int id);
|
||||
|
||||
/**
|
||||
* Retrieves a list of all the scripts that are currently available.
|
||||
**/
|
||||
QValueList<JScript*> getJScripts();
|
||||
|
||||
/**
|
||||
* Writes the key sequence-to-script bindings to the KConfig object that has
|
||||
* passed in the constructor.
|
||||
**/
|
||||
void writeConfig();
|
||||
|
||||
/**
|
||||
* Assigns a key sequence to a script. If the parameter "keySequence" is empty,
|
||||
* then nothing is done.
|
||||
* @param script the script that is considered
|
||||
* @param keySequence the key sequence that is assigned
|
||||
**/
|
||||
void setEditorKeySequence(JScript* script, const QString& keySequence);
|
||||
|
||||
/**
|
||||
* Removes an assigned key sequence from a script.
|
||||
* @param script the script that is considered
|
||||
**/
|
||||
void removeEditorKeySequence(JScript* script);
|
||||
|
||||
/**
|
||||
* Returns the directory that can be used by the used to store Kile's scripts.
|
||||
* Usually $HOME/.kde/share/apps/kile/scripts
|
||||
**/
|
||||
QString getLocalJScriptDirectory() const;
|
||||
|
||||
/**
|
||||
* Returns the script object that corresponds to a script id.
|
||||
* @param id the id of the script
|
||||
**/
|
||||
const JScript* getScript(unsigned int id);
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Signal emitted whenever the managed scripts haved changed, for example if the
|
||||
* watched directories have been scanned for scripts and thus, the potentially
|
||||
* available scripts (could) have changed.
|
||||
* The signal is also emitted when the currently available scripts have been
|
||||
* deleted internally in Kile (for example, after disabling the scripting feature).
|
||||
**/
|
||||
void jScriptsChanged();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Does nothing if scripting has been disabled.
|
||||
**/
|
||||
void scanJScriptDirectories();
|
||||
|
||||
/**
|
||||
* Reads and assigns the key sequence-to-script bindings from the KConfig
|
||||
* object that has been passed in the constructor.
|
||||
**/
|
||||
void readConfig();
|
||||
|
||||
protected:
|
||||
QString m_localJScriptDir;
|
||||
QValueList<JScript*> m_jScriptList;
|
||||
QMap<unsigned int, JScript*> m_idScriptMap;
|
||||
KDirWatch *m_jScriptDirWatch;
|
||||
|
||||
KileInfo *m_kileInfo;
|
||||
KConfig *m_config;
|
||||
KActionCollection *m_actionCollection;
|
||||
|
||||
/**
|
||||
* Registers the script contained in a file.
|
||||
* @param fileName the file that contains the script
|
||||
**/
|
||||
void registerScript(const QString& fileName, QMap<QString, unsigned int>& pathIDMap, QMap<unsigned int, bool>& takenIDMap, unsigned int &maxID);
|
||||
|
||||
/**
|
||||
* (Re-)Creates and initialises the KDirWatch object.
|
||||
**/
|
||||
void populateDirWatch();
|
||||
|
||||
/**
|
||||
* Deletes all the scripts that are handled by this manager.
|
||||
**/
|
||||
void deleteJScripts();
|
||||
|
||||
/**
|
||||
* Reads an 'unsigned int' list as value for a specific key from the local KConfig
|
||||
* object.
|
||||
* @param key the considered entry key
|
||||
**/
|
||||
QValueList<unsigned int> readUnsignedIntListEntry(const QString& key);
|
||||
|
||||
/**
|
||||
* Writes a key - value pair to the local KConfig object for the case that the
|
||||
* value is an 'unsigned int' list.
|
||||
* @param key the considered entry key
|
||||
* @param l the 'unsigned int' list that is used as value
|
||||
**/
|
||||
void writeEntry(const QString& key, const QValueList<unsigned int>& l);
|
||||
|
||||
/**
|
||||
* Finds the next free ID.
|
||||
* @param takenIDMap map describing which IDs are already in use
|
||||
* @param maxID the maximum ID that is currently in use (if there is no ID assigned, then
|
||||
* any value can be passed here, but typically '0')
|
||||
**/
|
||||
unsigned int findFreeID(const QMap<unsigned int, bool>& takenIDMap, unsigned int maxID);
|
||||
|
||||
/**
|
||||
* Writes the ID to file name mappings that are currently in use to the local
|
||||
* KConfig object.
|
||||
**/
|
||||
void writeIDs();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Recursively adds a directory to a KDirWatch object.
|
||||
* @param dir the directory that should be added
|
||||
**/
|
||||
void addDirectoryToDirWatch(const QString& dir);
|
||||
};
|
||||
|
||||
class ScriptExecutionAction : public KAction {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScriptExecutionAction(unsigned int scriptID, Manager *manager, KActionCollection* parent = 0);
|
||||
|
||||
virtual ~ScriptExecutionAction();
|
||||
|
||||
protected slots:
|
||||
void executeScript();
|
||||
|
||||
protected:
|
||||
KileJScript::Manager *m_manager;
|
||||
unsigned int m_id;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,124 @@
|
||||
/***************************************************************************
|
||||
begin : Mon Dec 22 2003
|
||||
copyright : (C) 2001 - 2003 by Brachet Pascal, 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilekonsolewidget.h"
|
||||
#include "kileinfo.h"
|
||||
|
||||
#include <qfileinfo.h>
|
||||
#include <qframe.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <klibloader.h>
|
||||
#include <kurl.h>
|
||||
#include <kparts/part.h>
|
||||
#include <kate/document.h>
|
||||
#include <kate/view.h>
|
||||
|
||||
#include "kileuntitled.h"
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
Konsole::Konsole(KileInfo * info, QWidget *parent, const char *name) :
|
||||
QVBox(parent, name),
|
||||
m_bPresent(false),
|
||||
m_ki(info)
|
||||
{
|
||||
spawn();
|
||||
}
|
||||
|
||||
Konsole::~Konsole()
|
||||
{
|
||||
}
|
||||
|
||||
void Konsole::spawn()
|
||||
{
|
||||
KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart");
|
||||
|
||||
if (!factory) return;
|
||||
m_part = (KParts::ReadOnlyPart *) factory->create(this);
|
||||
|
||||
if (!m_part) return;
|
||||
|
||||
if (m_part->widget()->inherits("QFrame"))
|
||||
((QFrame*)m_part->widget())->setFrameStyle(QFrame::Panel|QFrame::Sunken);
|
||||
|
||||
m_bPresent=true;
|
||||
connect ( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
|
||||
|
||||
m_part->widget()->show();
|
||||
show();
|
||||
}
|
||||
|
||||
|
||||
void Konsole::sync()
|
||||
{
|
||||
Kate::Document *doc = m_ki->activeTextDocument();
|
||||
Kate::View *view = 0;
|
||||
|
||||
if (doc)
|
||||
view = static_cast<Kate::View*>(doc->views().first());
|
||||
|
||||
if (view)
|
||||
{
|
||||
QString finame;
|
||||
KURL url = view->getDoc()->url();
|
||||
|
||||
if ( url.path().isEmpty() || KileUntitled::isUntitled(url.path()) ) return;
|
||||
|
||||
QFileInfo fic(url.directory());
|
||||
if ( fic.isReadable() )
|
||||
{
|
||||
setDirectory(url.directory());
|
||||
activate();
|
||||
}
|
||||
|
||||
view->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void Konsole::setDirectory(const QString &dirname)
|
||||
{
|
||||
if (m_bPresent)
|
||||
{
|
||||
KURL url(dirname);
|
||||
if (m_part->url() != url)
|
||||
m_part->openURL(url);
|
||||
}
|
||||
}
|
||||
|
||||
void Konsole::showEvent(QShowEvent *ev)
|
||||
{
|
||||
QWidget::showEvent(ev);
|
||||
activate();
|
||||
}
|
||||
|
||||
void Konsole::activate()
|
||||
{
|
||||
if (m_bPresent)
|
||||
{
|
||||
m_part->widget()->show();
|
||||
this->setFocusProxy(m_part->widget());
|
||||
m_part->widget()->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void Konsole::slotDestroyed ()
|
||||
{
|
||||
m_bPresent=false;
|
||||
spawn();
|
||||
}
|
||||
}
|
||||
|
||||
#include "kilekonsolewidget.moc"
|
@ -0,0 +1,59 @@
|
||||
/***************************************************************************
|
||||
begin : Sat Dec 8 2001
|
||||
copyright : (C) 2001 - 2003 by Brachet Pascal, 2003 Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEWIDGET_KONSOLE_H
|
||||
#define KILEWIDGET_KONSOLE_H
|
||||
|
||||
/**
|
||||
*@author Brachet Pascal
|
||||
@author Jeroen Wijnhout
|
||||
*/
|
||||
|
||||
#include <qvbox.h>
|
||||
|
||||
namespace KParts { class ReadOnlyPart; }
|
||||
class KileInfo;
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
class Konsole : public QVBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Konsole(KileInfo *, QWidget* parent, const char* name=0);
|
||||
~Konsole();
|
||||
|
||||
public slots:
|
||||
void setDirectory(const QString & dir);
|
||||
void activate();
|
||||
void sync();
|
||||
|
||||
private slots:
|
||||
void slotDestroyed();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *ev);
|
||||
void spawn();
|
||||
|
||||
private:
|
||||
KParts::ReadOnlyPart *m_part;
|
||||
bool m_bPresent;
|
||||
KileInfo *m_ki;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,369 @@
|
||||
/***************************************************************************
|
||||
begin : mon 3-11 20:40:00 CEST 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilelauncher.h"
|
||||
|
||||
#include "kileinfo.h"
|
||||
#include "kiletool.h"
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kiletool_enums.h"
|
||||
#include "docpart.h"
|
||||
#include "kileconfig.h"
|
||||
|
||||
#include <qwidgetstack.h>
|
||||
#include <qregexp.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
#include <krun.h>
|
||||
#include <kprocess.h>
|
||||
#include <klocale.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <klibloader.h>
|
||||
#include <kparts/part.h>
|
||||
#include <kparts/factory.h>
|
||||
#include <kparts/partmanager.h>
|
||||
|
||||
namespace KileTool
|
||||
{
|
||||
Launcher::Launcher() :
|
||||
m_tool(0L)
|
||||
{
|
||||
}
|
||||
|
||||
Launcher::~ Launcher()
|
||||
{
|
||||
KILE_DEBUG() << "DELETING launcher" << endl;
|
||||
}
|
||||
|
||||
ProcessLauncher::ProcessLauncher(const char * shellname /* =0 */) :
|
||||
m_wd(QString::null),
|
||||
m_cmd(QString::null),
|
||||
m_options(QString::null),
|
||||
m_texinputs(KileConfig::teXPaths()),
|
||||
m_bibinputs(KileConfig::bibInputPaths()),
|
||||
m_bstinputs(KileConfig::bstInputPaths()),
|
||||
m_changeTo(true)
|
||||
{
|
||||
KILE_DEBUG() << "==KileTool::ProcessLauncher::ProcessLauncher()==============" << endl;
|
||||
|
||||
m_proc = new KShellProcess(shellname);
|
||||
if (m_proc)
|
||||
KILE_DEBUG() << "\tKShellProcess created" << endl;
|
||||
else
|
||||
KILE_DEBUG() << "\tNO KShellProcess created" << endl;
|
||||
|
||||
connect(m_proc, SIGNAL( receivedStdout(KProcess*, char*, int) ), this, SLOT(slotProcessOutput(KProcess*, char*, int ) ) );
|
||||
connect(m_proc, SIGNAL( receivedStderr(KProcess*, char*, int) ),this, SLOT(slotProcessOutput(KProcess*, char*, int ) ) );
|
||||
connect(m_proc, SIGNAL( processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*)));
|
||||
}
|
||||
|
||||
ProcessLauncher::~ProcessLauncher()
|
||||
{
|
||||
KILE_DEBUG() << "DELETING ProcessLauncher" << endl;
|
||||
delete m_proc;
|
||||
}
|
||||
|
||||
void ProcessLauncher::setWorkingDirectory(const QString &wd)
|
||||
{
|
||||
m_wd = wd;
|
||||
}
|
||||
|
||||
bool ProcessLauncher::launch()
|
||||
{
|
||||
KILE_DEBUG() << "KileTool::ProcessLauncher::launch()=================" << endl;
|
||||
KILE_DEBUG() << "\tbelongs to tool " << tool()->name() << endl;
|
||||
|
||||
QString msg, out = "*****\n***** " + tool()->name() + i18n(" output: \n");
|
||||
|
||||
if ( m_cmd.isNull() )
|
||||
m_cmd = tool()->readEntry("command");
|
||||
|
||||
if ( m_options.isNull() )
|
||||
m_options = tool()->readEntry("options");
|
||||
|
||||
if ( m_changeTo && (!m_wd.isNull()) )
|
||||
{
|
||||
m_proc->setWorkingDirectory(m_wd);
|
||||
out += QString("***** cd '")+ m_wd +QString("'\n");
|
||||
}
|
||||
|
||||
QString str;
|
||||
tool()->translate(m_cmd);
|
||||
tool()->translate(m_options);
|
||||
*m_proc << m_cmd << m_options;
|
||||
|
||||
if (m_proc)
|
||||
{
|
||||
out += QString("***** ")+ m_cmd+ ' ' + m_options + '\n';
|
||||
|
||||
QString src = tool()->source(false);
|
||||
QString trgt = tool()->target();
|
||||
if (src == trgt)
|
||||
msg = src;
|
||||
else
|
||||
msg = src + " => " + trgt;
|
||||
|
||||
msg += " (" + m_proc->args()[0] + ')';
|
||||
|
||||
emit(message(Info,msg));
|
||||
|
||||
// QuickView tools need a special TEXINPUTS environment variable
|
||||
if ( tool()->isQuickie() )
|
||||
m_texinputs = KileConfig::previewTeXPaths();
|
||||
|
||||
KILE_DEBUG() << "$PATH=" << tool()->manager()->info()->expandEnvironmentVars("$PATH") << endl;
|
||||
KILE_DEBUG() << "$TEXINPUTS=" << tool()->manager()->info()->expandEnvironmentVars(m_texinputs + ":$TEXINPUTS") << endl;
|
||||
KILE_DEBUG() << "$BIBINPUTS=" << tool()->manager()->info()->expandEnvironmentVars(m_bibinputs + ":$BIBINPUTS") << endl;
|
||||
KILE_DEBUG() << "$BSTINPUTS=" << tool()->manager()->info()->expandEnvironmentVars(m_bstinputs + ":$BSTINPUTS") << endl;
|
||||
KILE_DEBUG() << "Tool name is "<< tool()->name() << endl;
|
||||
|
||||
m_proc->setEnvironment("PATH",tool()->manager()->info()->expandEnvironmentVars("$PATH"));
|
||||
|
||||
if (! m_texinputs.isEmpty())
|
||||
m_proc->setEnvironment("TEXINPUTS", tool()->manager()->info()->expandEnvironmentVars(m_texinputs + ":$TEXINPUTS"));
|
||||
if (! m_bibinputs.isEmpty())
|
||||
m_proc->setEnvironment("BIBINPUTS", tool()->manager()->info()->expandEnvironmentVars(m_bibinputs + ":$BIBINPUTS"));
|
||||
if (! m_bstinputs.isEmpty())
|
||||
m_proc->setEnvironment("BSTINPUTS", tool()->manager()->info()->expandEnvironmentVars(m_bstinputs + ":$BSTINPUTS"));
|
||||
|
||||
out += "*****\n";
|
||||
emit(output(out));
|
||||
|
||||
return m_proc->start(tool()->manager()->shouldBlock() ? KProcess::Block : KProcess::NotifyOnExit, KProcess::AllOutput);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ProcessLauncher::kill()
|
||||
{
|
||||
KILE_DEBUG() << "==KileTool::ProcessLauncher::kill()==============" << endl;
|
||||
if ( m_proc && m_proc->isRunning() )
|
||||
{
|
||||
KILE_DEBUG() << "\tkilling" << endl;
|
||||
return m_proc->kill();
|
||||
}
|
||||
else
|
||||
{
|
||||
KILE_DEBUG() << "\tno process or process not running" << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ProcessLauncher::selfCheck()
|
||||
{
|
||||
emit(message(Error, i18n("Launching failed, diagnostics:")));
|
||||
|
||||
QString exe = KRun::binaryName(tool()->readEntry("command"), false);
|
||||
QString path = KGlobal::dirs()->findExe(exe, QString::null, true);
|
||||
|
||||
if ( path.isNull() )
|
||||
{
|
||||
emit(message(Error, i18n("There is no executable named \"%1\" in your path.").arg(exe)));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QFileInfo fi(path);
|
||||
if ( ! fi.isExecutable() )
|
||||
{
|
||||
emit(message(Error, i18n("You do not have permission to run %1.").arg(path)));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
emit(message(Info, i18n("Diagnostics could not find any obvious problems.")));
|
||||
return true;
|
||||
}
|
||||
|
||||
void ProcessLauncher::slotProcessOutput(KProcess*, char* buf, int len)
|
||||
{
|
||||
emit output(QString::fromLocal8Bit(buf, len));
|
||||
}
|
||||
|
||||
void ProcessLauncher::slotProcessExited(KProcess*)
|
||||
{
|
||||
KILE_DEBUG() << "==KileTool::ProcessLauncher::slotProcessExited=============" << endl;
|
||||
KILE_DEBUG() << "\t" << tool()->name() << endl;
|
||||
|
||||
if (m_proc)
|
||||
{
|
||||
if (m_proc->normalExit())
|
||||
{
|
||||
KILE_DEBUG() << "\tnormal exit" << endl;
|
||||
int type = Info;
|
||||
if (m_proc->exitStatus() != 0)
|
||||
{
|
||||
type = Error;
|
||||
emit(message(type,i18n("finished with exit status %1").arg(m_proc->exitStatus())));
|
||||
}
|
||||
|
||||
if (type == Info)
|
||||
emit(done(Success));
|
||||
else
|
||||
emit(done(Failed));
|
||||
}
|
||||
else
|
||||
{
|
||||
KILE_DEBUG() << "\tabnormal exit" << endl;
|
||||
emit(message(Error,i18n("finished abruptly")));
|
||||
emit(done(AbnormalExit));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kdWarning() << "\tNO PROCESS, emitting done" << endl;
|
||||
emit(done(Success));
|
||||
}
|
||||
}
|
||||
|
||||
KonsoleLauncher::KonsoleLauncher(const char * shellname) : ProcessLauncher(shellname)
|
||||
{
|
||||
}
|
||||
|
||||
bool KonsoleLauncher::launch()
|
||||
{
|
||||
QString cmd = tool()->readEntry("command");
|
||||
QString noclose = (tool()->readEntry("close") == "no") ? "--noclose" : "";
|
||||
setCommand("konsole");
|
||||
setOptions(noclose + " -T \"" + cmd + " (Kile)\" -e " + cmd + ' ' + tool()->readEntry("options"));
|
||||
|
||||
if ( KGlobal::dirs()->findExe(KRun::binaryName(cmd, false)).isNull() ) return false;
|
||||
|
||||
return ProcessLauncher::launch();
|
||||
}
|
||||
|
||||
PartLauncher::PartLauncher(const char *name /* = 0*/ ) :
|
||||
m_part(0L),
|
||||
m_state("Viewer"),
|
||||
m_name(name),
|
||||
m_libName(0L),
|
||||
m_className(0L),
|
||||
m_options(QString::null)
|
||||
{
|
||||
}
|
||||
|
||||
PartLauncher::~PartLauncher()
|
||||
{
|
||||
KILE_DEBUG () << "DELETING PartLauncher" << endl;
|
||||
}
|
||||
|
||||
bool PartLauncher::launch()
|
||||
{
|
||||
m_libName = tool()->readEntry("libName").ascii();
|
||||
m_className = tool()->readEntry("className").ascii();
|
||||
m_options=tool()->readEntry("libOptions");
|
||||
m_state=tool()->readEntry("state");
|
||||
|
||||
QString msg, out = "*****\n***** " + tool()->name() + i18n(" output: \n");
|
||||
|
||||
QString shrt = "%target";
|
||||
tool()->translate(shrt);
|
||||
QString dir = "%dir_target"; tool()->translate(dir);
|
||||
|
||||
QString name = shrt;
|
||||
if ( dir[0] == '/' )
|
||||
name = dir + '/' + shrt;
|
||||
|
||||
|
||||
KLibFactory *factory = KLibLoader::self()->factory(m_libName);
|
||||
if (factory == 0)
|
||||
{
|
||||
emit(message(Error, i18n("Could not find the %1 library.").arg(m_libName)));
|
||||
return false;
|
||||
}
|
||||
|
||||
QWidgetStack *stack = tool()->manager()->widgetStack();
|
||||
KParts::PartManager *pm = tool()->manager()->partManager();
|
||||
|
||||
m_part = (KParts::ReadOnlyPart *)factory->create(stack, m_libName, m_className, m_options);
|
||||
|
||||
if (m_part == 0)
|
||||
{
|
||||
emit(message(Error, i18n("Could not create component %1 from the library %2.").arg(m_className).arg(m_libName)));
|
||||
emit(done(Failed));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
QString cmd = QString(m_libName) + "->" + QString(m_className) + ' ' + m_options + ' ' + name;
|
||||
out += "***** " + cmd + '\n';
|
||||
|
||||
msg = shrt+ " (" + tool()->readEntry("libName") + ')';
|
||||
emit(message(Info,msg));
|
||||
}
|
||||
|
||||
out += "*****\n";
|
||||
emit(output(out));
|
||||
|
||||
tool()->manager()->wantGUIState(m_state);
|
||||
|
||||
stack->addWidget(m_part->widget() , 1 );
|
||||
stack->raiseWidget(1);
|
||||
|
||||
m_part->openURL(KURL(name));
|
||||
pm->addPart(m_part, true);
|
||||
pm->setActivePart(m_part);
|
||||
|
||||
emit(done(Success));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PartLauncher::kill()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DocPartLauncher::launch()
|
||||
{
|
||||
m_state=tool()->readEntry("state");
|
||||
|
||||
QString shrt = "%target";
|
||||
tool()->translate(shrt);
|
||||
QString name="%dir_target/%target";
|
||||
tool()->translate(name);
|
||||
|
||||
QString out = "*****\n***** " + tool()->name() + i18n(" output: \n") + "***** KHTML " + name + "\n*****\n";
|
||||
QString msg = shrt+ " (KHTML)";
|
||||
emit(message(Info, msg));
|
||||
emit(output(out));
|
||||
|
||||
QWidgetStack *stack = tool()->manager()->widgetStack();
|
||||
KParts::PartManager *pm = tool()->manager()->partManager();
|
||||
|
||||
DocumentationViewer *htmlpart = new DocumentationViewer(stack,"help");
|
||||
m_part = static_cast<KParts::ReadOnlyPart*>(htmlpart);
|
||||
|
||||
connect(htmlpart, SIGNAL(updateStatus(bool, bool)), tool(), SIGNAL(updateStatus(bool, bool)));
|
||||
|
||||
tool()->manager()->wantGUIState(m_state);
|
||||
|
||||
htmlpart->openURL(KURL(name));
|
||||
htmlpart->addToHistory(name);
|
||||
stack->addWidget(htmlpart->widget() , 1 );
|
||||
stack->raiseWidget(1);
|
||||
|
||||
pm->addPart(htmlpart, true);
|
||||
pm->setActivePart( htmlpart);
|
||||
|
||||
emit(done(Success));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#include "kilelauncher.moc"
|
@ -0,0 +1,154 @@
|
||||
/***************************************************************************
|
||||
begin : mon 3-11 20:40:00 CEST 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILE_LAUNCHER
|
||||
#define KILE_LAUNCHER
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qdict.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
class QWidgetStack;
|
||||
|
||||
|
||||
class KProcess;
|
||||
class KShellProcess;
|
||||
class KileInfo;
|
||||
namespace KParts { class ReadOnlyPart; class PartManager; }
|
||||
|
||||
namespace KileTool
|
||||
{
|
||||
class Base;
|
||||
|
||||
/**
|
||||
* This class represents a way to launch a tool. This could be a commandline tool
|
||||
* running in a Konsole, running as a separate process, it could even be responsible
|
||||
* for starting a KPart.
|
||||
*
|
||||
* @author Jeroen Wijnhout
|
||||
**/
|
||||
class Launcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Launcher();
|
||||
~Launcher();
|
||||
|
||||
public slots:
|
||||
virtual bool launch() = 0;
|
||||
virtual bool kill() = 0;
|
||||
virtual bool selfCheck() = 0;
|
||||
|
||||
public:
|
||||
virtual void setWorkingDirectory(const QString &) {}
|
||||
|
||||
void setTool(Base *tool) { m_tool = tool; }
|
||||
Base* tool() { return m_tool; }
|
||||
|
||||
signals:
|
||||
void message(int, const QString & );
|
||||
void output(const QString &);
|
||||
|
||||
void exitedWith(int);
|
||||
void abnormalExit();
|
||||
|
||||
void done(int);
|
||||
|
||||
private:
|
||||
//QDict<QString> *m_pdictParams;
|
||||
Base *m_tool;
|
||||
};
|
||||
|
||||
class ProcessLauncher : public Launcher
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ProcessLauncher(const char * shellname =0);
|
||||
~ProcessLauncher();
|
||||
|
||||
public:
|
||||
void setWorkingDirectory(const QString &wd);
|
||||
void changeToWorkingDirectory(bool change) { m_changeTo = change; }
|
||||
void setCommand(const QString & cmd) { m_cmd = cmd; }
|
||||
void setOptions(const QString & opt) { m_options = opt; }
|
||||
|
||||
public slots:
|
||||
bool launch();
|
||||
bool kill();
|
||||
bool selfCheck();
|
||||
|
||||
private slots:
|
||||
void slotProcessOutput(KProcess*, char*, int );
|
||||
void slotProcessExited(KProcess*);
|
||||
|
||||
private:
|
||||
QString m_wd, m_cmd, m_options, m_texinputs, m_bibinputs, m_bstinputs;
|
||||
KShellProcess *m_proc;
|
||||
bool m_changeTo;
|
||||
};
|
||||
|
||||
class KonsoleLauncher : public ProcessLauncher
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KonsoleLauncher(const char * shellname =0);
|
||||
|
||||
public slots:
|
||||
bool launch();
|
||||
};
|
||||
|
||||
class PartLauncher : public Launcher
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PartLauncher(const char * = 0);
|
||||
~PartLauncher();
|
||||
|
||||
void setLibrary(const char *lib) { m_libName = lib; }
|
||||
void setClass(const char *clas) { m_className = clas; }
|
||||
void setOptions(QString & options) { m_options = options; }
|
||||
|
||||
public slots:
|
||||
bool launch();
|
||||
bool kill();
|
||||
bool selfCheck() { return true; } //no additional self-checks, all of them are done in launch()
|
||||
|
||||
KParts::ReadOnlyPart* part() { return m_part; }
|
||||
|
||||
protected:
|
||||
KParts::ReadOnlyPart *m_part;
|
||||
|
||||
QString m_state;
|
||||
const char *m_name, *m_libName, *m_className;
|
||||
QString m_options;
|
||||
};
|
||||
|
||||
class DocPartLauncher : public PartLauncher
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DocPartLauncher(const char * name = 0) : PartLauncher(name) {}
|
||||
|
||||
public slots:
|
||||
bool launch();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,114 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Aug 15 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
(C) 2007 by Holger Danielsson
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilelistselector.h"
|
||||
|
||||
#include <qstringlist.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlayout.h>
|
||||
#include <qheader.h>
|
||||
|
||||
#include <kapplication.h>
|
||||
#include "kiledebug.h"
|
||||
#include <klocale.h>
|
||||
|
||||
//////////////////// KileListSelectorBase ////////////////////
|
||||
|
||||
KileListSelectorBase::KileListSelectorBase(const QStringList &list, const QString &caption, const QString &select, QWidget *parent, const char *name) :
|
||||
KDialogBase( KDialogBase::Plain, caption, Ok|Cancel,Ok, parent, name, true, true )
|
||||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout(plainPage());
|
||||
|
||||
layout->addWidget(new QLabel(select, plainPage()));
|
||||
layout->addSpacing(8);
|
||||
|
||||
m_listview = new KListView(plainPage());
|
||||
m_listview->addColumn(i18n("Files"));
|
||||
m_listview->setSorting(-1);
|
||||
m_listview->setAllColumnsShowFocus(true);
|
||||
m_listview->setFullWidth(true);
|
||||
m_listview->setItemsMovable(false); // default: true
|
||||
//setAcceptDrops(false); // default: false
|
||||
//setDragEnabled(false); // default: false
|
||||
//setShadeSortColumn(true); // default: true
|
||||
m_listview->header()->setMovingEnabled(false); // default: true
|
||||
|
||||
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
|
||||
m_listview->setShadeSortColumn(false);
|
||||
#endif
|
||||
layout->addWidget(m_listview);
|
||||
|
||||
insertStringList(list);
|
||||
|
||||
int w = m_listview->columnWidth(0) + 32;
|
||||
w = ( w > 275 ) ? w : 275;
|
||||
int h = ( list.count() > 0 ) ? m_listview->header()->height()+12*m_listview->firstChild()->height() : 224;
|
||||
m_listview->setMinimumSize(w,h);
|
||||
|
||||
resize(sizeHint().width(),sizeHint().height()+4);
|
||||
connect(m_listview, SIGNAL(doubleClicked(QListViewItem*,const QPoint &,int)), this, SLOT(accept()));
|
||||
}
|
||||
|
||||
int KileListSelectorBase::currentItem()
|
||||
{
|
||||
QListViewItem *item = m_listview->currentItem();
|
||||
return ( item ) ? m_listview->itemIndex(item) : -1;
|
||||
}
|
||||
|
||||
void KileListSelectorBase::insertStringList(const QStringList &list)
|
||||
{
|
||||
QStringList::ConstIterator it;
|
||||
KListViewItem *item = 0L;
|
||||
for ( it=list.begin(); it!=list.end(); ++it )
|
||||
{
|
||||
item = new KListViewItem(m_listview,item,*it);
|
||||
m_listview->insertItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////// with single selection ////////////////////
|
||||
|
||||
KileListSelector::KileListSelector(const QStringList &list, const QString &caption, const QString &select, QWidget *parent, const char *name) : KileListSelectorBase(list,caption,select,parent,name)
|
||||
{
|
||||
m_listview->setSelectionMode(QListView::Single);
|
||||
|
||||
if ( list.count() > 0 )
|
||||
m_listview->setSelected(m_listview->firstChild(),true);
|
||||
}
|
||||
|
||||
//////////////////// with multi selection ////////////////////
|
||||
|
||||
KileListSelectorMultiple::KileListSelectorMultiple(const QStringList &list, const QString &caption, const QString &select, QWidget *parent, const char *name) : KileListSelectorBase(list,caption,select,parent,name)
|
||||
{
|
||||
m_listview->setSelectionMode(QListView::Extended); // default: Single
|
||||
}
|
||||
|
||||
const QStringList& KileListSelectorMultiple::selected()
|
||||
{
|
||||
m_selectedfiles.clear();
|
||||
|
||||
QPtrList<QListViewItem> list = m_listview->selectedItems();
|
||||
QPtrListIterator<QListViewItem> it(list);
|
||||
while ( it.current() )
|
||||
{
|
||||
m_selectedfiles.append((*it)->text(0));
|
||||
++it;
|
||||
}
|
||||
return m_selectedfiles;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,59 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Aug 15 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
(C) 2007 by Holger Danielsson
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef KILELISTSELECTOR_H
|
||||
#define KILELISTSELECTOR_H
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <klistview.h>
|
||||
|
||||
class KListView;
|
||||
class QStringList;
|
||||
|
||||
class KileListSelectorBase : public KDialogBase
|
||||
{
|
||||
public:
|
||||
KileListSelectorBase(const QStringList &list, const QString &caption, const QString &select, QWidget *parent=0, const char *name=0);
|
||||
~KileListSelectorBase() {}
|
||||
|
||||
int currentItem();
|
||||
|
||||
protected:
|
||||
KListView *m_listview;
|
||||
void insertStringList(const QStringList &list);
|
||||
};
|
||||
|
||||
class KileListSelector : public KileListSelectorBase
|
||||
{
|
||||
public:
|
||||
KileListSelector(const QStringList &list, const QString &caption, const QString &select, QWidget *parent=0, const char *name=0);
|
||||
~KileListSelector() {}
|
||||
};
|
||||
|
||||
class KileListSelectorMultiple : public KileListSelectorBase
|
||||
{
|
||||
public:
|
||||
KileListSelectorMultiple(const QStringList & list, const QString &caption, const QString &select, QWidget *parent=0, const char *name=0);
|
||||
~KileListSelectorMultiple() {}
|
||||
|
||||
const QStringList &selected();
|
||||
|
||||
private:
|
||||
QStringList m_selectedfiles;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,200 @@
|
||||
/***************************************************************************
|
||||
begin : Sat Dec 20 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include "kilelogwidget.h"
|
||||
|
||||
#include <qregexp.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qpopupmenu.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
#include <kurl.h>
|
||||
#include <klocale.h>
|
||||
|
||||
#include "kiletool_enums.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileconfig.h"
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
LogMsg::LogMsg(KileInfo *info, QWidget *parent, const char *name ) :
|
||||
KTextEdit(parent,name),
|
||||
m_info(info)
|
||||
{
|
||||
setTabStopWidth(10);
|
||||
connect(this, SIGNAL(clicked(int, int)), this, SLOT(slotClicked(int, int)));
|
||||
}
|
||||
|
||||
LogMsg::~LogMsg(){
|
||||
}
|
||||
|
||||
void LogMsg::highlight()
|
||||
{
|
||||
blockSignals(true); // block signals to avoid recursion
|
||||
setUpdatesEnabled(false);
|
||||
int cursorParagraph, cursorIndex;
|
||||
|
||||
getCursorPosition( &cursorParagraph, &cursorIndex );
|
||||
|
||||
int line=0;
|
||||
for(uint i = 0 ; i < m_info->outputInfo()->size() ; ++i )
|
||||
{
|
||||
line = (*m_info->outputInfo())[i].outputLine();
|
||||
|
||||
setSelection( line,0, line,paragraphLength(line) );
|
||||
|
||||
switch ( (*m_info->outputInfo())[i].type() )
|
||||
{
|
||||
case LatexOutputInfo::itmError : setColor(QColor(0xCC, 0x00, 0x00)); break;
|
||||
case LatexOutputInfo::itmWarning : setColor(QColor(0x00, 0x00, 0xCC )); break;
|
||||
case LatexOutputInfo::itmBadBox : setColor(QColor(0x00, 0x80, 0x00)); break;
|
||||
default : break;
|
||||
}
|
||||
removeSelection();
|
||||
}
|
||||
setCursorPosition( cursorParagraph, cursorIndex );
|
||||
setUpdatesEnabled(true);
|
||||
blockSignals(false); // block signals to avoid recursion
|
||||
}
|
||||
|
||||
void LogMsg::highlight(uint l, int direction /* = 1 */)
|
||||
{
|
||||
setCursorPosition(l + direction * 3 , 0);
|
||||
setSelection(l, 0, l, paragraphLength(l));
|
||||
}
|
||||
|
||||
void LogMsg::highlightByIndex(int index, int size, int direction /* = 1 */)
|
||||
{
|
||||
int parags = paragraphs();
|
||||
int problemsFound = 0;
|
||||
int targetProblemNumber = size - index;
|
||||
static QRegExp reProblem(".*:[0-9]+:.*");
|
||||
|
||||
//start from the bottom (most recent error) because
|
||||
//there could very well be errors with the same name
|
||||
for ( int i = parags - 1; i >= 0; --i )
|
||||
{
|
||||
if ( reProblem.exactMatch(text(i)) ) ++problemsFound;
|
||||
|
||||
if ( problemsFound == targetProblemNumber )
|
||||
{
|
||||
highlight(i, direction);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LogMsg::slotClicked(int parag, int /*index*/)
|
||||
{
|
||||
int l = 0;
|
||||
QString s = text(parag), file = QString::null;
|
||||
|
||||
static QRegExp reES = QRegExp("(^.*):([0-9]+):.*");
|
||||
//maybe there is an error summary
|
||||
if ( reES.search(s) != -1 )
|
||||
{
|
||||
l = reES.cap(2).toInt();
|
||||
file = reES.cap(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//look for error at line parag
|
||||
for (uint i=0; i< m_info->outputInfo()->size(); ++i)
|
||||
{
|
||||
if ( (*m_info->outputInfo())[i].outputLine() == parag)
|
||||
{
|
||||
file = (*m_info->outputInfo())[i].source();
|
||||
l = (*m_info->outputInfo())[i].sourceLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file = m_info->getFullFromPrettyName(file);
|
||||
|
||||
if ( file != QString::null )
|
||||
{
|
||||
emit(fileOpen(KURL::fromPathOrURL(file), QString::null));
|
||||
if ( l > 0 ) emit(setLine(QString::number(l)));
|
||||
}
|
||||
}
|
||||
|
||||
void LogMsg::printMsg(int type, const QString & message, const QString &tool)
|
||||
{
|
||||
if ( type == KileTool::Error ) emit showingErrorMessage(this);
|
||||
|
||||
QString ot = "", ct = "</font>";
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case KileTool::Warning :
|
||||
ot = "<font color='blue'>";
|
||||
break;
|
||||
case KileTool::ProblemWarning :
|
||||
if ( KileConfig::hideProblemWarning() ) return;
|
||||
ot = "<font color='blue'>";
|
||||
break;
|
||||
case KileTool::Error : case KileTool::ProblemError :
|
||||
ot = "<font color='red'>";
|
||||
break;
|
||||
case KileTool::ProblemBadBox :
|
||||
if ( KileConfig::hideProblemBadBox() ) return;
|
||||
ot = "<font color='#666666'>";
|
||||
break;
|
||||
default : ot = "<font color='black'>"; break;
|
||||
}
|
||||
|
||||
if (tool.isNull())
|
||||
append(ot + message + ct);
|
||||
else
|
||||
append(ot + "<b>[" + tool + "]</b> " + message + ct );
|
||||
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
void LogMsg::printProblem(int type, const QString & problem)
|
||||
{
|
||||
KILE_DEBUG() << "\t" << problem << endl;
|
||||
printMsg(type, problem, QString::null);
|
||||
}
|
||||
|
||||
QPopupMenu* LogMsg::createPopupMenu (const QPoint & pos)
|
||||
{
|
||||
//get standard popup menu
|
||||
QPopupMenu * popup = KTextEdit::createPopupMenu(pos);
|
||||
|
||||
//add toggle operations for hiding warnings/badboxes
|
||||
popup->insertSeparator();
|
||||
|
||||
m_idBadBox = popup->insertItem(i18n("Hide &Bad Boxes"));
|
||||
popup->setItemChecked(m_idBadBox, KileConfig::hideProblemBadBox());
|
||||
|
||||
m_idWarning = popup->insertItem(i18n("Hide (La)TeX &Warnings"));
|
||||
popup->setItemChecked(m_idWarning, KileConfig::hideProblemWarning());
|
||||
|
||||
disconnect ( popup , SIGNAL(activated(int)), this , SLOT(handlePopup(int )));
|
||||
connect ( popup , SIGNAL(activated(int)), this , SLOT(handlePopup(int )));
|
||||
|
||||
return popup;
|
||||
}
|
||||
|
||||
void LogMsg::handlePopup(int id)
|
||||
{
|
||||
if ( id == m_idBadBox ) KileConfig::setHideProblemBadBox(!KileConfig::hideProblemBadBox());
|
||||
else if ( id == m_idWarning ) KileConfig::setHideProblemWarning(!KileConfig::hideProblemWarning());
|
||||
}
|
||||
}
|
||||
|
||||
#include "kilelogwidget.moc"
|
@ -0,0 +1,66 @@
|
||||
/***************************************************************************
|
||||
begin : Sat Dec 20 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#ifndef KILEWIDGET_LOGMSG_H
|
||||
#define KILEWIDGET_LOGMSG_H
|
||||
|
||||
#include <ktextedit.h>
|
||||
|
||||
class QString;
|
||||
class QPopupMenu;
|
||||
class QPoint;
|
||||
|
||||
class KileInfo;
|
||||
class KURL;
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
class LogMsg : public KTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LogMsg(KileInfo *info, QWidget *parent, const char *name=0);
|
||||
~LogMsg();
|
||||
|
||||
void setReadOnly(bool r) { QTextEdit::setReadOnly(r); } //we don't want the greyed background
|
||||
|
||||
public slots:
|
||||
void highlight(); //FIXME for compatibility, should remove it asap
|
||||
void highlight(uint l, int direction = 1);
|
||||
void highlightByIndex(int index, int size, int direction = 1);
|
||||
|
||||
void printMsg(int type, const QString & message, const QString &tool = "Kile" );
|
||||
void printProblem(int type, const QString & problem);
|
||||
|
||||
void slotClicked(int, int);
|
||||
|
||||
signals:
|
||||
void fileOpen(const KURL &, const QString &);
|
||||
void setLine(const QString &);
|
||||
void showingErrorMessage(QWidget *);
|
||||
|
||||
protected:
|
||||
QPopupMenu* createPopupMenu (const QPoint & pos);
|
||||
|
||||
protected slots:
|
||||
void handlePopup(int);
|
||||
|
||||
private:
|
||||
KileInfo *m_info;
|
||||
int m_idWarning, m_idBadBox;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,234 @@
|
||||
/***************************************************************************
|
||||
begin : Sat Sept 9 2003
|
||||
edit : Tue Mar 20 2007
|
||||
copyright : (C) 2003 by Jeroen Wijnhout, 2007 by Thomas Braun
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "kilelyxserver.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h> //getenv
|
||||
#include <unistd.h> //read
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "kileactions.h"
|
||||
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qsocketnotifier.h>
|
||||
#include <qregexp.h>
|
||||
#include <qdir.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
#include <klocale.h>
|
||||
|
||||
KileLyxServer::KileLyxServer(bool startMe) :
|
||||
m_perms( S_IRUSR | S_IWUSR ),m_running(false)
|
||||
{
|
||||
KILE_DEBUG() << "===KileLyxServer::KileLyxServer(bool" << startMe << ")===" << endl;
|
||||
m_pipeIn.setAutoDelete(true);
|
||||
m_notifier.setAutoDelete(true);
|
||||
|
||||
m_file.setAutoDelete(false);
|
||||
m_tempDir = new KTempDir();
|
||||
if(!m_tempDir)
|
||||
return;
|
||||
|
||||
m_tempDir->setAutoDelete(true);
|
||||
|
||||
m_links << ".lyxpipe.in" << ".lyx/lyxpipe.in";
|
||||
m_links << ".lyxpipe.out" << ".lyx/lyxpipe.out";
|
||||
|
||||
for(uint i = 0; i< m_links.count() ; i++)
|
||||
{
|
||||
m_pipes.append( m_tempDir->name() + m_links[i] );
|
||||
m_links[i].prepend(QDir::homeDirPath() + '/' );
|
||||
KILE_DEBUG() << "m_pipes[" << i << "]=" << m_pipes[i] << endl;
|
||||
KILE_DEBUG() << "m_links[" << i << "]=" << m_links[i] << endl;
|
||||
}
|
||||
|
||||
if (startMe)
|
||||
start();
|
||||
}
|
||||
|
||||
KileLyxServer::~KileLyxServer()
|
||||
{
|
||||
stop();
|
||||
removePipes();
|
||||
delete m_tempDir;
|
||||
}
|
||||
|
||||
bool KileLyxServer::start()
|
||||
{
|
||||
if (m_running)
|
||||
stop();
|
||||
|
||||
KILE_DEBUG() << "Starting the LyX server..." << endl;
|
||||
|
||||
if (openPipes())
|
||||
{
|
||||
QSocketNotifier *notifier;
|
||||
QPtrListIterator<QFile> it(m_pipeIn);
|
||||
while (it.current())
|
||||
{
|
||||
if ((*it)->name().right(3) == ".in" )
|
||||
{
|
||||
notifier = new QSocketNotifier((*it)->handle(), QSocketNotifier::Read, this);
|
||||
connect(notifier, SIGNAL(activated(int)), this, SLOT(receive(int)));
|
||||
m_notifier.append(notifier);
|
||||
KILE_DEBUG() << "Created notifier for " << (*it)->name() << endl;
|
||||
}
|
||||
else
|
||||
KILE_DEBUG() << "No notifier created for " << (*it)->name() << endl;
|
||||
++it;
|
||||
}
|
||||
m_running=true;
|
||||
}
|
||||
|
||||
return m_running;
|
||||
}
|
||||
|
||||
bool KileLyxServer::openPipes()
|
||||
{
|
||||
KILE_DEBUG() << "===bool KileLyxServer::openPipes()===" << endl;
|
||||
|
||||
bool opened = false;
|
||||
QFileInfo pipeInfo,linkInfo;
|
||||
QFile *file;
|
||||
struct stat buf;
|
||||
struct stat *stats = &buf;
|
||||
|
||||
for (uint i=0; i < m_pipes.count(); ++i)
|
||||
{
|
||||
pipeInfo.setFile(m_pipes[i]);
|
||||
linkInfo.setFile(m_links[i]);
|
||||
|
||||
QFile::remove(linkInfo.absFilePath());
|
||||
linkInfo.refresh();
|
||||
|
||||
if ( !pipeInfo.exists() )
|
||||
{
|
||||
//create the dir first
|
||||
if ( !QFileInfo(pipeInfo.dirPath(true)).exists() )
|
||||
if ( mkdir(QFile::encodeName( pipeInfo.dirPath() ), m_perms | S_IXUSR) == -1 )
|
||||
{
|
||||
kdError() << "Could not create directory for pipe" << endl;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
KILE_DEBUG() << "Created directory " << pipeInfo.dirPath() << endl;
|
||||
|
||||
if ( mkfifo(QFile::encodeName( pipeInfo.absFilePath() ), m_perms) != 0 )
|
||||
{
|
||||
kdError() << "Could not create pipe: " << pipeInfo.absFilePath() << endl;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
KILE_DEBUG() << "Created pipe: " << pipeInfo.absFilePath() << endl;
|
||||
}
|
||||
|
||||
if ( symlink(QFile::encodeName(pipeInfo.absFilePath()),QFile::encodeName(linkInfo.absFilePath())) != 0 )
|
||||
{
|
||||
kdError() << "Could not create symlink: " << linkInfo.absFilePath() << " --> " << pipeInfo.absFilePath() << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
file = new QFile(pipeInfo.absFilePath());
|
||||
pipeInfo.refresh();
|
||||
|
||||
if( pipeInfo.exists() && file->open(IO_ReadWrite) ) // in that order we don't create the file if it does not exist
|
||||
{
|
||||
KILE_DEBUG() << "Opened file: " << pipeInfo.absFilePath() << endl;
|
||||
fstat(file->handle(),stats);
|
||||
if( !S_ISFIFO(stats->st_mode) )
|
||||
{
|
||||
kdError() << "The file " << pipeInfo.absFilePath() << "we just created is not a pipe!" << endl;
|
||||
file->close();
|
||||
delete file;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{ // everything is correct :)
|
||||
m_pipeIn.append(file);
|
||||
m_file.insert(file->handle(),file);
|
||||
opened=true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
kdError() << "Could not open " << pipeInfo.absFilePath() << endl;
|
||||
delete file;
|
||||
}
|
||||
}
|
||||
return opened;
|
||||
}
|
||||
|
||||
void KileLyxServer::stop()
|
||||
{
|
||||
KILE_DEBUG() << "Stopping the LyX server..." << endl;
|
||||
|
||||
QPtrListIterator<QFile> it(m_pipeIn);
|
||||
while (it.current())
|
||||
{
|
||||
(*it)->close();
|
||||
++it;
|
||||
}
|
||||
|
||||
m_pipeIn.clear();
|
||||
m_notifier.clear();
|
||||
|
||||
m_running=false;
|
||||
}
|
||||
|
||||
void KileLyxServer::removePipes()
|
||||
{
|
||||
for ( uint i = 0; i < m_links.count(); ++i)
|
||||
QFile::remove(m_links[i]);
|
||||
for ( uint i = 0; i < m_pipes.count(); ++i)
|
||||
QFile::remove(m_pipes[i]);
|
||||
|
||||
}
|
||||
|
||||
void KileLyxServer::processLine(const QString &line)
|
||||
{
|
||||
KILE_DEBUG() << "===void KileLyxServer::processLine(const QString " << line << ")===" << endl;
|
||||
|
||||
QRegExp reCite(":citation-insert:(.*)$");
|
||||
QRegExp reBibtexdbadd(":bibtex-database-add:(.*)$");
|
||||
QRegExp rePaste(":paste:(.*)$");
|
||||
|
||||
if( line.find(reCite) != -1 )
|
||||
emit(insert(KileAction::TagData(i18n("Cite"), "\\cite{"+reCite.cap(1)+'}')));
|
||||
else if( line.find(reBibtexdbadd) != -1 )
|
||||
emit(insert(KileAction::TagData(i18n("BibTeX db add"), "\\bibliography{"+ reBibtexdbadd.cap(1) + '}')));
|
||||
else if( line.find(rePaste) != -1)
|
||||
emit(insert(KileAction::TagData(i18n("Paste"), rePaste.cap(1))));
|
||||
}
|
||||
|
||||
void KileLyxServer::receive(int fd)
|
||||
{
|
||||
if (m_file[fd])
|
||||
{
|
||||
int bytesRead;
|
||||
int const size = 256;
|
||||
char buffer[size];
|
||||
if ((bytesRead = read(fd, buffer, size - 1)) > 0 )
|
||||
{
|
||||
buffer[bytesRead] = '\0'; // turn it into a c string
|
||||
QStringList cmds = QStringList::split('\n', QString(buffer).stripWhiteSpace());
|
||||
for ( uint i = 0; i < cmds.count(); ++i )
|
||||
processLine(cmds[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "kilelyxserver.moc"
|
@ -0,0 +1,77 @@
|
||||
/***************************************************************************
|
||||
begin : Sat Sept 9 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _LYXSERVER_H_
|
||||
#define _LYXSERVER_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qintdict.h>
|
||||
#include <qstringlist.h>
|
||||
#include <ktempdir.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/**
|
||||
* @short Simple server that impersonates as LyX to work with gBib, pyBibliographer etc.
|
||||
* @author Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
|
||||
* @author Thomas Braun
|
||||
* @version 0.2
|
||||
*/
|
||||
|
||||
class QFile;
|
||||
class QSocketNotifier;
|
||||
namespace KileAction { class TagData; }
|
||||
|
||||
class KileLyxServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileLyxServer(bool start = true);
|
||||
~KileLyxServer();
|
||||
|
||||
bool isRunning() { return m_running; }
|
||||
|
||||
public slots:
|
||||
bool start();
|
||||
void stop();
|
||||
|
||||
private slots:
|
||||
void receive(int);
|
||||
|
||||
private:
|
||||
bool openPipes();
|
||||
void removePipes();
|
||||
void processLine(const QString &);
|
||||
|
||||
signals:
|
||||
void insert(const KileAction::TagData &);
|
||||
|
||||
private:
|
||||
mode_t m_perms;
|
||||
KTempDir *m_tempDir;
|
||||
QPtrList<QFile> m_pipeIn;
|
||||
QPtrList<QSocketNotifier> m_notifier;
|
||||
QIntDict<QFile> m_file;
|
||||
bool m_running;
|
||||
QStringList m_links,m_pipes;
|
||||
};
|
||||
|
||||
#endif // _LYXSERVER_H_
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,316 @@
|
||||
/***************************************************************************
|
||||
kilemultitabbar.h - description
|
||||
-------------------
|
||||
begin : 2001
|
||||
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
***************************************************************************/
|
||||
|
||||
//FIXME: remove for the KDE4 version again
|
||||
|
||||
#ifndef _KileMultitabbar_h_
|
||||
#define _KileMultitabbar_h_
|
||||
|
||||
#include <qscrollview.h>
|
||||
#include <qvbox.h>
|
||||
#include <qhbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qstring.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
class QPixmap;
|
||||
class QPainter;
|
||||
class QFrame;
|
||||
|
||||
class KileMultiTabBarPrivate;
|
||||
class KileMultiTabBarTabPrivate;
|
||||
class KileMultiTabBarButtonPrivate;
|
||||
class KileMultiTabBarInternal;
|
||||
|
||||
/**
|
||||
* @ingroup main
|
||||
* @ingroup multitabbar
|
||||
* A Widget for horizontal and vertical tabs.
|
||||
* It is possible to add normal buttons to the top/left
|
||||
* The handling if only one tab at a time or multiple tabs
|
||||
* should be raisable is left to the "user".
|
||||
*@author Joseph Wenninger
|
||||
*/
|
||||
class KileMultiTabBar: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* The tab bar's orientation. Also constraints the bar's position.
|
||||
*/
|
||||
enum KileMultiTabBarMode {
|
||||
Horizontal, ///< Horizontal orientation (i.e. on top or bottom)
|
||||
Vertical ///< Vertical orientation (i.e. on the left or right hand side)
|
||||
};
|
||||
|
||||
/**
|
||||
* The tab bar's position
|
||||
*/
|
||||
enum KileMultiTabBarPosition {
|
||||
Left, ///< Left hand side
|
||||
Right, ///< Right hand side
|
||||
Top, ///< On top
|
||||
Bottom ///< On bottom
|
||||
};
|
||||
|
||||
/**
|
||||
* The list of available styles for KileMultiTabBar
|
||||
*/
|
||||
enum KileMultiTabBarStyle {
|
||||
VSNET=0, ///< Visual Studio .Net like (only show the text of active tabs)
|
||||
KDEV3=1, ///< KDevelop 3 like (always show the text)
|
||||
KONQSBC=2, ///< Konqueror's classic sidebar style (unthemed) (currently disabled)
|
||||
KDEV3ICON=3, ///< KDevelop 3 like with icons
|
||||
STYLELAST=0xffff ///< Last style
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param bm The tab bar's orientation
|
||||
* @param parent The parent widget
|
||||
* @param name The widget's name
|
||||
*/
|
||||
KileMultiTabBar(KileMultiTabBarMode bm,QWidget *parent=0,const char *name=0);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~KileMultiTabBar();
|
||||
|
||||
/**
|
||||
* append a new button to the button area. The button can later on be accessed with button(ID)
|
||||
* eg for connecting signals to it
|
||||
* @param pic a pixmap for the button
|
||||
* @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
|
||||
* if more than one button is connected to a signals.
|
||||
* @param popup A popup menu which should be displayed if the button is clicked
|
||||
* @param not_used_yet will be used for a popup text in the future
|
||||
*/
|
||||
int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null);
|
||||
/**
|
||||
* remove a button with the given ID
|
||||
*/
|
||||
void removeButton(int id);
|
||||
/**
|
||||
* append a new tab to the tab area. It can be accessed lateron with tabb(id);
|
||||
* @param pic a bitmap for the tab
|
||||
* @param id an arbitrary ID which can be used later on to identify the tab
|
||||
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
|
||||
* @return Always zero. Can be safely ignored.
|
||||
*/
|
||||
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
|
||||
/**
|
||||
* remove a tab with a given ID
|
||||
* @param id The ID of the tab to remove
|
||||
*/
|
||||
void removeTab(int id);
|
||||
/**
|
||||
* set a tab to "raised"
|
||||
* @param id The ID of the tab to manipulate
|
||||
* @param state true == activated/raised, false == not active
|
||||
*/
|
||||
void setTab(int id ,bool state);
|
||||
/**
|
||||
* return the state of a tab, identified by it's ID
|
||||
* @param id The ID of the tab to raise
|
||||
*/
|
||||
bool isTabRaised(int id) const;
|
||||
/**
|
||||
* get a pointer to a button within the button area identified by its ID
|
||||
* @param id The id of the tab
|
||||
*/
|
||||
class KileMultiTabBarButton *button(int id) const;
|
||||
|
||||
/**
|
||||
* get a pointer to a tab within the tab area, identified by its ID
|
||||
*/
|
||||
class KileMultiTabBarTab *tab(int id) const;
|
||||
/**
|
||||
* set the real position of the widget.
|
||||
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
|
||||
*/
|
||||
void setPosition(KileMultiTabBarPosition pos);
|
||||
/**
|
||||
* get the tabbar position.
|
||||
* @return The tab bar's position
|
||||
*/
|
||||
KileMultiTabBarPosition position() const;
|
||||
/**
|
||||
* set the display style of the tabs
|
||||
* @param style The new display style
|
||||
*/
|
||||
void setStyle(KileMultiTabBarStyle style);
|
||||
/**
|
||||
* get the display style of the tabs
|
||||
* @return display style
|
||||
*/
|
||||
KileMultiTabBarStyle tabStyle() const;
|
||||
/**
|
||||
* Returns the list of pointers to the tabs of type KileMultiTabBarTab.
|
||||
* @return The list of tabs.
|
||||
* @warning be careful, don't delete tabs yourself and don't delete the list itself
|
||||
*/
|
||||
QPtrList<KileMultiTabBarTab>* tabs();
|
||||
/**
|
||||
* Returns the list of pointers to the tab buttons of type KileMultiTabBarButton.
|
||||
* @return The list of tab buttons.
|
||||
* @warning be careful, don't delete buttons yourself and don't delete the list itself
|
||||
*/
|
||||
QPtrList<KileMultiTabBarButton>* buttons();
|
||||
|
||||
/**
|
||||
* might vanish, not sure yet
|
||||
*/
|
||||
void showActiveTabTexts(bool show=true);
|
||||
protected:
|
||||
friend class KileMultiTabBarButton;
|
||||
virtual void fontChange( const QFont& );
|
||||
void updateSeparator();
|
||||
private:
|
||||
class KileMultiTabBarInternal *m_internal;
|
||||
QBoxLayout *m_l;
|
||||
QFrame *m_btnTabSep;
|
||||
QPtrList<KileMultiTabBarButton> m_buttons;
|
||||
KileMultiTabBarPosition m_position;
|
||||
KileMultiTabBarPrivate *d;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup multitabbar
|
||||
* This class represents a tab bar button in a KileMultiTabBarWidget.
|
||||
* This class should never be created except with the appendButton call of KileMultiTabBar
|
||||
*/
|
||||
class KileMultiTabBarButton: public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/** @internal */
|
||||
KileMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup,
|
||||
int id,QWidget *parent, KileMultiTabBar::KileMultiTabBarPosition pos, KileMultiTabBar::KileMultiTabBarStyle style);
|
||||
/** @internal */
|
||||
KileMultiTabBarButton(const QString&, QPopupMenu *popup,
|
||||
int id,QWidget *parent, KileMultiTabBar::KileMultiTabBarPosition pos, KileMultiTabBar::KileMultiTabBarStyle style);
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~KileMultiTabBarButton();
|
||||
/**
|
||||
* Returns the tab's ID
|
||||
* @return The tab's ID
|
||||
*/
|
||||
int id() const;
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* this is used internaly, but can be used by the user, if (s)he wants to
|
||||
* It the according call of KileMultiTabBar is invoked though this modifications will be overwritten
|
||||
*/
|
||||
void setPosition(KileMultiTabBar::KileMultiTabBarPosition);
|
||||
/**
|
||||
* this is used internaly, but can be used by the user, if (s)he wants to
|
||||
* It the according call of KileMultiTabBar is invoked though this modifications will be overwritten
|
||||
*/
|
||||
void setStyle(KileMultiTabBar::KileMultiTabBarStyle);
|
||||
|
||||
/**
|
||||
* modify the text of the button
|
||||
*/
|
||||
void setText(const QString &);
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
protected:
|
||||
KileMultiTabBar::KileMultiTabBarPosition m_position;
|
||||
KileMultiTabBar::KileMultiTabBarStyle m_style;
|
||||
QString m_text;
|
||||
virtual void hideEvent( class QHideEvent*);
|
||||
virtual void showEvent( class QShowEvent*);
|
||||
private:
|
||||
int m_id;
|
||||
KileMultiTabBarButtonPrivate *d;
|
||||
signals:
|
||||
/**
|
||||
* this is emitted if the button is clicked
|
||||
* @param id the ID identifying the button
|
||||
*/
|
||||
void clicked(int id);
|
||||
protected slots:
|
||||
virtual void slotClicked();
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup multitabbar
|
||||
* This class represents a tab bar's tab in a KileMultiTabBarWidget.
|
||||
* This class should never be created except with the appendTab call of KileMultiTabBar
|
||||
*/
|
||||
class KileMultiTabBarTab: public KileMultiTabBarButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/** @internal */
|
||||
KileMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
|
||||
KileMultiTabBar::KileMultiTabBarPosition pos,KileMultiTabBar::KileMultiTabBarStyle style);
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~KileMultiTabBarTab();
|
||||
/**
|
||||
* set the active state of the tab
|
||||
* @param state @c true if the tab should become active, @c false otherwise
|
||||
*/
|
||||
void setState(bool state);
|
||||
/**
|
||||
* choose if the text should always be displayed
|
||||
* this is only used in classic mode if at all
|
||||
* @param show Whether or not to show the text
|
||||
*/
|
||||
void showActiveTabText(bool show);
|
||||
/**
|
||||
* Resized the tab to the needed size.
|
||||
*/
|
||||
void resize(){ setSize( neededSize() ); }
|
||||
private:
|
||||
bool m_showActiveTabText;
|
||||
int m_expandedSize;
|
||||
KileMultiTabBarTabPrivate *d;
|
||||
protected:
|
||||
friend class KileMultiTabBarInternal;
|
||||
void setSize(int);
|
||||
int neededSize();
|
||||
void updateState();
|
||||
virtual void drawButton(QPainter *);
|
||||
virtual void drawButtonLabel(QPainter *);
|
||||
void drawButtonStyled(QPainter *);
|
||||
void drawButtonClassic(QPainter *);
|
||||
protected slots:
|
||||
virtual void slotClicked();
|
||||
void setTabsPosition(KileMultiTabBar::KileMultiTabBarPosition);
|
||||
|
||||
public slots:
|
||||
virtual void setIcon(const QString&);
|
||||
virtual void setIcon(const QPixmap&);
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,69 @@
|
||||
/***************************************************************************
|
||||
kilemultitabbar_p.h - description
|
||||
-------------------
|
||||
begin : 2003
|
||||
copyright : (C) 2003 by Joseph Wenninger <jowenn@kde.org>
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
***************************************************************************/
|
||||
|
||||
//FIXME: remove for the KDE4 version again
|
||||
|
||||
#ifndef KILE_MULTI_TAB_BAR_P_H
|
||||
#define KILE_MULTI_TAB_BAR_P_H
|
||||
#include <qscrollview.h>
|
||||
#include <kmultitabbar.h>
|
||||
|
||||
class KileMultiTabBarInternal: public QScrollView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KileMultiTabBarInternal(QWidget *parent,KileMultiTabBar::KileMultiTabBarMode bm);
|
||||
int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
|
||||
KileMultiTabBarTab *tab(int) const;
|
||||
void removeTab(int);
|
||||
void setPosition(enum KileMultiTabBar::KileMultiTabBarPosition pos);
|
||||
void setStyle(enum KileMultiTabBar::KileMultiTabBarStyle style);
|
||||
void showActiveTabTexts(bool show);
|
||||
QPtrList<KileMultiTabBarTab>* tabs(){return &m_tabs;}
|
||||
private:
|
||||
friend class KileMultiTabBar;
|
||||
QWidget *box;
|
||||
QBoxLayout *mainLayout;
|
||||
QPtrList<KileMultiTabBarTab> m_tabs;
|
||||
enum KileMultiTabBar::KileMultiTabBarPosition m_position;
|
||||
bool m_showActiveTabTexts;
|
||||
enum KileMultiTabBar::KileMultiTabBarStyle m_style;
|
||||
int m_expandedTabSize;
|
||||
int m_lines;
|
||||
KileMultiTabBar::KileMultiTabBarMode m_barMode;
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *,QEvent*);
|
||||
virtual void drawContents ( QPainter *, int, int, int, int);
|
||||
|
||||
/**
|
||||
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
|
||||
* in order to ignore all mouseEvents on the viewport, so that the
|
||||
* parent can handle them.
|
||||
*/
|
||||
virtual void contentsMousePressEvent(QMouseEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
};
|
||||
#endif
|
||||
|
@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Dec 21 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include "kileoutputwidget.h"
|
||||
#include "kiledebug.h"
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
Output::Output(QWidget *parent, const char * name) : KTextEdit(parent, name)
|
||||
{
|
||||
setTextFormat(Qt::LogText);
|
||||
}
|
||||
|
||||
Output::~Output()
|
||||
{}
|
||||
|
||||
void Output::receive(const QString & str)
|
||||
{
|
||||
static QString line = "";
|
||||
|
||||
//find newline symbol
|
||||
//only output if we have receive one or more
|
||||
//full lines of text
|
||||
int newLineAt = str.findRev('\n');
|
||||
if ( newLineAt != -1 )
|
||||
{
|
||||
line += str.left(newLineAt); //don't copy the newline char
|
||||
line.replace('<',"<");
|
||||
line.replace('>',">");
|
||||
append(line);
|
||||
line = str.mid(newLineAt + 1);
|
||||
}
|
||||
else
|
||||
line += str;
|
||||
}
|
||||
}
|
||||
|
||||
#include "kileoutputwidget.moc"
|
@ -0,0 +1,37 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Dec 21 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#ifndef KILEWIDGET_OUTPUTMSG_H
|
||||
#define KILEWIDGET_OUTPUTMSG_H
|
||||
|
||||
#include <ktextedit.h>
|
||||
|
||||
namespace KileWidget
|
||||
{
|
||||
class Output : public KTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Output(QWidget *parent, const char *name=0);
|
||||
~Output();
|
||||
|
||||
void setReadOnly(bool r) { QTextEdit::setReadOnly(r); } //we don't want the greyed background
|
||||
|
||||
public slots:
|
||||
void receive(const QString &);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,813 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Aug 1 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
: (C) 2007 by Holger Danielsson
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2007-03-12 dani
|
||||
// - use KileDocument::Extensions
|
||||
// - allowed extensions are always defined as list, f.e.: .tex .ltx .latex
|
||||
|
||||
#include "kileproject.h"
|
||||
#include "kileversion.h"
|
||||
|
||||
#include <qstringlist.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
|
||||
#include <ksimpleconfig.h>
|
||||
#include <klocale.h>
|
||||
#include <kglobal.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kmessagebox.h>
|
||||
|
||||
#include "kiledocumentinfo.h"
|
||||
#include "kiledocmanager.h"
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kileinfo.h"
|
||||
#include "kileextensions.h"
|
||||
#include <krun.h>
|
||||
/*
|
||||
01/24/06 tbraun
|
||||
Added the logic to get versioned kilepr files
|
||||
We also warn if the user wants to open a project file with a different kileprversion
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* KileProjectItem
|
||||
*/
|
||||
KileProjectItem::KileProjectItem(KileProject *project, const KURL & url, int type) :
|
||||
m_project(project),
|
||||
m_url(url),
|
||||
m_type(type),
|
||||
m_docinfo(0L),
|
||||
m_parent(0L),
|
||||
m_child(0L),
|
||||
m_sibling(0L),
|
||||
m_nLine(0),
|
||||
m_order(-1)
|
||||
{
|
||||
m_highlight=m_encoding=QString::null;
|
||||
m_bOpen = m_archive = true;
|
||||
|
||||
if (project)
|
||||
project->add(this);
|
||||
}
|
||||
|
||||
void KileProjectItem::setOrder(int i)
|
||||
{
|
||||
m_order = i;
|
||||
}
|
||||
|
||||
void KileProjectItem::setParent(KileProjectItem * item)
|
||||
{
|
||||
m_parent = item;
|
||||
|
||||
//update parent info
|
||||
if (m_parent)
|
||||
{
|
||||
if (m_parent->firstChild())
|
||||
{
|
||||
//get last child
|
||||
KileProjectItem *sib = m_parent->firstChild();
|
||||
while (sib->sibling())
|
||||
sib = sib->sibling();
|
||||
|
||||
sib->setSibling(this);
|
||||
}
|
||||
else
|
||||
m_parent->setChild(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
setChild(0);
|
||||
setSibling(0);
|
||||
}
|
||||
}
|
||||
|
||||
void KileProjectItem::print(int level)
|
||||
{
|
||||
QString str;
|
||||
str.fill('\t', level);
|
||||
KILE_DEBUG() << str << "+" << url().fileName() << endl;
|
||||
|
||||
if (firstChild())
|
||||
firstChild()->print(++level);
|
||||
|
||||
if (sibling())
|
||||
sibling()->print(level);
|
||||
}
|
||||
|
||||
void KileProjectItem::allChildren(QPtrList<KileProjectItem> *list) const
|
||||
{
|
||||
KileProjectItem *item = firstChild();
|
||||
|
||||
// KILE_DEBUG() << "\tKileProjectItem::allChildren(" << list->count() << ")" << endl;
|
||||
while(item != 0)
|
||||
{
|
||||
list->append(item);
|
||||
// KILE_DEBUG() << "\t\tappending " << item->url().fileName() << endl;
|
||||
item->allChildren(list);
|
||||
item = item->sibling();
|
||||
}
|
||||
}
|
||||
|
||||
void KileProjectItem::setInfo(KileDocument::TextInfo *docinfo)
|
||||
{
|
||||
m_docinfo = docinfo;
|
||||
if(docinfo)
|
||||
{
|
||||
connect(docinfo,SIGNAL(urlChanged(KileDocument::Info*, const KURL &)), this, SLOT(slotChangeURL(KileDocument::Info*, const KURL &)));
|
||||
connect(docinfo,SIGNAL(depChanged()), m_project, SLOT(buildProjectTree()));
|
||||
}
|
||||
}
|
||||
|
||||
void KileProjectItem::changeURL(const KURL &url)
|
||||
{
|
||||
// don't allow empty URLs
|
||||
if(!url.isEmpty() && m_url != url)
|
||||
{
|
||||
m_url = url;
|
||||
emit(urlChanged(this));
|
||||
}
|
||||
}
|
||||
|
||||
void KileProjectItem::slotChangeURL(KileDocument::Info*, const KURL &url)
|
||||
{
|
||||
changeURL(url);
|
||||
}
|
||||
|
||||
/*
|
||||
* KileProject
|
||||
*/
|
||||
KileProject::KileProject(const QString& name, const KURL& url, KileDocument::Extensions *extensions) : QObject(0,name.ascii()), m_invalid(false), m_masterDocument(QString::null), m_useMakeIndexOptions(false)
|
||||
{
|
||||
init(name, url, extensions);
|
||||
}
|
||||
|
||||
KileProject::KileProject(const KURL& url, KileDocument::Extensions *extensions) : QObject(0,url.fileName().ascii()), m_invalid(false), m_masterDocument(QString::null), m_useMakeIndexOptions(false)
|
||||
{
|
||||
init(url.fileName(), url, extensions);
|
||||
}
|
||||
|
||||
KileProject::~KileProject()
|
||||
{
|
||||
KILE_DEBUG() << "DELETING KILEPROJECT " << m_projecturl.url() << endl;
|
||||
delete m_config;
|
||||
}
|
||||
|
||||
void KileProject::init(const QString& name, const KURL& url, KileDocument::Extensions *extensions)
|
||||
{
|
||||
m_name = name;
|
||||
m_projecturl = KileDocument::Manager::symlinkFreeURL( url);;
|
||||
|
||||
m_projectitems.setAutoDelete(true);
|
||||
|
||||
m_config = new KSimpleConfig(m_projecturl.path());
|
||||
m_extmanager = extensions;
|
||||
|
||||
m_baseurl = m_projecturl.directory();
|
||||
m_baseurl.cleanPath(true);
|
||||
|
||||
KILE_DEBUG() << "KileProject m_baseurl = " << m_baseurl.path() << endl;
|
||||
|
||||
if (QFileInfo(url.path()).exists())
|
||||
{
|
||||
load();
|
||||
}
|
||||
else
|
||||
{
|
||||
//create the project file
|
||||
m_config->setGroup("General");
|
||||
m_config->writeEntry("name", m_name);
|
||||
m_config->writeEntry("kileprversion", kilePrVersion);
|
||||
m_config->writeEntry("kileversion", kileVersion);
|
||||
m_config->sync();
|
||||
}
|
||||
}
|
||||
|
||||
void KileProject::setLastDocument(const KURL &url)
|
||||
{
|
||||
if ( item(url) != 0 )
|
||||
m_lastDocument = KileDocument::Manager::symlinkFreeURL(url);
|
||||
}
|
||||
|
||||
void KileProject::setExtensions(KileProjectItem::Type type, const QString & ext)
|
||||
{
|
||||
if (type<KileProjectItem::Source || type>KileProjectItem::Image)
|
||||
{
|
||||
kdWarning() << "ERROR: TYPE<1 or TYPE>3" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// first we take all standard extensions
|
||||
QStringList standardExtList;
|
||||
if ( type == KileProjectItem::Source )
|
||||
standardExtList = QStringList::split(" ", m_extmanager->latexDocuments() );
|
||||
else if ( type == KileProjectItem::Package )
|
||||
standardExtList = QStringList::split(" ", m_extmanager->latexPackages() );
|
||||
else // if ( type == KileProjectItem::Image )
|
||||
standardExtList = QStringList::split(" ", m_extmanager->images() );
|
||||
|
||||
// now we scan user defined list and accept all extension,
|
||||
// except standard extensions of course
|
||||
QString userExt;
|
||||
if ( ! ext.isEmpty() )
|
||||
{
|
||||
QStringList userExtList;
|
||||
|
||||
QStringList::ConstIterator it;
|
||||
QStringList list = QStringList::split(" ", ext);
|
||||
for ( it=list.begin(); it != list.end(); ++it )
|
||||
{
|
||||
// some tiny extension checks
|
||||
if ( (*it).length()<2 || (*it)[0]!='.' )
|
||||
continue;
|
||||
|
||||
// some of the old definitions are wrong, so we test them all
|
||||
if ( type==KileProjectItem::Source || type==KileProjectItem::Package)
|
||||
{
|
||||
if ( ! (m_extmanager->isLatexDocument(*it) || m_extmanager->isLatexPackage(*it)) )
|
||||
{
|
||||
standardExtList << (*it);
|
||||
userExtList << (*it);
|
||||
}
|
||||
}
|
||||
else // if ( type == KileProjectItem::Image )
|
||||
{
|
||||
if ( ! m_extmanager->isImage(*it) )
|
||||
{
|
||||
standardExtList << (*it);
|
||||
userExtList << (*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( userExtList.count() > 0 )
|
||||
userExt = userExtList.join(" ");
|
||||
}
|
||||
|
||||
// now we build a regular expression for all extensions
|
||||
// (used to search for a filename with a valid extension)
|
||||
QString pattern = standardExtList.join("|");
|
||||
pattern.replace(".","\\.");
|
||||
pattern = '('+ pattern +")$";
|
||||
|
||||
// and save it
|
||||
m_reExtensions[type-1].setPattern(pattern);
|
||||
|
||||
// if the list of user defined extensions has changed
|
||||
// we save the new value and (re)build the project tree
|
||||
if (m_extensions[type-1] != userExt)
|
||||
{
|
||||
m_extensions[type-1] = userExt;
|
||||
buildProjectTree();
|
||||
}
|
||||
}
|
||||
|
||||
void KileProject::setType(KileProjectItem *item)
|
||||
{
|
||||
if ( item->path().right(7) == ".kilepr" )
|
||||
{
|
||||
item->setType(KileProjectItem::ProjectFile);
|
||||
return;
|
||||
}
|
||||
|
||||
bool unknown = true;
|
||||
for (int i = KileProjectItem::Source; i < KileProjectItem::Other; ++i)
|
||||
{
|
||||
if ( m_reExtensions[i-1].search(item->url().fileName()) != -1)
|
||||
{
|
||||
item->setType(i);
|
||||
unknown = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (unknown)
|
||||
item->setType(KileProjectItem::Other);
|
||||
}
|
||||
|
||||
void KileProject::readMakeIndexOptions()
|
||||
{
|
||||
QString grp = KileTool::groupFor("MakeIndex", m_config);
|
||||
|
||||
//get the default value
|
||||
KConfig *cfg = KGlobal::config();
|
||||
cfg->setGroup(KileTool::groupFor("MakeIndex", KileTool::configName("MakeIndex", cfg)));
|
||||
QString deflt = cfg->readEntry("options", "'%S'.idx");
|
||||
|
||||
if ( useMakeIndexOptions() && !grp.isEmpty() )
|
||||
{
|
||||
m_config->setGroup(grp);
|
||||
QString val = m_config->readEntry("options", deflt);
|
||||
if ( val.isEmpty() ) val = deflt;
|
||||
setMakeIndexOptions(val);
|
||||
}
|
||||
else //use default value
|
||||
setMakeIndexOptions(deflt);
|
||||
}
|
||||
|
||||
void KileProject::writeUseMakeIndexOptions()
|
||||
{
|
||||
if ( useMakeIndexOptions() )
|
||||
KileTool::setConfigName("MakeIndex", "Default", m_config);
|
||||
else
|
||||
KileTool::setConfigName("MakeIndex", "", m_config);
|
||||
}
|
||||
|
||||
QString KileProject::addBaseURL(const QString &path)
|
||||
{
|
||||
KILE_DEBUG() << "===addBaseURL(const QString & " << path << " )" << endl;
|
||||
if ( path.isEmpty())
|
||||
return path;
|
||||
else if ( path.startsWith("/") )
|
||||
return KileDocument::Manager::symlinkFreeURL(KURL::fromPathOrURL(path)).path();
|
||||
else
|
||||
return KileDocument::Manager::symlinkFreeURL(KURL::fromPathOrURL(m_baseurl.path() + '/' +path)).path();
|
||||
}
|
||||
|
||||
QString KileProject::removeBaseURL(const QString &path)
|
||||
{
|
||||
|
||||
if ( path.startsWith("/") )
|
||||
{
|
||||
QFileInfo info(path);
|
||||
QString relPath = findRelativePath(path);
|
||||
KILE_DEBUG() << "removeBaseURL path is" << path << " , relPath is " << relPath << endl;
|
||||
return relPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
bool KileProject::load()
|
||||
{
|
||||
KILE_DEBUG() << "KileProject: loading..." <<endl;
|
||||
|
||||
//load general settings/options
|
||||
m_config->setGroup("General");
|
||||
m_name = m_config->readEntry("name", i18n("Project"));
|
||||
m_kileversion = m_config->readEntry("kileversion",QString::null);
|
||||
m_kileprversion = m_config->readEntry("kileprversion",QString::null);
|
||||
|
||||
if(!m_kileprversion.isNull() && m_kileprversion.toInt() > kilePrVersion.toInt())
|
||||
{
|
||||
if(KMessageBox::warningYesNo(0L,i18n("The project file of %1 was created by a newer version of kile.\
|
||||
Opening it can lead to unexpected results.\n\
|
||||
Do you really want to continue (not recommended)?").arg(m_name),
|
||||
QString::null, KStdGuiItem::yes(), KStdGuiItem::no(),QString::null,KMessageBox::Dangerous) == KMessageBox::No)
|
||||
{
|
||||
m_invalid=true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QString master = addBaseURL(m_config->readEntry("masterDocument", QString::null));
|
||||
KILE_DEBUG() << "masterDoc == " << master << endl;
|
||||
setMasterDocument(master);
|
||||
|
||||
setExtensions(KileProjectItem::Source, m_config->readEntry("src_extensions",m_extmanager->latexDocuments()));
|
||||
setExtensions(KileProjectItem::Package, m_config->readEntry("pkg_extensions",m_extmanager->latexPackages()));
|
||||
setExtensions(KileProjectItem::Image, m_config->readEntry("img_extensions",m_extmanager->images()));
|
||||
|
||||
setQuickBuildConfig(KileTool::configName("QuickBuild", m_config));
|
||||
|
||||
if( KileTool::configName("MakeIndex",m_config).compare("Default") == 0)
|
||||
setUseMakeIndexOptions(true);
|
||||
else
|
||||
setUseMakeIndexOptions(false);
|
||||
|
||||
readMakeIndexOptions();
|
||||
|
||||
KURL url;
|
||||
KileProjectItem *item;
|
||||
QStringList groups = m_config->groupList();
|
||||
|
||||
//retrieve all the project files and create and initialize project items for them
|
||||
for (uint i=0; i < groups.count(); ++i)
|
||||
{
|
||||
if (groups[i].left(5) == "item:")
|
||||
{
|
||||
QString path = groups[i].mid(5);
|
||||
if (path[0] == '/' )
|
||||
{
|
||||
url = KURL::fromPathOrURL(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
url = m_baseurl;
|
||||
url.addPath(path);
|
||||
url.cleanPath(true);
|
||||
}
|
||||
item = new KileProjectItem(this, KileDocument::Manager::symlinkFreeURL(url));
|
||||
setType(item);
|
||||
|
||||
m_config->setGroup(groups[i]);
|
||||
item->setOpenState(m_config->readBoolEntry("open", true));
|
||||
item->setEncoding(m_config->readEntry("encoding", QString::null));
|
||||
item->setHighlight(m_config->readEntry("highlight",QString::null));
|
||||
item->setArchive(m_config->readBoolEntry("archive", true));
|
||||
item->setLineNumber(m_config->readNumEntry("line", 0));
|
||||
item->setColumnNumber(m_config->readNumEntry("column", 0));
|
||||
item->setOrder(m_config->readNumEntry("order", -1));
|
||||
item->changePath(groups[i].mid(5));
|
||||
|
||||
connect(item, SIGNAL(urlChanged(KileProjectItem*)), this, SLOT(itemRenamed(KileProjectItem*)) );
|
||||
}
|
||||
}
|
||||
|
||||
// only call this after all items are created, otherwise setLastDocument doesn't accept the url
|
||||
m_config->setGroup("General");
|
||||
setLastDocument(KURL::fromPathOrURL(addBaseURL(m_config->readEntry("lastDocument", QString::null))));
|
||||
|
||||
// dump();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool KileProject::save()
|
||||
{
|
||||
KILE_DEBUG() << "KileProject: saving..." <<endl;
|
||||
|
||||
m_config->setGroup("General");
|
||||
m_config->writeEntry("name", m_name);
|
||||
m_config->writeEntry("kileprversion", kilePrVersion);
|
||||
m_config->writeEntry("kileversion", kileVersion);
|
||||
|
||||
KILE_DEBUG() << "KileProject::save() masterDoc = " << removeBaseURL(m_masterDocument) << endl;
|
||||
m_config->writeEntry("masterDocument", removeBaseURL(m_masterDocument));
|
||||
m_config->writeEntry("lastDocument", removeBaseURL(m_lastDocument.path()));
|
||||
|
||||
|
||||
writeConfigEntry("src_extensions",m_extmanager->latexDocuments(),KileProjectItem::Source);
|
||||
writeConfigEntry("pkg_extensions",m_extmanager->latexPackages(),KileProjectItem::Package);
|
||||
writeConfigEntry("img_extensions",m_extmanager->images(),KileProjectItem::Image);
|
||||
// only to avoid problems with older versions
|
||||
m_config->writeEntry("src_extIsRegExp", false);
|
||||
m_config->writeEntry("pkg_extIsRegExp", false);
|
||||
m_config->writeEntry("img_extIsRegExp", false);
|
||||
|
||||
KileProjectItem *item;
|
||||
for (uint i=0; i < m_projectitems.count(); ++i)
|
||||
{
|
||||
item = m_projectitems.at(i);
|
||||
m_config->setGroup("item:"+item->path());
|
||||
m_config->writeEntry("open", item->isOpen());
|
||||
m_config->writeEntry("encoding", item->encoding());
|
||||
m_config->writeEntry("highlight", item->highlight());
|
||||
m_config->writeEntry("archive", item->archive());
|
||||
m_config->writeEntry("line", item->lineNumber());
|
||||
m_config->writeEntry("column", item->columnNumber());
|
||||
m_config->writeEntry("order", item->order());
|
||||
}
|
||||
|
||||
KileTool::setConfigName("QuickBuild", quickBuildConfig(), m_config);
|
||||
|
||||
writeUseMakeIndexOptions();
|
||||
if ( useMakeIndexOptions() )
|
||||
{
|
||||
|
||||
QString grp = KileTool::groupFor("MakeIndex", m_config);
|
||||
if ( grp.isEmpty() ) grp = "Default";
|
||||
m_config->setGroup(grp);
|
||||
m_config->writeEntry("options", makeIndexOptions() );
|
||||
}
|
||||
|
||||
m_config->sync();
|
||||
|
||||
// dump();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void KileProject::writeConfigEntry(const QString &key, const QString &standardExt, KileProjectItem::Type type)
|
||||
{
|
||||
QString userExt = extensions(type);
|
||||
if ( userExt.isEmpty() )
|
||||
m_config->writeEntry(key,standardExt);
|
||||
else
|
||||
m_config->writeEntry(key,standardExt + ' ' + extensions(type));
|
||||
}
|
||||
|
||||
void KileProject::buildProjectTree()
|
||||
{
|
||||
KILE_DEBUG() << "==KileProject::buildProjectTree==========================" << endl;
|
||||
|
||||
//determine the parent doc for each item (TODO:an item can only have one parent, not necessarily true for LaTeX docs)
|
||||
|
||||
const QStringList *deps;
|
||||
QString dep;
|
||||
KileProjectItem *itm;
|
||||
KURL url;
|
||||
QPtrListIterator<KileProjectItem> it(m_projectitems);
|
||||
|
||||
//clean first
|
||||
while (it.current())
|
||||
{
|
||||
(*it)->setParent(0);
|
||||
++it;
|
||||
}
|
||||
|
||||
//use the dependencies list of the documentinfo object to determine the parent
|
||||
it.toFirst();
|
||||
while (it.current())
|
||||
{
|
||||
//set the type correctly (changing m_extensions causes a call to buildProjectTree)
|
||||
setType(*it);
|
||||
|
||||
if ( (*it)->getInfo() )
|
||||
{
|
||||
deps = (*it)->getInfo()->dependencies();
|
||||
for (uint i=0; i < deps->count(); ++i)
|
||||
{
|
||||
dep = (*deps)[i];
|
||||
|
||||
if( m_extmanager->isTexFile(dep) )
|
||||
url = KileInfo::checkOtherPaths(m_baseurl,dep,KileInfo::texinputs);
|
||||
else if( m_extmanager->isBibFile(dep) )
|
||||
url = KileInfo::checkOtherPaths(m_baseurl,dep,KileInfo::bibinputs);
|
||||
|
||||
itm = item(url);
|
||||
if (itm && (itm->parent() == 0))
|
||||
itm->setParent(*it);
|
||||
}
|
||||
}
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
//make a list of all the root items (items with parent == 0)
|
||||
m_rootItems.clear();
|
||||
it.toFirst();
|
||||
while (it.current())
|
||||
{
|
||||
if ((*it)->parent() == 0) m_rootItems.append(*it);
|
||||
++it;
|
||||
}
|
||||
|
||||
emit(projectTreeChanged(this));
|
||||
}
|
||||
|
||||
KileProjectItem* KileProject::item(const KURL & url)
|
||||
{
|
||||
QPtrListIterator<KileProjectItem> it(m_projectitems);
|
||||
while (it.current())
|
||||
{
|
||||
if ((*it)->url() == url)
|
||||
return *it;
|
||||
++it;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
KileProjectItem* KileProject::item(const KileDocument::Info *info)
|
||||
{
|
||||
QPtrListIterator<KileProjectItem> it(m_projectitems);
|
||||
KileProjectItem *current;
|
||||
while ((current = it.current()) != 0)
|
||||
{
|
||||
++it;
|
||||
if (current->getInfo() == info)
|
||||
{
|
||||
return current;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KileProject::add(KileProjectItem* item)
|
||||
{
|
||||
KILE_DEBUG() << "KileProject::add projectitem" << item->url().path() << endl;
|
||||
|
||||
setType(item);
|
||||
|
||||
item->changePath(findRelativePath(item->url()));
|
||||
connect(item, SIGNAL(urlChanged(KileProjectItem*)), this, SLOT(itemRenamed(KileProjectItem*)) );
|
||||
|
||||
m_projectitems.append(item);
|
||||
|
||||
// dump();
|
||||
}
|
||||
|
||||
void KileProject::remove(const KileProjectItem* item)
|
||||
{
|
||||
if (m_config->hasGroup("item:"+item->path()))
|
||||
m_config->deleteGroup("item:"+item->path());
|
||||
else
|
||||
kdWarning() << "KileProject::remove() Failed to delete the group corresponding to this item!!!" <<endl;
|
||||
|
||||
KILE_DEBUG() << "KileProject::remove" << endl;
|
||||
m_projectitems.remove(item);
|
||||
|
||||
// dump();
|
||||
}
|
||||
|
||||
void KileProject::itemRenamed(KileProjectItem *item)
|
||||
{
|
||||
KILE_DEBUG() << "==KileProject::itemRenamed==========================" << endl;
|
||||
KILE_DEBUG() << "\t" << item->url().fileName() << endl;
|
||||
m_config->deleteGroup("item:"+item->path());
|
||||
//config.sync();
|
||||
|
||||
item->changePath(findRelativePath(item->url()));
|
||||
}
|
||||
|
||||
QString KileProject::findRelativePath(const KURL &url)
|
||||
{
|
||||
QString basepath = m_baseurl.path();
|
||||
QString path = url.directory();
|
||||
QString filename = url.fileName();
|
||||
|
||||
KILE_DEBUG() <<"===findRelativeURL==================" << endl;
|
||||
KILE_DEBUG() << "\tbasepath : " << basepath << " path: " << path << endl;
|
||||
|
||||
// if ( basepath == path )
|
||||
// {
|
||||
// return "./";
|
||||
// }
|
||||
|
||||
QStringList basedirs = QStringList::split("/", basepath, false);
|
||||
QStringList dirs = QStringList::split("/", path, false);
|
||||
|
||||
uint nDirs = dirs.count();
|
||||
//uint nBaseDirs = basedirs.count();
|
||||
|
||||
// for (uint i=0; i < basedirs.count(); ++i)
|
||||
// {
|
||||
// KILE_DEBUG() << "\t\tbasedirs " << i << ": " << basedirs[i] << endl;
|
||||
// }
|
||||
|
||||
// for (uint i=0; i < dirs.count(); ++i)
|
||||
// {
|
||||
// KILE_DEBUG() << "\t\tdirs " << i << ": " << dirs[i] << endl;
|
||||
// }
|
||||
|
||||
while ( dirs.count() > 0 && basedirs.count() > 0 && dirs[0] == basedirs[0] )
|
||||
{
|
||||
dirs.pop_front();
|
||||
basedirs.pop_front();
|
||||
}
|
||||
|
||||
// KILE_DEBUG() << "\tafter" << endl;
|
||||
// for (uint i=0; i < basedirs.count(); ++i)
|
||||
// {
|
||||
// KILE_DEBUG() << "\t\tbasedirs " << i << ": " << basedirs[i] << endl;
|
||||
// }
|
||||
//
|
||||
// for (uint i=0; i < dirs.count(); ++i)
|
||||
// {
|
||||
// KILE_DEBUG() << "\t\tdirs " << i << ": " << dirs[i] << endl;
|
||||
// }
|
||||
|
||||
if (nDirs != dirs.count() )
|
||||
{
|
||||
path = dirs.join("/");
|
||||
|
||||
if (basedirs.count() > 0)
|
||||
{
|
||||
for (uint j=0; j < basedirs.count(); ++j)
|
||||
{
|
||||
path = "../" + path;
|
||||
}
|
||||
}
|
||||
|
||||
if ( path.length() > 0 && path.right(1) != "/" ) path = path + '/';
|
||||
|
||||
path = path+filename;
|
||||
}
|
||||
else //assume an absolute path was requested
|
||||
{
|
||||
path = url.path();
|
||||
}
|
||||
|
||||
// KILE_DEBUG() << "\tpath : " << path << endl;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
bool KileProject::contains(const KURL &url)
|
||||
{
|
||||
for (uint i=0; i < m_projectitems.count(); ++i)
|
||||
{
|
||||
if ( m_projectitems.at(i)->url() == url )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KileProject::contains(const KileDocument::Info *info)
|
||||
{
|
||||
QPtrListIterator<KileProjectItem> it(m_projectitems);
|
||||
KileProjectItem *current;
|
||||
while( (current = it.current()) != 0)
|
||||
{
|
||||
++it;
|
||||
if(current->getInfo() == info)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
KileProjectItem *KileProject::rootItem(KileProjectItem *item) const
|
||||
{
|
||||
//find the root item (i.e. the eldest parent)
|
||||
KileProjectItem *root = item;
|
||||
while ( root->parent() != 0)
|
||||
root = root->parent();
|
||||
|
||||
//check if this root item is a LaTeX root
|
||||
if ( root->getInfo() )
|
||||
{
|
||||
if (root->getInfo()->isLaTeXRoot())
|
||||
return root;
|
||||
else
|
||||
{
|
||||
//if not, see if we can find another root item that is a LaTeX root
|
||||
QPtrListIterator<KileProjectItem> it(m_rootItems);
|
||||
while ( it.current() )
|
||||
{
|
||||
if ( it.current()->getInfo() && it.current()->getInfo()->isLaTeXRoot() )
|
||||
return it.current();
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
//no LaTeX root found, return previously found root
|
||||
return root;
|
||||
}
|
||||
|
||||
//root is not a valid item (getInfo() return 0L), return original item
|
||||
return item;
|
||||
}
|
||||
|
||||
void KileProject::dump()
|
||||
{
|
||||
KILE_DEBUG() << "KileProject::dump() " << m_name << endl;
|
||||
for ( uint i=0; i < m_projectitems.count(); ++i)
|
||||
{
|
||||
KileProjectItem *item;
|
||||
item = m_projectitems.at(i);
|
||||
KILE_DEBUG() << "item " << i << " has path: " << item->path() << endl;
|
||||
KILE_DEBUG() << "item->type() " << item->type() << endl;
|
||||
KILE_DEBUG() << "OpenState: " << item->isOpen() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
QString KileProject::archiveFileList() const
|
||||
{
|
||||
KILE_DEBUG() << "KileProject::archiveFileList()" << endl;
|
||||
|
||||
QString path,list;
|
||||
QPtrListIterator<KileProjectItem> it(m_projectitems);
|
||||
|
||||
while (it.current())
|
||||
{
|
||||
if ((*it)->archive())
|
||||
{
|
||||
path = (*it)->path();
|
||||
KRun::shellQuote(path);
|
||||
list.append(path + ' ');
|
||||
}
|
||||
++it;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
void KileProject::setMasterDocument(const QString & master){
|
||||
|
||||
if(!master.isEmpty()){
|
||||
|
||||
QFileInfo fi(master);
|
||||
if(fi.exists())
|
||||
m_masterDocument = master;
|
||||
else{
|
||||
m_masterDocument = QString::null;
|
||||
KILE_DEBUG() << "setMasterDocument: masterDoc=NULL" << endl;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
m_masterDocument = QString::null;
|
||||
|
||||
emit (masterDocumentChanged(m_masterDocument));
|
||||
}
|
||||
|
||||
#include "kileproject.moc"
|
@ -0,0 +1,235 @@
|
||||
/***************************************************************************
|
||||
begin : Fri Aug 1 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
#ifndef KILEPROJECT_H
|
||||
#define KILEPROJECT_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qregexp.h>
|
||||
|
||||
#include "kiledebug.h"
|
||||
#include <kurl.h>
|
||||
|
||||
class QString;
|
||||
class QStringList;
|
||||
class KSimpleConfig;
|
||||
namespace KileDocument { class Info; class TextInfo; class Extensions; }
|
||||
|
||||
/**
|
||||
* KileProjectItem
|
||||
**/
|
||||
class KileProject;
|
||||
class KileProjectItemList;
|
||||
class KileProjectItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileProjectItem(KileProject *project = 0, const KURL &url = KURL(), int type = Source);
|
||||
~KileProjectItem() { KILE_DEBUG() << "DELETING PROJITEM " << m_path << endl;}
|
||||
|
||||
bool operator==(const KileProjectItem& item) { return m_url == item.url();}
|
||||
|
||||
enum Type { ProjectFile = 0, Source, Package, Image, Other /* should be the last item*/ };
|
||||
|
||||
int type() const { return m_type; }
|
||||
void setType(int type) { m_type = type; }
|
||||
|
||||
bool archive() const { return m_archive; }
|
||||
void setArchive(bool ar) { m_archive = ar; }
|
||||
|
||||
void setInfo(KileDocument::TextInfo * docinfo);
|
||||
KileDocument::TextInfo* getInfo() { return m_docinfo; }
|
||||
|
||||
KileProject* project() const { return m_project;}
|
||||
|
||||
/**
|
||||
* @returns absolute URL of this item
|
||||
**/
|
||||
const KURL& url() const { return m_url; }
|
||||
|
||||
/**
|
||||
* @returns path of this item relative to the project file
|
||||
**/
|
||||
const QString& path() const { return m_path; }
|
||||
|
||||
bool isOpen() const { return m_bOpen; }
|
||||
void setOpenState(bool state) { m_bOpen = state; }
|
||||
|
||||
const QString& encoding() const { return m_encoding;}
|
||||
void setEncoding(const QString& encoding) {m_encoding = encoding;}
|
||||
|
||||
const QString& highlight() { return m_highlight;}
|
||||
void setHighlight(const QString& highlight) {m_highlight = highlight;}
|
||||
|
||||
uint lineNumber() { return m_nLine; }
|
||||
void setLineNumber(uint l) { m_nLine = l; }
|
||||
|
||||
uint columnNumber() { return m_nColumn; }
|
||||
void setColumnNumber(uint l) { m_nColumn = l; }
|
||||
|
||||
int order() const { return m_order; }
|
||||
void setOrder(int i);
|
||||
|
||||
//project tree functions
|
||||
void setParent(KileProjectItem * item);
|
||||
|
||||
protected:
|
||||
void setChild(KileProjectItem *item) { m_child = item; }
|
||||
void setSibling(KileProjectItem *item) { m_sibling = item; }
|
||||
|
||||
public:
|
||||
KileProjectItem* parent() const { return m_parent; }
|
||||
KileProjectItem* firstChild() const { return m_child;}
|
||||
KileProjectItem* sibling() const { return m_sibling; }
|
||||
|
||||
void allChildren(QPtrList<KileProjectItem> *) const;
|
||||
|
||||
void print(int level);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @warning Does nothing if "url" is empty !
|
||||
**/
|
||||
void changeURL(const KURL &url);
|
||||
void changePath(const QString& path) { m_path = path;}
|
||||
|
||||
private slots:
|
||||
void slotChangeURL(KileDocument::Info* info, const KURL& url);
|
||||
|
||||
signals:
|
||||
void urlChanged(KileProjectItem*);
|
||||
|
||||
private:
|
||||
KileProject *m_project;
|
||||
KURL m_url;
|
||||
QString m_path;
|
||||
QString m_encoding;
|
||||
QString m_highlight;
|
||||
bool m_bOpen, m_archive;
|
||||
int m_type;
|
||||
KileDocument::TextInfo *m_docinfo;
|
||||
KileProjectItem *m_parent, *m_child, *m_sibling;
|
||||
uint m_nLine, m_nColumn;
|
||||
int m_order;
|
||||
};
|
||||
|
||||
class KileProjectItemList : public QPtrList<KileProjectItem>
|
||||
{
|
||||
public:
|
||||
KileProjectItemList() { setAutoDelete(true); }
|
||||
~KileProjectItemList() { KILE_DEBUG() << "DELETING KILEPROJECTITEMLIST" << endl;}
|
||||
};
|
||||
|
||||
/**
|
||||
* KileProject
|
||||
**/
|
||||
class KileProject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileProject(const QString& name, const KURL& url, KileDocument::Extensions *extensions);
|
||||
KileProject(const KURL& url, KileDocument::Extensions *extensions);
|
||||
|
||||
~KileProject();
|
||||
|
||||
void setName(const QString & name) { m_name = name; emit (nameChanged(name));}
|
||||
const QString& name() const { return m_name; }
|
||||
|
||||
void setMasterDocument(const QString & master);
|
||||
const QString& masterDocument() const { return m_masterDocument; }
|
||||
|
||||
void setExtensions(KileProjectItem::Type type, const QString & ext);
|
||||
const QString & extensions(KileProjectItem::Type type) { return m_extensions[type-1]; }
|
||||
|
||||
void setQuickBuildConfig(const QString & cfg) { m_quickBuildConfig = cfg; }
|
||||
const QString & quickBuildConfig() { return m_quickBuildConfig; }
|
||||
|
||||
void setLastDocument(const KURL &url);
|
||||
const KURL & lastDocument() const { return m_lastDocument; }
|
||||
|
||||
void setMakeIndexOptions(const QString & opt) { m_makeIndexOptions = opt; }
|
||||
const QString & makeIndexOptions() { return m_makeIndexOptions; }
|
||||
void readMakeIndexOptions();
|
||||
void setUseMakeIndexOptions(bool use) { m_useMakeIndexOptions = use; }
|
||||
void writeUseMakeIndexOptions();
|
||||
bool useMakeIndexOptions() { return m_useMakeIndexOptions; }
|
||||
|
||||
const KURL& url() const { return m_projecturl; }
|
||||
void setURL(const KURL & url ) { m_projecturl = url; }
|
||||
const KURL& baseURL() const { return m_baseurl; }
|
||||
|
||||
KileProjectItem* item(const KURL &);
|
||||
KileProjectItem* item(const KileDocument::Info *info);
|
||||
KileProjectItemList* items() { return &m_projectitems; }
|
||||
|
||||
KSimpleConfig *config() { return m_config; }
|
||||
|
||||
bool contains(const KURL&);
|
||||
bool contains(const KileDocument::Info *info);
|
||||
KileProjectItem *rootItem(KileProjectItem *) const;
|
||||
const QPtrList<KileProjectItem>* rootItems() const {return &m_rootItems;}
|
||||
bool isInvalid(){ return m_invalid;}
|
||||
QString archiveFileList() const;
|
||||
|
||||
signals:
|
||||
void nameChanged(const QString &);
|
||||
void masterDocumentChanged(const QString &);
|
||||
void projectTreeChanged(const KileProject *);
|
||||
|
||||
public slots:
|
||||
bool load();
|
||||
bool save();
|
||||
|
||||
void add(KileProjectItem*);
|
||||
void remove(const KileProjectItem*);
|
||||
|
||||
void itemRenamed(KileProjectItem*);
|
||||
|
||||
void buildProjectTree(); // moved to slots by tbraun
|
||||
|
||||
//debugging
|
||||
void dump();
|
||||
|
||||
signals:
|
||||
void loadFile(const KURL &url , const QString & encoding);
|
||||
|
||||
private:
|
||||
void init(const QString& name, const KURL& url, KileDocument::Extensions *extensions);
|
||||
QString findRelativePath(const KURL&);
|
||||
void setType(KileProjectItem *item);
|
||||
QString addBaseURL(const QString &path);
|
||||
QString removeBaseURL(const QString &path);
|
||||
void writeConfigEntry(const QString &key,const QString &standardExt,KileProjectItem::Type type);
|
||||
|
||||
private:
|
||||
QString m_name, m_quickBuildConfig, m_kileversion, m_kileprversion;
|
||||
KURL m_projecturl, m_baseurl, m_lastDocument;
|
||||
bool m_invalid;
|
||||
QPtrList<KileProjectItem> m_rootItems;
|
||||
KileProjectItemList m_projectitems;
|
||||
|
||||
QString m_extensions[3];
|
||||
QRegExp m_reExtensions[3];
|
||||
|
||||
QString m_masterDocument, m_makeIndexOptions;
|
||||
bool m_useMakeIndexOptions;
|
||||
|
||||
KSimpleConfig *m_config;
|
||||
KileDocument::Extensions *m_extmanager;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,609 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Aug 3 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
: (C) 2007 by Holger Danielsson
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
holger.danielsson@versanet.de
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
// 2007-02-15 (dani)
|
||||
// - cosmetic changes
|
||||
// - use of groupboxes to prepare further extensions
|
||||
|
||||
// 2007-03-12 (dani)
|
||||
// - use KileDocument::Extensions
|
||||
// - allowed extensions are always defined as list, f.e.: .tex .ltx .latex
|
||||
|
||||
#include "kileprojectdlgs.h"
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qregexp.h>
|
||||
#include <qvalidator.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kurlcompletion.h>
|
||||
#include <kfiledialog.h>
|
||||
#include <kcombobox.h>
|
||||
#include "kiledebug.h"
|
||||
#include <kapplication.h>
|
||||
#include <kiconloader.h>
|
||||
|
||||
#include "kileproject.h"
|
||||
#include "kiletoolmanager.h"
|
||||
#include "kiledocumentinfo.h"
|
||||
#include "kileconfig.h"
|
||||
#include "kileextensions.h"
|
||||
#include "templates.h"
|
||||
|
||||
const QString whatsthisName = i18n("Insert a short descriptive name of your project here.");
|
||||
const QString whatsthisPath = i18n("Insert the path to your project file here. If this file does not yet exists, it will be created. The filename should have the extension: .kilepr. You can also use the browse button to insert a filename.");
|
||||
const QString whatsthisExt = i18n("Insert a list (separated by spaces) of file extensions which should be treated also as files of the corresponding type in this project.");
|
||||
const QString whatsthisMaster = i18n("Select the default master document. Leave empty for auto detection.");
|
||||
|
||||
const QString tool_default = i18n("(use global setting)");
|
||||
|
||||
KileProjectDlgBase::KileProjectDlgBase(const QString &caption, KileDocument::Extensions *extensions, QWidget *parent, const char * name)
|
||||
: KDialogBase( KDialogBase::Plain, caption, (Ok | Cancel), Ok, parent, name, true, true),
|
||||
m_extmanager(extensions), m_project(0)
|
||||
{
|
||||
// properties groupbox
|
||||
m_pgroup = new QVGroupBox(i18n("Project"), plainPage());
|
||||
m_pgroup->setColumnLayout(0, Qt::Vertical );
|
||||
m_pgroup->layout()->setSpacing( 6 );
|
||||
m_pgroup->layout()->setMargin( 11 );
|
||||
m_pgrid = new QGridLayout( m_pgroup->layout() );
|
||||
m_pgrid->setAlignment( Qt::AlignTop );
|
||||
|
||||
m_title = new KLineEdit(m_pgroup, "le_projectname");
|
||||
QWhatsThis::add(m_title, whatsthisName);
|
||||
m_plabel = new QLabel(i18n("Project &title:"), m_pgroup);
|
||||
m_plabel->setBuddy(m_title);
|
||||
QWhatsThis::add(m_plabel, whatsthisName);
|
||||
|
||||
// extensions groupbox
|
||||
m_egroup= new QVGroupBox(i18n("Extensions"), plainPage());
|
||||
m_egroup->setColumnLayout(0, Qt::Vertical );
|
||||
m_egroup->layout()->setSpacing( 6 );
|
||||
m_egroup->layout()->setMargin( 11 );
|
||||
m_egrid = new QGridLayout( m_egroup->layout() );
|
||||
m_egrid->setAlignment( Qt::AlignTop );
|
||||
|
||||
m_extensions = new KLineEdit(m_egroup, "le_ext");
|
||||
QRegExp reg("[\\. a-zA-Z0-9]+");
|
||||
QRegExpValidator *extValidator = new QRegExpValidator(reg,m_egroup);
|
||||
m_extensions->setValidator(extValidator);
|
||||
|
||||
m_sel_extensions = new KComboBox(false, m_egroup, "le_sel_ext");
|
||||
m_sel_extensions->insertItem(i18n("Source Files"));
|
||||
m_sel_extensions->insertItem(i18n("Package Files"));
|
||||
m_sel_extensions->insertItem(i18n("Image Files"));
|
||||
m_lbPredefinedExtensions = new QLabel(i18n("Predefined:"),m_egroup);
|
||||
m_lbStandardExtensions = new QLabel(QString::null,m_egroup);
|
||||
|
||||
QWhatsThis::add(m_sel_extensions, whatsthisExt);
|
||||
QWhatsThis::add(m_extensions, whatsthisExt);
|
||||
|
||||
fillProjectDefaults();
|
||||
|
||||
connect(m_sel_extensions, SIGNAL(highlighted(int)),
|
||||
this, SLOT(slotExtensionsHighlighted(int)));
|
||||
|
||||
connect(m_extensions, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(slotExtensionsTextChanged(const QString&)));
|
||||
}
|
||||
|
||||
KileProjectDlgBase::~KileProjectDlgBase()
|
||||
{
|
||||
}
|
||||
|
||||
void KileProjectDlgBase::slotExtensionsHighlighted(int index)
|
||||
{
|
||||
disconnect(m_extensions, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(slotExtensionsTextChanged(const QString&)));
|
||||
m_extensions->setText(m_val_extensions[index]);
|
||||
connect(m_extensions, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(slotExtensionsTextChanged(const QString&)));
|
||||
|
||||
m_lbStandardExtensions->setText( m_val_standardExtensions[index] );
|
||||
}
|
||||
|
||||
void KileProjectDlgBase::slotExtensionsTextChanged(const QString &text)
|
||||
{
|
||||
m_val_extensions[m_sel_extensions->currentItem()] = text;
|
||||
}
|
||||
|
||||
bool KileProjectDlgBase::acceptUserExtensions()
|
||||
{
|
||||
QRegExp reg("\\.\\w+");
|
||||
|
||||
for (int i=KileProjectItem::Source; i<KileProjectItem::Other; ++i)
|
||||
{
|
||||
m_val_extensions[i-1] = m_val_extensions[i-1].stripWhiteSpace();
|
||||
if ( ! m_val_extensions[i-1].isEmpty() )
|
||||
{
|
||||
// some tiny extension checks
|
||||
QStringList::ConstIterator it;
|
||||
QStringList list = QStringList::split(" ", m_val_extensions[i-1]);
|
||||
for ( it=list.begin(); it != list.end(); ++it )
|
||||
{
|
||||
if ( ! reg.exactMatch(*it) )
|
||||
{
|
||||
KMessageBox::error(this, i18n("Error in extension") + " '" + (*it) + "':\n" + i18n("All user defined extensions should look like '.xyz'"), i18n("Invalid extension"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void KileProjectDlgBase::setExtensions(KileProjectItem::Type type, const QString & ext)
|
||||
{
|
||||
if (m_sel_extensions->currentItem() == type-1)
|
||||
m_extensions->setText(ext);
|
||||
else
|
||||
m_val_extensions[type-1] = ext;
|
||||
}
|
||||
|
||||
void KileProjectDlgBase::setProject(KileProject *project, bool override)
|
||||
{
|
||||
m_project = project;
|
||||
|
||||
if ((!override) || (project == 0))
|
||||
return;
|
||||
|
||||
for (int i = KileProjectItem::Source; i < KileProjectItem::Other; ++i)
|
||||
{
|
||||
m_val_extensions[i - 1] = project->extensions((KileProjectItem::Type) i);
|
||||
}
|
||||
|
||||
m_title->setText(m_project->name());
|
||||
m_extensions->setText(m_val_extensions[0]);
|
||||
m_lbStandardExtensions->setText( m_val_standardExtensions[0] );
|
||||
}
|
||||
|
||||
KileProject* KileProjectDlgBase::project()
|
||||
{
|
||||
return m_project;
|
||||
}
|
||||
|
||||
void KileProjectDlgBase::fillProjectDefaults()
|
||||
{
|
||||
m_val_extensions[0] = QString::null;
|
||||
m_val_extensions[1] = QString::null;
|
||||
m_val_extensions[2] = QString::null;
|
||||
//m_val_extensions[3] = OTHER_EXTENSIONS;
|
||||
|
||||
m_val_standardExtensions[0] = m_extmanager->latexDocuments();
|
||||
m_val_standardExtensions[1] = m_extmanager->latexPackages();
|
||||
m_val_standardExtensions[2] = m_extmanager->images();
|
||||
|
||||
m_extensions->setText(m_val_extensions[0]);
|
||||
m_lbStandardExtensions->setText( m_val_standardExtensions[0] );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* KileNewProjectDlg
|
||||
*/
|
||||
KileNewProjectDlg::KileNewProjectDlg(KileTemplate::Manager *templateManager, KileDocument::Extensions *extensions, QWidget* parent, const char* name)
|
||||
: KileProjectDlgBase(i18n("Create New Project"), extensions, parent, name), m_templateManager(templateManager),
|
||||
m_filename(QString::null)
|
||||
{
|
||||
// Layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout(plainPage(), 6,6 );
|
||||
|
||||
// first groupbox
|
||||
m_pgrid->addWidget(m_plabel, 0,0);
|
||||
m_pgrid->addWidget(m_title, 0,2);
|
||||
connect(m_title, SIGNAL(textChanged(const QString&)), this, SLOT(makeProjectPath()));
|
||||
|
||||
m_location = new KLineEdit(m_pgroup, "le_projectlocation");
|
||||
m_location->setMinimumWidth(200);
|
||||
|
||||
QLabel *lb1 = new QLabel(i18n("Project &file:"), m_pgroup);
|
||||
QWhatsThis::add(lb1, whatsthisPath);
|
||||
QWhatsThis::add(m_location, whatsthisPath);
|
||||
lb1->setBuddy(m_location);
|
||||
m_pbChooseDir= new KPushButton(i18n("Select Folder..."), m_pgroup, "dirchooser_button" );
|
||||
m_pbChooseDir->setPixmap( SmallIcon("fileopen") );
|
||||
int wpixmap = m_pbChooseDir->pixmap()->width();
|
||||
m_pbChooseDir->setFixedWidth(wpixmap+10);
|
||||
m_pbChooseDir->setFixedHeight(wpixmap+10);
|
||||
|
||||
m_pgrid->addWidget(lb1,1,0);
|
||||
m_pgrid->addMultiCellWidget(m_location,1,1,2,3);
|
||||
m_pgrid->addWidget(m_pbChooseDir,1,5);
|
||||
m_pgrid->setColSpacing(1,8);
|
||||
m_pgrid->setColSpacing(4,8);
|
||||
m_pgrid->setColStretch(3,1);
|
||||
|
||||
connect(m_pbChooseDir, SIGNAL(clicked()), this, SLOT(browseLocation()));
|
||||
|
||||
// second groupbox
|
||||
QVGroupBox* group2= new QVGroupBox(i18n("File"), plainPage());
|
||||
QWidget *widget2 = new QWidget(group2);
|
||||
QGridLayout *grid2 = new QGridLayout(widget2, 3,2, 6,6);
|
||||
m_cb = new QCheckBox(i18n("Create a new file and add it to this project"),widget2);
|
||||
m_cb->setChecked(true);
|
||||
m_lb = new QLabel(i18n("File&name (relative to where the project file is):"),widget2);
|
||||
m_file = new KLineEdit(widget2);
|
||||
m_lb->setBuddy(m_file);
|
||||
m_templateIconView = new TemplateIconView(widget2);
|
||||
m_templateIconView->setTemplateManager(m_templateManager);
|
||||
m_templateManager->scanForTemplates();
|
||||
m_templateIconView->fillWithTemplates(KileDocument::LaTeX);
|
||||
QWhatsThis::add(m_cb, i18n("If you want Kile to create a new file and add it to the project, then check this option and select a template from the list that will appear below."));
|
||||
|
||||
grid2->addMultiCellWidget(m_cb, 0,0, 0,1);
|
||||
grid2->addWidget(m_lb, 1,0);
|
||||
grid2->addWidget(m_file, 1,1);
|
||||
grid2->addMultiCellWidget(m_templateIconView, 2,2, 0,1);
|
||||
grid2->setColStretch(1,1);
|
||||
connect(m_cb, SIGNAL(clicked()), this, SLOT(clickedCreateNewFileCb()));
|
||||
|
||||
// third groupbox
|
||||
m_egrid->addWidget(m_sel_extensions, 6,0);
|
||||
m_egrid->addMultiCellWidget(m_extensions, 6,6, 1,3);
|
||||
m_egrid->addWidget(m_lbPredefinedExtensions, 7,0);
|
||||
m_egrid->addMultiCellWidget(m_lbStandardExtensions, 7,7, 1,3);
|
||||
|
||||
// add to layout
|
||||
vbox->addWidget(m_pgroup);
|
||||
vbox->addWidget(group2);
|
||||
vbox->addWidget(m_egroup);
|
||||
vbox->addStretch();
|
||||
|
||||
fillProjectDefaults();
|
||||
}
|
||||
|
||||
KileNewProjectDlg::~KileNewProjectDlg()
|
||||
{}
|
||||
|
||||
KileProject* KileNewProjectDlg::project()
|
||||
{
|
||||
if (!m_project) {
|
||||
m_project = new KileProject(projectTitle(), KURL(location()), m_extmanager);
|
||||
|
||||
KileProjectItem::Type type;
|
||||
for (int i = KileProjectItem::Source; i < KileProjectItem::Other; ++i) {
|
||||
type = (KileProjectItem::Type) i;
|
||||
m_project->setExtensions(type, extensions(type));
|
||||
}
|
||||
|
||||
m_project->buildProjectTree();
|
||||
}
|
||||
|
||||
return m_project;
|
||||
}
|
||||
|
||||
void KileNewProjectDlg::clickedCreateNewFileCb()
|
||||
{
|
||||
if (m_cb->isChecked())
|
||||
{
|
||||
m_file->show();
|
||||
m_lb->show();
|
||||
m_templateIconView->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_file->hide();
|
||||
m_lb->hide();
|
||||
m_templateIconView->hide();
|
||||
}
|
||||
}
|
||||
|
||||
QString KileNewProjectDlg::bare()
|
||||
{
|
||||
return projectTitle().lower().stripWhiteSpace().replace(QRegExp("\\s*"),"")+".kilepr";
|
||||
}
|
||||
|
||||
void KileNewProjectDlg::browseLocation()
|
||||
{
|
||||
QString dir = m_dir;
|
||||
if (!QFileInfo(m_dir).exists())
|
||||
dir = QString::null;
|
||||
|
||||
dir = KFileDialog::getExistingDirectory(dir, this);
|
||||
|
||||
if (! dir.isNull())
|
||||
{
|
||||
m_dir = dir;
|
||||
if (m_dir.right(1) != "/") m_dir = m_dir + '/';
|
||||
m_location->setText(m_dir+bare());
|
||||
}
|
||||
}
|
||||
|
||||
void KileNewProjectDlg::makeProjectPath()
|
||||
{
|
||||
m_filename=bare();
|
||||
KILE_DEBUG() << "BEFORE " << QFileInfo(location()).absFilePath() << " " << QFileInfo(location()).dirPath() << endl;
|
||||
m_dir = QFileInfo(location()).dirPath();
|
||||
if (m_dir.right(1) != "/") m_dir = m_dir + '/';
|
||||
|
||||
KILE_DEBUG() << "LOCATION " << location() << " AND " << m_dir << endl;
|
||||
m_location->setText(m_dir+m_filename);
|
||||
}
|
||||
|
||||
void KileNewProjectDlg::slotOk()
|
||||
{
|
||||
if ( ! acceptUserExtensions() )
|
||||
return;
|
||||
|
||||
//replace ~ and environment variables in the paths
|
||||
KURLCompletion uc;
|
||||
uc.setReplaceEnv(true);
|
||||
uc.setReplaceHome(true);
|
||||
m_location->setText(uc.replacedPath(location()));
|
||||
m_file->setText(uc.replacedPath(file()));
|
||||
|
||||
if ( projectTitle().stripWhiteSpace().isEmpty())
|
||||
{
|
||||
if (KMessageBox::warningYesNo(this, i18n("You did not enter a project name, if you continue the project name will be set to: Untitled."), i18n("No Name")) == KMessageBox::Yes)
|
||||
m_title->setText(i18n("Untitled"));
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if ( location().stripWhiteSpace().isEmpty() )
|
||||
{
|
||||
KMessageBox::error(this, i18n("Please enter the location where the project file should be save to. Also make sure it ends with .kilepr ."), i18n("Empty Location"));
|
||||
return;
|
||||
}
|
||||
|
||||
QFileInfo fi(location().stripWhiteSpace());
|
||||
QFileInfo dr(fi.dirPath());
|
||||
QDir dir = dr.dir();
|
||||
|
||||
if ( location().stripWhiteSpace().right(7) != ".kilepr")
|
||||
{
|
||||
KMessageBox::error(this, i18n("The extension of the project filename is not .kilepr , please correct the extension"), i18n("Wrong Filename Extension"));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (dir.isRelative())
|
||||
{
|
||||
KMessageBox::error(this, i18n("The path for the project file is not an absolute path, absolute paths always begin with an /"),i18n("Relative Path"));
|
||||
return;
|
||||
}
|
||||
|
||||
KILE_DEBUG() << "==KileNewProjectDlg::slotOk()==============" << endl;
|
||||
KILE_DEBUG() << "\t" << location() << " " << fi.dirPath() << endl;
|
||||
if (! dr.exists())
|
||||
{
|
||||
bool suc = true;
|
||||
QStringList dirs = QStringList::split("/", fi.dirPath());
|
||||
QString path;
|
||||
|
||||
for (uint i=0; i < dirs.count(); ++i)
|
||||
{
|
||||
path += '/' + dirs[i];
|
||||
dir.setPath(path);
|
||||
KILE_DEBUG() << "\tchecking : " << dir.absPath() << endl;
|
||||
if ( ! dir.exists() )
|
||||
{
|
||||
dir.mkdir(dir.absPath());
|
||||
suc = dir.exists();
|
||||
KILE_DEBUG() << "\t\tcreated : " << dir.absPath() << " suc = " << suc << endl;
|
||||
}
|
||||
|
||||
if (!suc)
|
||||
{
|
||||
KMessageBox::error(this, i18n("Could not create the project folder, check your permissions."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! dr.isWritable())
|
||||
{
|
||||
KMessageBox::error(this, i18n("The project folder is not writable, check your permissions."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( createNewFile() )
|
||||
{
|
||||
if ( file().stripWhiteSpace().isEmpty())
|
||||
{
|
||||
KMessageBox::error(this, i18n("Please enter a filename for the file that should be added to this project."),
|
||||
i18n("No File Name Given"));
|
||||
return;
|
||||
}
|
||||
|
||||
//check for validity of name first, then check for existence (fixed by tbraun)
|
||||
KURL fileURL; fileURL.setFileName(file());
|
||||
KURL validURL = KileDocument::Info::makeValidTeXURL(fileURL,m_extmanager->isTexFile(fileURL),true);
|
||||
if ( validURL != fileURL )
|
||||
m_file->setText(validURL.fileName());
|
||||
|
||||
if ( QFileInfo( QDir(fi.dirPath()) , file().stripWhiteSpace()).exists() )
|
||||
{
|
||||
if (KMessageBox::warningYesNo(this, i18n("The file \"%1\" already exists, overwrite it?").arg(file()),
|
||||
i18n("File Already Exists")) == KMessageBox::No)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (QFileInfo(location()).exists())
|
||||
{
|
||||
KMessageBox::error(this, i18n("The project file already exists, please select another name. Delete the existing project file if your intention was to overwrite it."),i18n("Project File Already Exists"));
|
||||
return;
|
||||
}
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
void KileNewProjectDlg::fillProjectDefaults()
|
||||
{
|
||||
m_dir = KileConfig::defaultProjectLocation();
|
||||
if( !m_dir.endsWith("/") )
|
||||
m_dir += '/';
|
||||
KILE_DEBUG() << "M_DIR " << m_dir << endl;
|
||||
m_location->setText(m_dir);
|
||||
m_cb->setChecked(true);
|
||||
|
||||
KileProjectDlgBase::fillProjectDefaults();
|
||||
}
|
||||
|
||||
TemplateItem* KileNewProjectDlg::getSelection() const
|
||||
{
|
||||
return static_cast<TemplateItem*>(m_templateIconView->currentItem());
|
||||
}
|
||||
|
||||
/*
|
||||
* KileProjectOptionsDlg
|
||||
*/
|
||||
KileProjectOptionsDlg::KileProjectOptionsDlg(KileProject *project, KileDocument::Extensions *extensions, QWidget *parent, const char * name) :
|
||||
KileProjectDlgBase(i18n("Project Options"), extensions, parent, name )
|
||||
{
|
||||
// Layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout(plainPage(), 6,6 );
|
||||
|
||||
m_pgrid->addWidget(m_plabel, 0,0);
|
||||
m_pgrid->addWidget(m_title, 0,2);
|
||||
// m_pgrid->addWidget(labelEncoding, 1,0);
|
||||
// m_pgrid->addWidget(m_lbEncoding, 1,2);
|
||||
m_pgrid->setColSpacing(1,8);
|
||||
m_pgrid->setColStretch(3,1);
|
||||
// second groupbox
|
||||
|
||||
m_egrid->addWidget(m_sel_extensions, 6,0);
|
||||
m_egrid->addMultiCellWidget(m_extensions, 6,6, 1,3);
|
||||
m_egrid->addWidget(m_lbPredefinedExtensions, 7,0);
|
||||
m_egrid->addMultiCellWidget(m_lbStandardExtensions, 7,7, 1,3);
|
||||
|
||||
// third groupbox
|
||||
QVGroupBox* group3 = new QVGroupBox(i18n("Properties"), plainPage());
|
||||
group3->setColumnLayout(0, Qt::Vertical );
|
||||
group3->layout()->setSpacing( 6 );
|
||||
group3->layout()->setMargin( 11 );
|
||||
QGridLayout *grid3 = new QGridLayout( group3->layout() );
|
||||
grid3->setAlignment( Qt::AlignTop );
|
||||
|
||||
m_master = new KComboBox(false, group3, "master");
|
||||
//m_master->setDisabled(true);
|
||||
QLabel *lb1 = new QLabel(i18n("&Master document:"), group3);
|
||||
lb1->setBuddy(m_master);
|
||||
lb1->setMinimumWidth( m_sel_extensions->sizeHint().width() );
|
||||
QWhatsThis::add(m_master, whatsthisMaster);
|
||||
QWhatsThis::add(lb1,whatsthisMaster);
|
||||
|
||||
m_master->insertItem(i18n("(auto-detect)"));
|
||||
QPtrListIterator<KileProjectItem> rit(*(project->rootItems()));
|
||||
int index = 0;
|
||||
while (rit.current())
|
||||
{
|
||||
if ((*rit)->type() == KileProjectItem::Source)
|
||||
{
|
||||
m_master->insertItem((*rit)->url().fileName());
|
||||
++index;
|
||||
if ( (*rit)->url().path() == project->masterDocument() )
|
||||
m_master->setCurrentItem(index);
|
||||
}
|
||||
++rit;
|
||||
}
|
||||
|
||||
if (project->masterDocument().isNull())
|
||||
m_master->setCurrentItem(0);
|
||||
|
||||
QLabel *lb2 = new QLabel(i18n("&QuickBuild configuration:"), group3);
|
||||
m_cbQuick = new KComboBox(group3);
|
||||
lb2->setBuddy(m_cbQuick);
|
||||
m_cbQuick->insertItem(tool_default);
|
||||
m_cbQuick->insertStringList(KileTool::configNames("QuickBuild", kapp->config()));
|
||||
m_cbQuick->setCurrentText(project->quickBuildConfig().length() > 0 ? project->quickBuildConfig() : tool_default );
|
||||
|
||||
//don't put this after the call to toggleMakeIndex
|
||||
setProject(project, true);
|
||||
|
||||
m_ckMakeIndex = new QCheckBox(i18n("&MakeIndex options"), group3);
|
||||
connect(m_ckMakeIndex, SIGNAL(toggled(bool)), this, SLOT(toggleMakeIndex(bool)));
|
||||
m_leMakeIndex = new KLineEdit(group3);
|
||||
m_ckMakeIndex->setChecked(project->useMakeIndexOptions());
|
||||
toggleMakeIndex(m_ckMakeIndex->isChecked());
|
||||
|
||||
grid3->addWidget(lb1,0,0);
|
||||
grid3->addWidget(m_master,0,1);
|
||||
grid3->addWidget(lb2,1,0);
|
||||
grid3->addWidget(m_cbQuick,1,1);
|
||||
grid3->addWidget(m_ckMakeIndex,2,0);
|
||||
grid3->addMultiCellWidget(m_leMakeIndex,2,2,1,2);
|
||||
grid3->setColStretch(2,1);
|
||||
|
||||
// add to layout
|
||||
vbox->addWidget(m_pgroup);
|
||||
vbox->addWidget(m_egroup);
|
||||
vbox->addWidget(group3);
|
||||
vbox->addStretch();
|
||||
}
|
||||
|
||||
KileProjectOptionsDlg::~KileProjectOptionsDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void KileProjectOptionsDlg::toggleMakeIndex(bool on)
|
||||
{
|
||||
KILE_DEBUG() << "TOGGLED!" << endl;
|
||||
m_leMakeIndex->setEnabled(on);
|
||||
m_project->setUseMakeIndexOptions(on);
|
||||
m_project->writeUseMakeIndexOptions();
|
||||
m_project->readMakeIndexOptions();
|
||||
m_leMakeIndex->setText(m_project->makeIndexOptions());
|
||||
}
|
||||
|
||||
void KileProjectOptionsDlg::slotOk()
|
||||
{
|
||||
if ( ! acceptUserExtensions() )
|
||||
return;
|
||||
|
||||
this->m_project->setName(m_title->text());
|
||||
|
||||
QPtrListIterator<KileProjectItem> rit(*(m_project->rootItems()));
|
||||
while (rit.current())
|
||||
{
|
||||
if ((*rit)->url().fileName() == m_master->currentText() )
|
||||
m_project->setMasterDocument((*rit)->url().path());
|
||||
++rit;
|
||||
}
|
||||
if (m_master->currentItem() == 0) m_project->setMasterDocument(QString::null);
|
||||
|
||||
m_val_extensions[m_sel_extensions->currentItem()] = m_extensions->text();
|
||||
|
||||
for (int i = KileProjectItem::Source; i < KileProjectItem::Other; ++i)
|
||||
{
|
||||
m_project->setExtensions( (KileProjectItem::Type) i, m_val_extensions[i-1] );
|
||||
}
|
||||
|
||||
if ( m_cbQuick->currentText() == tool_default )
|
||||
m_project->setQuickBuildConfig("");
|
||||
else
|
||||
m_project->setQuickBuildConfig(m_cbQuick->currentText());
|
||||
|
||||
m_project->setUseMakeIndexOptions(m_ckMakeIndex->isChecked());
|
||||
if ( m_project->useMakeIndexOptions() )
|
||||
m_project->setMakeIndexOptions(m_leMakeIndex->text());
|
||||
|
||||
m_project->save();
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
#include "kileprojectdlgs.moc"
|
@ -0,0 +1,138 @@
|
||||
/***************************************************************************
|
||||
begin : Sun Aug 3 2003
|
||||
copyright : (C) 2003 by Jeroen Wijnhout
|
||||
email : Jeroen.Wijnhout@kdemail.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef KILEPROJECTDLGS_H
|
||||
#define KILEPROJECTDLGS_H
|
||||
|
||||
#include <qcheckbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qvgroupbox.h>
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <klineedit.h>
|
||||
#include <kpushbutton.h>
|
||||
|
||||
#include "kileproject.h"
|
||||
#include "templates.h"
|
||||
|
||||
class TemplateIconView;
|
||||
class QLabel;
|
||||
class KileProject;
|
||||
class KComboBox;
|
||||
class QVGroupBox;
|
||||
class TemplateItem;
|
||||
|
||||
namespace KileDocument { class Extensions; }
|
||||
namespace KileTemplate { class Manager; }
|
||||
|
||||
class KileProjectDlgBase : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileProjectDlgBase(const QString &caption, KileDocument::Extensions *extensions, QWidget *parent = 0, const char * name = 0);
|
||||
virtual ~KileProjectDlgBase();
|
||||
|
||||
void setProject(KileProject *project, bool override);
|
||||
virtual KileProject* project();
|
||||
|
||||
void setProjectTitle(const QString &title) { m_title->setText(title); }
|
||||
const QString projectTitle() { return m_title->text(); }
|
||||
|
||||
void setExtensions(KileProjectItem::Type type, const QString & ext);
|
||||
const QString extensions(KileProjectItem::Type type)
|
||||
{ return m_val_extensions[type-1]; }
|
||||
|
||||
protected slots:
|
||||
virtual void slotOk() = 0;
|
||||
virtual void fillProjectDefaults();
|
||||
|
||||
private slots:
|
||||
void slotExtensionsHighlighted(int index);
|
||||
void slotExtensionsTextChanged(const QString &text);
|
||||
|
||||
protected:
|
||||
KileDocument::Extensions *m_extmanager;
|
||||
|
||||
QVGroupBox *m_pgroup, *m_egroup;
|
||||
QGridLayout *m_pgrid, *m_egrid;
|
||||
QLabel *m_plabel;
|
||||
|
||||
KLineEdit *m_title, *m_extensions;
|
||||
QLabel *m_lbPredefinedExtensions, *m_lbStandardExtensions;
|
||||
KileProject *m_project;
|
||||
KComboBox *m_sel_extensions;
|
||||
|
||||
QString m_val_extensions[KileProjectItem::Other - 1];
|
||||
QString m_val_standardExtensions[KileProjectItem::Other - 1];
|
||||
|
||||
bool acceptUserExtensions();
|
||||
|
||||
};
|
||||
|
||||
class KileNewProjectDlg : public KileProjectDlgBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileNewProjectDlg(KileTemplate::Manager *templateManager, KileDocument::Extensions *extensions, QWidget* parent = 0, const char* name = 0);
|
||||
~KileNewProjectDlg();
|
||||
|
||||
KileProject* project();
|
||||
|
||||
QString bare();
|
||||
QString location() { return m_location->text(); }
|
||||
|
||||
TemplateItem* getSelection() const;
|
||||
QString file() { return m_file->text();}
|
||||
bool createNewFile() { return m_cb->isChecked(); }
|
||||
|
||||
private slots:
|
||||
void clickedCreateNewFileCb();
|
||||
void browseLocation();
|
||||
void makeProjectPath();
|
||||
void slotOk();
|
||||
void fillProjectDefaults();
|
||||
|
||||
private:
|
||||
KileTemplate::Manager *m_templateManager;
|
||||
KLineEdit *m_location, *m_file, *m_name;
|
||||
TemplateIconView *m_templateIconView;
|
||||
QCheckBox *m_cb;
|
||||
QLabel *m_lb;
|
||||
|
||||
KPushButton *m_pbChooseDir;
|
||||
QString m_dir, m_filename;
|
||||
};
|
||||
|
||||
class KileProjectOptionsDlg : public KileProjectDlgBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KileProjectOptionsDlg(KileProject *project, KileDocument::Extensions *extensions, QWidget *parent = 0, const char * name = 0);
|
||||
~KileProjectOptionsDlg();
|
||||
|
||||
private slots:
|
||||
void slotOk();
|
||||
void toggleMakeIndex(bool);
|
||||
|
||||
private:
|
||||
KComboBox *m_master, *m_cbQuick;
|
||||
KLineEdit *m_leMakeIndex;
|
||||
QCheckBox *m_ckMakeIndex;
|
||||
};
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue