How to align baseline of ordinary text with the baseline in `tabular`?Align a parbox at the bottom of a...
Why would the IRS ask for birth certificates or even audit a small tax return?
What is the meaning of "notice to quit at once" and "Lotty points”
How do you say “my friend is throwing a party, do you wanna come?” in german
Why are special aircraft used for the carriers in the United States Navy?
Are all UTXOs locked by an address spent in a transaction?
Specific Chinese carabiner QA?
PTIJ: Is all laundering forbidden during the 9 days?
Levi-Civita symbol: 3D matrix
How to disable or uninstall iTunes under High Sierra without disabling SIP
Is there any relevance to Thor getting his hair cut other than comedic value?
How do I deal with being envious of my own players?
Difference between 'stomach' and 'uterus'
3.5% Interest Student Loan or use all of my savings on Tuition?
Create chunks from an array
Why did the Cray-1 have 8 parity bits per word?
Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?
“I had a flat in the centre of town, but I didn’t like living there, so …”
Is there a full canon version of Tyrion's jackass/honeycomb joke?
Can we carry rice to Japan?
How does insurance birth control work?
Is there a frame of reference in which I was born before I was conceived?
I can't die. Who am I?
Why is it "take a leak?"
Would the melodic leap of the opening phrase of Mozart's K545 be considered dissonant?
How to align baseline of ordinary text with the baseline in `tabular`?
Align a parbox at the bottom of a tableParagraph column in tabular working only in the first columnHow to create a table where one cell spans all the columns and the text wraps properly?Table used to place text and symbolsHow can I horizontally align text in a multirow element?Vertically aligning fixed height tablesTabular height does not fit rotated textHeight of rows being the same as width of rotated columnsHow to force a maximum cell height?How to set longtable width to text width so that the text in cell wraps around automatically?
This code:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
produces two side-by-side minipages that start with a horizontal line. The left minipage contains ordinary text. The right minipage contains a table. The horizontal lines are at the same height. The baselines of the text are not:
I want that the baseline of the ordinary text (on the left) is the same as the baseline of the text in the first cell of the table (on the right). This would require either moving the text down, or moving the text in the table up.
What I tried:
renewcommandarraystretch{0}
eliminates the top padding, but it also eliminates the bottom padding and changes the height of the cells
Setting
arraystretch
to0
and then replacing table rows by
TEXT & TEXT \[0.5ex]
seems to eliminate the top padding and to do roughly what I want, but I would prefer to not contaminate every line of the table with non-DRY magic numbers.
What would be the proper way to align the baselines in the text (left) and the table (right)?
tables spacing
|
show 2 more comments
This code:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
produces two side-by-side minipages that start with a horizontal line. The left minipage contains ordinary text. The right minipage contains a table. The horizontal lines are at the same height. The baselines of the text are not:
I want that the baseline of the ordinary text (on the left) is the same as the baseline of the text in the first cell of the table (on the right). This would require either moving the text down, or moving the text in the table up.
What I tried:
renewcommandarraystretch{0}
eliminates the top padding, but it also eliminates the bottom padding and changes the height of the cells
Setting
arraystretch
to0
and then replacing table rows by
TEXT & TEXT \[0.5ex]
seems to eliminate the top padding and to do roughly what I want, but I would prefer to not contaminate every line of the table with non-DRY magic numbers.
What would be the proper way to align the baselines in the text (left) and the table (right)?
tables spacing
1
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
The simplest solution would be to slightly lower the text on the left side: just add astrut
before the text.
– Bernard
yesterday
the following mwe works perfectly:documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown optionH
intabular
environment cause (together withhrule
) troubles ...
– Zarko
yesterday
1
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago
|
show 2 more comments
This code:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
produces two side-by-side minipages that start with a horizontal line. The left minipage contains ordinary text. The right minipage contains a table. The horizontal lines are at the same height. The baselines of the text are not:
I want that the baseline of the ordinary text (on the left) is the same as the baseline of the text in the first cell of the table (on the right). This would require either moving the text down, or moving the text in the table up.
What I tried:
renewcommandarraystretch{0}
eliminates the top padding, but it also eliminates the bottom padding and changes the height of the cells
Setting
arraystretch
to0
and then replacing table rows by
TEXT & TEXT \[0.5ex]
seems to eliminate the top padding and to do roughly what I want, but I would prefer to not contaminate every line of the table with non-DRY magic numbers.
What would be the proper way to align the baselines in the text (left) and the table (right)?
tables spacing
This code:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
produces two side-by-side minipages that start with a horizontal line. The left minipage contains ordinary text. The right minipage contains a table. The horizontal lines are at the same height. The baselines of the text are not:
I want that the baseline of the ordinary text (on the left) is the same as the baseline of the text in the first cell of the table (on the right). This would require either moving the text down, or moving the text in the table up.
What I tried:
renewcommandarraystretch{0}
eliminates the top padding, but it also eliminates the bottom padding and changes the height of the cells
Setting
arraystretch
to0
and then replacing table rows by
TEXT & TEXT \[0.5ex]
seems to eliminate the top padding and to do roughly what I want, but I would prefer to not contaminate every line of the table with non-DRY magic numbers.
What would be the proper way to align the baselines in the text (left) and the table (right)?
tables spacing
tables spacing
edited 12 hours ago
Andrey Tyukin
asked yesterday
Andrey TyukinAndrey Tyukin
1548
1548
1
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
The simplest solution would be to slightly lower the text on the left side: just add astrut
before the text.
– Bernard
yesterday
the following mwe works perfectly:documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown optionH
intabular
environment cause (together withhrule
) troubles ...
– Zarko
yesterday
1
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago
|
show 2 more comments
1
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
The simplest solution would be to slightly lower the text on the left side: just add astrut
before the text.
– Bernard
yesterday
the following mwe works perfectly:documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown optionH
intabular
environment cause (together withhrule
) troubles ...
– Zarko
yesterday
1
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago
1
1
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
The simplest solution would be to slightly lower the text on the left side: just add a
strut
before the text.– Bernard
yesterday
The simplest solution would be to slightly lower the text on the left side: just add a
strut
before the text.– Bernard
yesterday
the following mwe works perfectly:
documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown option H
in tabular
environment cause (together with hrule
) troubles ...– Zarko
yesterday
the following mwe works perfectly:
documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown option H
in tabular
environment cause (together with hrule
) troubles ...– Zarko
yesterday
1
1
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago
|
show 2 more comments
2 Answers
2
active
oldest
votes
Here is an explicitation of my comment: adding a strut
in the first line of the left-hand side tex lowers this line exactly at the same level as the first row of the tabular
:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
strut TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[H]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
add a comment |
All you really need to do is to match the first line of the minipage with the first line of the tabular (and use arraystretch = 1).
documentclass[12pt]{article}
begin{document}
%defarraystretch{1.5}
hrule
noindent
begin{minipage}[t]{0.5textwidth}
TEXT TEXT TEXT TEXT TEXT\
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{document}
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%2f477915%2fhow-to-align-baseline-of-ordinary-text-with-the-baseline-in-tabular%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
Here is an explicitation of my comment: adding a strut
in the first line of the left-hand side tex lowers this line exactly at the same level as the first row of the tabular
:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
strut TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[H]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
add a comment |
Here is an explicitation of my comment: adding a strut
in the first line of the left-hand side tex lowers this line exactly at the same level as the first row of the tabular
:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
strut TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[H]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
add a comment |
Here is an explicitation of my comment: adding a strut
in the first line of the left-hand side tex lowers this line exactly at the same level as the first row of the tabular
:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
strut TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[H]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
Here is an explicitation of my comment: adding a strut
in the first line of the left-hand side tex lowers this line exactly at the same level as the first row of the tabular
:
documentclass[12pt]{article}
begin{document}
noindent
begin{minipage}[t]{0.5textwidth}
hrule
strut TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{minipage}[t]{0.5textwidth}
hrule
begin{tabular}[H]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{minipage}
end{document}
answered yesterday
BernardBernard
172k776204
172k776204
add a comment |
add a comment |
All you really need to do is to match the first line of the minipage with the first line of the tabular (and use arraystretch = 1).
documentclass[12pt]{article}
begin{document}
%defarraystretch{1.5}
hrule
noindent
begin{minipage}[t]{0.5textwidth}
TEXT TEXT TEXT TEXT TEXT\
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{document}
add a comment |
All you really need to do is to match the first line of the minipage with the first line of the tabular (and use arraystretch = 1).
documentclass[12pt]{article}
begin{document}
%defarraystretch{1.5}
hrule
noindent
begin{minipage}[t]{0.5textwidth}
TEXT TEXT TEXT TEXT TEXT\
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{document}
add a comment |
All you really need to do is to match the first line of the minipage with the first line of the tabular (and use arraystretch = 1).
documentclass[12pt]{article}
begin{document}
%defarraystretch{1.5}
hrule
noindent
begin{minipage}[t]{0.5textwidth}
TEXT TEXT TEXT TEXT TEXT\
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{document}
All you really need to do is to match the first line of the minipage with the first line of the tabular (and use arraystretch = 1).
documentclass[12pt]{article}
begin{document}
%defarraystretch{1.5}
hrule
noindent
begin{minipage}[t]{0.5textwidth}
TEXT TEXT TEXT TEXT TEXT\
TEXT TEXT TEXT TEXT TEXT
end{minipage}
begin{tabular}[t]{rc}
TEXT & TEXT \
TEXT & TEXT \
end{tabular}
end{document}
answered 11 hours ago
John KormyloJohn Kormylo
44.9k12570
44.9k12570
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%2f477915%2fhow-to-align-baseline-of-ordinary-text-with-the-baseline-in-tabular%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
1
Do you really want the rule touches the text on the left side?
– Bernard
yesterday
@Bernard The horizontal lines are merely supposed to show that the minipages are aligned properly. I the end of the day, I don't want to have any horizontal lines at all. All I want is to make the baselines of text on the left be the same as the baseline of the text on the right. The extra whitespace prevents this from happening. My assumption is that the whitespace marked with red arrows is some kind of table cell padding. I want to set it to zero, somehow.
– Andrey Tyukin
yesterday
The simplest solution would be to slightly lower the text on the left side: just add a
strut
before the text.– Bernard
yesterday
the following mwe works perfectly:
documentclass[12pt]{article} begin{document} begin{minipage}[t]{0.22linewidth} TEXT TEXT end{minipage}begin{minipage}[t]{0.22linewidth} begin{tabular}[t]{cc} TEXT & TEXT \ TEXT & TEXT \ end{tabular} end{minipage} end{document}
. it seems that unknown optionH
intabular
environment cause (together withhrule
) troubles ...– Zarko
yesterday
1
BTW, tabular is not a float, so no H option. The t/b/c option controls where the baseline is placed: top line, bottom line or center. Default is center.
– John Kormylo
12 hours ago