Yet another images in tables question alignment. Want text to start at top of cell. Not ceteredproblem with Vertical alignment of text and images in long table when using tex4htUse column-separator & (ampersand) inside newenvironmentaligning a multiline formula with the bullet of itemizeConflict between color, graphicx and libertineTwo figures side by side with text wrappingTabular and grid typesettingTop padding inside tabular when using parboxTables: vertical alignment of celltabu package - gaps in vertical linesVertically aligning fixed height tablesI cannot add pictures to my document using latex and texstudio
Does the wearer know what items are in which patch in the Robe of Useful items?
Why does SSL Labs now consider CBC suites weak?
What color to choose as "danger" if the main color of my app is red
Capital gains on stocks sold to take initial investment off the table
What metal is most suitable for a ladder submerged in an underground water tank?
Why did the soldiers of the North disobey Jon?
c++ conditional uni-directional iterator
Would life always name the light from their sun "white"
Why did Varys remove his rings?
Why do galaxies collide
Can I say: "When was your train leaving?" if the train leaves in the future?
Can a tourist shoot a gun in the USA?
How to rename multiple files in a directory at the same time
Will there be more tax deductions if I put the house completely under my name, versus doing a joint ownership?
Why did the UK remove the 'European Union' from its passport?
I recently started my machine learning PhD and I have absolutely no idea what I'm doing
Developers demotivated due to working on same project for more than 2 years
Cuban Primes
2 parabolas through 4 points
Is there an academic word that means "to split hairs over"?
Why are goodwill impairments on the statement of cash-flows of GE?
Assembly writer vs compiler
Why were the bells ignored in S8E5?
What do the "optional" resistor and capacitor do in this circuit?
Yet another images in tables question alignment. Want text to start at top of cell. Not cetered
problem with Vertical alignment of text and images in long table when using tex4htUse column-separator & (ampersand) inside newenvironmentaligning a multiline formula with the bullet of itemizeConflict between color, graphicx and libertineTwo figures side by side with text wrappingTabular and grid typesettingTop padding inside tabular when using parboxTables: vertical alignment of celltabu package - gaps in vertical linesVertically aligning fixed height tablesI cannot add pictures to my document using latex and texstudio
I want to have a table with image in one cell and text in other cells.
I know about the issue of alignment at center of cells. So I use the trick of
raisebox-.5height{includegraphics[...]`
But this does not do what I want. The text in the other cells in the table all start from the middle of the cell. leaving lots of empty space above.
I want the text to start from the top of the other cells. But do not know how to do it. i.e. I want text and images to all start from top of cell.
A picture is worth a 1,000 words, so here is a MWE
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
If I do not use raisebox
then it looks like this
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
Which is worst.
Any advice on how to do this?
Update
I tried the suggestion in comment to use vspace0pt
before includegraphics
which works, but only for tabular
. I need it to work also for longtable
. I did not think it will make a difference, so my MWE only used tabular
.
Here is MWE for longtable
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
Which gives
But it works OK for tabular.
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
So I need a solution that works for longtable and not just tabular as I use longtable
much more.
TL 2019
tables graphics vertical-alignment includegraphics
add a comment |
I want to have a table with image in one cell and text in other cells.
I know about the issue of alignment at center of cells. So I use the trick of
raisebox-.5height{includegraphics[...]`
But this does not do what I want. The text in the other cells in the table all start from the middle of the cell. leaving lots of empty space above.
I want the text to start from the top of the other cells. But do not know how to do it. i.e. I want text and images to all start from top of cell.
A picture is worth a 1,000 words, so here is a MWE
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
If I do not use raisebox
then it looks like this
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
Which is worst.
Any advice on how to do this?
Update
I tried the suggestion in comment to use vspace0pt
before includegraphics
which works, but only for tabular
. I need it to work also for longtable
. I did not think it will make a difference, so my MWE only used tabular
.
Here is MWE for longtable
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
Which gives
But it works OK for tabular.
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
So I need a solution that works for longtable and not just tabular as I use longtable
much more.
TL 2019
tables graphics vertical-alignment includegraphics
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
With longtable you needvspace0ptpar
as longtable quits vmode internally at the begin of the cell.
– Ulrike Fischer
May 4 at 16:16
add a comment |
I want to have a table with image in one cell and text in other cells.
I know about the issue of alignment at center of cells. So I use the trick of
raisebox-.5height{includegraphics[...]`
But this does not do what I want. The text in the other cells in the table all start from the middle of the cell. leaving lots of empty space above.
I want the text to start from the top of the other cells. But do not know how to do it. i.e. I want text and images to all start from top of cell.
A picture is worth a 1,000 words, so here is a MWE
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
If I do not use raisebox
then it looks like this
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
Which is worst.
Any advice on how to do this?
Update
I tried the suggestion in comment to use vspace0pt
before includegraphics
which works, but only for tabular
. I need it to work also for longtable
. I did not think it will make a difference, so my MWE only used tabular
.
Here is MWE for longtable
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
Which gives
But it works OK for tabular.
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
So I need a solution that works for longtable and not just tabular as I use longtable
much more.
TL 2019
tables graphics vertical-alignment includegraphics
I want to have a table with image in one cell and text in other cells.
I know about the issue of alignment at center of cells. So I use the trick of
raisebox-.5height{includegraphics[...]`
But this does not do what I want. The text in the other cells in the table all start from the middle of the cell. leaving lots of empty space above.
I want the text to start from the top of the other cells. But do not know how to do it. i.e. I want text and images to all start from top of cell.
A picture is worth a 1,000 words, so here is a MWE
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
raisebox-.5heightincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
If I do not use raisebox
then it looks like this
documentclass[12pt]article%
usepackagegraphicx
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
includegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
Which is worst.
Any advice on how to do this?
Update
I tried the suggestion in comment to use vspace0pt
before includegraphics
which works, but only for tabular
. I need it to work also for longtable
. I did not think it will make a difference, so my MWE only used tabular
.
Here is MWE for longtable
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
Which gives
But it works OK for tabular.
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
begindocument
begintabularp1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endtabular
enddocument
So I need a solution that works for longtable and not just tabular as I use longtable
much more.
TL 2019
tables graphics vertical-alignment includegraphics
tables graphics vertical-alignment includegraphics
edited May 4 at 8:10
Nasser
asked May 4 at 7:16
NasserNasser
8,41073490
8,41073490
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
With longtable you needvspace0ptpar
as longtable quits vmode internally at the begin of the cell.
– Ulrike Fischer
May 4 at 16:16
add a comment |
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
With longtable you needvspace0ptpar
as longtable quits vmode internally at the begin of the cell.
– Ulrike Fischer
May 4 at 16:16
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
With longtable you need
vspace0ptpar
as longtable quits vmode internally at the begin of the cell.– Ulrike Fischer
May 4 at 16:16
With longtable you need
vspace0ptpar
as longtable quits vmode internally at the begin of the cell.– Ulrike Fischer
May 4 at 16:16
add a comment |
2 Answers
2
active
oldest
votes
With the valign=t
option (from the adjustbox
package) you can achieve the desired layout also in a longtable
environment:
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
usepackage[export]adjustbox
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
enddocument
add a comment |
as supplement to @leandris answer, with some off-topic suggestions (which can be helpful):
documentclass[12pt]article%
usepackagelongtable
usepackage[export]adjustbox % it load graphicx too
usepackageetoolbox % for Gin's key patches
begindocument
begingroup
expandafterpatchcmdcsname Gin@iiendcsname % needed etoolbox
setkeys Gin#1
setkeys Gin
width=dimexprlinewidth-tabcolsep, % standard graphicx settings
valign=t, margin=0pt 6pt 0pt 6pt % settings from adjustbox
beginlongtablep1.5in
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-a
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-b
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-c
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
endlongtable
endgroup
enddocument
note: your table is wider than text width!
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f489102%2fyet-another-images-in-tables-question-alignment-want-text-to-start-at-top-of-ce%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
With the valign=t
option (from the adjustbox
package) you can achieve the desired layout also in a longtable
environment:
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
usepackage[export]adjustbox
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
enddocument
add a comment |
With the valign=t
option (from the adjustbox
package) you can achieve the desired layout also in a longtable
environment:
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
usepackage[export]adjustbox
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
enddocument
add a comment |
With the valign=t
option (from the adjustbox
package) you can achieve the desired layout also in a longtable
environment:
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
usepackage[export]adjustbox
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
enddocument
With the valign=t
option (from the adjustbox
package) you can achieve the desired layout also in a longtable
environment:
documentclass[12pt]article%
usepackagegraphicx
usepackagelongtable
usepackage[export]adjustbox
begindocument
beginlongtablep1.5inhline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB\hline
AAAAAAAAAAAA AAAAAAAAA&
vspace0ptincludegraphics[width=3in,valign=t]example-image-a&
BBBBBBBBBBB BBBBBB BBBBBBBBB BBBBBBB\hline
endlongtable
enddocument
answered May 4 at 8:19
leandriisleandriis
12.8k1933
12.8k1933
add a comment |
add a comment |
as supplement to @leandris answer, with some off-topic suggestions (which can be helpful):
documentclass[12pt]article%
usepackagelongtable
usepackage[export]adjustbox % it load graphicx too
usepackageetoolbox % for Gin's key patches
begindocument
begingroup
expandafterpatchcmdcsname Gin@iiendcsname % needed etoolbox
setkeys Gin#1
setkeys Gin
width=dimexprlinewidth-tabcolsep, % standard graphicx settings
valign=t, margin=0pt 6pt 0pt 6pt % settings from adjustbox
beginlongtablep1.5in
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-a
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-b
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-c
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
endlongtable
endgroup
enddocument
note: your table is wider than text width!
add a comment |
as supplement to @leandris answer, with some off-topic suggestions (which can be helpful):
documentclass[12pt]article%
usepackagelongtable
usepackage[export]adjustbox % it load graphicx too
usepackageetoolbox % for Gin's key patches
begindocument
begingroup
expandafterpatchcmdcsname Gin@iiendcsname % needed etoolbox
setkeys Gin#1
setkeys Gin
width=dimexprlinewidth-tabcolsep, % standard graphicx settings
valign=t, margin=0pt 6pt 0pt 6pt % settings from adjustbox
beginlongtablep1.5in
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-a
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-b
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-c
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
endlongtable
endgroup
enddocument
note: your table is wider than text width!
add a comment |
as supplement to @leandris answer, with some off-topic suggestions (which can be helpful):
documentclass[12pt]article%
usepackagelongtable
usepackage[export]adjustbox % it load graphicx too
usepackageetoolbox % for Gin's key patches
begindocument
begingroup
expandafterpatchcmdcsname Gin@iiendcsname % needed etoolbox
setkeys Gin#1
setkeys Gin
width=dimexprlinewidth-tabcolsep, % standard graphicx settings
valign=t, margin=0pt 6pt 0pt 6pt % settings from adjustbox
beginlongtablep1.5in
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-a
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-b
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-c
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
endlongtable
endgroup
enddocument
note: your table is wider than text width!
as supplement to @leandris answer, with some off-topic suggestions (which can be helpful):
documentclass[12pt]article%
usepackagelongtable
usepackage[export]adjustbox % it load graphicx too
usepackageetoolbox % for Gin's key patches
begindocument
begingroup
expandafterpatchcmdcsname Gin@iiendcsname % needed etoolbox
setkeys Gin#1
setkeys Gin
width=dimexprlinewidth-tabcolsep, % standard graphicx settings
valign=t, margin=0pt 6pt 0pt 6pt % settings from adjustbox
beginlongtablep1.5in
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-a
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-b
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
AAAA AAA AA AAA AA AAAAA AA
& includegraphicsexample-image-c
& BBBBBBBBBBB BBBB BBBBBBBBB BBBBBBBBB \
hline
endlongtable
endgroup
enddocument
note: your table is wider than text width!
answered May 4 at 8:41
ZarkoZarko
134k872178
134k872178
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f489102%2fyet-another-images-in-tables-question-alignment-want-text-to-start-at-top-of-ce%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
Use height in the raisebox argument , or add vspace0pt before the graphic (and no raisebox)
– Ulrike Fischer
May 4 at 7:29
if you don't raise it aligns at the bottom, if you lower by half the height it aligns in the centre, so if you lower by the full height it aligns...
– David Carlisle
May 4 at 7:58
With longtable you need
vspace0ptpar
as longtable quits vmode internally at the begin of the cell.– Ulrike Fischer
May 4 at 16:16