[texworks] how to customize the completion

Alain Delmotte esperanto at swing.be
Wed Apr 29 11:27:35 CEST 2009


Hi!

Under Windows take care to modify the file: C:\Documents and
Settings\shaopeng\TeXworks\completion
as Stefan did write. (change shaopeng to your user_name)
Do not forget that there could be more than one completion starting with
the same shortcut; example
ba is good for \begin{align}, \begin{aligned},...;
so typing ba and pressing [Tab] will give the first completion, [Tab]
the next, and so on; *the order is the order* in the tw-latex.txt file
and the other files of the directory "completion".
You can add your own files in that directory, they will be used as well
(pay attention to conflict).

And yes, with r.291 the move to the bullet is working with [Ctrl]+[Tab]
(thanks Joseph to pointing that).
What is a Windows shortcut is [Alt]+[Tab], which scrolls between open
windows.

Regards,

Alain

Peng Shao a écrit :
> Dear Stefan:
>
> thank you very much.
> Yes I found the mistakes you pointed out, I appreciate it very much.
>
> I tried you suggestion, yes if I modify the line beginning with
> {equation} I can get what I want
> However if I try to modiry the line beginning with bequ:.....
> and I press Tab after typing bequ I still get the old one..
>
> btw, dear Joseph thank you for your reminding, I always reopen
> texworks after modifying the tw-latex.txt, am I correct? :p
>
> The most weird thing, I moved tw-latex.txt away and created a new
> tw-latex.txt file with only
>
> %%!TEX encoding = UTF-8 Unicode
> bequ:=\begin{equation}#RET#test#INS##RET#\end{equation}
>
> as its content and when I pressed tab after typing bequ, I still got
>
> \begin{equation}
> cursor
> \end{equation}bullet
>
> I pressed tab several times, then I got what I modified. So, I guess,
> are there some complement codes "embedded" in texworks?
>
> Yes the tab+ctrl seems to be occupied by windows as some kind of
> hotkey, I am not sure if the software autohotkey can
> help us release it from windows....
>
> Thank you
>
>
> Regards, Shao Peng
>
>
>
> > Date: Wed, 29 Apr 2009 09:14:39 +0200
> > From: st.loeffler at gmail.com
> > To: texworks at tug.org
> > Subject: Re: [texworks] how to customize the completion
> >
> > Hi,
> >
> > Peng Shao schrieb:
> > > The tw-latex.txt file I modified is the one in
> > > C:\Documents and Settings\shaopeng\TeXworks\completion
> > > and in linux, it is in ~/texworks/res/resfiles/completion
> >
> > At least the linux file is not the correct one. The one you mention is
> > just the template from the source code that gets copied to your "real"
> > configuration directory, which should be ~/.TeXworks/completion
> >
> > I just tested your modifications on Linux (Ubuntu 9.04) and maybe found
> > your problem.
> > If I enter "bequ" and press tab I get the modified environment (i.e.
> > with "test" in the middle). If I write "\begin{equa" and press tab I
> > s! till get the old one. The problem is that there are several different
> > shortcuts to get the equation environment. Just search for "equation" in
> > tw-latex.txt. You'll find (amongst others) a line starting with
> > "{equation}" which is the one that gets used in your case.
> >
> > > I am really really sorry to hear that the bullets do not work well
> > > under windows. I like it very much:(
> >
> > I imagine this is because Ctrl-Tab is used by the operating system (to
> > tab through sub-windows). But I'd need further investigations to confirm
> > this.
> >
> > Regards
> > Stefan
>
> See all the ways you can stay connected to friends and family
> <http://www.microsoft.com/windows/windowslive/default.aspx>



More information about the texworks mailing list