
subscripts
上の線が で下の線が の場合、superscripts
アルゴリズムではそれらが互いにかなり近くなる可能性があります。
行が互いに非常に接近している場合、アルゴリズムで行間に余分なスペースを入れることは可能ですか?
次のコードがあります:
\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage[table]{xcolor}
\usepackage{eulervm}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{algorithmicx}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{The sadWorld Function}
\hspace*{\algorithmicindent} \textbf{Input:} {}
\begin{algorithmic}[1]
\State{}{$j{.}Z_{H_{d_i}}^{\mathrm{pr}} \gets 0 $}
\State{}$p_n{.}\Pi^{\mathrm{p}}[H_{d_i}] \gets 0$
\end{algorithmic}
\end{algorithm}
\end{document}
出力は次のようになります。
ここで、よく見ると$d_i$
、p
と は非常に近いため、i
の上付き文字として見ることができますp
。 それらの間 (行 1 と 2) に余分なスペースを追加することは可能ですか? 可能であれば、この操作を自動的に処理します。
答え1
vspace を少し追加することもできます:
\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage[table]{xcolor}
\usepackage{eulervm}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{algorithmicx}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{The sadWorld Function}
\hspace*{\algorithmicindent} \textbf{Input:} {}
\begin{algorithmic}[1]
\State{}{$j{.}Z_{H_{d_i}}^{\mathrm{pr}} \gets 0 $}
\vspace*{3mm}
\State{}$p_n{.}\Pi^{\mathrm{p}}[H_{d_i}] \gets 0$
\end{algorithmic}
\end{algorithm}
\end{document}