我想在文本右侧放置签名。但是图片导致文本行之间出现一些间距:
我的目标是达到这样的目标:
或者那个:
我的此 MWE 代码:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\begin{document}
\setlength{\parindent}{0pt}
\textbf{Best regards,} \\ Firstname Lastname\\Student B.Sc.
\hspace{35mm}
\raisebox{1\dp\strutbox}{\includegraphics[width=10em]{example-image-a}}
\end{document}
答案1
一种可能的解决方案是tabular
:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{makecell}
\begin{document}
\noindent\begin{tabular}{m{4cm}m{5cm}}
\makecell[l]{\textbf{Best regards,}\\ \\ Firstname Lastname\\Student B.Sc.} & \includegraphics[width=10em]{example-image-a}\\
\end{tabular}
\end{document}