How to organize the appearing of floats when afterpage is used?
earlier I asked how to rotate a page with a sidewaysfigure
inside (question here). However I couldn't find a solution. I decided to use the landscape
environment with afterpage
, but when there's other floats near to the rotated one, the appearing order is altered.
In the following MWE, I expected to get the first page full of text, then the rotated figure, and finally the text and floats remaining.
How can I solve it?
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
clearpage%
}%
%
blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
%
Blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
end{document}
floats rotating afterpage
add a comment |
earlier I asked how to rotate a page with a sidewaysfigure
inside (question here). However I couldn't find a solution. I decided to use the landscape
environment with afterpage
, but when there's other floats near to the rotated one, the appearing order is altered.
In the following MWE, I expected to get the first page full of text, then the rotated figure, and finally the text and floats remaining.
How can I solve it?
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
clearpage%
}%
%
blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
%
Blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
end{document}
floats rotating afterpage
figure b is only allowed to come[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by usingafterpage
so I can't see what other order you would expect?
– David Carlisle
Feb 17 at 18:28
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside theafterpage
– Daniel Valencia C.
Feb 17 at 19:32
as I explained before the content ofafterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.
– David Carlisle
Feb 17 at 19:58
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02
add a comment |
earlier I asked how to rotate a page with a sidewaysfigure
inside (question here). However I couldn't find a solution. I decided to use the landscape
environment with afterpage
, but when there's other floats near to the rotated one, the appearing order is altered.
In the following MWE, I expected to get the first page full of text, then the rotated figure, and finally the text and floats remaining.
How can I solve it?
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
clearpage%
}%
%
blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
%
Blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
end{document}
floats rotating afterpage
earlier I asked how to rotate a page with a sidewaysfigure
inside (question here). However I couldn't find a solution. I decided to use the landscape
environment with afterpage
, but when there's other floats near to the rotated one, the appearing order is altered.
In the following MWE, I expected to get the first page full of text, then the rotated figure, and finally the text and floats remaining.
How can I solve it?
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
clearpage%
}%
%
blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
%
Blindtextpar%
%
begin{figure}[h]
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
end{document}
floats rotating afterpage
floats rotating afterpage
asked Feb 17 at 18:17
Daniel Valencia C.Daniel Valencia C.
1,108618
1,108618
figure b is only allowed to come[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by usingafterpage
so I can't see what other order you would expect?
– David Carlisle
Feb 17 at 18:28
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside theafterpage
– Daniel Valencia C.
Feb 17 at 19:32
as I explained before the content ofafterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.
– David Carlisle
Feb 17 at 19:58
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02
add a comment |
figure b is only allowed to come[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by usingafterpage
so I can't see what other order you would expect?
– David Carlisle
Feb 17 at 18:28
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside theafterpage
– Daniel Valencia C.
Feb 17 at 19:32
as I explained before the content ofafterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.
– David Carlisle
Feb 17 at 19:58
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02
figure b is only allowed to come
[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by using afterpage
so I can't see what other order you would expect?– David Carlisle
Feb 17 at 18:28
figure b is only allowed to come
[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by using afterpage
so I can't see what other order you would expect?– David Carlisle
Feb 17 at 18:28
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside the
afterpage
– Daniel Valencia C.
Feb 17 at 19:32
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside the
afterpage
– Daniel Valencia C.
Feb 17 at 19:32
as I explained before the content of
afterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.– David Carlisle
Feb 17 at 19:58
as I explained before the content of
afterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.– David Carlisle
Feb 17 at 19:58
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02
add a comment |
1 Answer
1
active
oldest
votes
You were explictly forcing A to come after B, if I understand you correctly you want something more like
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
}%
%
blindtextpar%
%
%
Blindtextpar%
%
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%2f475367%2fhow-to-organize-the-appearing-of-floats-when-afterpage-is-used%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You were explictly forcing A to come after B, if I understand you correctly you want something more like
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
}%
%
blindtextpar%
%
%
Blindtextpar%
%
end{document}
add a comment |
You were explictly forcing A to come after B, if I understand you correctly you want something more like
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
}%
%
blindtextpar%
%
%
Blindtextpar%
%
end{document}
add a comment |
You were explictly forcing A to come after B, if I understand you correctly you want something more like
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
}%
%
blindtextpar%
%
%
Blindtextpar%
%
end{document}
You were explictly forcing A to come after B, if I understand you correctly you want something more like
documentclass[12pt,a4paper]{article}
usepackage{blindtext}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{pdflscape}
usepackage{afterpage}
usepackage{rotating}
usepackage{graphics, graphicx}
begin{document}
blindtextpar%
%
afterpage{%
begin{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-a}
caption{Figure a}
label{Fig:a}
end{figure}%
end{landscape}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-b}
caption{Figure b}
label{Fig:b}
end{figure}
begin{figure}
centering
includegraphics[width=0.7linewidth]{example-image-c}
caption{Figure c}
label{Fig:c}
end{figure}
}%
%
blindtextpar%
%
%
Blindtextpar%
%
end{document}
answered Feb 17 at 18:32
David CarlisleDavid Carlisle
492k4111371885
492k4111371885
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%2f475367%2fhow-to-organize-the-appearing-of-floats-when-afterpage-is-used%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
figure b is only allowed to come
[h]ere
as you used the optional arguemt to prevent all other options so that forces it to appear in the text, and figure a you forced to come after that by usingafterpage
so I can't see what other order you would expect?– David Carlisle
Feb 17 at 18:28
@DavidCarlisle I expected that the figure a comes first, because it was called first, and before the figures b and c there is a little of text explaining the figure content, then I think that is not correct to put all the floats inside the
afterpage
– Daniel Valencia C.
Feb 17 at 19:32
as I explained before the content of
afterpage
is just an internal definition it is not interpreted at all so the first figure that tex sees is B, then A is only seen after the afterpage tokens are inserted at the start of the next page.– David Carlisle
Feb 17 at 19:58
the whole point of floats is that they move that is why they have captions, so any text in the main document flow should refer indirectly to the figure via its label, not be written assuming that it appears in any particular place. I wouldn't use afterpage, but if you use it for one, and you want some other figures to be in the same sequence, you must use it for all.
– David Carlisle
Feb 17 at 20:02