Wrapfig error: Conflicting Environment
up vote
0
down vote
favorite
I have a figure inside of a wrapfigure environment in the body of my paper. However, I am receiving a warning that it is used inside a conflicting environment, even though the environment that it's in is just the document! Is it because of how it floats around, maybe it ends up somewhere else?
Here is the relevant bit of my document:
Text text text text text...
begin{lstlisting}
...some code goes here...
end{lstlisting}
begin{wrapfigure}{L}{0.5textwidth}
centering
includegraphics[width=textwidth]{figures/myfigure.pdf}
caption{Caption for figure}
label{fig:fig-label}
end{wrapfigure}
Bunch more text goes here...
Interestingly, if I move the wrap figure after the paragraph following the listing, there are no warnings.
I hope this doesn't count as a duplicate; I found related questions, but none of the answers worked...
warnings wrapfigure
add a comment |
up vote
0
down vote
favorite
I have a figure inside of a wrapfigure environment in the body of my paper. However, I am receiving a warning that it is used inside a conflicting environment, even though the environment that it's in is just the document! Is it because of how it floats around, maybe it ends up somewhere else?
Here is the relevant bit of my document:
Text text text text text...
begin{lstlisting}
...some code goes here...
end{lstlisting}
begin{wrapfigure}{L}{0.5textwidth}
centering
includegraphics[width=textwidth]{figures/myfigure.pdf}
caption{Caption for figure}
label{fig:fig-label}
end{wrapfigure}
Bunch more text goes here...
Interestingly, if I move the wrap figure after the paragraph following the listing, there are no warnings.
I hope this doesn't count as a duplicate; I found related questions, but none of the answers worked...
warnings wrapfigure
1
I don't think there's a way to makelstlisting
andwrapfig
coexist. Normal text can wrap around pictures, listings can't.
– egreg
Nov 14 at 18:29
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a figure inside of a wrapfigure environment in the body of my paper. However, I am receiving a warning that it is used inside a conflicting environment, even though the environment that it's in is just the document! Is it because of how it floats around, maybe it ends up somewhere else?
Here is the relevant bit of my document:
Text text text text text...
begin{lstlisting}
...some code goes here...
end{lstlisting}
begin{wrapfigure}{L}{0.5textwidth}
centering
includegraphics[width=textwidth]{figures/myfigure.pdf}
caption{Caption for figure}
label{fig:fig-label}
end{wrapfigure}
Bunch more text goes here...
Interestingly, if I move the wrap figure after the paragraph following the listing, there are no warnings.
I hope this doesn't count as a duplicate; I found related questions, but none of the answers worked...
warnings wrapfigure
I have a figure inside of a wrapfigure environment in the body of my paper. However, I am receiving a warning that it is used inside a conflicting environment, even though the environment that it's in is just the document! Is it because of how it floats around, maybe it ends up somewhere else?
Here is the relevant bit of my document:
Text text text text text...
begin{lstlisting}
...some code goes here...
end{lstlisting}
begin{wrapfigure}{L}{0.5textwidth}
centering
includegraphics[width=textwidth]{figures/myfigure.pdf}
caption{Caption for figure}
label{fig:fig-label}
end{wrapfigure}
Bunch more text goes here...
Interestingly, if I move the wrap figure after the paragraph following the listing, there are no warnings.
I hope this doesn't count as a duplicate; I found related questions, but none of the answers worked...
warnings wrapfigure
warnings wrapfigure
asked Nov 14 at 17:45
alan
333
333
1
I don't think there's a way to makelstlisting
andwrapfig
coexist. Normal text can wrap around pictures, listings can't.
– egreg
Nov 14 at 18:29
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52
add a comment |
1
I don't think there's a way to makelstlisting
andwrapfig
coexist. Normal text can wrap around pictures, listings can't.
– egreg
Nov 14 at 18:29
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52
1
1
I don't think there's a way to make
lstlisting
and wrapfig
coexist. Normal text can wrap around pictures, listings can't.– egreg
Nov 14 at 18:29
I don't think there's a way to make
lstlisting
and wrapfig
coexist. Normal text can wrap around pictures, listings can't.– egreg
Nov 14 at 18:29
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f459988%2fwrapfig-error-conflicting-environment%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
I don't think there's a way to make
lstlisting
andwrapfig
coexist. Normal text can wrap around pictures, listings can't.– egreg
Nov 14 at 18:29
I don't get your error. I do get an image way too wide. Unlike minpage, wrapfigure does not reset textwidth. Now, if you have another lstlisting before wrapfigure is done, THAT will cause problems.
– John Kormylo
Nov 15 at 5:52