1

This question already has an answer here:

I am new Latex. If you see the following snippet, here I have created a table between two paragraph. However, when I compile it with XeLatex, the table goes up keeping both paragraphs down. I expected the table should be between two paragraph(Red Arrow). How to do this. Thank You.

 Soundex is a phonetic algorithm designed in 1900’s. Soundex algorithm phonetically encodesgroup similar sounding consonant characters. The process usually excludes vowels except the vowels at the beginning of the word. You can find Kaykobad’s Bangla soundex encoding table in [3,19] and Mumit’s Bangla soundex table in [4]. According to the Mumit’s soundex encoding algorithm returns the following output.

\begin{table}
\centering
  \caption{Sample result of N. UzZaman and Mumit’s Bangla soundex table}
  \begin{minipage}{\textwidth}
    \begin{tabular}{lccl}
    \hline\hline 
    Corpus Name & Corpus size & Creation time & Technique of data collection\\
    \hline 
BDNC01 [6] & 12 Million Words & 6 Years & Manual- Copy and Paste\\
SUMono [7] & 27 Million Words & 4 Years & Manual- Copy and Paste\\
NHMono01 (Our Corpus) & Over 100 Million Words & 2 Months & Automatic – Crawling and scraping with powerful Python’s Scrapy framework.\\
    \hline\hline
    \end{tabular}
    \vspace{-2\baselineskip}
  \end{minipage}
  \label{table2}
\end{table}
Soundex is an ancient version of phonetic algorithm and has lots of imperfections. Therefore, we have not used soundex in our spell checker. 

enter image description here

marked as duplicate by David Carlisle tables Mar 24 at 9:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Without a full example you cannot expect a full answer. However, there are some things you may want to try like \begin{table}[!h!]. – user121799 Mar 24 at 3:43
  • @marmot It's working. You can post it as answer. I will make it my answer. – Nahid Hossain Shihab Mar 24 at 4:06
  • note the only reason to use \begin{table} is to specify that the table may be moved to help with page breaking, so your oroblem is not a problem, it is by design, – David Carlisle Mar 24 at 9:10
  • @marmot two ! :-) very extravagant:-) – David Carlisle Mar 24 at 9:11
1

beside problem with position of table you have issues with table size. it will (regardless that we haven't any information about your document} spill out on right size of text. so see if the following remake of your table and positioning can help you:

\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs, makecell, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
 Soundex is a phonetic algorithm designed in 1900’s. Soundex algorithm phonetically encodesgroup similar sounding consonant characters. The process usually excludes vowels except the vowels at the beginning of the word. You can find Kaykobad’s Bangla soundex encoding table in [3,19] and Mumit’s Bangla soundex table in [4]. According to the Mumit’s soundex encoding algorithm returns the following output.

\begin{table}[htbp] % <--- "here", "top", "bottom", "page"
    \setcellgapes{2pt}
    \makegapedcells
\caption{Sample result of N. UzZaman and Mumit’s Bangla soundex table}
    \begin{tabularx}{\linewidth}{@{} lccL @{}}
    \toprule
\makecell[lb]{Corpus\\ Name}
            & \makecell[b]{Corpus size\\ (in Words)}
                                & \makecell[b]{Creation\\ time}
                                            & Technique of data collection\\
    \midrule
BDNC01 [6]  & 12 Million        & 6 Years   & Manual- Copy and Paste\\
SUMono [7]  & 27 Million        & 4 Years   & Manual- Copy and Paste\\
\makecell[lt]{NHMono01\\ (Our Corpus)}
            & Over100 Million    & 2 Months  & Automatic – Crawling and scraping with powerful Python’s Scrapy framework.\\
    \bottomrule
    \end{tabularx}
  \label{table2}
\end{table}
Soundex is an ancient version of phonetic algorithm and has lots of imperfections. Therefore, we have not used soundex in our spell checker.
\end{document}

enter image description here

edit: regarding positioning figure on page: meaning of options are noted in the code. the first three: h (for image should be here), t (on top of the page) and b (on the bottom of page) works fine if image occupy up to 70% of page size. if image is bigger, than p for image use whole page immediately after point of its inserting into text. with out of p in such a case image will be pushed to the end of document (as pointed David Carlisle now deleted comment below answer).

If you like to have image strictly between this two paragraphs regardless that on the page is no enough space for it, you can use placement specifier H provided by package float. in such case it will push image on the top of the next page and left empty space on previous page. after image will follow the next paragraph. so use of H should be with big precaution and generally its use is not recommended.

Not the answer you're looking for? Browse other questions tagged or ask your own question.