\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환경에서는 절대 사용해서는 안 되지만, 물론 표시 수학 모드는 내부적으로 이를 사용합니다).

하지만 $$귀하의 경우에는 무엇을 합니까? 또는 (아님 ) 유형의 정렬 셀은 다음에서 처리됩니다 l.crp제한된 수평 모드여기서 디스플레이 수학 모드는 허용되지 않으며 규칙에 따라 $$단순히 인라인 수학 모드를 시작하고 종료합니다. 따라서 TeX는~ 아니다수학 모드에서 \mathcal발견되면. 따라서 (분명히 비밀스러운)

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

에러 메시지. 아아, \[유형의 테이블 셀에서 l또는 TeX가 제한된 수평 모드에 있을 c때 using 오류를 잡는 것이 가능할 수도 있지만 r현재는 구현되지 않습니다(실제 이유도 없습니다).

이 작업에는 \(...\)인라인 수학 모드를 사용하십시오 .$...$

또한 \mathcal{q}현재 가지고 있는 글꼴 설정으로는 합리적인 출력이 생성되지 않습니다.

관련 정보