I now have the new TexnicCenter 2.0 Alpha 4 and my problem is that I want the .tex files to open in tabs in one window, instead of multiple instances. This always fills my entire Taskbar as I work with many documents at once. Is there any solution to have the files opening in tabs, like in the older versions?
I couldn't find this answer anywhere...
I would really appreciate some knowledge on this.
- 259,911
- 34
- 706
- 1,036
- 71
-
1Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. – Joseph Wright Mar 27 '12 at 20:48
-
1Same thing happens here (Alpha 3, W7). A temporary workaround could be to drag-and-drop the files from Explorer to the running TXC. – Torbjørn T. Mar 27 '12 at 21:41
3 Answers
(This was tested with final version 2.02 of TeXnicCenter.)
On installation TeXnicCenter adds or changes some keys in the Windows registry, so it’s a bit difficult to change the behaviour depending on your skills …
Open the registry – Start “regedit.exe” or another registry editor and save the following key by doing an export (the resulting REG-file could later be re-imported):
HKEY_CLASSES_ROOT\.tex
(This former one has to be distinguished from a second key created by TXC:HKEY_CLASSES_ROOT\.tex;.sty;.cls;.dtx;.ins;.ltx, but we will use the value of this latter one.)
In the registry editor change the value of this key from
TeXnicCenter.textoLaTeX.Document.For the case you are self-conscious I provide a REG script here, that has to be copied into a new ordinary text file (there are text editors with syntax highlighting for REG-files, three of them I know are mentioned here: https://tex.stackexchange.com/a/47585/9237) and saved as file with the extension
reg(pay attention, that the extensiontxtis not automatically added after this):Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.tex] @="LaTeX.Document"
Do an import of this saved REG file, i. e. execute it (by default REG files are linked with the regedit.exe.)
A remark: The original keys, where TXC defines the way of execution, are HKEY_CLASSES_ROOT\TeXnicCenter.tex and some other TeXnicCenter*.* keys, which could be changed, too, but I think it’s better to use the also created LaTeX.Document key. The reasons for this odd default behaviour of TeXnicCenter are unknown to me.
-
This seems to only reset the .tex filetype. As I open one of these files again it asks me which program to use, like first time. I select TXC and after that it's the same again. I seek files to open in new tabs and not new instances of TXC, if I understood correctly. – A. Vieira Jul 18 '17 at 09:57
-
I can confirm that this solution does not work. When following the approach I get asked the first time I open a tex file, and from then on it again opens a new instance. – Prof.Chaos Dec 23 '20 at 01:47
-
I was not able to find any solution, but found an official bug report for that issue: https://sourceforge.net/p/texniccenter/user-reports/1431/ Sadly, the bug report is already 5.5 years old, so it seems that the developers don't care. Maybe just change the editor... – Prof.Chaos Dec 23 '20 at 02:08
I finally solved it, took me wayy too much time, so hopefully some can benefit from this. This works for Windows 10 (fully patched on December 23rd 2020) with TEXnicCenter 2.02 Stable (64 Bit).
You can solve it with a workaround:
- create a new batch script (see below)
- for all .tex files, don't select TeXnicCenter as preferred program, but instead that batch file.
This is the file you need to create, it called it TeXnicCenterFixer.bat.
start /b "" "C:\Program Files\TeXnicCenter\TeXnicCenter.exe" /ddecmd [open('%1')]
I got the solution based on a couple of others, so consider liking them as well if this helped you:
- How to tell TeXnicCenter to open a file in a tab rather than in a new instance? by Paulo Cereda on StackOverflow and external website
- How to prevent the terminal to stay open? In particular when arguments are used (which prevent the 'start' command to work correctly) by Bob on StackOverflow
- The idea using a script as workaround in the context of kile and Okular by ivotron on StackOverflow
- 592
I played around with the previous answers and I think I found a solution that works for Windows 10, TeXnicCenter 2.02.
- Open the registry – Start "regedit.exe" or another registry editor
- Navigate to
Computer\HKEY_CLASSES_ROOT\TeXnicCenter2.AssocFile.tex\shell\open\command - Append
/ddecmd "[open('%1')]"to the end of the file location. There was"%1"appended to the end of the filename, but I deleted that and replaced it. My command now says"C:\Program Files\TeXnicCenter\TeXnicCenter.exe" /ddecmd "[open('%1')]" - Repeat for other TeXnicCenter associations in a similar fashion. My directory had the following associations:
- TEX:
Computer\HKEY_CLASSES_ROOT\TeXnicCenter.tex\shell\open\commandandComputer\HKEY_CLASSES_ROOT\TeXnicCenter2.AssocFile.tex\shell\open\command - BIB:
Computer\HKEY_CLASSES_ROOT\TeXnicCenter2.AssocFile.bib\shell\open\commandAnd some others.
- 1