For easier data exchange, macros can be im- and exported to a file. If you want to add a macro of your own to that repository, you can hand it in as a feature request on Github. Each macro can be assigned a fixed shortcut in the "Shortcut" box.
The list of macros on the left-hand side represents the macro ordering in the macro-menu. Folders can be added to sort a larger number of macros sensibly. The "run script" button directly executes a script in the editor for testing. Apart from normal text, some special codes are recognized and replaced on insertion.
If a macro insertion replaces an existing text, the replaced text is again inserted into a placeholder in the macro. If the original text spans more than one line, it will be inserted into a placeholder with the multiline property. Otherwise in a placeholder with the select-property. This code is only necessary if the not the first placeholder is intended to take the cut buffer, e.
The file filter is the standard Qt-Filefilterformat. Instead of using code snippets, you can also make use of scripting with QtScript. Here are the objects that provide the interface to the TeXstudio internals:. More examples can be found in the Wiki. TXS makes use of look-behind searching: "?
You can access the matched expression in the script via the global variable triggerMatches. It's zero-th component is the match to the complete regexp. The following elements are matches to groups if groups are defined.
Note: Triggers are inactive while the completer is active. To the scope in which a macro will be active, you can prepend an expression of the pattern? You may combine? However, combing? Note that you still need the regular expression of the trigger itself. Here's a full complex example:? Additionally the following special trigger terms without parentheses can be used to execute the script when the corresponding event occurs: Special Trigger Executed on Event?
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.
This command can only be used with the "Convert to html" tool. TeXstudio provides an integarted pdf-viewer which offers forward- and inverse-search. Forward search is automatically done every time the pdf-viewer is opened. TeXstudio will jump to the position where your cursor is currently positioned. This will keep the pdf-viewer position synchronous to your cursor opposition in the editor. Likewise "Cursor follows Scrolling" keeps the editor position synchronous to pdf-viewer position.
Some dvi viewers can jump to and visually highlight a position in the DVI file that corresponds to a certain line number in the La TeX source file. When the viewer is launched, the -placeholder will be replaced by the current line number and? If your PDF file is not in the same directory as your. For details see External Commands. Below you can find a list of commands for some common viewers. Of course, you have to replace your program path with the path of the program on your computer, if you want to use a command.
Since version 10 of the adobe products the DDE service name contains a letter for the Product and the version number. You can define a User Command for the above DDE-command and call it at the beginning of your build chain. This ensures that the file will be closed and thus is writable when compiling. Launch Yap from TeXstudio: " your Yap path " -1 -s?
Launch qpdfview from TeXstudio: qpdfview --unique? So called "magic comments" are a way to adapt the options of the editor on a per-document level. The concept was originally introduced in TeXshop and has been adopted in a number of editors since. TeXstudio supports the following magic comments:. Defines the language used for spell checking of the document. This overrides the global spellchecking settings. Nevertheless, an appropriate dictionary has to be installed.
Defines the character encoding of a document. This setting override the automatic root detection in TeXstudio. Defines the compiler to be used for the document. Valid options are "latex","pdflatex","xelatex","lualatex" and "user n " e. It overrides the build-system command specified to the left by the one on the right.
See also the description of the build system. You cannot run them manually. They are run via the trigger regular expression or special trigger, see section on triggers. The macro is just read once, when the file is opened. Changes during an edit session will only take effect when you reopen the file. BIB TS-program. This is intended as an interface for external bibliography managers to push citations to TeXstudio. Also comma separated keylists are supported.
TeXstudio recognizes, if the cursor is already within a citation macro. If so, only the key is inserted at an appropriate position, otherwise the full citation command is inserted. This allows using of multiple instances. Additional options only available in debug versions of texstudio: --disable-tests Prevent running any tests. Note: The most common tests are run automatically, if there were changes to the executable i. TXS has been compiled since the last run.
Furthermore all tests are run once a week. The following list is a rough overview of the defaults keyboard shortcuts. Depending on the operating system, there may be some deviations to adapt for OS-specific shortcut conventions.
TeXstudio uses an extended format of cwls to include additional semantic information and allow for cursor and placeholder placement. It uses them for the following purposes:. Each line of a cwl file defines a command.
Comment lines are possible and start with. The command syntax is. If no classification is given, the command is considered valid at any position in a LaTeX document. The char cannot be used inside a command , as it has special meaning:. In its simplest form the command is just a valid LaTeX expression as you find it in the documentation, e.
By default, every option is treated as a placeholder. The argument names are visible in the completer window and after completion as placeholders in the editor. In general, you are free to name the arguments as you like.
We encurage to provide meaningful names e. Though TeXstudio can automatically create cwls from packages, these autogenerated cwls do not contain meaningful argument names and no classification of commands. Therefore we ship hand-tuned cwls for many packages. We encourage users to contribute new cwl files. These should have the following attributes:. If present, the user provided cwl is taken, if not built-in versions are taken. As a last resort, txs automatically generates cwls from latex styles, though these only serve to provide syntax information.
Context information for arguments are not available and no completion hints are given. Texstudio offers the possibility to reformat an existing latex table after a table template. Now you can select a template which defines the formatting of the table. Meta data is used to provide additional information for the template. It can be stored in a metaData object in the source code. Currently only string values are accepted.
It is possible to use html tags for formatting. The template itself is a javascript see above with some prefined variables which contain the whole table.
The new table is just placed as replacement of the old one, using information from that variables. These features allow you to modify core aspects of TeXstudio and thus provide a great flexibility of adapting TeXstudio to your needs. Since these features are either complex or are tightly bound to the internals, we cannot guarantee functionality in all cases and forever. For once, we do not have enough resources to provide full support. Additionally, the dependence on internals conflicts with our need to freely change internals without restriction for future development.
Nevertheless, we decided that these features may be of interest for experiended users. As a compromise, we provide these features tentatively. We do not guarantee any of this will still be working in future versions. Functionality may change or be removed without notice. You can modify the behavior or add new functionality using Script Macros. The section above lists the core commands, but there are more commands which are not documented.
A number of them are used in the examples section in the wiki. Qt supports modifying the appearance of an application using style sheets. You may use this to adapt the GUI of the main window by placing a file stylesheet. The file is read at program startup. Please note that the style sheet may interfere with other ways of configuring the GUI, in particular the style color scheme and other options.
Therefore we do not guarantee a consistent behavior when using style sheets. TeXstudio uses QCodeEdit as editor component. It specifies languages in a special xml format named QNFA. This includes highlighting, parentheses for matching and code folding. In a normal TeXstudio installation you won't find any. You can add your own languages or overwrite the default ones by placing appropriate. Definitions here take precedence over the builtin ones.
The actual format information is specified in a. You can either use the formats specified in defaultFormats. You should read the syntax format specification and have a look at the formats shipped with TeXstudio. Note: We expose the language specification to you as end-user to give you more flexibility in adapting TeXstudio to your needs. But you should take it as is, because we don't have the capacity to give support here.
It's a powerful API, but neither polished nor fully featured. You might find some constructs in the shipped. Therefore we have extra highlighting functionality directly implemented in the sourcecode for the " La TeX" language, e. You won't be able to modify this or add it to other languages.
Example The following is a small example which specifies some highlighting of python code: python. The changelog can be found in the Github repository.
Determines whether the viewer should be closed, when the corresponding tex file is closed default: auto-close iff embedded. Determines the file to open. This will change the value of the xyz option to i. This will remove all options from the foobar command line, leaving only the name of the executable.
Calls an external command cmd , which includes the program name and its arguments. When expanding any tokens the current file is assumed to be the empty string, so any tokens that use the current file e. If workingDirectory is not set, the working directory will be inherited from the TeXstudio executable. This command returns a ProcessX object which has the following methods: waitForFinished: Wait until the process is finished readAllStandardOutputStr: Returns the stdout readAllStandardErrorStr: Returns the stderr exitCode: The exit code exitStatus: The qt exit status terminate or kill: Stops the process If the script does is not granted permission to run the external command, then system returns null.
The command does not contain any pipe characters , so it undergoes the expansion as an external command. Note that we have doubled the character? Sets a global configuration variable. Reads a global configuration variable. Matches of the regular trigger expression, if the script was called by an editor trigger. Numeric id of the trigger, if the script was called by an event trigger.
Searches something in the editor. It can be either a string e. A cursor describing the position of the match is passed as first argument. All arguments except searchFor are optional, and the order may be changed which may not be future compatible. TeXstudio is open-source and is available for all major operating systems. Download now TeXstudio 4. News A new release TeXstudio 4.
It should fix issue with chinese character input. It should fix a crash on OSX qt6. It should fix crashes which occur on some systems. This bugfix release which contains Qt6. On OSX this should fix problems with the cursor. On OSX this should fix entering accented characters.
This version offers Qt6 support which should improve hidpi handling. Mainly it fixes crashes loading included files. Mainly changing the GUI language has been fixed. Furthermore a global TOC is available besides the structure view.
It is work in progress and not yet automatically updated. Please give feedback. A new bugfix release TeXstudio 3.
It just fixes the configuration of the pdf toolbar size. No changes, just a build fix for OSX. Thanks to all translators on transifex. For Ubuntu, a ppa is available. It fixes garbled symbols in OSX, a crash when changing magic language comment, and pdf search path handling. This is the last release supporting Qt4. It fixes a problem with replacing when search highlight is activated.
This is mainly a bug fix release. Most notably change is better support of regexp in search Qt5 version only. Most notably change is flicker-free update of pdf. For Ubuntu We are happy to accept pull-requests and any other help. This is a bugfix release. The mercurial repository remains, but won't be updated any longer. From now on, you can obtain the latest source code from our git repository on github.
Linux builds are only provided for distributions which allow Qt5 builds. This mainly affects Centos 6, Ubuntu Please participate to increase the number of tranlations. Vote now! This is a bug fix release mainly for OSX and Linux. The shortcuts for moving the cursor get messed up if you use txs 2. To remedy the problem, you need to edit. Sorry for the inconvenience. It also continues to be a Featured Project this week.
It fixes bugs and adds some features. The SVN repository remains, but won't be updated any longer. From now on, you can obtain the latest source code from our Mercurial repository.
You can read an interview there. Also the old releases have been downloaded ten thousand times so far. Vertical blocks can even be copied and pasted. Asked 6 years, 4 months ago. Active 6 years, 4 months ago. Viewed 51k times. Improve this question. Sigur 35k 7 7 gold badges 89 89 silver badges bronze badges. Elise Elise 51 1 1 gold badge 1 1 silver badge 3 3 bronze badges.
Don't use save as. This is not necessary, the pdf is already there as you can view it. Look in the folder of your tex-file. When you compile a tex file the pdf file is created at the same folder. So you don't need to save it again. If you wish you can open the pdf with an external viewer instead of the embedded one.
0コメント