TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes my LaTeX document gets long and messy, and so it's hard for me to look through and find what I want. When I program, I usually have a macro in my IDE that creates a separator of comments to keep the code clean. I'm looking for something similar in TeXnicCenter. So it would insert the following


Or something to that effect. Now if TeXnicCenter doesn't have the capability of making macros like this, is there a way I could take advantage of the autocomplete system to do this? So I would add a custom command to the TeXnicCenter LaTeX XML files so that it would autocomplete with the percent signs. Does anyone know how to do this?

share|improve this question
up vote 6 down vote accepted

TeXnicCenter allows for the creation of "user text modules" that are initiated via a shortcut. To insert your own module, follow Insert>Own Text Modules>Manage Text Modules. Now you can enter a new one called (say) Separator:

Entering a new user text module in TeXnicCenter

Once you've established the correct "before cursor" and "after cursor" combination, it is accessible via the menu selection:

User text module accessible via menu

Or via the shortcut Alt+I+M+7 (in my case).

share|improve this answer
Is there anyway to make this shortcut shorter and more intuitive? Right now if I add another text module, I might need to reorder the modules and so change the shortcuts. – Jess Riedel Nov 11 '13 at 4:59
@JessRiedel: You could create your own hot keys via AutoHotkey. – Werner Nov 11 '13 at 5:15
Thanks Werner, that's a good point. – Jess Riedel Nov 11 '13 at 21:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.