Question: Main method in Java have the **String[]** as input parameter to the main method, but i want to pass **object** as a parameter. Java and all command line parametrized languages accept only String array of arguments which make sense as our ability to call using command line gives us the ability to enter text that could be represented by **String object** in Java

This is how we used to have a method like:

```
public static void main (String[] args) {

for (String text: args) {
System.out.println(text);
}
}

```

If we need to pass **integer** value, we need to use **parsing**
 method to obtain the numeric value from it.

```
 try {
 Arg = Integer.parseInt(args[0]);
 } catch (NumberFormatException e) {
 System.err.println("Number format mismatch");
 }

```

What if we need to pass a whole object as an argument to the class?

Regards

Answer: 
I now found a solution to this problem at [tex.stackexchange.com](https://tex.stackexchange.com/questions/9707/how-to-left-align-a-table-in-latex). Apparently pandoc inserts `\centering` for every float in the document. This can be cancelled by inserting `\let\centering\relax` in a custom preample to pandoc (as pandoc argument `-H custompreample.tex`). The link also describes more detailed ways to for example define different floats for tables and figures.
I was not able to get the solutions here to work--in LaTeX. I created a new longtable environment to make tables the way I wanted them. That was easier in the end. Here's an example Rmd file.

```
---
title: "Custom table"
header-includes:
  - \usepackage{longtable,booktabs}
output: pdf_document
---

\newenvironment{mylong}
    {\begin{longtable}[l]{p{.25in}p{3in}p{3in}}Line & Statements  & Reasons\\
    \toprule\addlinespace }
    { \addlinespace\bottomrule\end{longtable} }

\begin{mylong} 
1& $a+b=a+d$    & Given P10, if $b=d$, then 1 is true\\
2& $a+b=c$ & Given\\
3& $a+d=c$ & Given P9, if 1 and 2 are true, then 3 is true. QED\\
\end{mylong}

```