레이아웃을 조정하기 위한 \footnote의 대안 정의

레이아웃을 조정하기 위한 \footnote의 대안 정의

의 후속 질문입니다.정리 제목과 각주 번호의 거리

\thfootnote. 문제는 \footnoteMEW에서 볼 수 있듯이 명령 의 선택적 인수와 관련됩니다.

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

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\newtheorem{theorem}{Theorem}
\newcommand{\thfootnote}[2][]{\hspace{-0.4em}\footnote[#1]{#2}\hspace{0.3em}}
\begin{document}
\section{Something}
\begin{theorem}[Something]\footnote{Something}
Blah blah.
\end{theorem}
\begin{theorem}[Something]\thfootnote{Something}
Blah blah.
\end{theorem}
\end{document}

답변1

에 따르면귀하의 의견, 나는 이것이 당신이 원하는 것이라고 믿습니다:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{etoolbox}

\newtheorem{theorem}{Theorem}

\newcommand{\thfootnote}[2][]{%
  \hspace{-0.4em}%
  \ifstrempty{#1}{\footnote}{\footnote[#1]}%
  {#2}\hspace{0.3em}}

\begin{document}

\section{Something}

\begin{theorem}[Something]\footnote{Something}
Blah blah.
\end{theorem}

\begin{theorem}[Something]\thfootnote{Something}
Blah blah.
\end{theorem}

\end{document}

스크린샷

{#2}( TeX는 매크로 언어이기 때문에 두 가지 대안 모두에 the를 포함할 필요는 없습니다.~할 수 있었다그래도 해를 끼치 지 않고 포함됩니다.)

선택적 인수 내부의 공백을 허용하려는 경우 \thfootnote(빈 선택적 인수를 빈 인수로 처리) \ifstrempty로 바꾸십시오 \ifblank.

답변2

의 목적이 무엇인지 잘 모르겠지만 정리의 모든 각주 앞에 \thfootnote쓰지 않고 공백을 없애고 싶다면 단 하나의 인수로 새 각주를 정의할 수 있습니다. \hspace{-0.4em}그런 다음 이를 다른 각주 번호에 연결합니다. MWE를 참조하세요. 목적이 다른 경우 질문을 자세히 설명해주세요.

하나 이상의 각주 시리즈가 필요하다면 다음을 살펴보세요.큰 발또는많은 발. 또한 표준 기사 클래스는 페이지 하단에 각주를 배치하지 않고 텍스트에서 고정된 거리에 배치한다는 점에 유의하세요. 따라서 옵션을 사용하여 footmisc를 로드 bottom하거나 다음 중 하나를 사용하는 것을 고려해야 합니다.KOMA 스크립트클래스.

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

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\newtheorem{theorem}{Theorem}
\newcommand{\thfootnote}[1]{\hspace{-0.4em}\footnote{#1}\hspace{0.3em}}
\begin{document}
\section{Something}
\begin{theorem}[Something]\footnote{Something}
Blah blah.
\end{theorem}
\begin{theorem}[Something]\thfootnote{Something}
Blah blah.
\end{theorem}

\begin{theorem}[\footnote{Something}]
Blah blah.
\end{theorem}

\end{document}

관련 정보