LaTeX for Complex Stuff

In this post, I will keep updating solutions to common problems we face while preparing LaTeX manuscripts.

Customise the width of any cell in a table: First include package pbox. Then, cell contents of a table will go like this \pbox{5cm}{blah blabh}. Even the contents of cell can be forced to next line by using double backslash, i.e., \\

Customise width of entire table column: In this case, instead of mentioning l,c,r options of tabular environment for the said column, use p with width . For example \begin{tabular}{|r|c|p{4cm}} [Reference]

Present table in landscape style  [Ref]: Add necessary packages and the syntax to show table in landscape mode is as

\usepackage{floats,lscape}
\begin{landscape}
\begin{table}
…table stuff…
\end{table}
\end{landscape}

Place text and Figure side by side:

\usepackage{wrapfig}
\begin{wrapfigure}{r}{4cm} //first option is placement (l,r), second width
\includegraphics[]{abc.pdf}
\caption{}
\label{}
\end{wrap figure}

Show complete paper reference (title, author name, etc) without citation:

\usepackage{bibentry}
\nobibliography*

Write above two lines in the document heading in the same order, and then in the main document, for citing purpose write  \bibentry{paperkey} 

Shrink a table if it moves outside the text area: 

Use resizebox as explained in this Stackoverflow answer.