2

I would like to automatically inserting closing environments In MiKTeX-TeXWorks. And i have found Shortcut for inserting matching \end{something} in VIM. Any other same options are available in Windows?

  • Well, Vim is available for Windows ... – Torbjørn T. Feb 17 '15 at 8:38
  • 1
    You may try external integrated development environment called TeXStudio. It comes with auto-completion. – Say OL Feb 17 '15 at 12:26
5

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 other short cuts that are defined in files like tw-latex.txt. To find these, go to HelpSettings and Resources. You will get this window:

enter image description here

Click on the link and the folder C:\Users\HK\AppData\Local\MiKTeX\2.9\TeXworks\0.4 opens (HK may be different for you). Get inside the completion folder where you will find four files → tw-basix.txt, tw-beamer.txt, tw-context.txt and tw-latex.txt. You need tw-latex.txt where these shortcults can be found.

enter image description here

Foe example, type bsubeq and press TAB and see yourself.


In winedt, type

\begin{document}}   %%<--- extra brace

to get

\begin{document}

\end{document}

or to close the environment that is open, type

\end{{

In winedt, to find short cuts, do something like this:

Go to OptionsOptions Interface, then press Main Menu once. Press the arrow head as shown and you will find shortcuts, click on shortcuts. Now all shortcuts are copied to clip board. Open a new file and paste.

enter image description here

  • Also in TeXworks: bd and then tab twice for document, bi for itemize, bt for tabular, table etc., bf for frame, figure etc., beq for equation. There are a lot more as well. – Torbjørn T. Feb 17 '15 at 8:42
  • The complete list can be found in the completion files, so you can also define your own there. In TeXworks, go to Help --> Settings and Resources to find out where the resources folder is. Within that folder there is a completion subfolder which contains the text files with the completion patterns. See also code.google.com/p/texworks/wiki/CodeCompletion – Torbjørn T. Feb 17 '15 at 8:47

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.