[texworks] Some (simple) questions

Herbert Schulz herbs at wideopenwest.com
Sat Aug 30 22:23:43 CEST 2008

On Aug 30, 2008, at 3:05 PM, Joseph Wright wrote:

> Hello again,
> Sorry to go on, but another couple of thoughts:
> 6) When writing environments, I quite like the idea of being able to
> generate the "\end {...}" part having typed the "\begin{...}" part.   
> In
> my current editor, this occurs by adding a second "}" after typing
> "\begin{...}".  Is this a good idea for TeXworks?
> ...


If you write


at the start of a line and pressing Esc you will get a complete  
enumerated environment;

<cursor here>

and then searching for the bullet (•) will jump to the end of the  
environment. Similarly, placing


at the start of a line and pressing Esc gives you

\newcommand{<cursor here>}{•}

where the cursor is between the first braces. Searching for the bullet  
will then select the second argument. If press Esc a second time you  
get the variation with on optional argument

\newcommand{<cursor here>}[•]{•}

and Esc once more gives


with two optional arguments.

The list of abbreviations is contained in ~/Library/TeXworks/ 
completion/ on a Mac; don't know where that folder is on other  
systems. The file is UTF-8 and can be edited. Looking at the file will  
give you some idea of what can be done and how to do it.

Hope this is useful.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

More information about the texworks mailing list