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將離開紙張邊緣 1 公分的左側部分。

\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,儘管這看起來很有趣:我猜你會用法語寫履歷。

在此輸入影像描述

相關內容