將文字放置在兩個圖形之間

將文字放置在兩個圖形之間

我剛開始使用 LaTex,我正在嘗試建立一個自訂標題頁。在我們的實驗室報告中,我們被要求提供與所附影像類似的內容。我在對齊兩個圖之間的文字時遇到問題。我怎麼能像圖中那樣對齊它?

由於我是從頭開始製作標題頁,因此我有兩個 .tex 文檔,如下所示:

檔案 test_title.tex

\documentclass[pdftex,12pt,letterpaper]{report}

\usepackage[pdftex]{graphicx}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\begin{document}

\input{./title.tex}
\end{document}

文件標題.tex

\begin{titlepage}

\begin{flushleft}
\includegraphics[width=0.15\textwidth]{./UPRMlogo}
\end{flushleft}

\begin{flushright}
\includegraphics[width=0.15\textwidth]{./UPRMlogo}
\end{flushright}

\begin{center}
University of Puerto Rico \\
Mayaguez Campus\\
Mechanical Engineering Department\\
\end{center}

\end{titlepage}

例子

答案1

這是一種方法,但有很多選擇。請注意字元的使用%,以防止虛假空格導致溢出\hbox警告。

\documentclass{article}
\usepackage{graphicx}

\begin{document}
\noindent% just to prevent indentation narrowing the line width for this line
\includegraphics[width=0.15\textwidth]{example-image-a}%
\begin{minipage}[b]{0.7\textwidth}
\centering
University of Puerto Rico \\
Mayaguez Campus\\
Mechanical Engineering Department
\end{minipage}%
\includegraphics[width=0.15\textwidth]{example-image-b}
\end{document}

在此輸入影像描述

相關內容