LaTeX forum ⇒ Templates, Wizards & ToolsStrange template behavior

Information and discussion about TeXnicCenter document/project templates and wizards and other tools and extensions for TeXnicCenter
steven_nevets
Posts: 9
Joined: Wed Mar 02, 2011 11:51 pm

Strange template behavior

Postby steven_nevets » Thu Oct 24, 2013 5:18 am

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?

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3668
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Oct 24, 2013 10:11 am

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
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

steven_nevets
Posts: 9
Joined: Wed Mar 02, 2011 11:51 pm

Postby steven_nevets » Thu Oct 24, 2013 6:22 pm

@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.

steven_nevets
Posts: 9
Joined: Wed Mar 02, 2011 11:51 pm

Postby steven_nevets » Fri Oct 25, 2013 12:21 am

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.
Attachments
when_opened_.tex
(254 Bytes) Downloaded 176 times
TeXpad.tex
(167 Bytes) Downloaded 181 times

User avatar
Johannes_B
Site Moderator
Posts: 3668
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Oct 25, 2013 10:10 am

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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

steven_nevets
Posts: 9
Joined: Wed Mar 02, 2011 11:51 pm

Postby steven_nevets » Fri Oct 25, 2013 10:37 pm

@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.

User avatar
Johannes_B
Site Moderator
Posts: 3668
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Oct 27, 2013 11:35 am

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
  1. $ file when_opened_.tex
wich gave me
  1. 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.

User avatar
Johannes_B
Site Moderator
Posts: 3668
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Nov 05, 2013 9:59 am

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
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

steven_nevets
Posts: 9
Joined: Wed Mar 02, 2011 11:51 pm

Postby steven_nevets » Wed Mar 19, 2014 12:40 am

Unfortunately, the problem persists even when I've saved the file with the UTF-8 (without BOM) encoding.

User avatar
Johannes_B
Site Moderator
Posts: 3668
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Mar 19, 2014 10:37 am

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.


Return to “Templates, Wizards & Tools”

Who is online

Users browsing this forum: No registered users and 1 guest