\mathcal が正しく動作しない

\mathcal が正しく動作しない

使用しようとしています\mathcalが、下付き文字には機能しますが、メインの文字には機能しません。

\begin{table}[h]
    \centering
    \caption{Data integration framework}
    \label{tab:data_integration}
\begin{tabular}{| l | c | c |}
    \toprule
        & Language & Alphabet \\
    \midrule
    Global schema & \[\mathcal{L}_{\mathcal{G}}\] & \[\mathchal{A}_\mathcal{G}\] \\
    Source schema & \[\mathcal{L}_{\mathcal{S}}\] & \[\mathcal{A}_{\mathcal{S}}\] \\
    \hline
    Query \[\mathcal{q}_{\mathcal{S}}\] & \[\mathcal{L}_{\mathcal{M},\mathcal{S}}\] & \[\mathcal{A}_{\mathcal{S}}\] \\
    Query \[\mathcal{q}_{\mathcal{G}}\] & \[\mathcal{L}_{\mathcal{M},\mathcal{G} \] & \[\mathcal{A}_{\mathcal{G}}\] \\
    \bottomrule
    \end{tabular}
\end{table}

使用していますpdflatexが、このエラーが発生します

! LaTeX Error: \mathcal allowed only in math mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.34    Global schema & \[\mathcal
                                {L}_{\mathcal{G}}\] & \[\mathcal{A}_\mathcal...

? 
! Missing $ inserted.
<inserted text> 
                $
l.34    Global schema & \[\mathcal{L}_
                                    {\mathcal{G}}\] & \[\mathcal{A}_\mathcal...

? x

序文全文はこちら

\documentclass[12pt]{report}

\usepackage[utf8]{inputenc}
\PassOptionsToPackage{
        natbib=true,
    style=authoryear-comp,
        backend=biber,
        url=false,
        doi=false,
        isbn=false,
        eprint=false,
            }{biblatex}
\usepackage[backend=biber,bibencoding=utf8]{biblatex}
\addbibresource{/home/enrico/Università/uni_bib.bib}
\usepackage[bottom]{footmisc}
\usepackage[inline]{enumitem}
\usepackage{hyperref}
\usepackage{array}
\usepackage{svg}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[T1]{fontenc}
\usepackage{blindtext}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage[final]{microtype}
\usepackage{setspace}
\onehalfspacing

%%%This is to have the titles of the chapters without the number%%%
\usepackage[raggedright,pagestyles]{titlesec}

\newpagestyle{main}{
  \sethead[\thepage][][\chaptertitle]{\chaptertitle}{}{\thepage}
  \headrule
}
\pagestyle{main}

\titleformat{\chapter}{\normalfont\huge\bfseries}{}{0pt}{\Huge}

の使用の何が間違っているのか分かりません\[ \]

@quark67 がコメントで返信しました。この場合、$...$の代わりにを使用する必要があります\[ \]

答え1

エラーは少し微妙です。コマンドは\[いくつかの作業を実行し、最終的に$$ディスプレイ数式モードを開始するために発行されます ( $$LaTeX 環境では決して使用しないでくださいdocument。ただし、もちろんディスプレイ数式モードはこれを内部的に使用します)。

しかし、$$あなたの場合、 は何をしますか?または( ではない)タイプのアライメントセルはlcrp制限された水平モードここではディスプレイ数式モードは許可されておらず、規則により、$$単にインライン数式モードに入ったり出たりするだけです。したがって、TeXはない数式モードでは、\mathcalが見つかります。したがって、(確かに謎めいた)

! LaTeX Error: \mathcal allowed only in math mode.

\[エラー メッセージ。残念ながら、タイプのテーブル セル内lcまたはTeX が制限された水平モードの場合にを使用するとエラーが発生する可能性はありますrが、現在は実装されていません (実装する理由も見当たりません)。

このジョブには、\(...\)または のいずれかのインライン数式モードを使用します。$...$

\mathcal{q}また、現在のフォント設定では適切な出力が生成されないことにも注意してください。

関連情報