![刷新小頁面內文字右側的圖片](https://rvso.com/image/476263/%E5%88%B7%E6%96%B0%E5%B0%8F%E9%A0%81%E9%9D%A2%E5%85%A7%E6%96%87%E5%AD%97%E5%8F%B3%E5%81%B4%E7%9A%84%E5%9C%96%E7%89%87.png)
我想在迷你頁內的簡歷中的某些文字中顯示一個大學標誌。我無法去上班,無論是桌子還是包裝圖。但我承認我是個新手。在 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
ssidebyside
選項,至少在第一個例子中。然後你有額外的對齊選項minipage
沒有提供。不像棺材那麼靈活,但更簡單,因為您已經在使用tcolorbox
.
例如,
\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}