39

以下のスニペットを見て、本文と同じ三振効果を得る方法を教えてください。最新の Ubuntu リポジトリの LaTeX のバージョンを使用しています。

\documentclass{article}
\usepackage{ulem}
\begin{document}
The sout tag works perfect in the \sout{main text area} but not inside the equations.
$$
list = [1, \sout{2}, 3, \sout{4}, 5, \sout{6}, 7, \sout{8}, 9, \sout{10}]
$$
Any clue?
\end{document}

ここにLaTeX出力があります

4

4 に答える 4

27

\sout数学環境内では機能しないようです。次のようなことを試すことができます。

\documentclass{article}
\usepackage{ulem}
\begin{document}
The sout tag works perfect in the \sout{main text area} but not inside the equations.

$list = $[1, \sout{2}, 3, \sout{4}, 5, \sout{6}, 7, \sout{8}, 9, \sout{10}$]$

Any clue?
\end{document}
于 2010-04-18T21:16:52.087 に答える
27

誰かがまだ興味を持っている場合は、キャンセル パッケージについて知りました。これにより、数学モードでテキストをいくつかの異なる方法で打つことができます。ただし、水平ではありません。対角線のみで、私の場合ははるかに優れています。

于 2010-11-09T15:16:32.780 に答える
11

mathmode以外のコマンドは、次のように\text{}環境内に配置することで、mathmode内で使用できます。

\documentclass{article}
\usepackage{ulem}
\begin{document}
The sout tag works perfect in the \sout{main text area} but not inside the equations.

\[ list = [1, \text{\sout{2}}, 3, \text{\sout{4}}, 5, \text{\sout{6}}, 7, \text{\sout{8}}, 9, \text{\sout{10}}] \]
Any clue?
\end{document}

また、動作を再定義せずにストライクアウトを使用できるようにする場合は、を使用します。ulem\emph{}\usepackage[normalem]{ulem}

于 2011-04-19T14:14:41.367 に答える
11

Math モードで取り消し線を維持する必要がある場合 (たとえば、Math フォントを維持するため) は、次の方法を試してください。

\newcommand{\msout}[1]{\text{\sout{\ensuremath{#1}}}}

それから

$\msout{\mathsf{stuckout}}$

amsmath と ulem が必要です。

ここからの解決策。)

于 2011-08-23T02:30:12.543 に答える