0

I want to insert the logo of my company at the beginning of the page(document). Here is the code for the same. Unfortunately, it spills over to the next page.

    \documentclass[paper=a4, fontsize=11pt]{scrartcl}
                            \usepackage[T1]{fontenc}
                            \usepackage{fourier}
                            \usepackage{listings}
                            \usepackage[english]{babel}                                             % English language/hyphenation
                            \usepackage[protrusion=true,expansion=true]{microtype}  
                            \usepackage{amsmath,amsfonts,amsthm} % Math packages
                            \usepackage[pdftex]{graphicx}   
                            \usepackage{url}
                            \usepackage{color}
                            \usepackage[most]{tcolorbox}
                            \usepackage{hyperref}
                            \usepackage{graphicx}
                            \definecolor{dkgreen}{rgb}{0,0.6,0}
                            \definecolor{gray}{rgb}{0.5,0.5,0.5}
                            \definecolor{mauve}{rgb}{0.58,0,0.82}
                            \hypersetup{colorlinks,%
                                        urlcolor=blue,%
                                        pdftex}
                            \usepackage[english]{babel}
                            \usepackage{blindtext}
                            \lstset{frame=tb,
                              language=Java,
                              aboveskip=3mm,
                              belowskip=3mm,
                              showstringspaces=false,
                              columns=flexible,
                              basicstyle={\small\ttfamily},
                              numbers=none,
                              numberstyle=\tiny\color{gray},
                              keywordstyle=\color{blue},
                              commentstyle=\color{dkgreen},
                              stringstyle=\color{mauve},
                              breaklines=true,
                              breakatwhitespace=true,
                              tabsize=3
                            }


                            %%% Custom sectioning
                            \usepackage{sectsty}
                            \allsectionsfont{\centering \normalfont\scshape}


                            %%% Custom headers/footers (fancyhdr package)
                            \usepackage{fancyhdr}
                            \pagestyle{fancyplain}
                            \fancyhead{}                                            % No page header
                            \fancyfoot[L]{}                                         % Empty 
                            \fancyfoot[C]{}                                         % Empty
                            \fancyfoot[R]{\thepage}                                 % Pagenumbering
                            \renewcommand{\headrulewidth}{0pt}          % Remove header underlines
                            \renewcommand{\footrulewidth}{0pt}              % Remove footer underlines
                            \setlength{\headheight}{13.6pt}


                            %%% Equation and float numbering
                            \numberwithin{equation}{section}        % Equationnumbering: section.eq#
                            \numberwithin{figure}{section}          % Figurenumbering: section.fig#
                            \numberwithin{table}{section}               % Tablenumbering: section.tab#


                            %%% Maketitle metadata
                            \newcommand{\horrule}[1]{\rule{\linewidth}{#1}}     % Horizontal rule

                            \title{
                                    %\vspace{-1in}  
                                    \usefont{OT1}{bch}{b}{n}
                                    \begin{figure}
                                        \centering
                                        \includegraphics[scale=0.4]{example-image-a}
                                    \end{figure}
                                    \normalfont \normalsize \textsc{Yup} \\ [25pt]
                                    \horrule{0.5pt} \\[0.4cm]
                                    \huge A B C DE  FG HIJ KL MNO \\
                                    \horrule{2pt} \\[0.5cm]
                            }
                            \author{
                                    \normalfont                                 \normalsize
                                    "If you can't explain it simply, you don't understand it well enough."
                            - Albert Einstein\\[-3pt]       \normalsize
                                    \today
                            }
                            \date{}


                            %%% Begin document
                            \begin{document}
                            \maketitle
                            \section{Objective}
                            \blindtext
                            \section{Background}
                            \blindtext

                        \end{document}
2

This should probably solve the problem (not tested) and also corrects your preamble a little bit.

\documentclass[paper=a4, fontsize=11pt]{scrartcl}
                        \usepackage[T1]{fontenc}
                        \usepackage{fourier}
                        \usepackage{listings}
                        \usepackage[english]{babel}                                             % English language/hyphenation
                        \usepackage[protrusion=true,expansion=true,babel=true]{microtype}  %helps microtype to better stick to the language restrictions
                        \usepackage{amsmath,amsfonts,amsthm} % Math packages
                        \usepackage[pdftex]{graphicx}   
                        \usepackage{url}
                        %\usepackage{color}
                        \usepackage{xcolor}  %better colour support
                        \usepackage[most]{tcolorbox}
                        %\usepackage{hyperref}  %should be loaded last in preamble
                        \usepackage{graphicx}
                        \definecolor{dkgreen}{rgb}{0,0.6,0}
                        \definecolor{gray}{rgb}{0.5,0.5,0.5}
                        \definecolor{mauve}{rgb}{0.58,0,0.82}
                        %\hypersetup{colorlinks,%
                                    %urlcolor=blue,%
                                    %pdftex}
                        %\usepackage[english]{babel}  %already loaded above
                        \usepackage{blindtext}
                        \lstset{frame=tb,
                          language=Java,
                          aboveskip=3mm,
                          belowskip=3mm,
                          showstringspaces=false,
                          columns=flexible,
                          basicstyle={\small\ttfamily},
                          numbers=none,
                          numberstyle=\tiny\color{gray},
                          keywordstyle=\color{blue},
                          commentstyle=\color{dkgreen},
                          stringstyle=\color{mauve},
                          breaklines=true,
                          breakatwhitespace=true,
                          tabsize=3
                        }


                        %%% Custom sectioning
                        \usepackage{sectsty}
                        \allsectionsfont{\centering \normalfont\scshape}


                        %%% Custom headers/footers (fancyhdr package)
                        \usepackage{fancyhdr}
                        \pagestyle{fancyplain}
                        \fancyhead{}                                            % No page header
                        \fancyfoot[L]{}                                         % Empty 
                        \fancyfoot[C]{}                                         % Empty
                        \fancyfoot[R]{\thepage}                                 % Pagenumbering
                        \renewcommand{\headrulewidth}{0pt}          % Remove header underlines
                        \renewcommand{\footrulewidth}{0pt}              % Remove footer underlines
                        \setlength{\headheight}{13.6pt}


                        %%% Equation and float numbering
                        \numberwithin{equation}{section}        % Equationnumbering: section.eq#
                        \numberwithin{figure}{section}          % Figurenumbering: section.fig#
                        \numberwithin{table}{section}               % Tablenumbering: section.tab#


                        \usepackage{hyperref}  %should be loaded last in preamble
                        \hypersetup{colorlinks,%
                                    urlcolor=blue,%
                                    pdftex}

                        %%% Maketitle metadata
                        \newcommand{\horrule}[1]{\rule{\linewidth}{#1}}     % Horizontal rule

                        \title{
                                %\vspace{-1in}  
                                \usefont{OT1}{bch}{b}{n}
                                \centering
                                \includegraphics[scale=0.4]{example-image-a}
                                \normalfont \normalsize \textsc{Yup} \\ [25pt]
                                \horrule{0.5pt} \\[0.4cm]
                                \huge A B C DE  FG HIJ KL MNO \\
                                \horrule{2pt} \\[0.5cm]
                        }
                        \author{
                                \normalfont                                 \normalsize
                                "If you can't explain it simply, you don't understand it well enough."
                        - Albert Einstein\\[-3pt]       \normalsize
                                \today
                        }
                        \date{}


                        %%% Begin document
                        \begin{document}
                        \maketitle
                        \section{Objective}
                        \blindtext
                        \section{Background}
                        \blindtext

                    \end{document}
  • 2
    I wouldn't post the preamble at all (or just the really needed parts). Packages loaded twice, with different options, packages incompatible with KOMA-script ... – Johannes_B Mar 23 '15 at 10:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.