GeneralProblem with autocompletion

General information and discussion about TeXnicCenter
Post Reply
Sockenmeister
Posts: 3
Joined: Mon Feb 25, 2008 5:13 pm

Problem with autocompletion

Post by Sockenmeister »

Hi Community,

i have a problem with the autocompletion of Texniccenter. To structure my Latex code I indent code within environments.

Here is an example:

Code: Select all

\begin{itemize}
 \item
  \begin{enumerate}
   \item
  \end{enumerate}
 \item
\end{itemize}
But with Texniccenter-autocompletion I get this:

Code: Select all

\begin{itemize}
 \item
  \begin{enumerate}
 \item
\end{enumerate}
 \item
\end{itemize}
So in fact, Texniccenter "starts" with the autocompletion-code from Col1 instead from the position, were I want it.

I hope someone understands this gibberish and can help me.

Thanks in advance.

cu

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
chris2u2
Posts: 5
Joined: Tue Aug 14, 2007 8:05 am

Re: Problem with autocompletion

Post by chris2u2 »

In the subfolder of your TeXnicCenter installation \packages you will find a file "Tex.xml" it holds the auto-completion data that TeXnicCenter uses.

If you look through it, you will probably find that the template there is wrong. If you look at the file closely, you will figure out how to change that.

Btw: you can also add your own code there so that TeXnicCenter can autocomplete even environments usually not enclosed.

Don't forget to backup though!!!!
Sockenmeister
Posts: 3
Joined: Mon Feb 25, 2008 5:13 pm

Re: Problem with autocompletion

Post by Sockenmeister »

Hi,

thanks for your answer, but this won't help. I know the "Tex.xml" and it seems to be that everything is right.
The environments are working well, if I start at column1 with codecompletion. But as soon as my cursor is not in col1 the enviroment does not what I want.

I think, in the Tex.xml you tell how many empty spaces come infront of a command. The problem is that TexnicCenter always counts from col1. So if there is no empty space infront of a "\end{...}" (for example), TexnicCenter sets this command in col1 and doesn't care, in which col you startet your command/environment.

cu
Post Reply