wrapfig
完美兼容除章节之外的所有文本。它似乎将章节文本推到页面左侧。唯一仍在显示的章节文本是命令wrapfig
所在的章节文本。
\documentclass[margin,line]{res}
\oddsidemargin -.5in
\evensidemargin -.5in
\textwidth=6.0in
\itemsep=0in
\parsep=0in
% if using pdflatex:
%\setlength{\pdfpagewidth}{\paperwidth}
%\setlength{\pdfpageheight}{\paperheight}
\usepackage[utf8]{inputenc}
\usepackage{floatflt}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{color,hyperref}
\usepackage[T1]{fontenc}
\usepackage{wrapfig}
\usepackage[icelandic]{babel}
\newenvironment{list1}{
\begin{list}{\ding{113}}{%
\setlength{\itemsep}{0in}
\setlength{\parsep}{0in} \setlength{\parskip}{0in}
\setlength{\topsep}{0in} \setlength{\partopsep}{0in}
\setlength{\leftmargin}{0.17in}}}{\end{list}}
\newenvironment{list2}{
\begin{list}{$\bullet$}{%
\setlength{\itemsep}{0in}
\setlength{\parsep}{0in} \setlength{\parskip}{0in}
\setlength{\topsep}{0in} \setlength{\partopsep}{0in}
\setlength{\leftmargin}{0.2in}}}{\end{list}}
\newenvironment{innerlist}[1][\enskip\textbullet]%
{\begin{itemize}[#1,leftmargin=*,parsep=0pt,itemsep=0pt,topsep=0pt,partopsep=0pt]}
{\end{itemize}}
\begin{document}
\name{Eiríkur Rafn Björnsson \vspace*{.1in}}
\begin{resume}
\section{\sc Persónu upplýsingar}
\begin{wrapfigure}{r}{0.2\textwidth}
\vspace{-1cm}
\begin{center}
\includegraphics[width=0.2\textwidth]{eg.jpg}
\end{center}
\vspace{-1cm}
\end{wrapfigure}
\vspace{.05in}
\begin{tabular}{@{}p{2in}p{4in}}
{\it Heimilisfang:} Álfheimar 72 & {\it Sími:} 5685024 / 6902898 \\
{\it Póstnúmer:} 104 Reykjavík & {\it Fax:} (412) 268-7828 \\
{\it Kennitala:} 3107902659 & {\it E-mail:} [email protected]\\ \\
\end{tabular}
答案1
代码中有很多问题。首先,您不需要环境wrapfig
。您可以将其删除并将图片放在表格中,以下是代码片段:
\begin{tabular}{@{}p{2in}p{2in}p{1in}}
{\it Heimilisfang:} Álfheimar 72 & {\it Sími:} 5685024 / 6902898
&\vskip-10pt\vbox to 0pt{\includegraphics[width=1in]{./graphics/amato}} \\
\end{tabular}
如果将照片放置在\vbox
高度为零的位置,照片将溢出到下方的单元格中。您可以调整间距和大小以适应。
我像您一样使用英寸来表示单元格大小(我从未想过冰岛使用英制单位)。