2

I'm using TeXstudio. Everytime I have to type \begin{...} and \end{...}. It would save me sometime if everytime I type \begin{...} the software automatically fill with \end{...}. How can I do this?

In addition, given that I have \begin{env1} \end{env1}, if I rewrite a environment, say \begin{env2}, is there a way to the program to automatically rewrite \begin{env2}?

  • Welcome to TeX.SE! The user manual mentions "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}". I don't have TeXstudio so I can't test it, but maybe that would work. – Marijn Oct 17 '19 at 17:01
  • I like this. I'll use ctrl+alt+space. – Celine Harumi Oct 17 '19 at 17:04
  • @Marijn Would you like to add an answer? – Phelype Oleinik Oct 17 '19 at 21:42
  • @PhelypeOleinik as requested. – Marijn Oct 17 '19 at 21:55
  • @Marijn Thanks :-) – Phelype Oleinik Oct 17 '19 at 21:58
3

From the TeXstudio manual, Section 2.13 (emphasis mine):

2.13 Auto Completion

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.