Add vertically-aligned text between two enumerate items
I'd like to get something like this:
MWE:
documentclass{article}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$ quad (text)
item $Y^2 + 1 = 0$ quad (text)
end{enumerate}
end{document}
spacing vertical-alignment enumerate enumitem vertical
add a comment |
I'd like to get something like this:
MWE:
documentclass{article}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$ quad (text)
item $Y^2 + 1 = 0$ quad (text)
end{enumerate}
end{document}
spacing vertical-alignment enumerate enumitem vertical
add a comment |
I'd like to get something like this:
MWE:
documentclass{article}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$ quad (text)
item $Y^2 + 1 = 0$ quad (text)
end{enumerate}
end{document}
spacing vertical-alignment enumerate enumitem vertical
I'd like to get something like this:
MWE:
documentclass{article}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$ quad (text)
item $Y^2 + 1 = 0$ quad (text)
end{enumerate}
end{document}
spacing vertical-alignment enumerate enumitem vertical
spacing vertical-alignment enumerate enumitem vertical
asked 16 hours ago
Lele99_DDLele99_DD
1147
1147
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
How about a simple raisebox
, wrapped in a macro taking into account itemsep
and parsep
values (thanks to circumscribe, I have change to glueexpr`, since all involved lengths are glues, not ordinary lengths!)
documentclass{article}
usepackage{enumitem}
newcommand{raisecontent}[1]{%
raisebox{glueexprbaselineskip/2+parsep/2+itemsep/2+lineskip/2}[htstrutbox][htstrutbox]{#1}%
}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
begin{enumerate}[itemsep=40pt]
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
end{document}
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot aboutglueexpr
....
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thoughtitemsep
etc. would be normal length 'registers' and skip's'
– Christian Hupfer
13 hours ago
add a comment |
Another solution, based on tabularx
and listliketab
, which emulates list environments within tables:
documentclass{article}
usepackage{tabularx, listliketab, multirow}
begin{document}
storestyleof{enumerate}
begin{listliketab}
newcounter{tabenum}setcounter{tabenum}{0}
newcommand{tabitem}{addtocounter{tabenum}{1}thetabenum.}
noindentbegin{tabularx}{linewidth}{@{}L l@{quad}X@{}}
tabitem & $Y^2 - 1 = 0$ & multirow{2}{=}{(Text)}\
tabitem & $Y^2 + 1 = 0$
end{tabularx}
end{listliketab}
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%2f474045%2fadd-vertically-aligned-text-between-two-enumerate-items%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
How about a simple raisebox
, wrapped in a macro taking into account itemsep
and parsep
values (thanks to circumscribe, I have change to glueexpr`, since all involved lengths are glues, not ordinary lengths!)
documentclass{article}
usepackage{enumitem}
newcommand{raisecontent}[1]{%
raisebox{glueexprbaselineskip/2+parsep/2+itemsep/2+lineskip/2}[htstrutbox][htstrutbox]{#1}%
}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
begin{enumerate}[itemsep=40pt]
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
end{document}
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot aboutglueexpr
....
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thoughtitemsep
etc. would be normal length 'registers' and skip's'
– Christian Hupfer
13 hours ago
add a comment |
How about a simple raisebox
, wrapped in a macro taking into account itemsep
and parsep
values (thanks to circumscribe, I have change to glueexpr`, since all involved lengths are glues, not ordinary lengths!)
documentclass{article}
usepackage{enumitem}
newcommand{raisecontent}[1]{%
raisebox{glueexprbaselineskip/2+parsep/2+itemsep/2+lineskip/2}[htstrutbox][htstrutbox]{#1}%
}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
begin{enumerate}[itemsep=40pt]
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
end{document}
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot aboutglueexpr
....
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thoughtitemsep
etc. would be normal length 'registers' and skip's'
– Christian Hupfer
13 hours ago
add a comment |
How about a simple raisebox
, wrapped in a macro taking into account itemsep
and parsep
values (thanks to circumscribe, I have change to glueexpr`, since all involved lengths are glues, not ordinary lengths!)
documentclass{article}
usepackage{enumitem}
newcommand{raisecontent}[1]{%
raisebox{glueexprbaselineskip/2+parsep/2+itemsep/2+lineskip/2}[htstrutbox][htstrutbox]{#1}%
}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
begin{enumerate}[itemsep=40pt]
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
end{document}
How about a simple raisebox
, wrapped in a macro taking into account itemsep
and parsep
values (thanks to circumscribe, I have change to glueexpr`, since all involved lengths are glues, not ordinary lengths!)
documentclass{article}
usepackage{enumitem}
newcommand{raisecontent}[1]{%
raisebox{glueexprbaselineskip/2+parsep/2+itemsep/2+lineskip/2}[htstrutbox][htstrutbox]{#1}%
}
begin{document}
begin{enumerate}
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
begin{enumerate}[itemsep=40pt]
item $Y^2 - 1 = 0$
item $Y^2 + 1 = 0$ raisecontent{quad (text)}
end{enumerate}
end{document}
edited 7 hours ago
answered 16 hours ago
Christian HupferChristian Hupfer
150k15198393
150k15198393
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot aboutglueexpr
....
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thoughtitemsep
etc. would be normal length 'registers' and skip's'
– Christian Hupfer
13 hours ago
add a comment |
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot aboutglueexpr
....
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thoughtitemsep
etc. would be normal length 'registers' and skip's'
– Christian Hupfer
13 hours ago
Working in progress...
– Christian Hupfer
15 hours ago
Working in progress...
– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot about
glueexpr
....– Christian Hupfer
15 hours ago
@Circumscribe: Thanks, I totally forgot about
glueexpr
....– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
@Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again
– Christian Hupfer
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
Let us continue this discussion in chat.
– Circumscribe
15 hours ago
@Circumscribe: Oh, I thought
itemsep
etc. would be normal length 'registers' and skip's'– Christian Hupfer
13 hours ago
@Circumscribe: Oh, I thought
itemsep
etc. would be normal length 'registers' and skip's'– Christian Hupfer
13 hours ago
add a comment |
Another solution, based on tabularx
and listliketab
, which emulates list environments within tables:
documentclass{article}
usepackage{tabularx, listliketab, multirow}
begin{document}
storestyleof{enumerate}
begin{listliketab}
newcounter{tabenum}setcounter{tabenum}{0}
newcommand{tabitem}{addtocounter{tabenum}{1}thetabenum.}
noindentbegin{tabularx}{linewidth}{@{}L l@{quad}X@{}}
tabitem & $Y^2 - 1 = 0$ & multirow{2}{=}{(Text)}\
tabitem & $Y^2 + 1 = 0$
end{tabularx}
end{listliketab}
end{document}
add a comment |
Another solution, based on tabularx
and listliketab
, which emulates list environments within tables:
documentclass{article}
usepackage{tabularx, listliketab, multirow}
begin{document}
storestyleof{enumerate}
begin{listliketab}
newcounter{tabenum}setcounter{tabenum}{0}
newcommand{tabitem}{addtocounter{tabenum}{1}thetabenum.}
noindentbegin{tabularx}{linewidth}{@{}L l@{quad}X@{}}
tabitem & $Y^2 - 1 = 0$ & multirow{2}{=}{(Text)}\
tabitem & $Y^2 + 1 = 0$
end{tabularx}
end{listliketab}
end{document}
add a comment |
Another solution, based on tabularx
and listliketab
, which emulates list environments within tables:
documentclass{article}
usepackage{tabularx, listliketab, multirow}
begin{document}
storestyleof{enumerate}
begin{listliketab}
newcounter{tabenum}setcounter{tabenum}{0}
newcommand{tabitem}{addtocounter{tabenum}{1}thetabenum.}
noindentbegin{tabularx}{linewidth}{@{}L l@{quad}X@{}}
tabitem & $Y^2 - 1 = 0$ & multirow{2}{=}{(Text)}\
tabitem & $Y^2 + 1 = 0$
end{tabularx}
end{listliketab}
end{document}
Another solution, based on tabularx
and listliketab
, which emulates list environments within tables:
documentclass{article}
usepackage{tabularx, listliketab, multirow}
begin{document}
storestyleof{enumerate}
begin{listliketab}
newcounter{tabenum}setcounter{tabenum}{0}
newcommand{tabitem}{addtocounter{tabenum}{1}thetabenum.}
noindentbegin{tabularx}{linewidth}{@{}L l@{quad}X@{}}
tabitem & $Y^2 - 1 = 0$ & multirow{2}{=}{(Text)}\
tabitem & $Y^2 + 1 = 0$
end{tabularx}
end{listliketab}
end{document}
answered 13 hours ago
BernardBernard
169k773198
169k773198
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%2f474045%2fadd-vertically-aligned-text-between-two-enumerate-items%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