0

I need not trivial help.

I have a command with parameters. This command fills in and prints the following table:

\begin{longtable}{|p{3.2cm}|p{2.5cm}|p{2.5cm}|p{2.3cm}|} \hline

Some Text: & \multicolumn{3}{p{12.5cm}|}{ \raggedright {#1}} \\\\ \hline  

.....

Some Text: & {\parbox[c]{\textwidth}{#7}} & {\parbox[c]{\textwidth}{#8}} & {\parbox[c]{\textwidth}{#9}}  \hline

\end{longtable}

I need some command which user will set into cell (#1 parameter).

I mean: for example user write text into cell, and between text user call command e.g. \GoToNewRow. Then current row should be finished and further text put into the following row.

This command should do something like

  1. close current multicolumn
  2. make \\ \hline
  3. the further cell leave empty
  4. open new \multicolumn and set into the further text.

1 Answer 1

1

Not sure if this is what you want, in case comment under my answer. 12.5cm for the multicolumn goes out of the page so I reduced it to 7.5cm.

If you want to leave the first cell of each row empty, then just delete "some text:" from the \newcommand.

figure 1

\documentclass{article}
\usepackage{longtable}

\newcommand{\newrow}[1]{
    Some text: & \multicolumn{3}{p{7.5cm}|}{ \raggedright {#1}} \\ \hline
}

\begin{document}    
\begin{longtable}{|p{3.2cm}|p{2.5cm}|p{2.5cm}|p{2.3cm}|} \hline

        \newrow{hello}
        \newrow{this}
        \newrow{is}
        \newrow{a}
        \newrow{new}
        \newrow{row}

\end{longtable} 
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .