-
-
Notifications
You must be signed in to change notification settings - Fork 89
Probable bugs
This inspections highlights Unicode characters which are likely to cause incorrect output if you have not explicitly chosen the right packages and compiler.
In general, you should use LuaLaTeX or XeLaTeX when working with Unicode characters.
An example file which uses Unicode characters and is compilable with LuaLaTeX:
\documentclass{article}
% For this document you may need the following (texlive) packages: luatex luaotfload fontspec babel-greek greek-fontenc gfsporson
\usepackage[no-math]{fontspec}
\usepackage[main=english,greek]{babel}
\languageattribute{greek}{ancient}
\newfontfamily\greekfont{GFS Porson}[Ligatures=TeX,%
ItalicFont = GFSPorson-Regular,%
SmallCapsFont = GFSPorson-Regular]
\addto\extrasgreek{\greekfont}
\newcommand\textgreek[1]{\foreignlanguage{greek}{#1}}
\begin{document}
English and \textgreek{ελληνικά} and {\greekfont πιο ελληνικό}
\end{document}
Another example, tested with XeLaTeX:
\documentclass{article}
\usepackage{fontspec}
% Download from https://www.fontsquirrel.com/fonts/computer-modern and put ttf files in /usr/share/fonts/TTF
\setmainfont{CMU Serif}
\begin{document}
This is a paragraph with a PI (π) in it, which looks different than a $\pi$.
\end{document}
In some cases, there is a plain LaTeX equivalent available.
This will change for example ö
into \"o
.
Note that since TeX Live 2018 this is unnecessary: UTF-8 is assumed as the default input encoding (source: https://tex.stackexchange.com/a/370280/98850).
This will load
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
Note that since TeX Live 2018 loading inputenc
does not solve anything: UTF-8 is assumed as the default input encoding (source: https://tex.stackexchange.com/a/370280/98850).
Also note that in general it is better to use \usepackage[T1]{fontenc}
, see https://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc
Opens the settings page with the option to change compiler for which to check compatibility.
Some commands with which you include files, especially \bibliography
and \include
, should not include the file extension.
For example if you want to include a file section1.tex
, then \include{section1.tex}
will not work.
Some commands with which you include files, especially \addbibresource
, should include the file extension.
For example if you want to include a bibliography in references.bib
then \addbibresource{references}
will not work, but \addbibresource{references.bib}
will.
A LaTeX file that is the root of a document should contain a \documentclass{…}
.
This inspection is off by default.
A LaTeX file that is the root of a document should contain a document
environment.
This inspection is off by default.
When using \usepackage
or \RequirePackage
, we check if the package exists.
To do this, we check the project for use defined packages, and we check a list of all available CTAN packages.
This list of CTAN packages is manually updated by us, and might be out of date.
Since b0.6.9
This inspection is for TeX Live only, MiKTeX automatically installs packages on the fly.
When using \usepackage
or \RequirePackage
, TeXiFy checks if the packages is installed.
If it isn’t installed, it provides a quick fix to install the package.
Since b0.6.10
The package name given in a \ProvidesPackage
command does not match the name of the sty
file the command is in.
This inspection provides a quick fix to fix the package name.
Since b0.6.10
The package name given in a \ProvidesPackage
command does not contain the correct path of the sty
file.
This package name should include the path relative to the main file where the package is used.
This inspection provides a quick fix to fix the path in the package name.
For some common commands TeXiFy knows which package is needed to use them.
A quickfix is available to add the missing \usepackage
or \RequirePackage
command.
For more information, see Automagically import packages of common commands.
Note that if TeXiFy complains incorrectly that you did not import the package, you may need to tell TeXiFy which file is your root file, see Magic comments. It could also be that you installed TeX Live via your package manager instead of via the official installer. In general it is better (and easier for TeXiFy) to install the official distribution, see Installation.
Reports references that could not be resolved, for example to labels or citations that don’t exist.
The environment name in the \begin
command should match the name in the \end
command.
This inspection warns for \if
commands (and variations) which are not closed with the corresponding \fi
.
If a Latex command takes a path argument TeXiFy checks whether the file or path exists and throws an error if not.
With some special commands absolute paths are not allowed. E.g. \include and \includeonly. A error is thrown if you still enter an absolute path.
When two files include each other, this will be detected. On one of the inclusions a warning will be shown.
A label command in an environment (e.g., a figure or table environment) should go after the caption. This inspection shows a weak warning when the order is the wrong way around, and a quickfix is available to swap the commands.
Currently this inspection will only trigger when the label and caption are directly next to each other (only whitespace inbetween).
Since b0.6.10
When using a #
symbol outside of a command definition, an &
outside a tabular environment or a _
anywhere, it should be escaped with a backslash, like \&
.
If you have multiple \graphicspath
commands, only the last one that LaTeX finds defines the graphics path, so you should remove the other one.
The BIBINPUTS
environment variable cannot handle paths which start with ../
in the \bibliography
command, e.g. \bibliography{../mybib}
.
Solution: set the BIBINPUTS
path to the parent and use \bibliography{mybib}
instead (or use a "fake" subfolder and do \bibliography{fake/../../mybib}
).
This solution can be applied using the quickfix for this inspection.
See https://tex.stackexchange.com/questions/406024/relative-paths-with-bibinputs
[Edit March 2023] This issue might not exist anymore, perhaps it has been fixed in bibtex, so the inspection is disabled.
This inspection complains when you use a LaTeX command that is not defined anywhere. The inspection checks files in the file set, packages and document classes. It is disabled by default, because many commands from packages are unknown to TeXiFy, usually because they are defined in a way that the code which searches for command definitions doesn’t handle yet. Therefore, if you find such a command that is defined but this inspection cannot find it, please report it to the issue tracker.
This documentation has moved to https://hannah-sten.github.io/TeXiFy-IDEA