ミニページ内のテキストの右側に画像を揃える

ミニページ内のテキストの右側に画像を揃える

ミニページ内の履歴書のテキストから大学のロゴをフラッシュして表示したいのですが、テーブルでも wrapfigure でもうまくいきません。でも、私は初心者だと認めます。これを LaTeX でどのように実行すればよいのでしょうか?

今はこんな感じです:

悪い

しかし、私は次のようにしたいのです:

良い

\documentclass[11pt,oneside,a4paper,titlepage]{article}
\usepackage{geometry}
\usepackage[most]{tcolorbox}

\geometry{
    a4paper,
    left=0.1cm,
    right=0.1cm,
    top=0.1cm,
    bottom=0.1cm
}

\definecolor{titleBack}{RGB}{100, 84, 82} % Wenge brown

\begin{document}
    
    \tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}
    \begin{tcolorbox}
        \begin{minipage}{4.5cm}
            %Picture
        \end{minipage}
        \begin{minipage}{15cm}
            \begin{center}
                \Huge{\textcolor{white}{Name}} \\
                \vspace*{0.5cm}
                \Large{\textcolor{white}{Curriculum Vitae}}
            \end{center}
        \end{minipage}
    \end{tcolorbox}
    
    
    \tcbset{colframe=white,colback=white,arc=0mm}
    \begin{tcolorbox}
        \begin{minipage}[t]{8cm}
            \vspace*{-0.5cm}
            \begin{tcolorbox}[grow to left by=0.6cm,colback=gray!15,colframe=white]
                \section*{Profile}
            \end{tcolorbox}
        \end{minipage}
        \begin{minipage}[t]{11cm}
            \vspace*{-0.5cm}
            \begin{tcolorbox}[grow to right by=0.75cm,colframe=white,colback=white]
                \section*{Education}
                \begin{itemize}
                    \item{
                        \begin{tabular}[!t]{l r}
                            \begin{tabular}[c]{@{}l@{}}\textbf{University of X} \\ \emph{MSc Y} \\ \emph{April, 2024}\end{tabular} & \rule{4ex}{4ex}
                        \end{tabular}
                    
                        Some Text.
                    }
                    \item Another University
                \end{itemize}
            \end{tcolorbox}
        \end{minipage}
    \end{tcolorbox}
\end{document}

答え1

少なくとも最初の段階では、tcolorboxのオプションを使用すると思います。 では提供されていない追加の配置オプションがあります。 coffins ほど柔軟ではありませんが、すでに を使用しているため、より簡単です。sidebysideminipagetcolorbox

例えば、

\documentclass[11pt,oneside,a4paper,titlepage]{article}
\usepackage{geometry}
\usepackage[most]{tcolorbox}
\geometry{
    a4paper,
    left=0.1cm,
    right=0.1cm,
    top=0.1cm,
    bottom=0.1cm
}

\definecolor{titleBack}{RGB}{100, 84, 82} % Wenge brown

\begin{document}

\tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}%
\begin{tcolorbox}
  \begin{minipage}{4.5cm}
    %Picture
  \end{minipage}
  \begin{minipage}{15cm}
    \begin{center}
      \Huge{\textcolor{white}{Name}} \\
      \vspace*{0.5cm}
      \Large{\textcolor{white}{Curriculum Vitae}}
    \end{center}
  \end{minipage}
\end{tcolorbox}


\tcbset{colframe=white,colback=white,arc=0mm}%
\begin{tcolorbox}
  \begin{minipage}[t]{8cm}
    \vspace*{-0.5cm}
    \begin{tcolorbox}[grow to left by=0.6cm,colback=gray!15,colframe=white]
      \section*{Profile}
    \end{tcolorbox}
  \end{minipage}
  \begin{minipage}[t]{11cm}
    \vspace*{-0.5cm}
    \begin{tcolorbox}[grow to right by=0.75cm,colframe=white,colback=white,sidebyside,sidebyside align=center seam,righthand width=4ex+10pt]% adjust width as required for image and/or use width=\linewidth for \includegraphics
      \section*{Education}
      \begin{itemize}
        \item{
            \begin{tabular}[c]{@{}l@{}}\textbf{University of X} \\ \emph{MSc Y} \\ \emph{April, 2024}\end{tabular} 
          
          Some Text.
        }
        \item Another University
      \end{itemize}
      \tcblower
      \rule{4ex}{4ex}
      
    \end{tcolorbox}
  \end{minipage}
\end{tcolorbox}
\end{document}

編集

tabularx大学の列により適していると思われる を使用したバージョンを次に示します。

\documentclass[11pt,oneside,a4paper,titlepage]{article}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{array,tabularx}
% \usepackage{kantlipsum}
\usepackage[most]{tcolorbox}
\geometry{
    a4paper,
    left=0.1cm,
    right=0.1cm,
    top=0.1cm,
    bottom=0.1cm
}

\definecolor{titleBack}{RGB}{100, 84, 82} % Wenge brown

\newlist{edulist}{itemize}{1}
\setlist[edulist]{label=\textbullet,nosep}
\renewcommand{\tabularxcolumn}[1]{>{\raggedright\arraybackslash}m{#1}}
\begin{document}

\tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}%
\begin{tcolorbox}
  \begin{minipage}{4.5cm}
    %Picture
  \end{minipage}
  \begin{minipage}{15cm}
    \begin{center}
      \Huge{\textcolor{white}{Name}} \\
      \vspace*{0.5cm}
      \Large{\textcolor{white}{Curriculum Vitae}}
    \end{center}
  \end{minipage}
\end{tcolorbox}


\tcbset{colframe=white,colback=white,arc=0mm}%
\begin{tcolorbox}
  \begin{minipage}[t]{8cm}
    \vspace*{-0.5cm}
    \begin{tcolorbox}[grow to left by=0.6cm,colback=gray!15,colframe=white]
      \section*{Profile}
    \end{tcolorbox}
  \end{minipage}
  \begin{minipage}[t]{11cm}
    \vspace*{-0.5cm}
    \begin{tcolorbox}[grow to right by=0.75cm,colframe=white,colback=white]% adjust width as required for image and/or use width=\linewidth for \includegraphics
      \section*{Education}
      \begin{tabularx}\linewidth{Xm{5ex}}
        \begin{edulist}
          \item\textbf{University of X}
          
          \emph{MSc Y}
          
          \emph{April, 2024}
          
          Some Text.
        \end{edulist}
        &
        \rule{4ex}{4ex}
        \\
        \begin{edulist}
          \item \textbf{Another University}
          
          \emph{BPhil}
          
          \emph{July, 2024}
          
          Super quick!
        \end{edulist}
        &
        \includegraphics[width=4ex,height=4ex]{example-image-b}
        \\
      \end{tabularx}
    \end{tcolorbox}
  \end{minipage}
\end{tcolorbox}

% \kant[1-5]
\end{document}

関連情報