
나는 학회에 논문을 제출하고 싶습니다.기호 논리 저널asl.cls
, 이는 Association of Symbolic Logic의 클래스 파일 과 참고문헌 스타일 파일을 사용해야 함을 의미합니다. asl.bst
둘 다 사용 가능합니다.여기.
과거에는 및 패키지 hyperref
를 및 패키지와 함께 성공적으로 사용했습니다.cleveref
cite
article
book
. 그런데 클래스 파일이 asl.cls
문제를 일으키고 있습니다. MWE는 다음과 같습니다.
\documentclass{asl}
\usepackage{color}
\usepackage{hyperref}
\hypersetup{colorlinks=true,linkcolor={blue},citecolor={orange}}
%\usepackage[nameinlink]{cleveref} % If this is switched on, then the .tex file fails to compile.
\usepackage{cite} % This package doesn't lead to a catastrophic failure, but the citation appears as [?].
\newtheorem{thm}{Theorem}
\title{A minimal working example}
\author{M.W.\ Example}
\begin{document}
\maketitle
\begin{thm}\label{theorem}
There exists a solution to this \LaTeX{} problem.
\end{thm}
\begin{proof}
See the \TeX{} Stack Exchange.
\end{proof}
A reference to the theorem: \ref{theorem} This is working! :)
A citation: \cite{test} This is not working. :(
\bibliography{MWE}
\bibliographystyle{asl}
\end{document}
MWE.bib 파일은 다음과 같습니다.
@article{test,
author = {Why, Y.O.},
title = {Clashes between packages and class files},
journal = {Journal of tricky \LaTeX{} problems},
year = {2017},
volume = {1},
pages = {1-101}
}
지금까지의 몇 가지 관찰과 시도는 다음과 같습니다.
- 파일
asl.cls
2002년의 것으로, 일부 패키지보다 이전 버전인 것으로 생각되지만 최신 버전을 찾을 수 없습니다. - 파일을 살펴봤지만
asl.cls
LaTeX 클래스 파일의 내부 작동에 대한 지식은 다음과 같습니다.매우제한적이며 종속성이 너무 많아서 어디서부터 시작해야 할지 모르겠습니다. - 패키지 를 끄면
cite
인용이 [?]가 아닌 [1]로 올바르게 표시되지만 클릭할 수는 없습니다. - 와 같은 일부 표준 패키지는
amsthm
파일에 내장되어 있습니다asl.cls
(완전히 이해하지는 못함).
hyperref
그래서 제 질문은 이렇습니다. , cleveref
및 cite
패키지를 (수정된 버전)과 함께 사용할 수 있는 방법이 있습니까 asl.cls
?
답변1
나는 파일을 살펴보고 asl.cls
문서 asl.bst
클래스의 사용자 가이드( )를 이해하려고 노력했습니다 asldoc.ps
.
파일의 복사본을 만들고
asl.cls
복사본을 호출합니다als-mod.cls
.텍스트 편집기에서 파일을 열고
als-mod.cls
3332행으로 이동하여 (재)정의가\bibliographystyle
시작됩니다. 이 매크로의 전체 (재)정의(예: 3332~3349행)를 주석 처리합니다.기본 tex 파일에서
asl-mod
의 필수 인수로 지정\documentclass
하고 옵션을 지정합니다bibother
.otherbib
예, 둘 다입니다!기본 tex 파일에서 인수를
\bibliographystyle
fromasl
으로 변경하십시오plain
. 파일의 코딩은asl.bst
단순히 창백함을 넘어선 것입니다. 그것을 고치려고 노력하는 것은 의미가 없습니다. 문서 클래스 의 사용자 가이드에서는asl
간접적이기는 하지만 해당 스타일을 사용하여 참고문헌을 편집하는 것이 허용된다고 제안합니다plain
. 그것을 위해 가십시오! (사용자 가이드에는 "다른 스타일을 사용할 이유가 없습니다asl
."라고 명시되어 있습니다. 이는 참고문헌 스타일 사용을 지지하는 것처럼 들리지만asl
을 사용해야 한다는 표시는 없습니다asl
.)
이러한 변경으로 인해 \cite
지침은 실제로 숫자 인용 설명을 제공합니다. 우후!
- 출근 하려면
cleveref
다음을 실행하세요. (a)\newtheorem{thm}{Theorem}
~ 전에로딩 및 (b) 로딩 후cleveref
지침을 제공합니다 .\crefname{thm}{Theorem}{Theorems}
cleveref
\RequirePackage{filecontents}
\begin{filecontents}{MWE.bib}
@article{test,
author = {Why, Y. O.},
title = {Clashes between packages and class files},
journal = {Journal of tricky \LaTeX{} problems},
year = {2017},
volume = {1},
pages = {1-101}
}
\end{filecontents}
\documentclass[otherbib,bibother]{asl-mod} % not 'asl'
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,
linkcolor={blue},
citecolor={red}}
\newtheorem{thm}{Theorem}
\usepackage[nameinlink]{cleveref} % 'nameinlink' option is optional
\crefname{thm}{Theorem}{Theorems}
\bibliographystyle{plain} % not 'asl'
\begin{document}
%\title{A minimal working example}
%\author{M.W.\ Example}
%\maketitle
\begin{thm}\label{theorem}
There exists a solution to this \LaTeX{} problem.
\end{thm}
\begin{proof}
See the \TeX{} Stack Exchange.
\end{proof}
A \verb+\cref+ cross-reference: \cref{theorem}. This is now working.
A citation call-out: \cite{test}. This now works too.
\bibliography{MWE}
\end{document}