TeXstudio has been diligently extended for the last months. The subsequent list gives a probably incomplete overview of new and changed functionality:
First steps for dynamic syntax highlighting have been implemented. For example references in in commands like \label or \ref are checked and are marked especially if the reference does not exist (in case of referencing) or if it has been defined multiple times.
The word completion system has been extended. It now uses “kile”-word lists which extend the number of known commands considerably. The key Tab can be used to complete common word bases in the present suggestion list like it is done in bash shells. Furthermore it can also complete normal text by proposing earlier used text parts. The two modes are distinguished by a backslash as starting letter. And finally “User Tags” (user defined text blocks) can be inserted by using user defined abbreviations which replaced in the completion process. The old behavior of using key sequences for inserting user tags certainly is still available. And lastly user defined latex commands are automatically scanned and can be used for command completion.
Apart from using wizards, new documents can be created by using templates. User can add own templates which can be edited or removed later on if necessary.
The symbol panel was extended. It was also extended by “kile” symbol list. It also can insert “tags” from textual lists. And finally the column count automatically adapts to the available horizontal space. Not to mention that unwanted symbol lists can be hidden.
The symbol list selector was moved to the left edge to give more room for the symbols, like it was done in texmaker.
Hover help was implemented. Hovering the cursor over standard latex commands will present tool tip help. If it is hovers over references, the corresponding text passage which contains the label is shown as tool tip.
A preview for selected text can be shown either in the status panel or as tool tip.
The status/log/error panel can also be used in a tabbed manner if desired.
The online spell checker handles escaped chars like “a or \”{a} now correctly. It also refrain from spell checking in (some) latex command options like \ref{label} and some more.
The context menu of the structure view gives some useful option like selecting a complete section or indenting a section which means changing \section to \subsection and accordingly all included headings as well.
A thesaurus was added. It allows search for word parts as well.
For sure, lots of bugs have been squashed !
User Tags can use java script to manipulate the current document. The manipulation is done via direct cursor handling. If further functionality is needed, feel free to open a feature request.
some performance issues on mac have been addressed. Still not perfect, but it should feel much faster on mac.
math constructs can be previewed with mouse hover over the expression limit ($, begin{equation},...)
a customizable tool bar is available
the latex expressions in the Math/Latex-Menus can be changed to user preferred versions.
global find over all open documents improved
support of transparent versioning of text documents via svn
structure view and custom command completer are updated as you type
the structure view marks some aspects with colours like being part of the appendix or missing include files
if a master document is defined, references and labels from open (!) subdocuments can be used for completion as well as for interactive label checking
dde commands can be modified to start a corresponding program if it is not running
if a started latex freezes up, you can kill it by pressing escape after 2 seconds
the folding is now actually useful: mismatched brackets will not disturb it anymore and folded blocks can be edited
lots of bugs removed after user feedback
some performance issues on mac have been adressed. It should feel faster for long sible lines on mac.
more than one overlay can be shown at the same time e.g. for syntax highlighting and spell checking
command replacement in completed commands was added
a cut buffer was added. If selected text is replaced with a command via completion, the removed text is used as argument for the inserted command (if applicable)
tool tip in completer shows the surrounding of the label to which the selected reference is pointing
profiles containing predefined short cuts, menu redefinition, editor settings can be imported from a file
when waiting with text cursor on an environment name, a mirror cursor is generated which allows the renaming of the environment (\begin and \end simultaneously)
delete word, a command or an environment by typing ALT-del
spell checking is only done in known text commands
some dialogs adapted to cope better with small screen sizes
lots of bugs removed after user feedback
integrated pdf viewer with forward/reverse search
online latex syntax check (for simple errors)
support to manipulate tables (add/remove lines,columns or \hline)
inserted brackets are automatically closed
option to limit line length with hard wraps
word repetitions are marked as possible style error
as always, bug fixes and small improvements
online latex syntax check has been extended
number of columns is checked in tabulars
\usepackage and \documentclass are interpreted to decide which commands are valid in the document
new commands added
TXS automatically detects parent/child relation in loaded documents and acts accordingly. So normally no master mode is needed anymore.
improved preview:
Pdf viewer can show multiple pages
Pdf viewer supports a presentation mode and multiple views
Pdf viewer has a new overview and clock dock
Selection preview become faster and is shown within the text
as always, bug fixes and small improvements
improved preview:
Pdf viewer can show multiple pages in continous fashion
Pdf viewer works non-blocking (multi-threaded)
preview works with included files
key replacements can trigger arbitrary user macros
double quote replacement can easily be selected from predefined list
completer distinguishes between usual, most often used and all possible commands
saving/loading profiles working
more environments are syntax highlighted
as always, bug fixes and small improvements
list of commands accepting \ref/\cite-references can be changed
remember search history
support for different dictionaries per document
find-invalid-bracket feature
almost word level inverse pdf search
complete file names in graphic including macros
improved BibTeX auto calling
more methods available for scripting
several bug fix (especially crashs in the pdf viewer/syntax check/structure view) and minor improvements
You can should set the default encoding for new files ("Configure TeXstudio" -> "Editor" -> "Editor Font Encoding") if you don't want utf8 as encoding. Don't forget to set the same encoding in the preamble of your documents. (e.g. \usepackage[utf8]{inputenc}, if you use utf-8).
TeXstudio can auto detect utf-8 and latin1 encoded files, but if you use a different encoding in your existing documents you have to specify it in the configuration dialog before opening them. (and then you also have to disable the auto detection)
TeXstudio can't compile yours documents if the paths to the LaTeX related commands are wrong.
The default settings should work with the recent and standard LaTeX distributions, but you could have to modify them ("Configure TeXstudio" -> "Commands"). To change a command, just click on the button at the end of the corresponding line and select the command in the file browser : TeXstudio will adapt automatically the syntax of the command.
The % character represents the name of the file without the extension and the @ character will be replaced by the current line number. If you need more options (e.g. absolute paths) use ? and look at the instruction on the bottom of the configuration dialog.
Section Forward/Inverse search gives some example commands for common viewers.
TeXstudio checks the spelling while you type. If the typed text is within a LaTeX-command, TeXstudio takes information from the command-completion-list to determine whether the text is natural language which needs to be checked or just command options which are left alone. Only known LaTeX-commands are considered to be checked in its options!
Therefore make sure that all used packages are activated in the option/completion menu, see the corresponding section
The spell checker uses the OpenOffice.org dictionaries. Only GPL French and British dictionaries are distributed with TeXstudio.
Users can download others dictionaries here : http://wiki.services.openoffice.org/wiki/Dictionaries
To configure the spell checker : "Configure TeXstudio" -> "Editor" -> "Spelling dictionary" -> click on the button at the end of the line to select the dictionary with the file browser. If you specify a non existing file the edit gets red.
Warning : spell checking with Ctrl+Shift+F7 starts at the cursor position and not at the beginning of the document.
If the interactive spell checker is enabled (default), any wrong spelled word is underlined with a red wave. Click on it with the right mouse to open an menu with a list of possible corrections. There you can also move it to the ignore list. If your dictionary is very large (> 5MB), opening the context menu and showing possible suggestions can take some seconds. If you don't need the suggestion, you can press shift while right clicking and don't have to wait.
The ignore list is normally saved in the same directory as the dictionary with the extension .ign. If this isn't possible (e.g. missing access) the list is stored in the user configuration directory.
The thesaurus uses OpenOffice.org 2.x databases. Only GPL French and US-English and German databases are distributed with TeXstudio.
Users can download others databases here : http://wiki.services.openoffice.org/wiki/Dictionaries
TeXstudio has taken up completion word list from kile which extended the number of known commands for completion considerably.
TeXstudio understands the use of \documentclass and \usepackage in order to select valid lists of commands for completion as well as syntax checking.
However TeXstudio allows to select the additional word lists under
"Configure TeXstudio" -> "Editor" -> "". The names of the word lists corresponds to the package for which they are made. The list latex.cwl contains the standard latex commands.
Concerning auto completion, TeXstudio allows to adapt the behaviour to your liking.
Following options are available:
Shortcuts can be changed by double clicking on "Current Shortcut" or "Additional Shortcut". A shortcut can be selected from the drop down list or put in as text directly. If a shortcut should be set to default value or removed completely, the items "<default>" or "<none>" at the top of the list can be selected.
The Math/Latex-Menu can be adapted to user likings. For this menu items can be renamed and a new Latex-Code can be placed. The apropriate item can be be directly edited by doubleclicking on them.
One Custom Toolbar is present in TMX. This toolbar can be filled with actions from the Latex-, Math- and User-Menu. Since many of those item don't have icons, user icons can be loaded as well. This is achieved by applying "load other icon" from the context menu on a item in the custom toolbar list in the configure dialog.
To provide documenten versioning, TeXstudio makes use of SVN (subversion). To make use of it, the SVN commandline tools need to be installed. Linux and Mac OSX normally provide already svn tools, for Windows, the installation of "SlikSVN" is recommended.
The complete path to the command "svn" and "svnadmin" need to be adjusted in the aprioriate field of the svn configure page, see below. Furthermore the user can choose the degree of automation, which TeXstudio provides.
"Automatically check in after save" allows TeXstudio to perform an svn check in after every save of a document, thus providing a very complete history of the creation of a document. Since text documents are rather small compared to disk spaces, size of the svn database should not be a problem. In addition newly saved files (save as) are automatically added to svn control,provided that the directory is alredy under svn control. If that is not the case, TeXstudio searches in "SVN Directory Search Depth" directory above the current diorectory for a svn controlled directory to which the subdirectories and the TeX-Document will be added. If no appropriate directory is found, a repository is automatically generated in a directory called "./repo" and the document is added. Thus the user does not need to look up the necessary commands to set up a repository. This functionality is only activated when "Auto checkin in" is enabled !
With "User SVN revisions to undo before last save" TeXstudio will perform undo as usually, but if there are no further undoable commands in the internal storage, the document will be changed to the previous version in svn history. Further undo commands allows to back further to older revisions, whereas a redo goes forward to more recent versions. This is a more interactive approach than choosing svn revisions directly via a menu command, see section 4.3
The standard commands (cut, copy, find...) can be launched via the "Edit" menu and the "Edit" tool bar.
To define the preamble of your document, you can use the "Quick start" wizard ("Wizard" menu).
This dialog allows you to set the main features of your document (class, paper size, encoding...).
Note : You can add other options by clicking the "+" buttons. All yours settings are recorded.
You can also type your own preamble model in the editor : with the "Copy/paste" or "Save As" commands, you can use it for a new document.
To define a new part (section,subsection...) in your document with TeXstudio, just use this combo box in the tool bar :
This will cause a dialog to pop up which allows you to define the style of the part (section,subsection...).
Note : the "Structure View" is automatically updated.
The "Structure View" (left panel) lets you quickly reach any part of your document. All you need to do is to click on any item (label, section...) and you will be taken to the beginning of the corresponding area in the editor. The mechanism for jumping to a line does not anymore only consider line numbers but really remembers text lines. Thus adding and removing lines will not lead to jumps to wrong locations.
A grey background shows the present cursor position in the text in the structure view as well. A greenish background denotes sections which are in the appendix.
The "Structure View" is automatically updated as you type. You can also use the "Refresh Structure" ("Edit" menu) command at any moment.
Apart from labels,sections,includes and beamer blocks, comments starting with %TODO are also scanned for and presented as section of its own in the structure view. This can be used to create a kind of permanent bookmark in the text or just to note where some changes are still necessary.
The structure view also offers a context menu which allows to copy/cut all text which belongs to a section (including subsection) and paste it before or after a section. Section can be indented/unindented which means that the hierarchy level is changed by one, i.e. \section is changed to \subsection, and all subsections are treated accordingly
For each file, three bookmarks can be used to speed up navigation : just click on a line number to add or remove a bookmark. When you have already defined three bookmarks, you must remove one of them to add a new bookmark. To jump to the line corresponding to a bookmark in the editor, just click on the buttons in the status bar.
You can quickly set the format of a part of your text with this tool bar :
Additional option: a selected text can be directly framed by certain environments. Example: while clicking on the button "Bold" after having selected the word "Hello" , you will obtain the code: \textbf{Hello}.
This option is available for all the environments indicated by "[selection]" in the "LaTeX" menu.
The usual "spacing" commands are available in the "LaTeX" and "Math" menus. To insert quickly the "new line" LaTeX command, you can use the corresponding command in the toolbar (shortcut : Ctrl+Alt+return)
The usual list environments code can be insert quickly via the "LaTeX-List" menu.
Note : the shortcut for the \item command is Ctrl+Alt+H.
With the "Tabular" wizard ("Wizard" menu), the LaTeX code for a tabular environment can be quickly inserted :
You can set the main features of your table.
Note : this dialog allows you to type directly the code in the cells.
The corresponding LaTeX code is automatically inserted in the editor.
To help you to insert a "tabbing" code, you can use the "Tabbing" wizard ("Wizard" menu) :
To insert a picture in your document, just use the "\includegraphics" command in the "LaTeX" menu. Then, click on the "browser" button in the dialog to select the graphic file.
Note : you can insert a "figure" LaTeX environment ("LaTeX - Environments" menu) before inserting the picture.
TeXstudio offers a wizard for picture insertion in your document. Apart from selecting a file, you can also have TeXstudio include an appropriate figure-environment with label and caption correctly set.
This toolbox in the toolbar allows you to insert quickly the label, cite, ref, footnote... code.
Note : the labels used in your documents are displayed in the "Structure View".
Additional option:for the \ref command, a dialog box allows you to select directly the label.
You can toggle in the "in-line math" environment with the "f(x)" button in the toolbar (shortcut : Ctrl+Alt+M) or with the "Math" menu. The shortcut for the "display math" environment is : Alt+Shift+M.
The "Math" toolbar allows you to insert the most currents mathematical forms (frac, sqrt...) like the \left and \right tags.
With the "symbols panels" in the structure view, you can insert the code of 400 mathematical symbols.
You can also define the format of your mathematical text via the "Math" menu.
For the "array" environments, a wizard (like the "Tabular" wizard) is available in the "Wizard" menu. With this wizard, you can select the environment : array, matrix, pmatrix.... The cells can be directly completed.
Whenever you press \ followed by a letter, a list of possible LaTex tags is shown where you select the right one. If you write additional letters the list is filtered, so that only the tags starting with the already written text are shown.
If the list contains words which all start with the same letter combination, you can press Tab to complete all common letters. If only one element is present in the list, Tab selects this one to do the completion, like Enter. This behaviour is similar to tab completion in bash shells.
You can also press Ctrl+Space to open this list whenever you want.
If a tag has different options, a short descriptive text is inserted into your text, telling you the meaning of each option. You can press Ctrl+Left, Ctrl+Right to select all positions.
Furthermore normal text can be completed by starting to type a word and pressing Ctrl+Space. All apropriate words in the current document are used as possible suggestions.
If a enviroment is to be inserted, typing in the beginning of the environment name and pressing Ctrl+Alt+Space gives suggestions for adequate enviroments which are inserted completely with \begin{env}..\end{env}
And finally user tags can be assigned a abbreviation which can also be used with completion. Just type in the start of the abbreviation and start the completion with Ctrl+Space. The abbreviation should show up in the completion list, especially marked with “abbreviation (template)”.
If you change a command by completing a new command, only the command name is substituted. The same is true for environments, where the environment is changed in the \begin- and \end-command.
The easiest way to compile a document is to use the "Quick Build" command ("Quick" button - shortcut : F1). You can define the sequence of commands used by the "Quick Build" command via the "Configure TeXstudio" dialog.
You can also launch each command one by one (shortcuts : F2...F12 - see the "Tools" menu).
Note : the "Clean" command in the "Tools menu" allows you to erase the files (dvi, toc, aux...) generated by a LaTeX compilation (except the ps and pdf files).
Warning : all yours files must have an extension and you can't compile an "untitled" file or a file with a space in his name.
With the "Quick Build" command, the log file is automatically displayed in the "Messages / Log file" pannel. While clicking on a number in the "Line" column, the cursor is placed on the corresponding line in the editor and the error is displayed.
Remark : a summary of the latex errors and warnings is displayed before the full log file.
The "Next Latex Error"and "Previous LaTeX Error" commands allow to get to the errors detected during compilation.
Lines with errors, warnings, bad boxes will be highlighted with red, yellow or blue background and you can jump between them using Ctrl+Up/Down. (Ctrl+Shift for errors only, Ctrl+Alt for warnings only, Alt+Shift for bad boxes only)
A tool tip will show more details of the mistake if you jump to a line (it is also shown if you move the mouse over the mark left from the line numbers).
TeXstudio allows you to work onto documents separated in several files.
To include a TeX file into your document, just use the "\include{file}" command in the "LaTeX" menu. The file will appear in the "Structure View". With a click on his name, TeXstudio will open it.
TeXstudio now understands parent/child relations of loaded documents (1 level only !). Therefor, as in "master document mode", only the parent document is compiled if compilation is tarted while working on a child document. Likewise labels and usercommands are known in all corresponding documents.
You can still define your "master document" with the "Options" menu. All the commands of the "Tools" menu will apply only to this document even when working on the "children" documents (you can even close the "master" document).
If a master document is set, labels and usercommands which are defined in any open document, can be used for completion in any open document. Thus you can insert easily a reference to a label which is defined in another subdocument, as long as that document is open in TeXstudio.
Note : you can leave the "master" mode with the "Options" menu.
For the "bib" files , the "Bibliography" menu enables you to directly insert the entries corresponding to the standard types of document.
Note: the optional fields can be automatically deleted with the "Clean" command of the "Bibliography" menu.
Apart from the supported svn features already describes in section 1.8, TeXstudio supports two more commands.
"File/chekin" performs an explicit save and check in, with a input dialog which asks for an checkin in message which is stored in the svn history.
"File/Show old Revisions" pops up a dialog, which shows all alvailable revisions. A selection of an older revision leads to instatanious change of the current document to that older revision. You can can select and copy old parts to transfer them to the most recent version of your document, by copying the parts and then going back to most recent version. If you start editing that document directly, the dialog is closed and the present text is your new most recent version though yet unsaved.
TeXstudio allows you to insert your own tags (shortcuts : Shift+F1...Shift+F10). These tags are defined with the "User - User Tags" menu.
Note : if the code of the menu is "%environment", TeXstudio will directly insert:
\begin{environment }
\end{environment }
If you write %| somewhere the cursor will be placed at that place in the inserted text. (A second %| will select everything between them).
Write %<something%> to mark it as descriptive text which can be selected by Ctrl+Left/Right.
The option %(filefilter%) will be replaced by a filename which is asked for in a file dialog. The file filter is the standard Qt-Filefilterformat.
For example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)", see also Qt-Doc
Instead of using code snippets, you can also make use of javascript. To do so, put "%SCRIPT" in the first line. The following code will be interpreted as javascript. The language is based on ECMAScript. To access the document these objects are introduced:
Command | Description |
Global scope | |
---|---|
alert(str), information(str), warning(str) or critical(str) | shows str in a messagebox with a certain icon |
confirm(str) or confirmWarning(str) | shows str as a yes/no question in a messagebox |
debug(str) | prints str to stdout |
writeFile(name, value) | Writes value to file name (requires write privileges) |
readFile(name) | Reads the entire file name (requires read privileges) |
system(cmd) | Calls cmd and returns a ProcessX object which has this methodes:
|
setGlobal(name, value) | Sets a temporary, global variable |
getGlobal(name) | Reads a global variable |
hasGlobal(name) | Checks for the existence of a global variable |
setGlobal(name, value) | Sets a global configuration variable. (can change the values of the ini file, requires write privileges) |
getGlobal(name) | Reads a global configuration variable. (can read all values of the ini file, requires read privileges) |
hasGlobal(name) | Checks if a global configuration variable exists. (requires read privileges) |
hasReadPrivileges() | Checks if the script has read privileges |
hasWritePrivileges() | Checks if the script has write privileges |
Editor object | |
editor.search(searchFor, [options], [scope], [callback]) | Searchs something in the editor.
|
editor.replace(searchFor, [options], [scope], [replaceWith]) | This function searches and replaces something in the editor. It behaves like editor.search apart from the replaceWith argument which can be a simple string or a callback function. If it is a function the return value of replaceWith is used to replace the match described by the cursor passed to replaceWith. |
editor.undo(); | undo last command in editor |
editor.redo(); | redo last command in editor |
editor.cut(); | cut selection to clipboard |
editor.copy(); | copy selection to clipboard |
editor.paste(); | paste clipboard contents |
editor.selectAll(); | select all |
editor.selectNothing(); | select nothing (clear selections) |
editor.find(); | activate "find panel" |
editor.find(QString text, bool highlight, bool regex, bool word=false, bool caseSensitive=false); | activate "find panel" with predefined values |
editor.find(QString text, bool highlight, bool regex, bool word, bool caseSensitive, bool fromCursor, bool selection); | activate "find panel" with predefined values |
editor.findNext(); | find next |
editor.replacePanel(); | replace (if find panel open and something is selected) |
editor.gotoLine(); | activate "goto line panel" |
editor.indentSelection(); | indent selection |
editor.unindentSelection(); | unindent selection |
editor.commentSelection(); | comment selection |
editor.uncommentSelection(); | uncomment selection |
editor.clearPlaceHolders(); | clear place holders |
editor.nextPlaceHolder(); | jump to next place holder |
editor.previousPlaceHolder() | jump to previous place holder |
editor.setPlaceHolder(int i, bool selectCursors=true); | set Placeholder |
editor.setFileName(f); | set filename to f |
editor.write(str) | inserts str at the current cursors position (if there are cursor mirrors, str will be inserted by all of them) |
editor.insertText(str) | inserts str at the current cursor position (cursor mirrors are ignored) |
editor.setText(text) | replace the whole text of the current document by text |
editor.text() | return the text of the complete document |
editor.text(int line) | return text of line | Document object |
editor.document().lineCount() | Returns the number of lines |
editor.document().visualLineCount() | Returns the number of visual lines (counting wrapped lines) |
editor.document().cursor(line, [column = 0], [lineTo = -1], [columnTo = length of lineTo]) | Returns a cursor object. If lineTo is given the cursor has a selection from line:column to lineTo:columnTo, otherwise not. |
editor.document().text([removeTrailing = false], [preserveIndent = true]) | Returns the complete text of the document |
editor.document().textLines() | Returns an array of all text lines |
editor.document().lineEndingString() | Returns a string containing the ending of a line (\n or \n\r) |
editor.document().canUndo() | Returns true if undo is possible |
editor.document().canRedo() | Returns true if redo is possible |
editor.document().expand(lineNr) | Expands the line |
editor.document().collapse(lineNr) | Collapse the line |
editor.document().expandParents(lineNr) | Expand all parents of the line until it is visible |
editor.document().foldBlockAt(bool unFold, lineNr); | Collapses or expands the first block before lineNr |
Cursor object | |
cursor.atEnd() | returns whether the cursor is at the end of the document |
cursor.atStart() | returns whether the cursor is at the start of the document |
cursor.atBlockEnd() | returns whether the cursor is at the end of a block |
cursor.atBlockStart() | returns whether the cursor is at the start of a block |
cursor.atLineEnd() | returns whether the cursor is at the end of a line |
cursor.atLineStart() | returns whether the cursor is at the start of a line |
cursor.hasSelection() | return whether the cursor has a selection |
cursor.lineNumber() | returns the line number of the cursor |
cursor.columnNumber() | returns the column of the cursor |
cursor.anchorLineNumber() | returns the line number of the anchor. |
cursor.anchorColumnNumber() | returns the column of the anchor. |
cursor.shift(int offset) | Shift cursor position (text column) by a number of columns (characters) |
cursor.setPosition(int pos, MoveMode m = MoveAnchor) | set the cursor position after pos-characters counted from document start (very slow) |
cursor.movePosition(int offset, MoveOperation op = NextCharacter, MoveMode m = MoveAnchor); | move cursor offset times. MoveOperations may be:
|
cursor.moveTo(int line, int column); | move cursor to line and column |
cursor.eraseLine(); | remove current line |
cursor.insertLine(bool keepAnchor = false); | insert empty line |
cursor.insertText(text, bool keepAnchor = false) | insert text text at cursor (this function will ignore indentations and mirrors, see editor.write and editor.insertText) |
cursor.selectedText() | return the selected text |
cursor.clearSelection(); | clears selection |
cursor.removeSelectedText(); | removes selected text |
cursor.replaceSelectedText(text); | replace selected text with text |
cursor.deleteChar(); | removes char right to the cursor |
cursor.deletePreviousChar(); | removes char left to the cursor |
cursor.beginEditBlock(); | begins a new edit block. All cursor operations encapsulated in an edit block are undone/redone at once. |
cursor.endEditBlock(); | ends an edit block |
App object | |
app.getVersion | Current version (0xMMmm00) |
app.clipboard | Property to read/write to the clipboard |
app.getCurrentFileName() | File name of currently edited file |
app.getAbsoluteFilePath(rel, ext = "") | Converts a relative filename to an absolute one |
app.load(file) | Loads an file |
app.fileOpen/Save/Close/.../editUndo/.../QuickBuild/... | All menu commands (i.e. all slots in the texmaker.h file) |
FileChooser object | |
fileChooser.exec() | show dialog and wait until it is closed again |
fileChooser.setDir(dir) | set directory in the dialog to dir |
fileChooser.setFilter(filter) | set file filter to filter, using the QT-format, see above |
fileChooser.fileName() | return selected filename (after exec) |
%SCRIPT app.clipboard = editor.fileName();
%SCRIPT eval(editor.text());
%SCRIPT currentLine=editor.text(cursor.lineNumber()); from=currentLine.lastIndexOf("%")+1; to=currentLine.lastIndexOf("="); if (from>=0 && to > from) { toEvaluate = currentLine.substring(from, to); with (Math) { value = eval(toEvaluate);} cursor.eraseLine(); cursor.insertText(currentLine.substring(0, from)+toEvaluate+"="+value); cursor.insertLine(); cursor.movePosition(1,cursorEnums.Left ); }This will evaluate everything between % and = and write the result after the =. You can use it like a calculator if you write %5+3= in the tex file.
%SCRIPT var doit = function(){ var mytext=cursor.selectedText(); var regExNumberPre = " *[0-9]+([.][0-9]*)? *"; var regExDigit = /[0-9]/; var regExSpace = / /g; var regExPairPre = " *(-?"+regExNumberPre+")"; var regExPair = new RegExp("()[(]"+regExPairPre+","+regExPairPre+"[)]"); ; //read first coordinate pair var regExFirstPairPre = regExPairPre + " *([+-]"+regExNumberPre+")?"; var regExFirstPair = new RegExp("()[(]"+regExFirstPairPre+","+regExFirstPairPre+"[)]"); //extract offsets (start regex search from first digit, to allow -x - y) var matches = regExFirstPair.exec(mytext); if (matches == null) throw "missing"; //throw matches; var offsetXPre = matches[4]; var offsetYPre = matches[8]; if (offsetXPre == "" && offsetYPre == "") throw "abc"; var offsetX = offsetXPre == ""?0.0:offsetXPre.replace(regExSpace, "")*1.0; var offsetY = offsetYPre == ""?0.0:offsetYPre.replace(regExSpace, "")*1.0; //move first pair var matchpos = mytext.search(regExFirstPair); editor.write(mytext.slice(0,matchpos)); editor.write("("+(matches[2].replace(regExSpace, "")*1.0+offsetX)); editor.write(", "+(matches[6].replace(regExSpace, "")*1.0+offsetY)+")"); //move other pairs var remaining = mytext.slice(matchpos+matches[0].length); while (remaining != ""){ matches = regExPair.exec(remaining); if (matches == null) break; matchpos = remaining.search(regExPair); editor.write(remaining.slice(0,matchpos)); remaining = remaining.slice(matchpos+matches[0].length); editor.write("(" + ((matches[2].replace(regExSpace, "")*1.0)+offsetX) + ", "+ ((matches[4].replace(regExSpace, "")*1.0)+offsetY) + ")"); } editor.write(remaining); } doit();This will add to all selected coordinate pairs the offset of the first pair which translates all pairs in a given direction. E.g. if you have (1 + 1, 2 - 1.5) (3, 4) it will change it to (2, 0.5) (4, 2.5).
You can also launch your own commands (shortcuts : Alt+Shift+F1...Alt+Shift+F5). These commands are defined with the "User - User Commands" menu.
The main pstricks commands can be inserted with the "Pstricks" panel in the "Structure View".
The metapost keywords can be inserted with the "Metapost" panel in the "Structure View" and the "mpost" command can be launched via the "Tools" menu.
This command (from the "Tools" menu ) produces a set of html pages from a LaTeX source file with one image for each html page. Each page in the slide presentation corresponds to one of the postscript pages you would obtain running LaTeX.
The command also produces an index page corresponding to the table of contents you would obtain with LaTeX. Each item of the index page includes a link to the corresponding html page.
You can create links in the html pages by using the \ttwplink{}{} command in the tex file.
Synopsis :
\ttwplink{http://www.mylink.com}{my text} (external link)
\ttwplink{page3.html}{my text} (internal link)
\ttwplink{name_of_a_label}{my text} (internal link)
Warning : You can't use this command with the hyperref package (and some others packages). This command can only be used with the "Convert to html" tool.
TeXstudio file [--master] [--line xx] [--start-always] [--pdf-viewer-only] [--page yy]
With the "--master" option, the document will be automatically defined as a "master" document.
With the "--line xx" option, TeXstudio will ask you if you want to jump to the xx line after loading the document.
With the "--start-always" option, TeXstudio will start, even if another instance of it is already running.
With the "--pdf-viewer-only" option, TeXstudio will open as standalone pdf viewer without editor
With the "--page" option, TeXstudio displays a certain page if used as pdf viewer
Defaults keyboard shortcuts :
Basically a cwl file is a list of valid commands which contains one command per line. If no further information is given, the command is considered valid at any position in a latex document. The following characters have special meanings: