0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

対処法 - Paragraph ended before \align was complete.

Posted at

以下のようなコードをコンパイルしようとすると↓

Before.tex
\documentclass{jlreq}
\usepackage{amsmath}

\begin{document}
\begin{align}
    a=0\\

    b=1
\end{align}
\end{document}

こういうエラーが出る↓

Runaway argument?
 a=0\\ 
! Paragraph ended before \align was complete.
<to be read again> 
                   \par 
l.7 
    
? ^D
! Emergency stop.
<to be read again> 
                   \par 
l.7 
    
No pages of output.

解決法は,align環境内に空白の行を入れないことである↓

After.tex
\documentclass{jlreq}
\usepackage{amsmath}

\begin{document}
\begin{align}
    a=0\\
    b=1
\end{align}
\end{document}

こうするとコンパイルが上手くいく.

コードの見通しのためにちょくちょく空白の行を入れる癖がある私としては,ちょっと理不尽な仕様だな.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?