[texworks] 'Improved' auto-completion

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Aug 20 22:51:31 CEST 2013

On 17/08/2013 21:43, Herbert Schulz wrote:
> Howdy,
> AutoCompletion in TeXShop has been extended since the time when it used for TeXworks.

The question wasn't in any way a criticism of the TeXShop :-)

> It is now possible to surround a first argument place holder with two #INS# statements, i.e., #INS#•#INS#, and it will be selected; that allows all arguments to have place holders, •, including the first one. Not only that, you can have a place holder that starts with •‹ and ends with › surrounding a comment so you can add a short memory jogger (note: ‹ and › are NOT < and > but open/close single guillemet quotes). When you jump to a comment the complete comment is selected. Finally, AutoComplete in TeXshop retains indentation for those that like to ``pretty print'' environments. PS: that file MUST be saved in UTF-8 Unicode since it uses non-ascii characters and is read in by TeXShop as UTF-8.

I quite like the #INS# placeholder, although I have to say I've never
really got on with the • stuff (I can never remember the key
combination). I'd love to hear how others see this: TeXworks has not to
my knowledge picked up any improvements in auto-complete.

> As before, the Completions.txt file can be edited to customize spacing, etc., as well as add/delete commands and abbreviations. Make it yours.

Of course. My reason for asking the question was the official aim of
TeXworks: 'lowering the entry barrier'. For me, the auto-completes I
remember are those such as 'Type "\docum" and press Tab to get
"\documentclass"', i.e. 'start of command/environment' ones. That seems
to align with the approach TeXstudio takes. I find the "xa", etc.,
abbreviations pretty confusing. I can see the value if you learn them,
but do wonder about beginners.

> Finally, the Completions.txt file supplied is for LaTeX. I have put out a request on the Mac OS X TeX list for help to create a separate file for use with Context but got no response to my request.

Again, I'm looking at this from the TeXworks point of view. TeXworks has
a few auto-complete files, and all are 'active' at once.  There's no
easy way to switch them off, so 'out of the box' you get a lot of beamer
stuff in addition to more generally-useful commands. That led me to
suggest a plan similar to TeXstudio: have one completion file per
package (or perhaps 'task': a set of related packages), and allow
turning them on-and-off.
Joseph Wright

More information about the texworks mailing list