awesomebox 中水平线之间的空间

awesomebox 中水平线之间的空间

我需要在段落顶部和底部之间留出一个小空间

平均能量损失

\documentclass[10pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{awesomebox}

\begin{document}

\setlength{\aweboxsignraise}{-10mm}
\awesomebox[white][\abShortLine]{2pt}{\faGrinBeam}{red}{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}

\end{document}

答案1

该包\awesomebox作为实现tabular,并且规则由 生成\cline

这是一个允许添加指定尺寸的垂直空间的解决方法。

\documentclass[10pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{awesomebox}

\newcommand{\abovespace}[1]{\hrule width 0pt height #1\ignorespaces}
\newcommand{\belowspace}[1]{\par\hrule width 0pt height #1\ignorespaces}

\begin{document}

\setlength{\aweboxsignraise}{-10mm}
\awesomebox[white][\abShortLine]{2pt}{\faGrinBeam}{red}{
  \abovespace{6pt}
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
  sed do eiusmod tempor incididunt ut labore et dolore magna
  aliqua. Ut enim ad minim veniam, quis nostrud exercitation
  ullamco laboris nisi ut aliquip ex ea commodo consequat.
  Duis aute irure dolor in reprehenderit in voluptate velit
  esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
  occaecat cupidatat non proident, sunt in culpa qui officia
  deserunt mollit anim id est laborum.
  \belowspace{6pt}
}

\end{document}

在此处输入图片描述

相关内容