LaTeX 把我的线从中间剪断了。为什么?

LaTeX 把我的线从中间剪断了。为什么?

我正在用 LaTeX 写简历,但我不知道为什么,但下面的代码将我的第一段从中间截断了。知道原因应该很简单,但我一直在寻找,却一无所获。有人能帮我吗?如果我的问题太明显,请提前致歉 :(

在此处输入图片描述

\documentclass[a4paper, 12pt, oneside, final]{scrartcl}
\usepackage[left=4.7cm, right=0.85cm, top=0.65cm, bottom=0.70cm]{geometry}
\usepackage{soul}
\usepackage{scrpage2}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage{tabularx}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\pagestyle{empty}
\usepackage{enumitem}
\usepackage{color}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{scrextend}
\usepackage{marvosym}

\usepackage{xcolor}
\definecolor{blue}{RGB}{0,25,80}

% Title format
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\color{blue}\titlerule[0.8pt]}]
\titlespacing*{\section}
{0pt}{3.8ex plus 0ex minus 0ex}{2ex plus 0ex}

% Left margin
\reversemarginpar
\marginparwidth 96pt

% DOCUMENT
% ---------------------------------------------------------------------
\begin{document}

% Command label item
\renewcommand{\labelitemi}{\raise .5ex\hbox{\tiny$\bullet$}}
\newcommand{\mymarginnote}[1]{\leavevmode
\marginpar{\normalsize\textcolor{black}{#1}}%
\ignorespaces}

\setlength\parindent{0pt}
\setlength{\parskip}{0pt plus 0pt minus 0pt}

% Personal informations and picture
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{0.7pt}%
\begin{wrapfigure}{r}{00mm}
    \hfill
    \fbox{\includegraphics[scale=0.125]{cv_picture.jpg}}
\end{wrapfigure} 

\mymarginnote{\smash{\fontsize{13.5}{30}\textbf{Branch Warren}}}
\mbox{}

\mymarginnote{alabama 17 \\ 1870 bessemer \\ usa \\   +4179 277320  \\ bbbranch} 
Born on the 4th of March  1700

Single

US nationality

Military duties completed

[email protected]

% Objective
\section{Objective}
I am looking for a full-time position at stack overflow where my skills will add value to my employer's business. 
\end{document}

答案1

对代码进行少许修改(这不是必要的):

\documentclass[a4paper, 12pt, oneside, final]{scrartcl}
    \usepackage[left=4.7cm, right=0.85cm, top=0.65cm, bottom=0.70cm]{geometry}
    \usepackage{soul}
    \usepackage{scrpage2}
    \usepackage{titlesec}
    \usepackage{tabularx}
    \usepackage{marvosym}
    \usepackage[francais]{babel}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{enumitem}
    \usepackage{wrapfig}
    \usepackage{graphicx}
    \usepackage{amsmath,amssymb,mathrsfs}
    \usepackage{scrextend}

    \usepackage{xcolor}
\definecolor{blue}{RGB}{0,25,80}


% Title format
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\color{blue}\titlerule[0.8pt]}]
\titlespacing*{\section}
{0pt}{3.8ex plus 0ex minus 0ex}{2ex plus 0ex}

% Left margin
\reversemarginpar
\marginparwidth 96pt

% Command label item
\renewcommand{\labelitemi}{\raise .5ex\hbox{\tiny$\bullet$}}
\newcommand{\mymarginnote}[1]{\leavevmode
\marginpar{\normalsize\textcolor{black}{#1}}%
\ignorespaces}

\setlength\parindent{0pt}
\setlength{\parskip}{0pt plus 0pt minus 0pt}

% DOCUMENT
% ---------------------------------------------------------------------
\begin{document}
\pagestyle{empty}

% Personal informations and picture
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{0.7pt}%
\begin{wrapfigure}{r}{00mm}
    \fbox{\includegraphics[width=33mm]{example-image}}
\end{wrapfigure}

\mymarginnote{\smash{\fontsize{13.5}{30}\textbf{Branch Warren}}}

\mymarginnote{alabama 17 \\ 1870 bessemer \\ usa \\ 
              \,  +4179 277320  \\ 
              \, bbbranch}
Born on the 4th of March  1700

Single

US nationality

Military duties completed

\Letter \, [email protected]

% Objective
\section{Objective}
I am looking for a full-time position at stack overflow where my skills will add value to my employer's business. 
\end{document}

我得到:

在此处输入图片描述

与您的 MWE 相比,上述代码的变化是:(i)删除了所有加载两次的包(ii)所有\newcommand定义都移至序言中,(iii)pagestyle{...}从序言移至文档内容,紧接着\begin{document,(iv)图像大小由决定width= 33mm

我怀疑你可能对图像大小有疑问。你应该缩放图像,而不是确定其宽度,甚至更好的是确定其高度。

答案2

在我看来,你使用的工具是错误的。

标题可以是单个框,其中可以“手动”放置一些其他框,例如tabular

长度3.7cm将距纸张边缘1cm处留出。

\documentclass[a4paper, 12pt, oneside, final]{scrartcl}
\usepackage[left=4.7cm, right=0.85cm, top=0.65cm, bottom=0.70cm]{geometry}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}

\usepackage{scrpage2}
\usepackage{scrextend}

\usepackage{titlesec} % not really compatible with scrartcl

\usepackage{graphicx}
\usepackage{xcolor}

\definecolor{blue}{RGB}{0,25,80}

% Title format
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{} [{\color{blue}\titlerule[0.8pt]}]
\titlespacing*{\section}{0pt}{3.8ex plus 0ex minus 0ex}{2ex plus 0ex}

% Command label item
\renewcommand{\labelitemi}{\raise .5ex\hbox{\tiny$\bullet$}}

\setlength\parindent{0pt}
\setlength{\parskip}{0pt plus 0pt minus 0pt}
\pagestyle{empty}

\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{0.7pt}%

% DOCUMENT
% ---------------------------------------------------------------------

\begin{document}

\noindent\makebox[\textwidth]{%
  \hspace{-3.7cm}%
  \begin{tabular}{@{}l@{}l@{}}
  \multicolumn{2}{@{}l@{}}{\fontsize{13.5}{0}\textbf{Branch Warren}}\\[1ex]
  \parbox[t]{3.7cm}{
    alabama 17 \\
    1870 bessemer \\
    usa \\
    +4179 277320 \\
    bbbranch
  } &
  \begin{tabular}[t]{@{}l@{}}
  Born on the 4th of March  1700 \\
  Single \\
  US nationality \\
  Military duties completed \\
  \texttt{[email protected]}
  \end{tabular}
  \end{tabular}%
  \hfill
  \begin{tabular}{@{}c@{}}
  \fbox{\includegraphics[width=4cm,height=3cm]{example-image}}
  \end{tabular}%
}

% Objective
\section{Objective}

I am looking for a full-time position at stack overflow where 
my skills will add value to my employer's business.

\end{document}

我删除了所有不必要的包。我留下了babel,虽然这看起来很有趣:我猜你会用法语写简历。

在此处输入图片描述

相关内容