Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for packages included in documentclass options #949

Closed
tms320c opened this issue Jul 4, 2019 · 1 comment
Closed

Add support for packages included in documentclass options #949

tms320c opened this issue Jul 4, 2019 · 1 comment
Assignees
Labels
bug Deficiencies in TeXiFy behaviour.
Milestone

Comments

@tms320c
Copy link

tms320c commented Jul 4, 2019

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

GoLand 2019.1.3
Build #GO-191.7479.32, built on May 30, 2019
JRE: 1.8.0_202-release-1483-b53 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

TeXiFy IDEA version

v0.6.6

What I did (steps to reproduce)

I created a document with the following structure (note amsmath in the options):

\documentclass[preprint, showpacs, preprintnumbers, amsmath, amssymb, aps, pre, showkeys, longbibliography]{revtex4-1}
\begin{document}
\input{content/text/chapter1}
\end{document}

inside chapter1.tex:

\begin{equation}
\iiiint % this is from amsmath and plugin "knows" it
\end{equation}

Expected behavior

The plugin recognizes that amsmath package presents and does not add \usepackage{amsmath} on top of the chapter1.tex

Actual behavior

The plugin adds \usepackage{amsmath} on top of the chapter1.tex, which is not really correct itself, see the corresponding bug.

If I add \usepackage{amsmath} into the master file, the plugin works fine -- it recognizes the package presence.

Maybe, special support for revtex4 document type is necessary?

Regards,
Mike


@PHPirates
Copy link
Collaborator

Correct, thanks for reporting. Let's keep it simple, this is sufficient to reproduce the problem:

\documentclass[amsmath]{revtex4-1}
\begin{document}
    $\iiiint$
\end{document}

I am not sure whether we should check if the documentclass supports this or not. I don't think we should, because we don't want to maintain a list of all documentclasses which do so, and I think it's too difficult to detect.

@PHPirates PHPirates added the bug Deficiencies in TeXiFy behaviour. label Jul 5, 2019
@PHPirates PHPirates changed the title package included in documentclass options is not recognized Add support for packages included in documentclass options Jul 5, 2019
@PHPirates PHPirates self-assigned this Jul 14, 2019
@PHPirates PHPirates added this to the b0.6.7 milestone Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants