가로 들여쓰기가 포함된 사용자 정의 환경

가로 들여쓰기가 포함된 사용자 정의 환경

두 부분으로 구성된 간단한 환경을 만들려고 합니다.

  1. 굵은 텍스트와 오른쪽 화살표
  2. 굵은 텍스트 아래에 들여쓰기가 있는 (여러) 줄의 텍스트

내가 지금까지 가지고 있는 것:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{subfig}

\newenvironment{myeventeq}[1]
  {\textbf{#1} $\Rightarrow$\vspace{1ex}\par
   \hspace*{2em}%%
   \begin{minipage}{\dimexpr\columnwidth-2em}}
  {\end{minipage}}

\begin{document}

\begin{figure}    
  \subfloat[piece1]{  
    \begin{myeventeq}{piece of bold text}
      condition 1 to be satisfied\\
      condition 2 to be satisfied
    \end{myeventeq}
  }
  \subfloat[piece2]{
    \begin{myeventeq}{piece of bold text}
      condition 1 to be satisfied\\
      condition 2 to be satisfied
    \end{myeventeq}  
  }
  \caption{dual caption}
\end{figure}

\end{document}

그러면 다음이 생성됩니다.

예

현재 문제가 되는 것은 다음과 같습니다.

  • 조건은 굵은 텍스트 아래에 있어야 합니다.
  • 두 번째 하위 그림은 페이지에서 벗어납니다.

답변1

환경 을 피하려면 list. minipage문제는 여러 페이지에 걸쳐 나누어지지 않는다는 것입니다. 하지만 당신이 언급한 이후로 subfig나는 이 환경이 여러 페이지에 걸쳐 있도록 의도된 것이 아니라고 가정하고 있습니다.

\documentclass{article}
\usepackage{amsmath,amssymb}

\newenvironment{myeventeq}[1]
  {\textbf{#1} $\Rightarrow$\vspace{1ex}\par
   \hspace*{2em}%%
   \begin{minipage}{\dimexpr\columnwidth-2em}}
  {\end{minipage}}

\begin{document}

Hello

\begin{myeventeq}{piece of bold text}
  condition 1 to be satisfied\\
  condition 2 to be satisfied
\end{myeventeq}

\end{document}

관련 정보