Generalproblem with autocompletion

General information and discussion about TeXnicCenter
Post Reply
gondolier
Posts: 2
Joined: Sun Apr 22, 2007 5:16 am

problem with autocompletion

Post by gondolier »

Hi all,

As I was using TeXnicCenter, the auto-completion function is very help. But:
1. everytime when I type enumera (i meant to use enumerate environment), but it is auto completed as
\begin{enumeration}
\end{enumeration}
How can I modify the autocomplete template?
2. how can i create new autocomplete terms, say, \left \right?

Thank u!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kmoff
Posts: 1
Joined: Mon May 21, 2007 9:45 pm

Re: problem with autocompletion

Post by kmoff »

For your first question, try this, it seems to have worked for me:

(1) open ...\TeCnicCenter\packages\Tex.xml

(2) replace enumeration with enumerate. I think there are only two places (right near each other) that you need to do this. use find/replace

(3) save Tex.xml and restart TexnicCenter

I'm not so sure about your second question. I would imagine that you would need to add something to Tex.xml, but I don't know if that is, by itself, sufficient. Haven't tried myself. You can define your own text modules from the insert menu (within TeXnicCenter), but those don't seem to get added to the auto-complete list, so they don't seem to be particularly useful.

Good luck!
guizmateos
Posts: 2
Joined: Wed May 30, 2007 2:19 pm

Re: problem with autocompletion

Post by guizmateos »

I don't know if this is the right place for suggestions, but as far as the commented issue is an error I suggest to modify the tex.xml file and include the corrected version in the next release of TeXnicCenter.

This software is helping me a lot, keep on the good work ;)

V. Guiztoa
Andy22
Posts: 16
Joined: Wed Jul 25, 2007 10:11 am

Re: problem with autocompletion

Post by Andy22 »

There is an option in "Tools" named "import TeX commands". TXC will ask you for your main TeX-directory (for example "c:\program files\miktex2.6") it will then automatically search for style files of the installed packages to import commands for autocompletion. TXC will then save a file "\TeCnicCenter\packages\packages.xml".

The problem is that TXC imports all commands it finds which can be a lot. So you will maybe have to edit the "packages.xml" to remove some commands or inspect the structure of that file to write your own.
Tierelier
Posts: 1
Joined: Thu Nov 08, 2007 2:47 pm

problem with autocompletion

Post by Tierelier »

There is also an error in the autocompletion of \begin{figure}
In the autocompleted version that came with the installation the code is:

Code: Select all

\begin{figure}[ht]
	
	\label{}
	\caption{}
\end{figure}
This causes errors when you \ref{} to the label, since latex won't be able to find the correct item to label to. The correct code places the label after the caption:

Code: Select all

\begin{figure}[ht]
	
	\caption{}
	\label{}
\end{figure}
So that latex refers to the caption number.
duvvuri
Posts: 4
Joined: Mon Dec 03, 2007 5:51 pm

Re: problem with autocompletion

Post by duvvuri »

Mine is silly question! But how to autocomplete. In TeXnicCenter while typing the commands a pop up comes. But I am unable to use this gppd facility. :( Please tell me.
Andy22
Posts: 16
Joined: Wed Jul 25, 2007 10:11 am

Re: problem with autocompletion

Post by Andy22 »

When the autocompletion pops up just hit Crtl+Space. TXC will then autocomplete or give you a list with possible commands.
basalt
Posts: 1
Joined: Tue Jan 29, 2008 6:13 pm

Re: problem with autocompletion

Post by basalt »

Is there a way I can change the key settings for auto completion? Ctrl-Space has been used by WinXP to toggle the IME.

Thanks.
dnquark
Posts: 1
Joined: Tue Apr 01, 2008 8:59 am

problem with autocompletion

Post by dnquark »

Can anyone clarify this for me: say I want to auto-complete the begin/end equation block, so I start typing "\begin{equa" and the auto-complete tooltip floats up, so I hit ctrl-space, and I get a duplicate \begin block, like this:

Code: Select all

\begin{\begin{equation}
	
	\label{eq:}
\end{equation}
Is this a bug? Is it fixable?
Sockenmeister
Posts: 3
Joined: Mon Feb 25, 2008 5:13 pm

Re: problem with autocompletion

Post by Sockenmeister »

I think its a feature ;)

Just type "equa" instead of "\begin...".

cu
Post Reply