Last active
April 25, 2018 08:52
-
-
Save hyuki/2ef89af7d855e3b37cd741598fdb786f to your computer and use it in GitHub Desktop.
数式でディスプレイスタイルとそれ以外を自動判定するLaTeXマクロはどう書くの?(コメントで解決)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{jsarticle} | |
\begin{document} | |
\newcommand{\TEST}{(\ifinner \texttt{i} \fi% | |
\ifmmode \texttt{m} \fi)} | |
\section*{1} | |
$\TEST$ | |
\section*{2} | |
$$ | |
\TEST | |
$$ | |
\section*{3} | |
$\begin{array}{c}\TEST\end{array}$ | |
\section*{4} | |
$$ | |
\begin{array}{c}\TEST\end{array} | |
$$ | |
\section*{5} | |
$$ | |
\begin{array}{c}\displaystyle\TEST\end{array} | |
$$ | |
\end{document} | |
Author
hyuki
commented
Apr 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment