tcolorbox
环境中的段落默认是不缩进的,如何设置才能使其中段落与正文有相同的缩进?
\documentclass{article}
\usepackage{tcolorbox}
\tcbset{
sharp corners,
boxrule=0pt,
top=0mm,bottom=0pt,left=0pt,right=0pt,
boxsep=0pt,
}
\begin{document}
I can swallow glass without hurting myself. I can swallow glass without hurting myself.
\begin{tcolorbox}
This is a box: I can swallow glass without hurting myself. I can swallow glass without hurting myself. $\displaystyle\frac{d}{y}$
This is a box: I can swallow glass without hurting myself. I can swallow glass without hurting myself. $\displaystyle\frac{d}{y}$
\end{tcolorbox}
I can swallow glass without hurting myself. I can swallow glass without hurting myself.
\end{document}
我从(https://tex.stackexchange.com/questions/217974/indentation-inside-tcolorbox)看到类似的了,主要是parbox,我tcolorbox
用的不多,是一个很蠢的方法解决的
\documentclass{article}
\usepackage{tcolorbox}
\tcbset{
sharp corners,
boxrule=0pt,
top=0mm,bottom=0pt,left=0pt,right=0pt,
boxsep=0pt,
parbox=false
}
\begin{document}
I can swallow glass without hurting myself. I can swallow glass without hurting myself.
\begin{tcolorbox}
% 空一行
This is a box: I can swallow glass without hurting myself. I can swallow glass without hurting myself. $\displaystyle\frac{d}{y}$
This is a box: I can swallow glass without hurting myself. I can swallow glass without hurting myself. $\displaystyle\frac{d}{y}$
You can swallow glass without hurting yourself. New Bee.
\end{tcolorbox}
I can swallow glass without hurting myself. I can swallow glass without hurting myself.
\end{document}
结果如下
哈哈哈!