0

I am composing a cv without using any predefined documentclass like, e.g, moderncvn for which I have written a code that goes like this:

\documentclass[12pt,a4paper]{article}
\usepackage[a4paper]{geometry}
\usepackage{hyperref,marvosym,wasysym,graphicx,wrapfig,float,color,tikz}
\newcommand{\linespace}{\\{\rule{\textwidth}{0.2mm}}\\\\}
\newcommand{\linespac}{\\
    \begin{tikzpicture}
    \draw [line width=0.5mm, red,dash pattern={on 7pt off 2pt on 1pt off 3pt}] (0,0) -- (\textwidth,0);
    \end{tikzpicture}\\\\}
\begin{document}
    {\Huge \textbf{Charles, Xavier, Ph.D.}}
        \begin{wrapfigure}{o}{0.45\textwidth}
        \begin{center}
            \includegraphics[width=0.28\textwidth]{Xavier.jpg}
        \end{center}
        \end{wrapfigure}
    \linespac
    \begin{minipage}{0.5\textwidth}
        \underline{\textbf{Institute Address}}:\\
        Xavier's School for Gifted Youngsters (X-Mansion),\\
        Central Park,\\
        New York City,\\
        United States of America\\
    \end{minipage}
    \begin{minipage}{0.5\textwidth}
        \underline{\textbf{Permenent Address}}:\\
        Xavier's School for Gifted Youngsters (X-Mansion),\\
        Central Park,\\
        New York City,\\
        United States of America\\
    \end{minipage}\\
\Letter: \href{xyz@zxy.com}{xyz@zxy.com}, \href{mailto:xyz@zxy.com}{xyz@zxy.com}\\\\
\Mobilefone: 100, 100\\\\
\phone: 911 (Institute), 912 (Home)
\linespace
\textbf{Present Position}: \\
Professor @ Xavier's School for Gifted Youngsters - From 1963
\linespace
\textbf{{Article published}}:
\begin{enumerate}
    \item In some journal- A
    \item In some journal- B
\end{enumerate}
{\rule{14cm}{0.2pt}}\\\\
%\linespace
\textbf{{Conference Attended and \textit{paper presented}}}:\\
\begin{itemize}
    \item sometime at Oxford University with Erik Lehnsherr (Magneto)
    \item sometime at Columbia University with Henry McCoy (Beast).
\end{itemize}
{\rule{14cm}{0.2pt}}\\\\
%\linespac
\textbf{{Technical Skills}}:\\\\
Professor X ordinarily possesses vast psionic powers, including telepathy; the ability to induce in others mental illusions, temporary mental or physical paralysis, and loss of specific memories or total amnesia; the projection of "mental bolts" to stun or render a person unconscious; astral projection; and the ability to sense other superhuman mutants within a small radius. At present Xavier is unable to use his psionic powers.
\linespace
\textbf{{Teaching Experience}}:\\\\
I have founded Xavier's School for Gifted Youngsters (later named the Xavier Institute) which provides a safe haven for mutants and teaches them to master their abilities and to explore and control their powers.
\linespace
\textbf{{References}}:\\\\
\begin{enumerate}
    \item Henry McCoy aka The Beast,\\
        1407 Graymalkin Lane,\\
        Salem Center,\\
        Westchester County,\\
        New York.,\\
        United States of America\\
    \item Jean Grey aka Phoenix,\\
        1407 Graymalkin Lane,\\
        Salem Center,\\
        Westchester County,\\
        New York.,\\
        United States of America\\
\end{enumerate}
{\rule{14cm}{0.2pt}}\\\\
%\linespace
\end{document}

These are my queries for this:

  1. When I comment the wrapfigure environment, I am getting this kind of output: without_wrapfigure

    Uncommenting will give this will give me:

enter image description here

As you can see, the names is spreaded out and the column of “permanent address” comes over the figure. Why is this happening? What did I do wrong?

Further, I would like it to have like this, where the figure comes in the middle of Institute Address and Permenent Address: enter image description here

How to modify the code?

  1. The command \linespace \textbf{Present Position}: \\ Professor @ Xavier's School for Gifted Youngsters - From 1963 give the output in two different lines as shown here:

enter image description here

Why is this so?

  1. After \linespace \textbf{{Article published}}: \begin{enumerate} \item In some journal- A \item In some journal- B \end{enumerate} if I put the command \linespace, I am getting an error message “There's no line here to end. \linespace”. But if I replace this with{\rule{14cm}{0.2pt}}\\\\ it runs perfectly. This also happens before \textbf{{Technical Skills}}:\\\\ and also at last. Why is it so?
  2. Moreover, with above correction the problem mentioned in point 2 comes again- this time for “Conference Attended and paper presented”:

enter image description here

and for “Technical Skills”:

enter image description here

Seems like wrapfigure does something, for if I comment it everything goes smoothly.

Any help will be deeply appreciated.

Thanks in advance...

  • 4
    wrapfig is documented as not to be used alongside a list (you have itemize and center (which is a list internally) also all the \\\` and \\ ` at ends of paragraph are wrong (you must get underfull box warnings for them?) you don't need wrapfig here just have the list in a minpage, alongside the image – David Carlisle May 17 '19 at 14:31
  • thanks for that comment. Then, how to modify the codes to get desired results? – sreeraj t May 18 '19 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.