Aligning Graphics and multiple lines
up vote
3
down vote
favorite
I'm trying to align and image and some lines of text (not a paragraph) to resemble this.

this is my code:
documentclass[a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{xcolor}
usepackage[10pt]{moresize}
usepackage{graphicx}
usepackage[a6paper]{geometry}
usepackage{fancyhdr}
usepackage{hyperref}
usepackage{wrapfig}
usepackage{amssymb}
usepackage{amsmath}
usepackage{enumitem}
usepackage{soul}
usepackage[T1]{fontenc}
usepackage{lipsum}
usepackage{fontspec}
definecolor{blu1000}{RGB}{15, 57, 101}
definecolor{marrone1000}{HTML}{a4895e}
definecolor{marronescuro1000}{HTML}{483a26}
begin{document}
vspace*{-5baselineskip}
nullhfill {color{marrone1000} tiny Certificato d'iscrizione} \ [baselineskip]
vspace*{2baselineskip}
centering
includegraphics[height=2.5cm]{img-1} \ [baselineskip]
color{marrone1000}{
noindentframebox[3cm][c]{color{blu1000}textbf{N. 1001-P}}
noindentframebox[3cm][c]{color{blu1000}textbf{1001-P-YY-YY}} \ [.15baselineskip]
}
raggedright hspace{2.5em}tiny color{marrone1000} Identification Number hspace{5.7em}tiny Certificate Number \ [baselineskip]
centering
color{blu1000}{
noindentframebox[6cm][c]{normalsizecolor{blu1000}textbf{Class Winner}} \ [.15baselineskip]
raggedright hspace{5em}tiny Category \ [3baselineskip]
}
vspace{5baselineskip}
begin{wrapfigure}{l}{.4textwidth}
vspace{-24pt}
hspace{-14em}
centering
includegraphics[width=0.40textwidth]{default_qrcode}
% vspace{-20pt}
end{wrapfigure}
textcolor{blu1000}{CERTIFICATE} \ [2baselineskip]
color{marrone1000}{
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Date of Issue \ [2baselineskip]}
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Expiry Date\ [2baselineskip]}
}
clearpage
end{document}
Resulting

I'm using XeLatex and I'd like to left align the text as in 1
xetex wrapfigure
add a comment |
up vote
3
down vote
favorite
I'm trying to align and image and some lines of text (not a paragraph) to resemble this.

this is my code:
documentclass[a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{xcolor}
usepackage[10pt]{moresize}
usepackage{graphicx}
usepackage[a6paper]{geometry}
usepackage{fancyhdr}
usepackage{hyperref}
usepackage{wrapfig}
usepackage{amssymb}
usepackage{amsmath}
usepackage{enumitem}
usepackage{soul}
usepackage[T1]{fontenc}
usepackage{lipsum}
usepackage{fontspec}
definecolor{blu1000}{RGB}{15, 57, 101}
definecolor{marrone1000}{HTML}{a4895e}
definecolor{marronescuro1000}{HTML}{483a26}
begin{document}
vspace*{-5baselineskip}
nullhfill {color{marrone1000} tiny Certificato d'iscrizione} \ [baselineskip]
vspace*{2baselineskip}
centering
includegraphics[height=2.5cm]{img-1} \ [baselineskip]
color{marrone1000}{
noindentframebox[3cm][c]{color{blu1000}textbf{N. 1001-P}}
noindentframebox[3cm][c]{color{blu1000}textbf{1001-P-YY-YY}} \ [.15baselineskip]
}
raggedright hspace{2.5em}tiny color{marrone1000} Identification Number hspace{5.7em}tiny Certificate Number \ [baselineskip]
centering
color{blu1000}{
noindentframebox[6cm][c]{normalsizecolor{blu1000}textbf{Class Winner}} \ [.15baselineskip]
raggedright hspace{5em}tiny Category \ [3baselineskip]
}
vspace{5baselineskip}
begin{wrapfigure}{l}{.4textwidth}
vspace{-24pt}
hspace{-14em}
centering
includegraphics[width=0.40textwidth]{default_qrcode}
% vspace{-20pt}
end{wrapfigure}
textcolor{blu1000}{CERTIFICATE} \ [2baselineskip]
color{marrone1000}{
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Date of Issue \ [2baselineskip]}
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Expiry Date\ [2baselineskip]}
}
clearpage
end{document}
Resulting

I'm using XeLatex and I'd like to left align the text as in 1
xetex wrapfigure
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you usewrapfigure?
– Zarko
Nov 12 at 23:47
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I'm trying to align and image and some lines of text (not a paragraph) to resemble this.

this is my code:
documentclass[a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{xcolor}
usepackage[10pt]{moresize}
usepackage{graphicx}
usepackage[a6paper]{geometry}
usepackage{fancyhdr}
usepackage{hyperref}
usepackage{wrapfig}
usepackage{amssymb}
usepackage{amsmath}
usepackage{enumitem}
usepackage{soul}
usepackage[T1]{fontenc}
usepackage{lipsum}
usepackage{fontspec}
definecolor{blu1000}{RGB}{15, 57, 101}
definecolor{marrone1000}{HTML}{a4895e}
definecolor{marronescuro1000}{HTML}{483a26}
begin{document}
vspace*{-5baselineskip}
nullhfill {color{marrone1000} tiny Certificato d'iscrizione} \ [baselineskip]
vspace*{2baselineskip}
centering
includegraphics[height=2.5cm]{img-1} \ [baselineskip]
color{marrone1000}{
noindentframebox[3cm][c]{color{blu1000}textbf{N. 1001-P}}
noindentframebox[3cm][c]{color{blu1000}textbf{1001-P-YY-YY}} \ [.15baselineskip]
}
raggedright hspace{2.5em}tiny color{marrone1000} Identification Number hspace{5.7em}tiny Certificate Number \ [baselineskip]
centering
color{blu1000}{
noindentframebox[6cm][c]{normalsizecolor{blu1000}textbf{Class Winner}} \ [.15baselineskip]
raggedright hspace{5em}tiny Category \ [3baselineskip]
}
vspace{5baselineskip}
begin{wrapfigure}{l}{.4textwidth}
vspace{-24pt}
hspace{-14em}
centering
includegraphics[width=0.40textwidth]{default_qrcode}
% vspace{-20pt}
end{wrapfigure}
textcolor{blu1000}{CERTIFICATE} \ [2baselineskip]
color{marrone1000}{
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Date of Issue \ [2baselineskip]}
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Expiry Date\ [2baselineskip]}
}
clearpage
end{document}
Resulting

I'm using XeLatex and I'd like to left align the text as in 1
xetex wrapfigure
I'm trying to align and image and some lines of text (not a paragraph) to resemble this.

this is my code:
documentclass[a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{xcolor}
usepackage[10pt]{moresize}
usepackage{graphicx}
usepackage[a6paper]{geometry}
usepackage{fancyhdr}
usepackage{hyperref}
usepackage{wrapfig}
usepackage{amssymb}
usepackage{amsmath}
usepackage{enumitem}
usepackage{soul}
usepackage[T1]{fontenc}
usepackage{lipsum}
usepackage{fontspec}
definecolor{blu1000}{RGB}{15, 57, 101}
definecolor{marrone1000}{HTML}{a4895e}
definecolor{marronescuro1000}{HTML}{483a26}
begin{document}
vspace*{-5baselineskip}
nullhfill {color{marrone1000} tiny Certificato d'iscrizione} \ [baselineskip]
vspace*{2baselineskip}
centering
includegraphics[height=2.5cm]{img-1} \ [baselineskip]
color{marrone1000}{
noindentframebox[3cm][c]{color{blu1000}textbf{N. 1001-P}}
noindentframebox[3cm][c]{color{blu1000}textbf{1001-P-YY-YY}} \ [.15baselineskip]
}
raggedright hspace{2.5em}tiny color{marrone1000} Identification Number hspace{5.7em}tiny Certificate Number \ [baselineskip]
centering
color{blu1000}{
noindentframebox[6cm][c]{normalsizecolor{blu1000}textbf{Class Winner}} \ [.15baselineskip]
raggedright hspace{5em}tiny Category \ [3baselineskip]
}
vspace{5baselineskip}
begin{wrapfigure}{l}{.4textwidth}
vspace{-24pt}
hspace{-14em}
centering
includegraphics[width=0.40textwidth]{default_qrcode}
% vspace{-20pt}
end{wrapfigure}
textcolor{blu1000}{CERTIFICATE} \ [2baselineskip]
color{marrone1000}{
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Date of Issue \ [2baselineskip]}
noindent rule{3cm}{0.4pt} \ [0.15baselineskip] hspace{-6em}{Expiry Date\ [2baselineskip]}
}
clearpage
end{document}
Resulting

I'm using XeLatex and I'd like to left align the text as in 1
xetex wrapfigure
xetex wrapfigure
edited Nov 12 at 23:57
asked Nov 12 at 23:34
Sukhdev Mohan
254
254
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you usewrapfigure?
– Zarko
Nov 12 at 23:47
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00
add a comment |
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you usewrapfigure?
– Zarko
Nov 12 at 23:47
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you use
wrapfigure?– Zarko
Nov 12 at 23:47
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you use
wrapfigure?– Zarko
Nov 12 at 23:47
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
see if the following solution is acceptable to you:
documentclass{article}
usepackage[showframe, % <--- in real document delete option "showframe"
a6paper]{geometry}
usepackage{fontspec}
usepackage{xcolor}
definecolor{marrone1000}{HTML}{a4895e}
usepackage[10pt]{moresize}
usepackage[demo, % <--- in real document delete option "demo"
export]{adjustbox} % <--- it load the graphicx package
begin{document}
begin{center}
begin{minipage}[t]{0.3linewidth}centering
includegraphics[height=2.5cm, width=linewidth,valign=t]{img-1}
end{minipage}
quad
begin{minipage}[t]{0.3linewidth}raggedright
CERTIFICATE \[1.5baselineskip]
tiny
color{marrone1000}
rule[-0.5ex]{linewidth}{0.2pt}
Date of issue: \[1.5baselineskip]
rule[-0.5ex]{linewidth}{0.2pt}
Expire date
end{minipage}
end{center}
end{document}
as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.
edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

(lines around image and text shows page layout)
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
see if the following solution is acceptable to you:
documentclass{article}
usepackage[showframe, % <--- in real document delete option "showframe"
a6paper]{geometry}
usepackage{fontspec}
usepackage{xcolor}
definecolor{marrone1000}{HTML}{a4895e}
usepackage[10pt]{moresize}
usepackage[demo, % <--- in real document delete option "demo"
export]{adjustbox} % <--- it load the graphicx package
begin{document}
begin{center}
begin{minipage}[t]{0.3linewidth}centering
includegraphics[height=2.5cm, width=linewidth,valign=t]{img-1}
end{minipage}
quad
begin{minipage}[t]{0.3linewidth}raggedright
CERTIFICATE \[1.5baselineskip]
tiny
color{marrone1000}
rule[-0.5ex]{linewidth}{0.2pt}
Date of issue: \[1.5baselineskip]
rule[-0.5ex]{linewidth}{0.2pt}
Expire date
end{minipage}
end{center}
end{document}
as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.
edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

(lines around image and text shows page layout)
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
add a comment |
up vote
3
down vote
accepted
see if the following solution is acceptable to you:
documentclass{article}
usepackage[showframe, % <--- in real document delete option "showframe"
a6paper]{geometry}
usepackage{fontspec}
usepackage{xcolor}
definecolor{marrone1000}{HTML}{a4895e}
usepackage[10pt]{moresize}
usepackage[demo, % <--- in real document delete option "demo"
export]{adjustbox} % <--- it load the graphicx package
begin{document}
begin{center}
begin{minipage}[t]{0.3linewidth}centering
includegraphics[height=2.5cm, width=linewidth,valign=t]{img-1}
end{minipage}
quad
begin{minipage}[t]{0.3linewidth}raggedright
CERTIFICATE \[1.5baselineskip]
tiny
color{marrone1000}
rule[-0.5ex]{linewidth}{0.2pt}
Date of issue: \[1.5baselineskip]
rule[-0.5ex]{linewidth}{0.2pt}
Expire date
end{minipage}
end{center}
end{document}
as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.
edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

(lines around image and text shows page layout)
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
see if the following solution is acceptable to you:
documentclass{article}
usepackage[showframe, % <--- in real document delete option "showframe"
a6paper]{geometry}
usepackage{fontspec}
usepackage{xcolor}
definecolor{marrone1000}{HTML}{a4895e}
usepackage[10pt]{moresize}
usepackage[demo, % <--- in real document delete option "demo"
export]{adjustbox} % <--- it load the graphicx package
begin{document}
begin{center}
begin{minipage}[t]{0.3linewidth}centering
includegraphics[height=2.5cm, width=linewidth,valign=t]{img-1}
end{minipage}
quad
begin{minipage}[t]{0.3linewidth}raggedright
CERTIFICATE \[1.5baselineskip]
tiny
color{marrone1000}
rule[-0.5ex]{linewidth}{0.2pt}
Date of issue: \[1.5baselineskip]
rule[-0.5ex]{linewidth}{0.2pt}
Expire date
end{minipage}
end{center}
end{document}
as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.
edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

(lines around image and text shows page layout)
see if the following solution is acceptable to you:
documentclass{article}
usepackage[showframe, % <--- in real document delete option "showframe"
a6paper]{geometry}
usepackage{fontspec}
usepackage{xcolor}
definecolor{marrone1000}{HTML}{a4895e}
usepackage[10pt]{moresize}
usepackage[demo, % <--- in real document delete option "demo"
export]{adjustbox} % <--- it load the graphicx package
begin{document}
begin{center}
begin{minipage}[t]{0.3linewidth}centering
includegraphics[height=2.5cm, width=linewidth,valign=t]{img-1}
end{minipage}
quad
begin{minipage}[t]{0.3linewidth}raggedright
CERTIFICATE \[1.5baselineskip]
tiny
color{marrone1000}
rule[-0.5ex]{linewidth}{0.2pt}
Date of issue: \[1.5baselineskip]
rule[-0.5ex]{linewidth}{0.2pt}
Expire date
end{minipage}
end{center}
end{document}
as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.
edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

(lines around image and text shows page layout)
edited Nov 13 at 5:10
answered Nov 13 at 0:34
Zarko
116k865154
116k865154
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
add a comment |
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again.
– Sukhdev Mohan
Nov 13 at 0:50
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459707%2faligning-graphics-and-multiple-lines%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you use
wrapfigure?– Zarko
Nov 12 at 23:47
Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks
– Sukhdev Mohan
Nov 13 at 0:00