tcolorbox,请问如何将左移至背景色里面去,如何将箭头上移至中间位置。

2019-09-10 16:00发布

\documentclass{article}\usepackage{amsmath,amsthm,amssymb}\usepackage{xcolor}\usepackage{colortbl}\u...

\documentclass{article}


\usepackage{amsmath,amsthm,amssymb}

\usepackage{xcolor}

\usepackage{colortbl}

\usepackage{listings}

\usepackage{tcolorbox}

\tcbuselibrary{most}

\usepackage{varwidth}


\begin{document}

\begin{tcolorbox}[sharp corners, text width = 8cm, boxrule=0pt, nobeforeafter, arc=0mm]  

\begin{lstlisting}[language={[LaTeX]TeX}]

$S=\sqrt[n]{\frac{a+b}{a-b}}$.

\end{lstlisting}

\end{tcolorbox}

\qquad $\Rightarrow$ \qquad

\tcbox[sharp corners, colframe=black, colback=white, width=(\linewidth-4pt)/3, boxrule=0.5pt, nobeforeafter, arc=0mm]

{$S=\sqrt[n]{\frac{a+b}{a-b}}$.}

\end{document}



请问如何将$S=\sqrt[n]{\frac{a+b}{a-b}}$.左移至背景色里面去,如何将箭头上移至中间位置。

4条回答
\documentclass{article}
\usepackage{mathtools}
\usepackage{tcolorbox}
\usepackage{listings}
\tcbuselibrary{most}
\begin{document}
\begin{tcolorbox}[sharp corners,text width=0.8\linewidth,boxrule=0pt,nobeforeafter,arc=0mm]
  \lstinline[language={[LaTeX]TeX}]|$S=\sqrt[n]{\frac{a+b}{a-b}}$| \qquad $\Rightarrow$ \qquad $S=\sqrt[n]{\dfrac{a+b}{a-b}}$
\end{tcolorbox}
\end{document}

image.png

一周热门 更多>

相关问答