Float placement [H] considered Heinous
This is not a question but a statement.
Many MWEs include code like:
usepackage{float}
% etc
begin{figure}[H]% or begin{table}[H]
% figure/table code (e.g. begin{tabular}...)
% etc
which has the effect of placing the float (figure or table or ...) at that exact position in the document no matter how bad it will look with respect to spurious white space. The effect is to turn the float into a non-float but with the option of adding a caption. Often the question is about an undesired position of the float which is what the [H] option often leads to.
If you really want a float to be a non-float then don't call it as a float e.g.,
begin{tabular}
% tabular code
and if you need a caption use the caption
package. For example
usepackage{caption}
% etc
begin{center}
begin{tabular}
% etc
captionof{table}[Lot entry]{Nonfloating table}
label{tab:X}
end{tabular}
end{center}
% etc
LaTeX tries very hard to position floats in a pleasing way in a document via the optional float parameters [htbp]. If you think you know better then good luck to you.
A comprehensive discussion about floats and what you can do with them is in the 43 page chapter 6 of Frank Mittelbach & Michael Goossens The LaTeX Companion, Second Edition Addison Wesley, 2004. (I understand that there might be a Third edition sometime in the future). The chapter includes details of how you can adjust the allowable spaces for top (t
), bottom (b
), and here (h
) floats.
floats
|
show 7 more comments
This is not a question but a statement.
Many MWEs include code like:
usepackage{float}
% etc
begin{figure}[H]% or begin{table}[H]
% figure/table code (e.g. begin{tabular}...)
% etc
which has the effect of placing the float (figure or table or ...) at that exact position in the document no matter how bad it will look with respect to spurious white space. The effect is to turn the float into a non-float but with the option of adding a caption. Often the question is about an undesired position of the float which is what the [H] option often leads to.
If you really want a float to be a non-float then don't call it as a float e.g.,
begin{tabular}
% tabular code
and if you need a caption use the caption
package. For example
usepackage{caption}
% etc
begin{center}
begin{tabular}
% etc
captionof{table}[Lot entry]{Nonfloating table}
label{tab:X}
end{tabular}
end{center}
% etc
LaTeX tries very hard to position floats in a pleasing way in a document via the optional float parameters [htbp]. If you think you know better then good luck to you.
A comprehensive discussion about floats and what you can do with them is in the 43 page chapter 6 of Frank Mittelbach & Michael Goossens The LaTeX Companion, Second Edition Addison Wesley, 2004. (I understand that there might be a Third edition sometime in the future). The chapter includes details of how you can adjust the allowable spaces for top (t
), bottom (b
), and here (h
) floats.
floats
4
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
5
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
4
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
2
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago
|
show 7 more comments
This is not a question but a statement.
Many MWEs include code like:
usepackage{float}
% etc
begin{figure}[H]% or begin{table}[H]
% figure/table code (e.g. begin{tabular}...)
% etc
which has the effect of placing the float (figure or table or ...) at that exact position in the document no matter how bad it will look with respect to spurious white space. The effect is to turn the float into a non-float but with the option of adding a caption. Often the question is about an undesired position of the float which is what the [H] option often leads to.
If you really want a float to be a non-float then don't call it as a float e.g.,
begin{tabular}
% tabular code
and if you need a caption use the caption
package. For example
usepackage{caption}
% etc
begin{center}
begin{tabular}
% etc
captionof{table}[Lot entry]{Nonfloating table}
label{tab:X}
end{tabular}
end{center}
% etc
LaTeX tries very hard to position floats in a pleasing way in a document via the optional float parameters [htbp]. If you think you know better then good luck to you.
A comprehensive discussion about floats and what you can do with them is in the 43 page chapter 6 of Frank Mittelbach & Michael Goossens The LaTeX Companion, Second Edition Addison Wesley, 2004. (I understand that there might be a Third edition sometime in the future). The chapter includes details of how you can adjust the allowable spaces for top (t
), bottom (b
), and here (h
) floats.
floats
This is not a question but a statement.
Many MWEs include code like:
usepackage{float}
% etc
begin{figure}[H]% or begin{table}[H]
% figure/table code (e.g. begin{tabular}...)
% etc
which has the effect of placing the float (figure or table or ...) at that exact position in the document no matter how bad it will look with respect to spurious white space. The effect is to turn the float into a non-float but with the option of adding a caption. Often the question is about an undesired position of the float which is what the [H] option often leads to.
If you really want a float to be a non-float then don't call it as a float e.g.,
begin{tabular}
% tabular code
and if you need a caption use the caption
package. For example
usepackage{caption}
% etc
begin{center}
begin{tabular}
% etc
captionof{table}[Lot entry]{Nonfloating table}
label{tab:X}
end{tabular}
end{center}
% etc
LaTeX tries very hard to position floats in a pleasing way in a document via the optional float parameters [htbp]. If you think you know better then good luck to you.
A comprehensive discussion about floats and what you can do with them is in the 43 page chapter 6 of Frank Mittelbach & Michael Goossens The LaTeX Companion, Second Edition Addison Wesley, 2004. (I understand that there might be a Third edition sometime in the future). The chapter includes details of how you can adjust the allowable spaces for top (t
), bottom (b
), and here (h
) floats.
floats
floats
asked 10 hours ago
Peter WilsonPeter Wilson
8,18711432
8,18711432
4
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
5
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
4
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
2
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago
|
show 7 more comments
4
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
5
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
4
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
2
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago
4
4
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
5
5
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
4
4
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
2
2
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago
|
show 7 more comments
1 Answer
1
active
oldest
votes
[H]
is often (perhaps usually) misused but it isn't heinous, and the person who originally came up with the syntax is of course extremely honourable.
As egreg commented below the (non)-question, if an image or table is a non-float it shouldn't need a caption so the markup can be simply tabular
or includegraphics
with no surrounding float container so no need for [H]
However there is a use case where H can be useful. It is not really [H]
for Here it is [H]
for Humans are better at choosing float positions. If you are prepared to take full control, use [H]
on all your floats and float them by hand by moving the environment in the source, and if necessary re-writing other parts of the page to help make things fit, then for some documents you can surely get better results. Of course there is a very high maintenance cost to this as any edit invalidates all the positioning and you have to check all the page breaks again, but if you have just spent ten years writing a book, spending a week at the end hand tuning float positions isn't necessarily the wrong thing to do.
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%2f469880%2ffloat-placement-h-considered-heinous%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
[H]
is often (perhaps usually) misused but it isn't heinous, and the person who originally came up with the syntax is of course extremely honourable.
As egreg commented below the (non)-question, if an image or table is a non-float it shouldn't need a caption so the markup can be simply tabular
or includegraphics
with no surrounding float container so no need for [H]
However there is a use case where H can be useful. It is not really [H]
for Here it is [H]
for Humans are better at choosing float positions. If you are prepared to take full control, use [H]
on all your floats and float them by hand by moving the environment in the source, and if necessary re-writing other parts of the page to help make things fit, then for some documents you can surely get better results. Of course there is a very high maintenance cost to this as any edit invalidates all the positioning and you have to check all the page breaks again, but if you have just spent ten years writing a book, spending a week at the end hand tuning float positions isn't necessarily the wrong thing to do.
add a comment |
[H]
is often (perhaps usually) misused but it isn't heinous, and the person who originally came up with the syntax is of course extremely honourable.
As egreg commented below the (non)-question, if an image or table is a non-float it shouldn't need a caption so the markup can be simply tabular
or includegraphics
with no surrounding float container so no need for [H]
However there is a use case where H can be useful. It is not really [H]
for Here it is [H]
for Humans are better at choosing float positions. If you are prepared to take full control, use [H]
on all your floats and float them by hand by moving the environment in the source, and if necessary re-writing other parts of the page to help make things fit, then for some documents you can surely get better results. Of course there is a very high maintenance cost to this as any edit invalidates all the positioning and you have to check all the page breaks again, but if you have just spent ten years writing a book, spending a week at the end hand tuning float positions isn't necessarily the wrong thing to do.
add a comment |
[H]
is often (perhaps usually) misused but it isn't heinous, and the person who originally came up with the syntax is of course extremely honourable.
As egreg commented below the (non)-question, if an image or table is a non-float it shouldn't need a caption so the markup can be simply tabular
or includegraphics
with no surrounding float container so no need for [H]
However there is a use case where H can be useful. It is not really [H]
for Here it is [H]
for Humans are better at choosing float positions. If you are prepared to take full control, use [H]
on all your floats and float them by hand by moving the environment in the source, and if necessary re-writing other parts of the page to help make things fit, then for some documents you can surely get better results. Of course there is a very high maintenance cost to this as any edit invalidates all the positioning and you have to check all the page breaks again, but if you have just spent ten years writing a book, spending a week at the end hand tuning float positions isn't necessarily the wrong thing to do.
[H]
is often (perhaps usually) misused but it isn't heinous, and the person who originally came up with the syntax is of course extremely honourable.
As egreg commented below the (non)-question, if an image or table is a non-float it shouldn't need a caption so the markup can be simply tabular
or includegraphics
with no surrounding float container so no need for [H]
However there is a use case where H can be useful. It is not really [H]
for Here it is [H]
for Humans are better at choosing float positions. If you are prepared to take full control, use [H]
on all your floats and float them by hand by moving the environment in the source, and if necessary re-writing other parts of the page to help make things fit, then for some documents you can surely get better results. Of course there is a very high maintenance cost to this as any edit invalidates all the positioning and you have to check all the page breaks again, but if you have just spent ten years writing a book, spending a week at the end hand tuning float positions isn't necessarily the wrong thing to do.
edited 8 hours ago
Thruston
26k24190
26k24190
answered 9 hours ago
David CarlisleDavid Carlisle
485k4111181860
485k4111181860
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%2f469880%2ffloat-placement-h-considered-heinous%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
4
Sorry, but TeX-StackExchange is a Q&A site. As it stands, there is no question here, which means this will likely be closed.
– Joseph Wright♦
10 hours ago
@JosephWright I know it is not a question but it is an answer to many questions. Is it not possible to address many questions without having to do it individually,? If SE is meant to help users then there should be some way of providing general advice. GOM.
– Peter Wilson
9 hours ago
5
You could make it a question if you ask e.g. "What are the alternatives to [H]?", and then you could add your own answer. There are several examples of such questions with self-answers.
– marmot
9 hours ago
4
In my opinion, if something has to be “right there”, then it doesn't need a caption.
– egreg
9 hours ago
2
@egreg: I disagree. For writing lengthy books or science articles it may be appropiate to have floating figures, but outside of the ivory tower of academia, in 'lower class' teaching, where short work sheets are much more useful and you can not let images etc. float away. They must stay exactly at their position and they do need a caption!
– Christian Hupfer
9 hours ago