7

I'd love to know how to add the eqnarray* environment to autocompletion, I only get the regular eqnarray. (I'm using Windows 7)

Julio Cáceres
  • 309
  • 1
  • 3
  • 9

3 Answers3

4

For completeness: You find more info on how the completer works in the FAQ.

In the special case of eqnarray*, it's not really missing but included in l2tabu.cwl. This is not loaded by default, because eqnarray* is deprecated. If you insist to use it for some reason, you can include it by checking l2tabu.cwl at Options -> Configure -> Completion -> Use following completion files.

Bubaya
  • 2,279
Tim Hoffmann
  • 11,159
2

Otherwise, if you want allow completion with personnal command, you need to create a CWL file in the personnal folder (C:\Users\XX\AppData\Roaming\TeXstudio\completion\user).

On each lign you write your commands, in this form :

\command
\commandWithText{text}

You can see arguments example here : http://texstudio.sourceforge.net/manual/current/usermanual_en.html#CWLDESCRIPTION

Don't forget to activate you personnal CWL file in the TexStudio settings !

Gaspalet
  • 165
  • 7
1

Typing the first parts of the environment \begin{eqn, there should be a \begin{eqnarray} listed in the pop up for autocompletion. It should look like this. (I am using version 2.6.2 by the way and it should work in any platform.)

enter image description here

But as suggested, you should use the align or align* environment instead. In order to activate text completion for align and other amsmath environments, click

Options > Configure TeXstudio... > Completion

then click on the check box for amsmath as you can see in the picture below.

enter image description here

hpesoj626
  • 17,282
  • Yes, but he wanted to use eqnarray*. ;) Either way, the canonical way for auto-completion for an environment is (after typing eqn) Ctrl+Alt+Space. – Qrrbrbirlbel Jul 29 '13 at 01:40
  • Hi @Qrrbrbirlbel Thanks for letting me know about the Ctrl+Alt+Space. I just hit Enter after typing enough characters to isolate the specific text completion for the command/environment as I find it faster that way, or scroll down to the specific command/environment. Am I missing something by not using Ctrl+Alt+Space? – hpesoj626 Jul 29 '13 at 02:00
  • Well, Enter works only because “Automatically start completer when typing LaTeX-Commands” in the “Completion” tab of the Configuration checked. Without it, you first need to do Ctrl+Space (the completion for macros). You’re missing typing \begin! ;) I learned about Ctrl+Alt+Space due to a bug concerning completing environment which is long fixed. – Qrrbrbirlbel Jul 29 '13 at 02:09
  • I see now. Perhaps I missed your earlier comments. I have to get back to this a little later though. Thanks! – hpesoj626 Jul 29 '13 at 02:13
  • @Qrrbrbirlbel I am getting a bug when I hit Ctrl+Alt+Enter. I get an extra } at the end of the environment. File in https://sourceforge.net/p/texstudio/bugs/775/ – hpesoj626 Jul 29 '13 at 10:29
  • You don't type the \begin part. Simply type enu, then Ctrl+Alt+Enter will create \begin{enumrate}<cursor>\end{enumerate}. – Qrrbrbirlbel Jul 29 '13 at 21:47