TeX - LaTeX Asked by Walterminator-58 on January 8, 2021
I’m a beginner and I try since yesterday to put a logo on the left corner and text on the right corner, like this :
but I just can’t do it.
Could you please help me?
Sorry for my english, I’m a French speaker.
documentclass[10pt,a4paper]{report}
usepackage[latin5]{inputenc}
usepackage[francais]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{graphicx}
usepackage{lmodern}
usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
author{BATON SOFIAN}
begin{document}
begin{figure}[!h]
includegraphics[scale=0.5]{../Images/logo.png}
end{figure}
end{document}
The following MWE results in this output. Spacing, alignment and font sizes can ouf course be altered to suit your needs.
In order to make sure the header is aligned with the left margin, I have added noindent
right before the includegraphics
command. (Here I have replaced your image file with an example image). In order to make sure, the text is right aligned and is placed at the right margin, I have used hfill
between the image and the tabular. In the tabular itself, I have used an r
type column (for right alignment) as well as @{}
to remove the small horizontal white pace that is added to either side of a text inside of a table cell. In order to bottom align image and text, I have added [b]
to the tabular
and valign=b
to includegraphics
. The latter is only available if you add usepackage[export]{adjustbox}
to your preamble.
To other, unrelated changes: I have replaced francais
with french
(in the babel
option). If you use the frormer, you should recieve a warinign about this option being deprecated. In addition to that, I have removed usepackage[latin5]{inputenc}
in order to use the default utf8 inputenc instead.
documentclass[10pt,a4paper]{report}
usepackage[french]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{graphicx}
usepackage{lmodern}
usepackage[export]{adjustbox}
usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
author{BATON SOFIAN}
begin{document}
noindent
includegraphics[scale=0.5, valign=b]{example-image}
hfill
begin{tabular}[b]{@{}r@{}}
Tribunal...
bfseries COMMUNIQUE ...
Luxembourg[20pt]
Ordonnance...
Lukáv{s}...
end{tabular}
smallskip
hrule
end{document}
Answered by leandriis on January 8, 2021
documentclass[12pt]{article} usepackage[utf8]{inputenc} usepackage{amsthm} usepackage{empheq} usepackage{multicol} usepackage[english]{babel} usepackage{graphicx}%f
begin{document}
begin{minipage}{0.25textwidth}
includegraphics[width=0.3textwidth]{example-image}
Presse et information
end{minipage}%
hspace{2cm}
begin{minipage}{0.7textwidth}
{small{ Tribunal de i'Unioneurop$acute{text{e}}$enne.}}hspace*{-1cm}{
{bf{COMMUNOQUE DE PRESSE $n^o$ 98/20}}}hspace*{1cm}{
{small{Luxembourg,ie 17 juillet 2020 }}}
hspace*{-1cm}{Ordonnance du Tribunal dans I'affaire T-715/19}
Lukas Wagenknecht/Conseoil europ$acute{text{e}}$en
end{minipage} noindent rule{linewidth}{0.5mm} end{document}
Answered by kaziba stephen on January 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP