[texworks] Autocompletion with numbers

Stefan Löffler st.loeffler at gmail.com
Sat Dec 8 17:32:46 CET 2012


On 2012-11-17 20:00, Timmy Timmy wrote:
> I was wondering if there is a simple way to allow the <alias> of a
> code-completion template to include numbers. In particular, I'd like
> to be able to use templates such as "x1:=x_{1}". At present, I use
> templates such as "xa:=x_{1}", but I would prefer to be able to use
> numbers because using letters sometimes clashes with other usages, and
> it can take a while to cycle through all the options. I looked through
> the files in "TeXworks/0.4/configuration" for a regex "[a-zA-Z]" that
> I could change to "[a-zA-Z0-9]", but didn't find anything. I am using
> TeXworks 0.4.3 r857 (MiKTeX 2.9) on Windows 7 (x64).

Unfortunately, this is not possible at the moment. TeXworks uses a
function called findNextWord (defined in src/TWUtils.cpp) to recognize
words for auto-completion. AFAIK, this is (mostly) modeled after TeX's
way of handling command words. In particular, this means that numbers
are not recognized as part of a word and are hence not included in the

Maybe Henrik's script
(http://tug.org/pipermail/texworks/2012q4/005666.html) could be able to
achieve what you want?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20121208/1e91c391/attachment.html>

More information about the texworks mailing list