von Xenara » Mi 21. Mär 2012, 17:30
Mich wundert, dass der Code bei André gelaufen ist. Bei mir gabs zunächst mehrere Fehler:
- Das Bild "meinFoto.jpg" hat ausser dem Threadstarter niemand
- inputenc von utf8 auf ansinew geändert, damits bei mir läuft
- "undefined color sectionrectanglecolor", daher die Zeile mit \color{sectionrectanglecolor} auskommentiert
- der Zeilenumbruch bei \phone führt zu einem "missing item"-Error
Ich hab in meinem TeXnicCenter allerdings auch die pingelige Einstellung, dass bei jedem Fehler das Kompilieren abgebrochen wird und nicht auf biegen und brechen versucht wird, ein Dokument zu erstellen (in dem dann nachher Fehler sind, die man auf den ersten Blick gar nicht bemerkt).
Mit unten stehendem Code läufts tatsächlich mit 0 Fehlern und 2 Warnungen wegen pdfpagelabel und 2 Warnungen wegen fehlender Fonts.
Manchmal werden übrigens Probleme/Fehler/Warnungen im Editor nicht richtig angezeigt, dann lohnt sich ein Blick in die echte .log-Datei (im gleichen Verzeichnis wie dein Dokument).
\documentclass[11pt,a4paper]{moderncv}
\usepackage[english,ngerman]{babel}
% moderncv themes
\moderncvtheme[blue]{casual} % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
%\moderncvtheme[green]{classic} % idem
% usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment}
% Hier mein Fix zur Anpassung der Spaltenbreite bei cvlanguage - mit dem Parameter 0.7 kann man dann rumspielen
\newcommand*{\cvlanguageneu}[3]{%
\cvline{#1}{\begin{minipage}[t]{120pt}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.7\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}
% character encoding
\usepackage[latin1]{inputenc} % replace by the encoding you are using
\usepackage{amsmath}
% adjust the page margins
\usepackage[scale=0.8]{geometry}
\setlength{\hintscolumnwidth}{4cm} % if you want to change the width of the column with the dates
%\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}} % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details
\AtBeginDocument{\recomputelengths} % required when changes are made to page layout lengths
% personal data
\firstname{Dominik}
\familyname{Mustermann}
%\title{Resumé title (optional)} % optional, remove the line if not wanted
\address{Musterstraße 58}{12345 Musterstadt} % optional, remove the line if not wanted
\mobile{Mobil (555) 55 55 55 55} % optional, remove the line if not wanted
\phone{Telefon (55 55) 5 55 55 55 } % optional, remove the line if not wanted
%\fax{fax (optional)} % optional, remove the line if not wanted
\email{email email@email.mail} % optional, remove the line if not wanted
%\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[64pt]{meinFoto.jpg} % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted
\quote{\huge{Lebenslauf}} % optional, remove the line if not wanted
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle
\section{Persönliche Daten}
\cvline{Familienstand}{ledig}
\cvline{Staatsangehörigkeit}{deutsch}
\section{Schule}
...\\
\section{Beruflicher Werdegang}
\cventry{Juni 2002 - Juli 2002}{Praktikum als ...}{Firma ...}{meineStadt}{}{}
\section{Sprachkenntnisse}
\cvlanguageneu{Deutsch}{Muttersprache}{}
\cvlanguageneu{Englisch}{in Wort und Schrift}{}
\section{Computer Fertigkeiten}
\cvcomputer{Programmiersprachen}{Java, C, PHP, Matlab}
{Scriptsprachen}{Python, Linux bash}
%\section{Interests}
%\cvline{hobby 1}{\small Description}
%\cvline{hobby 2}{\small Description}
%\cvline{hobby 3}{\small Description}
%\renewcommand{\listitemsymbol}{-} % change the symbol for lists
%\section{Extra 1}
%\cvlistitem{Item 1}
%\cvlistitem{Item 2}
%\cvlistitem[+]{Item 3} % optional other symbol
%\section{Extra 2}
%\cvlistdoubleitem[\Neutral]{Item 1}{Item 4}
%\cvlistdoubleitem[\Neutral]{Item 2}{Item 5}
%\cvlistdoubleitem[\Neutral]{Item 3}{}
% Publications from a BibTeX file
%\nocite{*}
%\bibliographystyle{plain}
%\bibliography{publications} % 'publications' is the name of a BibTeX file
\vspace*{2.5cm}
\begin{flushleft}
\Large
\parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{
% \color{sectionrectanglecolor}
\rule{\columnwidth}{1ex}}}
\\
MeineStadt, 6. Januar 2011\\
\vspace*{0.5 cm}
\textit{Dominik Mustermann}
\end{flushleft}
\end{document}
Mich wundert, dass der Code bei André gelaufen ist. Bei mir gabs zunächst mehrere Fehler:
- Das Bild "meinFoto.jpg" hat ausser dem Threadstarter niemand
- inputenc von utf8 auf ansinew geändert, damits bei mir läuft
- "undefined color sectionrectanglecolor", daher die Zeile mit \color{sectionrectanglecolor} auskommentiert
- der Zeilenumbruch bei \phone führt zu einem "missing item"-Error
Ich hab in meinem TeXnicCenter allerdings auch die pingelige Einstellung, dass bei jedem Fehler das Kompilieren abgebrochen wird und nicht auf biegen und brechen versucht wird, ein Dokument zu erstellen (in dem dann nachher Fehler sind, die man auf den ersten Blick gar nicht bemerkt).
Mit unten stehendem Code läufts tatsächlich mit 0 Fehlern und 2 Warnungen wegen pdfpagelabel und 2 Warnungen wegen fehlender Fonts.
Manchmal werden übrigens Probleme/Fehler/Warnungen im Editor nicht richtig angezeigt, dann lohnt sich ein Blick in die echte .log-Datei (im gleichen Verzeichnis wie dein Dokument).
[code]
\documentclass[11pt,a4paper]{moderncv}
\usepackage[english,ngerman]{babel}
% moderncv themes
\moderncvtheme[blue]{casual} % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
%\moderncvtheme[green]{classic} % idem
% usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment}
% Hier mein Fix zur Anpassung der Spaltenbreite bei cvlanguage - mit dem Parameter 0.7 kann man dann rumspielen
\newcommand*{\cvlanguageneu}[3]{%
\cvline{#1}{\begin{minipage}[t]{120pt}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.7\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}
% character encoding
\usepackage[latin1]{inputenc} % replace by the encoding you are using
\usepackage{amsmath}
% adjust the page margins
\usepackage[scale=0.8]{geometry}
\setlength{\hintscolumnwidth}{4cm} % if you want to change the width of the column with the dates
%\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}} % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details
\AtBeginDocument{\recomputelengths} % required when changes are made to page layout lengths
% personal data
\firstname{Dominik}
\familyname{Mustermann}
%\title{Resumé title (optional)} % optional, remove the line if not wanted
\address{Musterstraße 58}{12345 Musterstadt} % optional, remove the line if not wanted
\mobile{Mobil (555) 55 55 55 55} % optional, remove the line if not wanted
\phone{Telefon (55 55) 5 55 55 55 } % optional, remove the line if not wanted
%\fax{fax (optional)} % optional, remove the line if not wanted
\email{email email@email.mail} % optional, remove the line if not wanted
%\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[64pt]{meinFoto.jpg} % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted
\quote{\huge{Lebenslauf}} % optional, remove the line if not wanted
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle
\section{Persönliche Daten}
\cvline{Familienstand}{ledig}
\cvline{Staatsangehörigkeit}{deutsch}
\section{Schule}
...\\
\section{Beruflicher Werdegang}
\cventry{Juni 2002 - Juli 2002}{Praktikum als ...}{Firma ...}{meineStadt}{}{}
\section{Sprachkenntnisse}
\cvlanguageneu{Deutsch}{Muttersprache}{}
\cvlanguageneu{Englisch}{in Wort und Schrift}{}
\section{Computer Fertigkeiten}
\cvcomputer{Programmiersprachen}{Java, C, PHP, Matlab}
{Scriptsprachen}{Python, Linux bash}
%\section{Interests}
%\cvline{hobby 1}{\small Description}
%\cvline{hobby 2}{\small Description}
%\cvline{hobby 3}{\small Description}
%\renewcommand{\listitemsymbol}{-} % change the symbol for lists
%\section{Extra 1}
%\cvlistitem{Item 1}
%\cvlistitem{Item 2}
%\cvlistitem[+]{Item 3} % optional other symbol
%\section{Extra 2}
%\cvlistdoubleitem[\Neutral]{Item 1}{Item 4}
%\cvlistdoubleitem[\Neutral]{Item 2}{Item 5}
%\cvlistdoubleitem[\Neutral]{Item 3}{}
% Publications from a BibTeX file
%\nocite{*}
%\bibliographystyle{plain}
%\bibliography{publications} % 'publications' is the name of a BibTeX file
\vspace*{2.5cm}
\begin{flushleft}
\Large
\parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{
% \color{sectionrectanglecolor}
\rule{\columnwidth}{1ex}}}
\\
MeineStadt, 6. Januar 2011\\
\vspace*{0.5 cm}
\textit{Dominik Mustermann}
\end{flushleft}
\end{document}
[/code]