Skip to main content

Questions tagged [magic-comment]

Comments of the form % !TEX ... that can be used as directives in many tex editors

Filter by
Sorted by
Tagged with
0 votes
0 answers

TeXShop option "Wrap Lines: Never" does not work when using % !TEX root

I use the option "Line Wrap: Never" in TeXShop. It works fine, but when I open a file beginning with the magic comment % !TEX root the file is displayed with soft wraps (by word), even ...
Arkandias's user avatar
  • 278
1 vote
0 answers

is there a reference of %!TeX directives? [duplicate]

Well, can't find if this has been asked here before, and failing to found good answer with search engines (I tried only with Qwant and DuckDuckGo.) Is there somewhere a good and complete reference ...
gildux's user avatar
  • 487
1 vote
1 answer

Magic comment root document \jobname

I want to use \jobname as input for a magic comment % !TeX root = \jobname.tex, but it doesn't work. There are two files, one *.tikz and one *.tex. MWE Tex: \documentclass{article} \usepackage{tikz} \...
kilsen's user avatar
  • 357
2 votes
1 answer

Disable spell checking through magic comments

I use TeXstudio 2.11.2, and I want to know if there is a way to disable spell checking through magic comments. Something like this: % !TeX spellcheck = disable
Pana's user avatar
  • 123
5 votes
0 answers

When and why should I use % !Mode:: "TeX:UTF-8" directive?

I often see the following lines are included at the beginning of the tex files: % !TEX TS-program = xelatex % !TEX encoding = UTF-8 Unicode % !Mode:: "TeX:UTF-8" Directives started with % !TEX are ...
YaOzI's user avatar
  • 489
5 votes
1 answer

Texmaker magic comment

Is there any similar magic comment in Texmaker like those in Texstudio? Example:% !TeX program = xelatex
Aslan Nazari's user avatar
1 vote
1 answer

How to change the color of a magic comment

In TeXStudio you can have magic comments: % !TeX. I want to change their foreground color, but can't find that option in the Syntax Highlighting tab in the configuration options. How can I change ...
adn's user avatar
  • 11.3k
48 votes
2 answers

Tell TeXstudio to compile a particular document with LuaLaTeX

It is not hard to change the default compilation engine in TeXstudio from PDFLaTeX to LuaLaTeX (or any other engine for that matter). But if I only want to use LuaLaTeX for a single document, it gets ...
Gaussler's user avatar
  • 12.8k
2 votes
0 answers

Documentation of "%! TeX" codes [duplicate]

Possible Duplicate: When and why should I use %!TEX TS-program and %!TEX encoding? I want to create a list of "%! TeX" codes to a documentation file for my template and want it to be as complete, ...
Matthias Pospiech's user avatar
159 votes
5 answers

When and why should I use % !TEX TS-program and % !TEX encoding?

Occasionally, I see other people's documents starting with two lines like that: % !TEX TS-program = xelatex % !TEX encoding = UTF-8 Unicode It's clear to me that the first line declares the engine ...
doncherry's user avatar
  • 54.7k
5 votes
1 answer

Bypass % !TEX TS-program =

Some LaTeX editors (TeXShop and TeXworks, for instance) allow a special comment line to define a default engine to use with a current document, like this : % !TEX TS-program = pdflatex It's really ...
user11208's user avatar
  • 199