Last active
December 15, 2015 21:39
-
-
Save zr-tex8r/5327154 to your computer and use it in GitHub Desktop.
LaTeX: list系環境のインデントを解除して出力する環境
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
% bxclearindent.sty | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{bxclearindent} | |
%%<*> clearindent 環境 | |
% list系環境に由来するインデントを全て解除した状態で中身を出力する. | |
\newenvironment{clearindent}{% | |
\let\par\@@par \let\@par\@@par \par \parshape\z@ | |
\leftmargin\z@ \rightmargin\z@ | |
\@totalleftmargin\z@ \linewidth\hsize | |
\ignorespaces | |
}{% | |
\par | |
} | |
%%<*> \newclearindentenvironment{<名前1>}{<名前2>} | |
% clearindentと<名前2>の環境を複合した環境を<名前1>として定義する. | |
\newcommand*{\newclearindentenvironment}[2]{% | |
\newenvironment{#1}% | |
{\clearindent\begin{#2}}% | |
{\end{#2}\endclearindent}% | |
} | |
\endinput |
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{jarticle}\relax | |
\usepackage{bxclearindent} | |
\newclearindentenvironment{widedispmath}{displaymath} | |
\begin{document} | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{description} | |
\item[テスト] | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{enumerate} | |
\item | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{quotation} | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{itemize} | |
\item | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\[ % list 系環境内での中央ぞろえ | |
f'(x)=\lim_{\Delta x\to0} | |
\frac{f(x + \Delta x) - f(x)}{\Delta x} | |
\] | |
\item | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{clearindent}\[ | |
f'(x)=\lim_{\Delta x\to0} | |
\frac{f(x + \Delta x) - f(x)}{\Delta x} | |
\]\end{clearindent} | |
\item | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\begin{widedispmath} | |
f'(x)=\lim_{\Delta x\to0} | |
\frac{f(x + \Delta x) - f(x)}{\Delta x} | |
\end{widedispmath} | |
\end{itemize} | |
\end{quotation} | |
\end{enumerate} | |
\end{description} | |
いろはにほへとちりぬるをわかよたれそつねならむ | |
うゐのおくやまけふこえてあさきゆめみしゑひもせすん | |
\[ % 比較のために、list 系環境の外での別行立て数式 | |
f'(x)=\lim_{\Delta x\to0} | |
\frac{f(x + \Delta x) - f(x)}{\Delta x} | |
\] | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment