1

I am trying to put my chapter title in the vertical center of the figures height. My code is the following:

\rhead{\includegraphics[width=1.25cm]{Figures/logo_without_name.png} \vspace*{-0.25cm}\rightmark}

This leads to following result: Sitation at the moment

Where I want the chaptername is shown in the following: Wanted result

Thanks in advance!

UPDATE:

The MWE as requested (thanks for the hint!):

\documentclass{article}
\usepackage{graphicx}
\usepackage[utf8x]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1pt}
    \rhead{\includegraphics[width=1.25cm]{example.png} \vspace* \rightmark}
\begin{document} 
Lorem Ipsum
\end{document}
  • 1
    Welcome to TeX.SX! Please help us (and also you) and add a minimal working example (MWE), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. – Bobyandbob May 26 '17 at 15:37
  • You can try to use \raisebox to change the position, height and depth of the image. – Schweinebacke May 26 '17 at 15:40
  • You can also \usepackage[export]{adjustbox} in the preamble, and then \includegraphics[...,valign=c]{..}. – Werner May 26 '17 at 15:54
  • 1
    @LockeLamora: Please write up a separate answer to this problem rather than including it in the original post. Then you can also accept it later. – Werner May 26 '17 at 16:02
  • 1
    The example in the question is not working. So it is not a MWE as mentioned by Bobyandbob. Please, have a look at the link in his comment. – Schweinebacke May 26 '17 at 16:04
1

SOLUTION:

As Schweinebacke suggested me, I used \raisebox and it works perfectly with it:

\rhead{\includegraphics[width=1.25cm]{Figures/logo_without_name.png} \raisebox{0.5cm}[0cm][0cm]{\rightmark}}

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.