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

adds an description-like-label in enumerate-environment #3300

Closed
Lichtschalter-5000 opened this issue Nov 4, 2023 · 3 comments · Fixed by #3383
Closed

adds an description-like-label in enumerate-environment #3300

Lichtschalter-5000 opened this issue Nov 4, 2023 · 3 comments · Fixed by #3383
Assignees
Labels
bug Deficiencies in TeXiFy behaviour.
Milestone

Comments

@Lichtschalter-5000
Copy link

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

IntelliJ IDEA Ultimate 2023.2.4

Operating System

Win 10

TeXiFy IDEA version

0.9.1

What I did (steps to reproduce)

I have the custom command \alignspc with one optional parameter defined.

\item {\begin{align*}
            \alignspc[\Leftrightarrow]
            \end{align*}}**CURSOR HERE, press Enter**

Expected behavior

\item {\begin{align*}
\alignspc[\Leftrightarrow]
\end{align*}}
\item **CURSOR HERE**

Actual behavior

\item {\begin{align*}
\alignspc[\Leftrightarrow]
\end{align*}}
\item[\Leftrightarrow]

with the second \Leftrightarrow in a selection

@Lichtschalter-5000 Lichtschalter-5000 added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels Nov 4, 2023
@Lichtschalter-5000
Copy link
Author

Maybe linking to #3293 makes sense here

@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Nov 8, 2023
@Lichtschalter-5000
Copy link
Author

Having the same issue in

\item {\begin{align*}
  \intertext{For $x\in [0,1]$}
  f(x) \leq 1
\end{align*}} 
\item[0,1]

Where I press enter at the end of the first item and the second item will be automatically inserted.

@jojo2357
Copy link
Contributor

jojo2357 commented Jan 6, 2024

@PHPirates

val optionals = label.childrenOfType(LatexOptionalParam::class).firstOrNull() ?: return null
is to blame for the first example. I have no idea why it isnt using label.getOptionalParameterMap() to try to extract only item's optional param. Instead it will just extract the first optional param it finds.

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

Successfully merging a pull request may close this issue.

3 participants