Hot answers tagged

22

Under Options → Configure TeXstudio → Adv. Editor → Special options the option Auto Complete Parentheses dis-/enables the Auto-Completion of all braces, brackets and parentheses. The Tab Adv. Editor is visible after the checkbox Show Advanced Options is checked.


21

Here are a few examples of what I put in the field: \makeatletter (see What do \makeatletter and \makeatother do?) \makeatother \documentclass{@} (Texmaker only has \documentclass[@]{@} preconfigured) \cref{#label#} (for the cleveref package) \Cref{#label#} \qroof{@}.@ (for the qtree package) When you start typing one of these commands, Texmaker will ...


19

The following macro \midruleV sets a \midrule every five rows. Counter midruleV is used to count the rows inside a block of five rows. Therefore the counter is reset before the table and after the header, because the header does not count. The larger problem is finding a place to put \midruleV. The example puts it after the last cell by escaping the current ...


16

In your TeXnicCenter installation folder and subfolders look out for xml files, such as base.xml and math.xml. Edit these files or create your own xml file. Some example lines for align autocompletion: <lxEnvironment name="align" parameters="1" desc="Math environment" icon="math.bmp" index="10" ...


16

It does have auto-complete powers. (It has more than any one person knows about.) Try, e.g., C-c C-m (for calling macros like \footnote or \ref); type the letter 's' and hit TAB. The rest will become clear. C-c C-e will prompt for for starting new environments. And so on. If you use AUCTeX with reftex, try things like C-c [ to prompt you for a ...


15

In Emacs, an experienced user (i.e. a user considering arrow keys and the like a no-no) would use a combination of C-f (forward-char), C-b (backward-char), C-M-f (forward-sexp) and C-M-b (backward-sexp) for this purpose. If you are ambitious enough to internalize these commands you will get really fast. PS: C denotes the Control key and M (normally) the ...


15

Start typing only the name of the environment, e.g. docu, press the code-completion shortcut, and TexnicCenter will create it with \begin, and appropriate braces. I've been tripped off by this in the beginning as well, but apparently it's supposed to save more typing.


13

In Windows, WinEdt offers this feature. You write few letters of a word and then press Ctrl + Enter. A pop-up window will show you the possible list of words as in the following figure. Double clicking on the desired word will insert it in the place. Sublimetext Sublime text too has this feature. But I found that its word completion is not as ...


13

AUCTeX has autocompletion mechanisms different from most of the other LaTeX editors. In Emacs, when TeX-latex-mode is activated, the sequence Ctrl-c Ctrl-e (the - means that the second key has to be pressed while holding the first, while the space implies the release of both keys before the next combination) opens the mini-buffer dialog interface at the ...


11

It's a feature. To save typing, TeXnicCenter additionally inserts \begin{ when environments are completed. This may be confusing if you don't know it. With this knowledge, it should be easy to use, as mindcorrosive said. Though, you could change this behavior if you like. To do this, go to TeXnicCenter directory (C:\Program Files\TeXnicCenter for instance), ...


11

I raised this issue on the TeX on OS X mailing list a few years ago, and received the following reply from Herb Schulz, who created the basic autocompletion file for TeXShop: Well, they will show up depending upon your input encoding. You are supposed to replace them by using the Next/Previous Mark commands to move and select them and replace them. When ...


10

Any LaTeX editor can accommodate this style of auto-completion by means of macro definitions. It is probably the fastest way to perform this without having to switch from your existing editor to a new/different one. In my opinion, it is flexible, transferable and accommodates a host of variability that you may require based on (say) conditional support from ...


10

In the menu, select User > Customize Completion. Then add \begin{flalign} to the list of commands. You can also specify arguments using @, e.g \foobar{@}.


10

If you type enum and press Tab you will get this: Similarly type item and press Tab to get To put a new \item press Shift + Enter at the end of line For a quick view of these short cuts Press Tools and then Snippets (Cntrl+L, Cntrl+S) to get


9

Something that is pretty much as useful is to type nameofenvironment then F5 which gives \begin{nameofenvironment} \end{nameofenvironment}<++> and puts the cursor in the body of the environment. You can leave the environment easily by pressing CTRL J


9

Here's an option using the pgfplotstable package. The idea is to read the data into a macro (called edytable below) and then typeset it using the command \pgfplotstabletypeset[ columns/Student Id/.style={string type}, columns/Name/.style={string type}, every head row/.style={ before row={% \toprule ...


8

Here is a list of LaTeX IDEs While emacs+AucTeX doesn't have "autocompletion" per se but it does have something that performs the same role, and performs it better (obviously). Let's take the example of adding section headings. With autocompletion I start writing \sec... and then press TAB or some such autocomplete key. With emacs, you press Ctrl+C and ...


8

Completion and syntax check is both based on so called cwl files, which contain the definitions of the commands. TXS ships with cwls for some frequently used packages but by far not for all. If there is no cwl for a package yet, TXS tries to create one by extracting the information from the TeX source of the package. By default these commands are marked as ...


7

The correct place to fix this is the regular expressions that RefTeX uses to parse the BibTeX file. However, in the version of RefTeX (4.31) that I am looking at it seems that [{(] shows up every place you would expect. EDIT: After poking at it a bit, it seems the issue is that in reftex.el ( and ) are defined as punctuation is the reftex-syntax-table and ...


7

This can be achieved by creating a custom auto completion file. Such a file has the extension cwl and (on my systom) has to be saved under ~/.kde4/share/apps/kile/completion/tex. The # is a comment char in such a file. In such a file you write the commands with the text you want to appear in the arguments. # custom auto-completion file # ...


7

(comment converted to answer) You can backup all of your settings via Options→Settings File→Save a copy of the settings file and restore them with Replace the settings file by a new one in the same menu. The .ini file you get as a backup contains the custom autocomplete entries; in my file, it was line 27: Editor\UserCompletion=\\ex, ...


7

According to About TeXShop (available here) "Auto completion is user configurable. To configure, open the file ˜/Library/TeXShop/Keyboard/autocompletion.plist with TeXShop. Read the comments at the top, edit appropriately to redefine Landweber’s choices or add your own, and save. Be sure to edit and save in UTF-8 format if you use Unicode ...


7

Yes, this is a bug and will be fixed in WinEdt 8.2. In the meantime, you can get things working properly in this way. Open Tree.ini from the "Options Interface". Do the following global replacement with Regular Expressions on: Search for: <\(0@{ }\)MACRO="GlobalReturn;\(1*\)GlobalMark;" Replace with: <\0MACRO="GlobalMark(1);GlobalReturn;\1" ...


7

This is a misunderstanding: LaTeX doesn't help you to write your text, which is the job of the editor. I'm quite confident that such a thing (capitalize each first letter after a dot) can be achieved with emacs or vim. Word is all and everything in one: editor, typesetting machine, spreadsheet and so on and does nothing really well (OK, millions of people ...


6

TeXnicCenter allows for the creation of "user text modules" that are initiated via a shortcut. To insert your own module, follow Insert>Own Text Modules>Manage Text Modules. Now you can enter a new one called (say) Separator: Once you've established the correct "before cursor" and "after cursor" combination, it is accessible via the menu selection: Or ...


6

By adding these three lines \makeatletter \@ifpackageloaded{biblatex}{\addbibresource{literatur.bib}}{\bibliography{literatur}} \makeatother instead of just \addbibresource{} TeXnicCenter believes you are using \bibliography{} and integrates it accordingly into the GUI and for autocomplete. This solution has the beauty of working with both ...


6

Besides the choices listed by Robert in his answer, which probably won't work in the latest versions of WinEdt (version 6 is quite obsolete now and has not full support for Unicode), WinEdt has a built-in completion feature. Execute the command 'Complete Word' (Ctrl+Enter) in the Tools menu and WinEdt will display a dialog with a list of possible ...


6

Made comment into answer which satisfied the OP Options-->Configure Texmaker-->Editor--> Is completion checked on and add .bib extension \addbibresource{biblatex-examples.bib}. Check if you can see .bib file in Structure on left side pane or open the .bib file with Texmaker from File menu.


6

You can use physics package and exploit its expval (or the short ev) command: \documentclass{article} \usepackage{physics} \begin{document} $\langle x \rangle $ $\langle x^{A} \rangle$ $\expval{x}$ $\ev*{x^{A}}$ $\expval{x^{A}}$ $\ev{x^{A}}$ \end{document} Or use mathtools package and define a macro \DeclarePairedDelimiter\ev{\langle}{\rangle}% ...


6

In Texworks, type \beg and TAB, you will get \begin{. Then type doc as in \begin{doc and again press TAB you will get \begin{document} \end{document} with cursor in between. Then type, say, \beg and TAB to get \begin{ and type ite (\begin{ite) press TAB to get \begin{document} \begin{itemize} \item \end{itemize}• \end{document} There are many ...



Only top voted, non community-wiki answers of a minimum length are eligible