천체 물리학 표기법: HI 조판

천체 물리학 표기법: HI 조판

다음과 같이 분자 가스를 지정하기 위해 HI를 조판하는 가장 좋은 방법은 무엇입니까?이 글의 제목, 대문자 H와 약간 작은 숫자 로 I? 수업 을 이용하고 있습니다 scrbook.

나는 정의하려고 노력했다.

\newcommand{\HI}{H {\uppercase{\romannumeral 1}} }

하지만 결과는 H i소문자 입니다 i.

나도 시도했다

\newcommand*{\HI}{\textsc{Hi}}

하지만 에서 사용할 때 제대로 작동하지 않아 \section{}"H I"가 아닌 "H i"가 발생합니다.

chemmacros나는 또한 화학자에게 더 적합한 에서 이와 같은 것을 찾지 못했습니다 .


이것은 천체물리학에서 분자를 작성하는 표준 방법인데, 이를 쉽게 수행하는 패키지가 없다는 사실에 놀랐습니다.

답변1

현재 글꼴 크기에 연결된 아래 첨자의 크기를 사용합니다.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\DeclareRobustCommand{\HI}{%
  \mbox{H\check@mathfonts\fontsize\sf@size\z@\selectfont I}%
}
\makeatother

\textheight=3cm % just to shorten the image

\begin{document}

\section{About \HI}

Here we talk about \HI.\footnote{Yes, about \HI.}

\end{document}

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

커널 명령은 저장된 매개변수 나 휴리스틱을 사용하여 현재 글꼴 크기부터 \check@mathfonts계산 \sf@size하고 시작합니다.\ssf@size\DeclareMathSizes

답변2

적합하게 조정하십시오 1.2ex.

\documentclass{article}
\usepackage{scalerel}
\newcommand\HI{H\protect\scaleto{$I$}{1.2ex}}
\begin{document}
\tableofcontents

\section{This is \HI}

And in text: \HI{} and \LARGE \HI
\end{document}

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

scalerel기본적으로 수학 모드에서 작동하기 때문에 $I$실제로는 이스케이프입니다.밖으로수학 모드. 너무 혼란스러우면 언제든지 다음과 같이 수학 모드에서 작업할 수 있습니다.\newcommand\HI{H\protect\scaleto{\textrm{I}}{1.2ex}}


패키지가 없는 버전을 원한다면 이렇게 할 수 있지만 굵은 스타일을 위해서는 별도의 매크로가 필요합니다.

\documentclass{article}
\newcommand\HI{$\textrm{H}\scriptstyle\mathrm{I}$}
\newcommand\HIbold{$\textbf{H}\scriptstyle\mathbf{I}$}
\begin{document}
\tableofcontents

\section{This is \HIbold}

And in text: \HI{} and \LARGE \HI
\end{document}

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

답변3

이를 수행하는 또 다른 방법은 다음과 같이 구현되는 방식입니다.천문학 및 천체물리학 수업.

헤더에 다음 선언을 추가합니다.

\DeclareRobustCommand{\ion}[2]{%
\relax\ifmmode
\ifx\testbx\f@series
{\mathbf{#1\,\mathsc{#2}}}\else
{\mathrm{#1\,\mathsc{#2}}}\fi
\else\textup{#1\,{\mdseries\textsc{#2}}}%
\fi}

그런 다음 문서 본문에서

\ion{H}{I}

관련 정보