如何写一个矩形框并在其中书写

如何写一个矩形框并在其中书写
\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb}
\begin{document}
\title{GROUP THEORY}\bfseries
\maketitle
\section{ALGEBRIC SYSTEM :}
NOTE: The algebraic system define over operator $\star$ , which is \emph{closed} and \emph{associative} is called SEMIGROUP.
\end{document}

我想把我的最后一句话写在矩形框里,这样我就可以突出显示它。

答案1

一种选择是使用tcolorbox包。可视化有很多样式选项。以下是一些示例:

\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage[many]{tcolorbox}
\begin{document}
\title{GROUP THEORY}\bfseries
\maketitle
\section{ALGEBRIC SYSTEM :}

\begin{tcolorbox}
NOTE: The algebraic system define over operator $\star$ , which is \emph{closed} and \emph{associative} is called SEMIGROUP.
\end{tcolorbox}

\begin{tcolorbox}[title=NOTE:,colframe=blue,colback=blue!5!white,arc=0pt,fonttitle=\bfseries]
The algebraic system define over operator $\star$ , which is \emph{closed} and \emph{associative} is called SEMIGROUP.
\end{tcolorbox}

\newtcbtheorem[number within=section]{note}{Note}{enhanced,drop fuzzy shadow,
  colframe=red!75!black,colback=red!5!white,
  colbacktitle=red!10!white,coltitle=red!20!black}{note}

\begin{note}{}{somenote}
The algebraic system define over operator $\star$ , which is \emph{closed} and \emph{associative} is called SEMIGROUP.
\end{note}

\end{document}

在此处输入图片描述

答案2

我会用mdframed上一篇

\documentclass{book}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}

\definecolor{cccolor}{rgb}{.67,.7,.67}
\begin{document}

\begin{mdframed}[outerlinecolor=black,outerlinewidth=2pt,linecolor=cccolor,middlelinewidth=3pt,roundcorner=10pt]
  This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
  \begin{center}
    \includegraphics[scale=2]{by-nc-sa.pdf}
  \end{center}
\end{mdframed}

\end{document}

给予……

带有 TikZ 的 mdframed 盒子

相关内容