2

I am new to Texworks. I would like to have this behaviour: If I type in \begin{something} then the phrase \end{something} will be added automatically.

Is this feature available? How can I activate it?

1

TeXworks does have some autocompletion features, see https://github.com/TeXworks/texworks/wiki/CodeCompletion, but I'm not sure if exactly what you ask is available.

The way TeXworks' autocompletion works, is that you type the first few letters of a given pattern, and then hit the Tab-key one or more times. For example if I type bal and hit Tab, I get

\begin{align}

\end{align}•

Hitting Tab more times steps through other environments, like align*, alignat and aligned. You can use Shift + Tab to cycle backwards. The bullet at the end is a placeholder that you can jump to by hitting Ctrl + Tab, the idea being that after you've finished writing your equation, you can quickly jump out of the environment.

The available completions are listed in text files in the TeXworks resource directory, see https://github.com/TeXworks/texworks/wiki/TipsAndTricks#locating-and-customizing-texworks-resources. (One way of finding that directory is in TeXworks to choose Scripts --> Scripting TeXworks --> Show scripts folder. Go up one folder, and you're in the resource folder, where you should find a subfolder called completion.)

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.