2つの部分でフレームを作成する方法

2つの部分でフレームを作成する方法

2 つのパーツでフレームを作成しようとしています。両方とも、下の図のように接続されています。フレームに好きなものを書き込むために使用したいのですが、カウンターは必要ありません。カウンターは自分で作成したいと思います。定理ボックスを使用しようとしましたが、これは私が望んでいるものではありません。

ここに画像の説明を入力してください

この定理カウンターを内部で個別に使用できるようにしたいと考えています。定理の高度な階層的カウント

だから、カウンターなしでボックスを作りたいだけです。

ありがとう

答え1

パッケージtcolorbox(https://ctan.org/pkg/tcolorbox) は、おそらくあなたがやりたいことすべてを実行します。次に例を示します。

\documentclass[english,11pt,a5paper]{article}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}

\newtcolorbox{MyQuestion}[2][]{%
    enhanced, breakable, 
    title style={green!30}, % background color of the top field
    colback=red!5,        % background color of the bottom field
    colframe=blue!65,       % color of the frame
    width=\textwidth,       % width of the box
    %
    sharp corners,          % or use `arc=6pt` instead of `sharp corners`  
    %
    boxsep=5pt,             % space around the title text
    left=6pt,right=6pt,     % spacing of text inside the box
    top=5pt,bottom=5pt,  
    %
    bottomrule=3pt, toprule=5pt,  % thicknesses of various lines
    leftrule=1pt, rightrule=1pt,
    titlerule=1pt, 
    %
    title={\color{red}#2}, 
    #1                      % everything that is inside [] of \begin{MyQuestion}[]
}

\begin{document}
    \begin{MyQuestion}{%
        Question 1. So, I was taking a walk the other day. 
        And I see a woman pacing up and down ...
    }
        Solution:  ... \\
    \end{MyQuestion}
\end{document}

これは次のようになります:

ここに画像の説明を入力してください

変更しやすいように意図的にいくつかの異なる色を選択しました。

カウンターを「手動で」処理するとおっしゃっていますが、tcolorboxes は環境のカスタム カウンターもサポートしていることを知っておくと役立つかもしれません (上記のリンクにある tcolorbox のドキュメントで「カウンター」を検索してください)。

関連情報