
내 문서에 이와 같은 공리를 열거하고 싶습니다.
A1 this is the first axiom
A2 this is the second axiom
Now some text
A3 this is the third axiom
LaTeX에서는 어떻게 할 수 있나요?
답변1
공리 및 유사한 요소는 일반적으로 자동으로 번호가 매겨지는 정리 환경으로 처리됩니다. 이 접근 방식을 사용하면 서문에 다음 지시문을 포함할 수 있습니다.
\newtheorem{axiom}{A}
그러면 공리는 "A 1", "A 2" 등으로 표시됩니다.
(위 코드에서 "Axiom"을 대체하는 "Axiom"을 철자하는 것이 더 일반적입니다.)
"A"와 숫자 사이에 공백 없이 레이블을 "A1" 등으로 표시하려면 상황이 더 복잡해집니다. 적절한 코드가 제공될 수 있도록 이 요구 사항을 확인하고 사용 중인 문서 클래스와 패키지를 지정하십시오.
답변2
A와 공리 번호 사이에 공백이 없는 것은 그리 어렵지 않습니다.
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsthm}
\usepackage{cleveref}
\crefname{axiom}{axiom}{axioms}
\Crefname{axiom}{Axiom}{Axioms}
\newtheorem{axiom}{}
\renewcommand\theaxiom{A\arabic{axiom}}
\begin{document}
\begin{axiom}\label{ax1}
This is the first axiom.
\end{axiom}
\begin{axiom}\label{ax2}
This is the second axiom.
\end{axiom}
\Cref{ax2} cannot be deduced from \cref{ax2}.
\end{document}