Cloud2016 我没有注意到,原来模板试不需要的。这样就更方便了。你要的几个css 块的LaTeX,我有。CSS我没有太在意,从@yihui 那里抄了几个,自己有改造了一下,花了些时间找自由版权的图片。🙂
\usepackage{tcolorbox}
\tcbset{
noparskip/.style={before={\pagebreak[0]\parskip=0pt\parindent=0pt}},
before skip=-\baselineskip,
box align=top,
enhanced,
breakable,
left=0pt,
right=0pt,
top=2pt,
bottom=2pt,
opacityframe=0,
opacitybacktitle=0.5,
width=\dimexpr\textwidth\relax,
enlarge left by=0mm,
}
\makeatletter
\ifdefstring{\ELEGANT@lang}{cn}{
\newcommand{\rmdnotename}{注意}
\newcommand{\tipname}{提示}
\newcommand{\warnname}{警告}
\newcommand{\thinkname}{思考}
}{\relax}
\ifdefstring{\ELEGANT@lang}{en}{
\setlength\parindent{2em}
\newcommand{\rmdnotename}{Note}
\newcommand{\tipname}{Tips}
\newcommand{\warnname}{Warning}
\newcommand{\thinkname}{Think}
}{\relax}
\makeatother
\newenvironment{rmdnote}{
\vspace*{0.5\baselineskip}
\par\noindent
\makebox[-3pt][r]{\color{red!90}\size{8}{\textdbend}\,\,}
\begin{tcolorbox}[
title={\textbf{\color{second}\rmdnotename}},
title style={left color=blue!10!green!20!white,right color=yellow!20!blue!20!white},
colback=red!10!white,
]
\itshape
}{
\end{tcolorbox}
\par\ignorespacesafterend
}
\newenvironment{rmdtip}{
\vspace*{0.5\baselineskip}
\par\noindent
\makebox[-3pt][r]{\color{red!90}\size{12}{\HandRight}\,\,}
\begin{tcolorbox}[
enhanced,
title={\textbf{\color{second}\tipname}},
title style={left color=blue!10!green!20!white,right color=yellow!20!blue!20!white},
colback=cyan!10!white,
]
\sffamily
}{
\end{tcolorbox}
\par\ignorespacesafterend
}
\newenvironment{rmdthink}{
\vspace*{0.5\baselineskip}
\par\noindent
\makebox[-4pt][r]{\color{green!90}\size{12}{\faLightbulbO}\,\,}
\begin{tcolorbox}[
enhanced,
title={\textbf{\color{second}\thinkname}},
title style={left color=blue!10!green!20!white,right color=yellow!20!blue!20!white},
colback=green!20!white,
]
\sffamily
}{
\end{tcolorbox}
\par\ignorespacesafterend
}
.rmdnote, .rmdtip, .rmdthink{
padding: 1em 1em 1em 4em;
margin-bottom: 10px;
}
.rmdnote {
background: #f5ead8 5px center/3em no-repeat;
background-image: url("../figs/note.png");
}
.rmdtip {
background: #88c1f0 5px center/3em no-repeat;
background-image: url("../figs/tip.png");
}
.rmdthink {
background: #96f5f8 5px center/3em no-repeat;
background-image: url("../figs/thinking.png");
}