1

Similar to how when you type \begin{document}, \end{document} automatically appears.

This is for TexMaker.

Torbjørn T.
  • 206,688
  • 1
    Hello, in which sourcecode editor? – yo' Aug 12 '18 at 18:17
  • 4
    @boycott.se-yo' I see the boycott is going well. :) – Alan Munn Aug 12 '18 at 18:17
  • @boycott.se-yo' TexMaker – Mohammed Shahid Aug 12 '18 at 18:25
  • 2
    \left( ... \right) has many legitimate uses and even if you only use it a handful of times in a document, typing out the whole thing can be tedious and autocompleting \right) would be a handy and desirable feature even if it only got used once per document. However, the fact you're asking this question makes me a teeny tiny bit worried you may be overusing \left( ... \right) a common beginner's error that I probably still make. See for example https://tex.stackexchange.com/questions/173717/is-it-ever-bad-to-use-left-and-right?noredirect=1&lq=1 – Au101 Aug 12 '18 at 18:50
  • @Au101 I probably am. However, I am just using LaTex for homework assignments and lecture notes so I am not that concerned with having perfect spacing. – Mohammed Shahid Aug 12 '18 at 21:21
  • @Mohammed_Shahid: I really don't know how this can be achieved in texmaker, but I would recommend you the editor TexStudio – autocompetiton and many other features are included … – current_user Aug 15 '18 at 19:56
  • @user49915 hmm, okay. Can you give me some examples of \left and \right resulting in this poor type set? I believe you, but in my limited experience it has never been that bad so I am curious to see how bad it can get. – Mohammed Shahid Aug 16 '18 at 23:40

1 Answers1

1

In TexMaker, there are two ways I currently implement autocompletion of \left(•\right) with the cursor correctly positioned at the •, so that I don't need to use arrow keys or the mouse:

Method 1

Go to User -> User Tags -> Edit User Tags.

A dialog box will pop up. Select which shortcut combination you want. The default runs from Shift+F1 to Shift +F10

Under Menu Item, label it whatever you want. This just names the shortcut.

Under Latex Content, enter \left(@\right)

Click OK

Now press Shift+F1 (or whatever you chose) and it will auto-insert \left(•\right) with • immediately highlighted - like how autocomplete of commands with placeholder arguments work, such as \mathrm{•}. The next keystroke will replace •

Method 2

Go to User -> Customize Completion.

Enter \left(@\right) and click Add

This lists \left(•\right) directly after \left( in the autocompletion list, so it requires one additional keystroke (down arrow key) to select it. Not my favourite because I am lazy

Bawb
  • 11