如下这个例子:例子代码: 地址:http://tex.stackexchange.com/questions/66820/how-to-create-highlight-boxes-in-latex
\documentclass{book} \usepackage{xcolor} \usepackage[tikz]{bclogo} \usepackage[framemethod=tikz]{mdframed} \usepackage{lipsum} \definecolor{bgblue}{RGB}{245,243,253} \definecolor{ttblue}{RGB}{91,194,224} \mdfdefinestyle{mystyle}{% rightline=true,innerleftmargin=10,innerrightmargin=10, outerlinewidth=3pt,topline=false,rightline=true,bottomline=false, skipabove=\topsep,skipbelow=\topsep } \begin{document} \renewcommand\bcStyleTitre[1]{\large\textcolor{ttblue}{#1}} \begin{bclogo}[couleur=bgblue, arrondi =0 , logo=\bcbombe, barre=none,noborder=true]{Commom Programming Error} \itshape\lipsum[4] \end{bclogo} \begin{mdframed}[style=mystyle,frametitle={Web addresses in text}] \lipsum[4] \end{mdframed} \end{document}
大家可以阅读:bclogo和mdframed包的说明如下:http://www.ctan.org/tex-archive/graphics/bclogo、
\documentclass{article} \usepackage{lipsum} \usepackage[svgnames]{xcolor} \usepackage[tikz]{bclogo} \begin{document} \begin{bclogo}[logo=\bcattention, noborder=true, barre=none]{Important!} \lipsum[1] \end{bclogo} \end{document}
\begin{bclogo}[logo=\bcattention, couleurBarre=red, noborder=true, couleur=LightSalmon]{Important!} \lipsum[1] \end{bclogo}
\begin{bclogo}[logo=\bcinfo, couleurBarre=orange, noborder=true, couleur=white]{Information} \lipsum[1] \end{bclogo}
http://www.ctan.org/tex-archive/macros/latex/contrib/mdframed大家可以自己阅读这些包的说明文件,来学习相关实例。
发表评论 取消回复