Cannot add figure float in table











up vote
3
down vote

favorite
2












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.
enter image description here
This is how I have it currently on lyx:



enter image description here



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:



enter image description here



Figure above with a figure float inside the Box.



enter image description here



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:
enter image description here



Which outputs this:
enter image description here










share|improve this question




















  • 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 the capt-of package or the caption 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

















up vote
3
down vote

favorite
2












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.
enter image description here
This is how I have it currently on lyx:



enter image description here



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:



enter image description here



Figure above with a figure float inside the Box.



enter image description here



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:
enter image description here



Which outputs this:
enter image description here










share|improve this question




















  • 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 the capt-of package or the caption 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















up vote
3
down vote

favorite
2









up vote
3
down vote

favorite
2






2





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.
enter image description here
This is how I have it currently on lyx:



enter image description here



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:



enter image description here



Figure above with a figure float inside the Box.



enter image description here



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:
enter image description here



Which outputs this:
enter image description here










share|improve this question















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.
enter image description here
This is how I have it currently on lyx:



enter image description here



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:



enter image description here



Figure above with a figure float inside the Box.



enter image description here



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:
enter image description here



Which outputs this:
enter image description here







lyx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 like includegraphics{filename}.
    – Bernard
    Dec 27 '17 at 20:28






  • 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






  • 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




    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 the capt-of package or the caption 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












1 Answer
1






active

oldest

votes

















up vote
0
down vote













i guessing that you like achieve something like this:



enter image description here



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.






share|improve this answer





















  • 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 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











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',
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
});


}
});














draft saved

draft discarded


















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

























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:



enter image description here



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.






share|improve this answer





















  • 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 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















up vote
0
down vote













i guessing that you like achieve something like this:



enter image description here



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.






share|improve this answer





















  • 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 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













up vote
0
down vote










up vote
0
down vote









i guessing that you like achieve something like this:



enter image description here



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.






share|improve this answer












i guessing that you like achieve something like this:



enter image description here



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.







share|improve this answer












share|improve this answer



share|improve this answer










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 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


















  • 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 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
















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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents