texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.75k stars 342 forks source link

Bug in Proof enviroment #1528

Closed Algardiagon closed 3 years ago

Algardiagon commented 3 years ago

Environment

Expected behavior

Run document showing no errors and the compiled version on the right hand side.

Actual behavior

It shows errors for each \end{proof} command, do not show the compiled version on the right hand side but going to the pdf file it is all fine.

How to reproduce

\documentclass[11pt]{article} \usepackage{amsfonts} \usepackage{amsmath,amssymb} \usepackage{amscd} \usepackage{amsthm} \usepackage{color} \usepackage{hyperref} \usepackage{tikz-cd} \begin{document}

\begin{proof} \end{proof}

\end{document}

muzimuzhi commented 3 years ago

Works ok here, with the continuous development for 91d3385 on macOS 12.1.

It shows errors for each \end{proof} command

It is a highlighting error or an excerpted error from log?

Algardiagon commented 3 years ago

It is not just a Highlighting error. It says "Undefined control sequence. \end{proof}" and does not show the result on the righthandside. Nevertheless, I can open the pdf file and it is like there was no error at all. This means It is possible to work with this problem. It is just annoying to compile and then open the pdf, then close the pdf to write compile and open it again.

Using other editors like TeXworks everything goes smoothly. So I really think there is some problem with TeXstudio. (I prefer using TeXstudio though).

2021-03-10

sunderme commented 3 years ago

looks like a latex error. Different texlive installations ? Take a look at help/check latex installation.

muzimuzhi commented 3 years ago

@Algardiagon This is a LaTeX usage question.

proof environment is provided in amsthm package. "Undefined control sequence. \end{proof}" is the excerpted message and that doesn't necessarily mean \end{proof} is undefined. You should click the "Log File" tab at the left of "Issues" tab, and see exactly which one is the undefined control sequence from full error message. image

Online docs that might help:

Algardiagon commented 3 years ago

It worked adding \usepackage{txfonts}

Not sure why it ran before (and when the problem started it ran well in TeXworks and Overleaf).