我想问一下为什么在使用允许创建自定义框的环绕图形后不能将文本/方程式居中。
例如,我想避免获取此配置:
代码如下(我从本论坛的另一篇文章中获取了该框的结构):
\documentclass{article}
%%%%%%%%MATHS%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{breqn}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{xcolor}
\usepackage{accents} % for bar under character
\DeclareMathOperator{\e}{e}
\usepackage {mcode}
\usepackage{color} %red, green, blue, yellow, cyan, magenta, black, white
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\definecolor{BgYellow}{HTML}{FFF59C}
\definecolor{FrameYellow}{HTML}{F7A600}
\usepackage{geometry}
\usepackage{layout}
\geometry{hmargin=1cm,vmargin=1.5cm}
\newcommand{\gap}{\vspace{0.25cm}}
\newcommand{\gapi}{\vspace{1.25cm}}
\usepackage{parskip}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{pgf, tikz, adjustbox}
\usetikzlibrary{patterns, matrix, positioning}
\usepackage[most]{tcolorbox}
\usepackage{wrapfig}
\newtcolorbox{mybox1}[1][]{enhanced,
before skip=0mm,after skip=0mm,
width=0.35\textwidth,
colback=BgYellow,colframe=FrameYellow,boxrule=0.2mm,
attach boxed title to top left={xshift=0cm,yshift*=0mm-\tcboxedtitleheight},
varwidth boxed title*=-3cm,
boxed title style={frame code={
\path[left color=FrameYellow,right color=FrameYellow,
middle color=FrameYellow]
([xshift=-0mm]frame.north west) -- ([xshift=0mm]frame.north east)
[rounded corners=0mm]-- ([xshift=0mm,yshift=0mm]frame.north east)
-- (frame.south east) -- (frame.south west)
-- ([xshift=0mm,yshift=0mm]frame.north west)
[sharp corners]-- cycle;
},interior engine=empty,
},
sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
underlay={%
\path[fill=BgYellow!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[draw=FrameYellow,shorten <=-0.05mm,shorten >=-0.05mm,color=FrameYellow] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
},
drop fuzzy shadow,
fonttitle=\bfseries,
title={#1}}
\begin{document}
%%%%%%%MEMO%%%%%%%%%%%%
\begin{wrapfigure}{L}{0.35\textwidth}
\begin{mybox1}[Mémo]
Soit $z = x+iy$ :
\begin{dmath*}
arg(z) = \left\{ \begin{aligned}
\pi + \arctan(\frac{y}{x}) \condition{si $x <0$} \\
\arctan(\frac{y}{x}) \condition{si $x >0$}
\end{aligned}
\right.
\end{dmath*}
\end{mybox1}
\end{wrapfigure}
Il reste ensuite à déterminer les constantes restantes $C$ et $D$ en usant des conditions sur le bord du domaine $x=L$ telles que :
\gap
\begin{equation}
\left\{
\begin{aligned}
F''(x=L) &= 2 \alpha^2 e^{-\alpha L} \left[C \sin \left({\alpha L} \right) - D \cos \left({\alpha L} \right) \right] = 0 \\
\\
F(x=L) &= e^{-\alpha L} \left[C \cos \left({\alpha L} \right) + D \sin \left({\alpha L} \right) \right] = (h_{N} - h_{\infty}) \\
\end{aligned}
\right.
\notag
\end{equation}
En résolvant ce système, on détermine les valeurs des constantes associées :
\begin{equation}
\left\{
\begin{aligned}
C&= e^{\alpha L} (h_{N} - h_{\infty}) \cos\left(\frac{L}{B^{\frac{1}{4}}\sqrt{2}}\right) \\
D &= e^{\alpha L} (h_{N} - h_{\infty}) \sin\left(\frac{L}{B^{\frac{1}{4}}\sqrt{2}}\right) \\
\end{aligned}
\right.
\notag
\end{equation}
\end{document}
感谢您的帮助,