제목 입력 시 amsart 문제

제목 입력 시 amsart 문제

대부분의 스타일 파일은 스타일 파일이 약간 다르기를 원하고 스타일 파일을 쉽게 변경할 수 있기를 원하기 때문에 작성자 및 제목 명령에 대해 메타레벨을 구현하려고 했습니다.

간단히 amsart말해서 \title{}. 오류가 발생하지는 않지만 제목을 대문자로 사용하지 않습니다. 그러나 여전히 굵은 글씨로 조판됩니다.

따라서 효과가 없는 것도 아니고 모든 효과가 있는 것도 아닙니다. 또한 \expandafter제가 생각할 수 있는 모든 장소에 배치하려고 노력했지만 분명히 이 명령을 잘 이해하지 못하는 것 같습니다.

\documentclass[a4paper,reqno]{amsart}

\usepackage[utf8]{inputenc}

\begin{document}

\newtoks\mytitleA
\mytitleA={This is a title}

\newcommand{\mytitle}{This is a title}
\newcommand{\myauthor}{This is me}

% toggle the following commands to see that only the last version
% produceses the correct layout
%\title{\the\mytitleA}
%\title{\mytitle}
\title{This is a title}

% for the author I cannot spot a difference
\author{\myauthor}
\author{This is me}

\maketitle

\end{document}

같은 다른 스타일 파일은 article제목을 다르게 조판하지 않는 것 같습니다. 매크로에 중첩되어 있으면 적어도 차이점을 알 수 없습니다. 따라서 or amsart의 구현 에 문제가 있을 수 있습니다 .\title{}\maketitle

이 문제를 해결하거나 적어도 중첩된 매크로를 작동시킬 수 있는 방법이 있습니까?

답변1

그거 하나 잊어버렸네하다일, 즉

\expandafter\title\expandafter{\the\mytitleA}

물론 \the앞의 것을 피하는 것은 아무 것도 \mytitleA할 수 없습니다. 왜냐하면 레지스터 \the의 내용을 전달하기 위해서는 필요하기 때문입니다 \toks.

뭐가 문제 야? 기본적으로는 amsart그냥 사용합니다 \uppercase(그렇지 않아야 하지만 이는 또 다른 문제입니다).

해당 작업을 수행하기 전에 전체(보호된) 확장이 textcase이루어 amsart지도록 강제로 로드하여 문제를 피할 수 있습니다 .\MakeTextUppercase\uppercase

\toks레지스터 와 함께

\documentclass[a4paper,reqno]{amsart}
\usepackage{textcase}

\newtoks\mytitleA
\mytitleA={This is a title}
\newcommand{\myauthor}{This is me}

\begin{document}

\title{\the\mytitleA}
\author{\myauthor}

\maketitle

\end{document}

명령으로

\documentclass[a4paper,reqno]{amsart}
\usepackage{textcase}

\newcommand{\mytitle}{This is a title}
\newcommand{\myauthor}{This is me}

\begin{document}

\title{\mytitle}
\author{\myauthor}

\maketitle

\end{document}

출력(두 예제 모두 동일)

여기에 이미지 설명을 입력하세요

관련 정보