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 option to disable auto package insert (and some subfiles support) #1131

Merged
merged 4 commits into from
Dec 14, 2019

Conversation

PHPirates
Copy link
Collaborator

Fixes #1101

This PR

  • Adds a global setting to disable auto insertion of package requirements (and also disables LatexMissingImportInspection)
  • The root file when using the subfiles package is now correct, so package imports will be added to the correct preamble and imports will be resolved correctly (try using autocomplete for something in section1.tex)
  • Added the subfile command
  • Do not add the class in the list of included packages, otherwise it thinks that subfiles is included twice.

https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/Automatic-package-importing

\documentclass{article}
\usepackage{amsmath}
\usepackage{subfiles}
\begin{document}
    \section{One}\label{sec:one}
    \subfile{section1}
\end{document}
\documentclass[main.tex]{subfiles}

\begin{document}

    \begin{align*}
        \alpha
    \end{align*}

\end{document}

@PHPirates PHPirates added this to the b0.6.8 milestone Dec 11, 2019
@PHPirates PHPirates self-assigned this Dec 11, 2019
@PHPirates PHPirates requested a review from slideclimb December 12, 2019 08:08
@PHPirates PHPirates merged commit c154614 into master Dec 14, 2019
@PHPirates PHPirates deleted the disable-usepackage-insert branch December 14, 2019 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggle for auto-insert of amsmath
2 participants