我尝试使用 textpos 和 tabular,但效果并不好
\documentclass[12pt,draft]{report}
\usepackage[utf8]{inputenc}
\usepackage[showframe,margin=2.5cm]{geometry}
\usepackage{blindtext}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage[absolute,overlay]{textpos}
\usepackage{array}
\begin{document}
...
\vspace*{\fill}
%\begin{flushright}
\begin{tabular}{ |b|b{6cm}|b| }%[b]
\hline
\includegraphics[height=1.5cm]{.png} &
%\begin{textblock}{10cm}%(10cm,6cm)
text &
%\end{textblock}
\includegraphics[height=1.5cm]{.jpeg} \\%[1.5cm]
\hline
\end{tabular}
%\end{flushright}
\end{document}
有什么想法吗?
答案1
您必须更改表格的定义(我删除了所有垂直线和水平线,因为在我看来,有线条看起来很丑陋):
\begin{tabular}[b]{@{}cp{6cm}c@{}}
我们[b]
将表格放在底部,@{}
删除图片前后的空间,将cp{6cm}c
图片居中,并将文本放在 6 厘米宽的框中。您可以加载包array
并m{6cm}
尝试p{6cm}
。
请参阅以下 mwe(代码更改以 标记<=====
):
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[showframe,margin=2.5cm]{geometry}
\usepackage{blindtext}
\usepackage{graphicx}
%\usepackage{array}
\begin{document}
\blindtext
\vspace*{\fill}
%\vfill
\hfill
\begin{tabular}[b]{@{}cp{6cm}c@{}} % <==================================
% \hline
\includegraphics[height=1.5cm]{example-image-a} % <=================
& text
& \includegraphics[height=1.5cm]{example-image-b} \\%[1.5cm]
% \hline
\end{tabular}
\end{document}
及其结果:
根据您的评论,请参见以下代码:
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[showframe,margin=2.5cm]{geometry}
\usepackage{blindtext}
\usepackage{graphicx}
\begin{document}
\blindtext
\vspace*{\fill}
%\vfill
\hfill
\begin{tabular}[b]{@{}c@{}} % <=========================================
\includegraphics[height=1.5cm]{example-image-a} % <===================
\end{tabular}
\begin{minipage}[b]{6cm}
text text text text text text text text text text text text text text text
\end{minipage}
\begin{tabular}[b]{@{}c@{}} % <==================================
\includegraphics[height=1.5cm]{example-image-b} \\%[1.5cm]
\end{tabular}
\end{document}
及其结果: