Cannot add figure float in table
up vote
3
down vote
favorite
I'm using lyx so I'm not sure how to properly show a MWE but here goes. I want to get this kind of output BUT I want it to show figure number and caption as well.
This is how I have it currently on lyx:
The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). I tried a couple of ways to get the figure number and caption to appear but met with a lot of complaints:
Figure above with a figure float inside the Box.
Figure above with only figure float alone.
Has anyone came across this kind of problem? Your help is very much appreciated.
EDIT: The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). But after compilation,the image appeared exactly as the first image which is fine. Actually, the real issue is to add the caption and figure number.
I tried this:
Which outputs this:
lyx
|
show 14 more comments
up vote
3
down vote
favorite
I'm using lyx so I'm not sure how to properly show a MWE but here goes. I want to get this kind of output BUT I want it to show figure number and caption as well.
This is how I have it currently on lyx:
The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). I tried a couple of ways to get the figure number and caption to appear but met with a lot of complaints:
Figure above with a figure float inside the Box.
Figure above with only figure float alone.
Has anyone came across this kind of problem? Your help is very much appreciated.
EDIT: The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). But after compilation,the image appeared exactly as the first image which is fine. Actually, the real issue is to add the caption and figure number.
I tried this:
Which outputs this:
lyx
4
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something likeincludegraphics{filename}
.
– Bernard
Dec 27 '17 at 20:28
3
@zaraku27: Trycaptionof{figure}{asdadasd}
(you need either thecapt-of
package or thecaption
package)
– Christian Hupfer
Dec 27 '17 at 21:52
1
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
1
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
2
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45
|
show 14 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I'm using lyx so I'm not sure how to properly show a MWE but here goes. I want to get this kind of output BUT I want it to show figure number and caption as well.
This is how I have it currently on lyx:
The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). I tried a couple of ways to get the figure number and caption to appear but met with a lot of complaints:
Figure above with a figure float inside the Box.
Figure above with only figure float alone.
Has anyone came across this kind of problem? Your help is very much appreciated.
EDIT: The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). But after compilation,the image appeared exactly as the first image which is fine. Actually, the real issue is to add the caption and figure number.
I tried this:
Which outputs this:
lyx
I'm using lyx so I'm not sure how to properly show a MWE but here goes. I want to get this kind of output BUT I want it to show figure number and caption as well.
This is how I have it currently on lyx:
The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). I tried a couple of ways to get the figure number and caption to appear but met with a lot of complaints:
Figure above with a figure float inside the Box.
Figure above with only figure float alone.
Has anyone came across this kind of problem? Your help is very much appreciated.
EDIT: The Box(Minipage) allows the image to appear side by side with the image (at least on Lyx). But after compilation,the image appeared exactly as the first image which is fine. Actually, the real issue is to add the caption and figure number.
I tried this:
Which outputs this:
lyx
lyx
edited Dec 28 '17 at 19:17
asked Dec 27 '17 at 20:19
zaraku27
1816
1816
4
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something likeincludegraphics{filename}
.
– Bernard
Dec 27 '17 at 20:28
3
@zaraku27: Trycaptionof{figure}{asdadasd}
(you need either thecapt-of
package or thecaption
package)
– Christian Hupfer
Dec 27 '17 at 21:52
1
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
1
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
2
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45
|
show 14 more comments
4
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something likeincludegraphics{filename}
.
– Bernard
Dec 27 '17 at 20:28
3
@zaraku27: Trycaptionof{figure}{asdadasd}
(you need either thecapt-of
package or thecaption
package)
– Christian Hupfer
Dec 27 '17 at 21:52
1
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
1
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
2
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45
4
4
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something like
includegraphics{filename}
.– Bernard
Dec 27 '17 at 20:28
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something like
includegraphics{filename}
.– Bernard
Dec 27 '17 at 20:28
3
3
@zaraku27: Try
captionof{figure}{asdadasd}
(you need either the capt-of
package or the caption
package)– Christian Hupfer
Dec 27 '17 at 21:52
@zaraku27: Try
captionof{figure}{asdadasd}
(you need either the capt-of
package or the caption
package)– Christian Hupfer
Dec 27 '17 at 21:52
1
1
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
1
1
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
2
2
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45
|
show 14 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
i guessing that you like achieve something like this:
documentclass{article}
usepackage{geometry}
usepackage[demo]{graphicx}
usepackage[skip=0.5ex]{caption}
usepackage{booktabs, tabularx}
renewcommandtabularxcolumn[1]{m{#1}}
%-------------------------------- show page layout, only for test
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum} % for dummy text in table
begin{document}
noindent
begin{tabularx}{linewidth}{@{}
>{hsize=0.3hsize}X
>{hsize=0.7hsize}X
@{}}
toprule
textbf{GBot Versions} & textbf{Description} \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-1}
captionof{figure}{}
end{minipage} & lipsum*[1] \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-2}
captionof{figure}{}
end{minipage} & lipsum*[2] \
bottomrule
end{tabularx}
end{document}
i assume that this table with images is shorter than one page. in case that this is not a case, you should replace tabularx
package with ltablex
.
note: in real document remove demo
option from ]aphicx
and all stuff for showing page layout as well as all use of lipsum
.
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't knowlyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, thatlyx
has very little common withlatex
).
– Zarko
Dec 28 '17 at 21:56
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
i guessing that you like achieve something like this:
documentclass{article}
usepackage{geometry}
usepackage[demo]{graphicx}
usepackage[skip=0.5ex]{caption}
usepackage{booktabs, tabularx}
renewcommandtabularxcolumn[1]{m{#1}}
%-------------------------------- show page layout, only for test
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum} % for dummy text in table
begin{document}
noindent
begin{tabularx}{linewidth}{@{}
>{hsize=0.3hsize}X
>{hsize=0.7hsize}X
@{}}
toprule
textbf{GBot Versions} & textbf{Description} \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-1}
captionof{figure}{}
end{minipage} & lipsum*[1] \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-2}
captionof{figure}{}
end{minipage} & lipsum*[2] \
bottomrule
end{tabularx}
end{document}
i assume that this table with images is shorter than one page. in case that this is not a case, you should replace tabularx
package with ltablex
.
note: in real document remove demo
option from ]aphicx
and all stuff for showing page layout as well as all use of lipsum
.
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't knowlyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, thatlyx
has very little common withlatex
).
– Zarko
Dec 28 '17 at 21:56
add a comment |
up vote
0
down vote
i guessing that you like achieve something like this:
documentclass{article}
usepackage{geometry}
usepackage[demo]{graphicx}
usepackage[skip=0.5ex]{caption}
usepackage{booktabs, tabularx}
renewcommandtabularxcolumn[1]{m{#1}}
%-------------------------------- show page layout, only for test
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum} % for dummy text in table
begin{document}
noindent
begin{tabularx}{linewidth}{@{}
>{hsize=0.3hsize}X
>{hsize=0.7hsize}X
@{}}
toprule
textbf{GBot Versions} & textbf{Description} \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-1}
captionof{figure}{}
end{minipage} & lipsum*[1] \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-2}
captionof{figure}{}
end{minipage} & lipsum*[2] \
bottomrule
end{tabularx}
end{document}
i assume that this table with images is shorter than one page. in case that this is not a case, you should replace tabularx
package with ltablex
.
note: in real document remove demo
option from ]aphicx
and all stuff for showing page layout as well as all use of lipsum
.
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't knowlyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, thatlyx
has very little common withlatex
).
– Zarko
Dec 28 '17 at 21:56
add a comment |
up vote
0
down vote
up vote
0
down vote
i guessing that you like achieve something like this:
documentclass{article}
usepackage{geometry}
usepackage[demo]{graphicx}
usepackage[skip=0.5ex]{caption}
usepackage{booktabs, tabularx}
renewcommandtabularxcolumn[1]{m{#1}}
%-------------------------------- show page layout, only for test
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum} % for dummy text in table
begin{document}
noindent
begin{tabularx}{linewidth}{@{}
>{hsize=0.3hsize}X
>{hsize=0.7hsize}X
@{}}
toprule
textbf{GBot Versions} & textbf{Description} \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-1}
captionof{figure}{}
end{minipage} & lipsum*[1] \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-2}
captionof{figure}{}
end{minipage} & lipsum*[2] \
bottomrule
end{tabularx}
end{document}
i assume that this table with images is shorter than one page. in case that this is not a case, you should replace tabularx
package with ltablex
.
note: in real document remove demo
option from ]aphicx
and all stuff for showing page layout as well as all use of lipsum
.
i guessing that you like achieve something like this:
documentclass{article}
usepackage{geometry}
usepackage[demo]{graphicx}
usepackage[skip=0.5ex]{caption}
usepackage{booktabs, tabularx}
renewcommandtabularxcolumn[1]{m{#1}}
%-------------------------------- show page layout, only for test
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum} % for dummy text in table
begin{document}
noindent
begin{tabularx}{linewidth}{@{}
>{hsize=0.3hsize}X
>{hsize=0.7hsize}X
@{}}
toprule
textbf{GBot Versions} & textbf{Description} \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-1}
captionof{figure}{}
end{minipage} & lipsum*[1] \
midrule
begin{minipage}{hsize}
includegraphics[width=linewidth]{gbot-2}
captionof{figure}{}
end{minipage} & lipsum*[2] \
bottomrule
end{tabularx}
end{document}
i assume that this table with images is shorter than one page. in case that this is not a case, you should replace tabularx
package with ltablex
.
note: in real document remove demo
option from ]aphicx
and all stuff for showing page layout as well as all use of lipsum
.
answered Dec 28 '17 at 20:29
Zarko
117k865155
117k865155
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't knowlyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, thatlyx
has very little common withlatex
).
– Zarko
Dec 28 '17 at 21:56
add a comment |
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't knowlyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, thatlyx
has very little common withlatex
).
– Zarko
Dec 28 '17 at 21:56
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
The OP uses LyX.
– Werner
Dec 28 '17 at 21:35
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Zarko: Thanks. Yup. That's the output that I want but would be nice if your solution is in Lyx format. I'm still scratching my head how to make use of your solution.
– zaraku27
Dec 28 '17 at 21:49
@Werner, is this important? i don't know
lyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, that lyx
has very little common with latex
).– Zarko
Dec 28 '17 at 21:56
@Werner, is this important? i don't know
lyx
, but this should work in it too. if not, than op should wait on better solution (then i can only conclude, that lyx
has very little common with latex
).– Zarko
Dec 28 '17 at 21:56
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f407811%2fcannot-add-figure-float-in-table%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
Welcome to TeX SX! If the graphic file is in a table, it can't be a float. The code should just be something like
includegraphics{filename}
.– Bernard
Dec 27 '17 at 20:28
3
@zaraku27: Try
captionof{figure}{asdadasd}
(you need either thecapt-of
package or thecaption
package)– Christian Hupfer
Dec 27 '17 at 21:52
1
@zaraku27: Well, as long as you don't show a compilable document, there's not much help here
– Christian Hupfer
Dec 27 '17 at 22:19
1
@zaraku27: I don't use LyX. You learn nothing about LaTeX by using it, in fact
– Christian Hupfer
Dec 28 '17 at 9:07
2
How-to make a LyX MWE (in LaTeX code) : (1) Reduce the document to only the problematic part . (2) View > Source Pane > Complete source > Copy & Paste.
– Fran
Dec 28 '17 at 21:45