Graying out texts with/without lines with LaTeX?

后端 未结 2 534
深忆病人
深忆病人 2021-01-25 10:16

This is a screen capture from Pragmatic Bookshelf.

How to make this boxed text with LaTeX? It has it\'s own heading with underline, and uses color.

And

相关标签:
2条回答
  • 2021-01-25 10:55

    You should use the color package.

    For example,

    \colorbox{red}{Black text on red background}
    

    creates a black text, with a red background. A good description of the color capabilities can be seen here, and an extended example here.

    0 讨论(0)
  • 2021-01-25 11:15

    The rounded box is most easily created using TikZ:

    \begin{tikzpicture}
      \draw node[draw=black,fill=black!20,rounded corners,inner sep=2ex,text width=\textwidth] {
        Lorem ipsum dolor sit amet \dots
        };
    \end{tikzpicture}
    
    0 讨论(0)
提交回复
热议问题