0

I want to have a table under a subsection, but the place I write the table and its specifications in the source file seem not to matter. Can someone explain how to have a table at a desired position together with its vertical and horizontal position?

Thanks

Edit: The part of the code I mention is as follows:

\documentclass[12pt]{article}
\usepackage{a4, color}
\usepackage{amsmath, amsfonts, amssymb}
\usepackage{siunitx}
\begin{document} 
\title{Understanding Semiconductor Lasers}
\author{Ongun Ar\i sev}
\date{Report: 15.10.2013\\ Experiment: 8.10.2013}
\maketitle
\subsection{Output characteristic of semiconductor laser diode}

\begin{table}[htbp]
\centering
\begin{minipage}[t]{.4\textwidth}
\begin{tabular}[t]{|c|c|}
\hline
I\,(\si{\milli\ampere})&P\,(\si{\micro\watt})\\
\hline
2.5&0.53\\
2.6&0.56\\

\hline
\end{tabular}
\end{minipage}
\begin{minipage}[t]{.4\textwidth}
\begin{tabular}[t]{|c|c|}
\hline
I\,(\si{\milli\ampere})&P\,(\si{\milli\watt})\\
\hline
11.0&12.63\   
\hline
\end{tabular}
\end{minipage}
\end{table}
\newpage
\subsection{Divergence angle of the beam measurement}
\begin{table}
\centering
\begin{minipage}[t]{.4\textwidth}
\begin{tabular}[t]{|c|c|}
\hline
I\,(\si{\milli\ampere})&P\,(\si{\micro\watt})\\
\hline

\hline
\end{tabular}
\end{minipage}
\end{document}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
Vesnog
  • 1,307
  • 2
  • 15
  • 30
  • 1
    We need more information; please create a minimal working example. – Svend Tveskæg Oct 14 '13 at 00:20
  • Assuming I guess correct, the option [htbp] is what you are looking for. – Svend Tveskæg Oct 14 '13 at 00:21
  • Thanks, but that option did not work. I have provided some information maybe that will be relevant. – Vesnog Oct 14 '13 at 00:36
  • Put [htb] to the second table also. BTW you are missing \end{tabular} for the second table. –  Oct 14 '13 at 00:47
  • Hmm that did not work I put htb in every possible location but it is still printed at the end of the document. – Vesnog Oct 14 '13 at 00:55
  • Okay I get it done I think the arguments supplied to the tabular environment is not that important; I supplied the argument htb to the main table function and shortened the length of the table and it worked. But this time the alignment of the top rows of the table was disturbed – Vesnog Oct 14 '13 at 01:01
  • I did it and also used the captions, but I definitely need some tutorial on formatting, sizing and placing tables. Many thanks for everyone involved. – Vesnog Oct 14 '13 at 01:19
  • 1
    If you have no caption, just don't use table; a center environment will suffice. You don't need the inner minipage in any case. – egreg Oct 14 '13 at 07:28

0 Answers0