Templates, Wizards & Tools ⇒ Strange template behavior
-
- Posts: 9
- Joined: Wed Mar 02, 2011 11:51 pm
Strange template behavior
I utilize personal templates which I keep in the folder C:\Program Files\TeXnicCenter\Templates\Documents\My Templates. Occasionally, something odd happens - a newly created template won't reproduce properly when opened from within TeXnicCenter - the content appears to be written in Chinese. This seems to happen when the preamble of the template is minimal in content. This notion is reinforced by the experiment to pare down the content of a functional template. Once reduced, it behaves in the same anomalous manner. Does anyone know something about this?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Strange template behavior
Hi,
you don't give us much information. Which operating system and which version of TexnicCenter are you using?
Where are the template files coming from? The behaviour you described sounds a bit like an encoding problem. You can also upload whole files to the forum server.
Best regards
Johannes
you don't give us much information. Which operating system and which version of TexnicCenter are you using?
Where are the template files coming from? The behaviour you described sounds a bit like an encoding problem. You can also upload whole files to the forum server.
Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 9
- Joined: Wed Mar 02, 2011 11:51 pm
Re: Strange template behavior
@Johannes_B I am using Windows 7 and TeXnicCenter 2.0 Beta 2. The templates are created by me as simple compilable .tex documents and kept in the location that I indicated.
-
- Posts: 9
- Joined: Wed Mar 02, 2011 11:51 pm
Re: Strange template behavior
I've attached two files:
TeXpad.tex - the original file that was saved in C:\Program Files\TeXnicCenter\Templates\Documents\My Templates
when_opened.tex - the corrupted version of TeXpad.tex that opens when called upon from within TeXnicCenter.
TeXpad.tex - the original file that was saved in C:\Program Files\TeXnicCenter\Templates\Documents\My Templates
when_opened.tex - the corrupted version of TeXpad.tex that opens when called upon from within TeXnicCenter.
- Attachments
-
- when_opened_.tex
- (254 Bytes) Downloaded 812 times
-
- TeXpad.tex
- (167 Bytes) Downloaded 785 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Strange template behavior
Your file »when_opened.tex« contains a Byte order mark, TexnixCenter seems to be very confused about this. Try opening a new file within Texniccenter and save it there, too.
Btw: Texnicenter 2 is now stable.
Btw: Texnicenter 2 is now stable.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 9
- Joined: Wed Mar 02, 2011 11:51 pm
Re: Strange template behavior
@Johannes_B How can you tell that the document contains a Byte order mark? It is not visible to me. Certainly, I've recreated the document from scratch several times in an effort to start fresh, but the problem persists. Surely, these don't all have byte order marks. When you say "try opening a new file within Texniccenter and save it there, too", you seem to suggest that I create a new template. I have done this many times. Recall that I do have fully functional templates. Can you please clarify your suggestion. Thank you for your time.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Strange template behavior
It's hard for me to tell if Texniccenter does something funny, since it is not installed on my linux. Try creating a new file with notepad (or something similar), saving it as .tex (but without the txt) with encoding utf8. You can choose the encoding while saving as.
Concerning the BOM: I ran wich gave me
Concerning the BOM: I ran
Code: Select all
$ file when_opened_.tex
Code: Select all
when_opened_.tex: UTF-8 Unicode (with BOM) text, with CRLF line terminators
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Strange template behavior
You can also choose the encoding while saving as within TXC. Choose utf8 without BOM. A notification to the maintainers would be great though.
Best regards
Johannes
Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 9
- Joined: Wed Mar 02, 2011 11:51 pm
Re: Strange template behavior
Unfortunately, the problem persists even when I've saved the file with the UTF-8 (without BOM) encoding.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Strange template behavior
Then i guess you should contact the TexnicCenter Support and state your problems there. They might be more suited to help you.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.