Table with multirow and multicolumn












1















I want to create a table with multirow and multicolumn in LaTeX.



I tried some post 1, 2, 3 to create my table but because I wasn't able to create my table.



Please help me with LaTeX code for the table given below.




enter image description here



I wrote this code so far:



begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } 
hline
multicolumn{4}{|c|}{textbf{Crop field location info}} \
hline
textbf{District name} & textbf{Tehsil name} & textbf{UC name}
& textbf{UC #}\ & & &\
hline
multicolumn{4}{|c|}{textbf{Farmer's info}} \
hline
textbf{Farmer name} & textbf{Farmer contact #}
& multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
& & multicolumn{2}{ |c| }{} \
hline
textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\
hline
end{tabular}









share|improve this question




















  • 1





    Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

    – Mico
    Jun 23 '15 at 6:32








  • 1





    In your tabular there is no multirow, just multicolumn

    – touhami
    Jun 23 '15 at 7:02











  • @Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

    – Muhammad Toseef
    Jun 23 '15 at 8:22













  • But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

    – Muhammad Toseef
    Jun 23 '15 at 8:24






  • 2





    I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

    – Andrew Swann
    Jun 23 '15 at 8:33
















1















I want to create a table with multirow and multicolumn in LaTeX.



I tried some post 1, 2, 3 to create my table but because I wasn't able to create my table.



Please help me with LaTeX code for the table given below.




enter image description here



I wrote this code so far:



begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } 
hline
multicolumn{4}{|c|}{textbf{Crop field location info}} \
hline
textbf{District name} & textbf{Tehsil name} & textbf{UC name}
& textbf{UC #}\ & & &\
hline
multicolumn{4}{|c|}{textbf{Farmer's info}} \
hline
textbf{Farmer name} & textbf{Farmer contact #}
& multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
& & multicolumn{2}{ |c| }{} \
hline
textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\
hline
end{tabular}









share|improve this question




















  • 1





    Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

    – Mico
    Jun 23 '15 at 6:32








  • 1





    In your tabular there is no multirow, just multicolumn

    – touhami
    Jun 23 '15 at 7:02











  • @Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

    – Muhammad Toseef
    Jun 23 '15 at 8:22













  • But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

    – Muhammad Toseef
    Jun 23 '15 at 8:24






  • 2





    I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

    – Andrew Swann
    Jun 23 '15 at 8:33














1












1








1








I want to create a table with multirow and multicolumn in LaTeX.



I tried some post 1, 2, 3 to create my table but because I wasn't able to create my table.



Please help me with LaTeX code for the table given below.




enter image description here



I wrote this code so far:



begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } 
hline
multicolumn{4}{|c|}{textbf{Crop field location info}} \
hline
textbf{District name} & textbf{Tehsil name} & textbf{UC name}
& textbf{UC #}\ & & &\
hline
multicolumn{4}{|c|}{textbf{Farmer's info}} \
hline
textbf{Farmer name} & textbf{Farmer contact #}
& multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
& & multicolumn{2}{ |c| }{} \
hline
textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\
hline
end{tabular}









share|improve this question
















I want to create a table with multirow and multicolumn in LaTeX.



I tried some post 1, 2, 3 to create my table but because I wasn't able to create my table.



Please help me with LaTeX code for the table given below.




enter image description here



I wrote this code so far:



begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } 
hline
multicolumn{4}{|c|}{textbf{Crop field location info}} \
hline
textbf{District name} & textbf{Tehsil name} & textbf{UC name}
& textbf{UC #}\ & & &\
hline
multicolumn{4}{|c|}{textbf{Farmer's info}} \
hline
textbf{Farmer name} & textbf{Farmer contact #}
& multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
& & multicolumn{2}{ |c| }{} \
hline
textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\
hline
end{tabular}






tables multicol multirow






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 18 mins ago









CarLaTeX

32.9k551136




32.9k551136










asked Jun 23 '15 at 6:08









Muhammad ToseefMuhammad Toseef

1441111




1441111








  • 1





    Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

    – Mico
    Jun 23 '15 at 6:32








  • 1





    In your tabular there is no multirow, just multicolumn

    – touhami
    Jun 23 '15 at 7:02











  • @Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

    – Muhammad Toseef
    Jun 23 '15 at 8:22













  • But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

    – Muhammad Toseef
    Jun 23 '15 at 8:24






  • 2





    I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

    – Andrew Swann
    Jun 23 '15 at 8:33














  • 1





    Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

    – Mico
    Jun 23 '15 at 6:32








  • 1





    In your tabular there is no multirow, just multicolumn

    – touhami
    Jun 23 '15 at 7:02











  • @Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

    – Muhammad Toseef
    Jun 23 '15 at 8:22













  • But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

    – Muhammad Toseef
    Jun 23 '15 at 8:24






  • 2





    I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

    – Andrew Swann
    Jun 23 '15 at 8:33








1




1





Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

– Mico
Jun 23 '15 at 6:32







Please tell us what you've tried so far, LaTeX-wise. Please also tell us more about the document class, the font, the font size, and the width and height of the text block that are in use in your document.

– Mico
Jun 23 '15 at 6:32






1




1





In your tabular there is no multirow, just multicolumn

– touhami
Jun 23 '15 at 7:02





In your tabular there is no multirow, just multicolumn

– touhami
Jun 23 '15 at 7:02













@Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

– Muhammad Toseef
Jun 23 '15 at 8:22







@Mico I wrote this code so far; begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

– Muhammad Toseef
Jun 23 '15 at 8:22















But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

– Muhammad Toseef
Jun 23 '15 at 8:24





But I don't know that what to do for column separtion for Unit -- Quantity and Rate/Unit -- All Cost.

– Muhammad Toseef
Jun 23 '15 at 8:24




2




2





I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

– Andrew Swann
Jun 23 '15 at 8:33





I have edited you code in the comment into the question. It is better to add code there because it is easier to preserve linebreaks etc.

– Andrew Swann
Jun 23 '15 at 8:33










2 Answers
2






active

oldest

votes


















1














Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:



documentclass{article}

%just for show only a table
usepackage[active,tightpage]{preview}
PreviewEnvironment{tabular}
setlengthPreviewBorder{1em}


begin{document}
sffamily
small
renewcommand{arraystretch}{1.2}
begin{tabular}{|p{0.4textwidth} % determine column width to your wish
|p{0.1textwidth}
|p{0.15textwidth}
|p{0.15textwidth}
|p{0.20textwidth}|
}
hline
multicolumn{5}{|c|}{Crop field location info}\
hline
District name &
multicolumn{2}{|c|}{Tehsil name}
& UC name & UC # \[2em]
hline
multicolumn{5}{|c|}{Farmer's info} \
hline
Farmer name &
multicolumn{2}{|c|}{Farmer contract #}
&
multicolumn{2}{|c|}{Farmer's Land holdings (acres)} \[2em]
hline
Item & Unit & Quality & Rate/Unit & All cost \
hline
% repeat regarding to your table contents ...
multicolumn{1}{|c}{}
&
multicolumn{4}{ c|}{Land preparation cost} \
hline
Ploughing & planking (Bullocks)
& Rs./Hr & & & \
hline
etc & & & & \
hline
end{tabular}
end{document}


enter image description here






share|improve this answer































    1














    You could use the multicol package for this task. Here I have an example of the first few rows:



    documentclass{article}
    usepackage{multicol}

    begin{document}

    begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| }
    hline
    multicolumn{5}{|c|}{textbf{Crop field location info}} \
    hline
    textbf{District name} & multicolumn{2}{ |c| }{textbf{Tehsil name}}
    & textbf{UC name} & textbf{UC #}\
    & multicolumn{2}{ |c| }{} & &\
    hline
    multicolumn{5}{|c|}{textbf{Farmer's info}} \
    hline
    textbf{Farmer name} & multicolumn{2}{|c|}{textbf{Farmer contact #}}
    & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
    & multicolumn{2}{ |c| }{} & multicolumn{2}{ |c| }{} \
    hline
    textbf{Item} & textbf{Unit} & textbf{Quantity} & textbf{Rate/Unit} & textbf{Total Cost}\
    hline
    & multicolumn{4}{ c| }{textbf{Land preparation cost}} \
    hline
    Ploughing & planking (Bullocks) & Rs./hr & & & \
    hline
    Leveling (Bullocks) & Rs./hr & & & \
    hline
    end{tabular}

    end{document}


    More information on the correct usage can be found at latex_tables






    share|improve this answer


























    • there is no need to multicol package

      – touhami
      Jun 23 '15 at 7:03











    • @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

      – Muhammad Toseef
      Jun 23 '15 at 8:21











    • begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

      – Muhammad Toseef
      Jun 23 '15 at 8:21











    • I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

      – lenxn
      Jun 23 '15 at 9:05











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f251648%2ftable-with-multirow-and-multicolumn%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:



    documentclass{article}

    %just for show only a table
    usepackage[active,tightpage]{preview}
    PreviewEnvironment{tabular}
    setlengthPreviewBorder{1em}


    begin{document}
    sffamily
    small
    renewcommand{arraystretch}{1.2}
    begin{tabular}{|p{0.4textwidth} % determine column width to your wish
    |p{0.1textwidth}
    |p{0.15textwidth}
    |p{0.15textwidth}
    |p{0.20textwidth}|
    }
    hline
    multicolumn{5}{|c|}{Crop field location info}\
    hline
    District name &
    multicolumn{2}{|c|}{Tehsil name}
    & UC name & UC # \[2em]
    hline
    multicolumn{5}{|c|}{Farmer's info} \
    hline
    Farmer name &
    multicolumn{2}{|c|}{Farmer contract #}
    &
    multicolumn{2}{|c|}{Farmer's Land holdings (acres)} \[2em]
    hline
    Item & Unit & Quality & Rate/Unit & All cost \
    hline
    % repeat regarding to your table contents ...
    multicolumn{1}{|c}{}
    &
    multicolumn{4}{ c|}{Land preparation cost} \
    hline
    Ploughing & planking (Bullocks)
    & Rs./Hr & & & \
    hline
    etc & & & & \
    hline
    end{tabular}
    end{document}


    enter image description here






    share|improve this answer




























      1














      Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:



      documentclass{article}

      %just for show only a table
      usepackage[active,tightpage]{preview}
      PreviewEnvironment{tabular}
      setlengthPreviewBorder{1em}


      begin{document}
      sffamily
      small
      renewcommand{arraystretch}{1.2}
      begin{tabular}{|p{0.4textwidth} % determine column width to your wish
      |p{0.1textwidth}
      |p{0.15textwidth}
      |p{0.15textwidth}
      |p{0.20textwidth}|
      }
      hline
      multicolumn{5}{|c|}{Crop field location info}\
      hline
      District name &
      multicolumn{2}{|c|}{Tehsil name}
      & UC name & UC # \[2em]
      hline
      multicolumn{5}{|c|}{Farmer's info} \
      hline
      Farmer name &
      multicolumn{2}{|c|}{Farmer contract #}
      &
      multicolumn{2}{|c|}{Farmer's Land holdings (acres)} \[2em]
      hline
      Item & Unit & Quality & Rate/Unit & All cost \
      hline
      % repeat regarding to your table contents ...
      multicolumn{1}{|c}{}
      &
      multicolumn{4}{ c|}{Land preparation cost} \
      hline
      Ploughing & planking (Bullocks)
      & Rs./Hr & & & \
      hline
      etc & & & & \
      hline
      end{tabular}
      end{document}


      enter image description here






      share|improve this answer


























        1












        1








        1







        Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:



        documentclass{article}

        %just for show only a table
        usepackage[active,tightpage]{preview}
        PreviewEnvironment{tabular}
        setlengthPreviewBorder{1em}


        begin{document}
        sffamily
        small
        renewcommand{arraystretch}{1.2}
        begin{tabular}{|p{0.4textwidth} % determine column width to your wish
        |p{0.1textwidth}
        |p{0.15textwidth}
        |p{0.15textwidth}
        |p{0.20textwidth}|
        }
        hline
        multicolumn{5}{|c|}{Crop field location info}\
        hline
        District name &
        multicolumn{2}{|c|}{Tehsil name}
        & UC name & UC # \[2em]
        hline
        multicolumn{5}{|c|}{Farmer's info} \
        hline
        Farmer name &
        multicolumn{2}{|c|}{Farmer contract #}
        &
        multicolumn{2}{|c|}{Farmer's Land holdings (acres)} \[2em]
        hline
        Item & Unit & Quality & Rate/Unit & All cost \
        hline
        % repeat regarding to your table contents ...
        multicolumn{1}{|c}{}
        &
        multicolumn{4}{ c|}{Land preparation cost} \
        hline
        Ploughing & planking (Bullocks)
        & Rs./Hr & & & \
        hline
        etc & & & & \
        hline
        end{tabular}
        end{document}


        enter image description here






        share|improve this answer













        Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows:



        documentclass{article}

        %just for show only a table
        usepackage[active,tightpage]{preview}
        PreviewEnvironment{tabular}
        setlengthPreviewBorder{1em}


        begin{document}
        sffamily
        small
        renewcommand{arraystretch}{1.2}
        begin{tabular}{|p{0.4textwidth} % determine column width to your wish
        |p{0.1textwidth}
        |p{0.15textwidth}
        |p{0.15textwidth}
        |p{0.20textwidth}|
        }
        hline
        multicolumn{5}{|c|}{Crop field location info}\
        hline
        District name &
        multicolumn{2}{|c|}{Tehsil name}
        & UC name & UC # \[2em]
        hline
        multicolumn{5}{|c|}{Farmer's info} \
        hline
        Farmer name &
        multicolumn{2}{|c|}{Farmer contract #}
        &
        multicolumn{2}{|c|}{Farmer's Land holdings (acres)} \[2em]
        hline
        Item & Unit & Quality & Rate/Unit & All cost \
        hline
        % repeat regarding to your table contents ...
        multicolumn{1}{|c}{}
        &
        multicolumn{4}{ c|}{Land preparation cost} \
        hline
        Ploughing & planking (Bullocks)
        & Rs./Hr & & & \
        hline
        etc & & & & \
        hline
        end{tabular}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 23 '15 at 9:29









        ZarkoZarko

        127k868165




        127k868165























            1














            You could use the multicol package for this task. Here I have an example of the first few rows:



            documentclass{article}
            usepackage{multicol}

            begin{document}

            begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| }
            hline
            multicolumn{5}{|c|}{textbf{Crop field location info}} \
            hline
            textbf{District name} & multicolumn{2}{ |c| }{textbf{Tehsil name}}
            & textbf{UC name} & textbf{UC #}\
            & multicolumn{2}{ |c| }{} & &\
            hline
            multicolumn{5}{|c|}{textbf{Farmer's info}} \
            hline
            textbf{Farmer name} & multicolumn{2}{|c|}{textbf{Farmer contact #}}
            & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
            & multicolumn{2}{ |c| }{} & multicolumn{2}{ |c| }{} \
            hline
            textbf{Item} & textbf{Unit} & textbf{Quantity} & textbf{Rate/Unit} & textbf{Total Cost}\
            hline
            & multicolumn{4}{ c| }{textbf{Land preparation cost}} \
            hline
            Ploughing & planking (Bullocks) & Rs./hr & & & \
            hline
            Leveling (Bullocks) & Rs./hr & & & \
            hline
            end{tabular}

            end{document}


            More information on the correct usage can be found at latex_tables






            share|improve this answer


























            • there is no need to multicol package

              – touhami
              Jun 23 '15 at 7:03











            • @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

              – lenxn
              Jun 23 '15 at 9:05
















            1














            You could use the multicol package for this task. Here I have an example of the first few rows:



            documentclass{article}
            usepackage{multicol}

            begin{document}

            begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| }
            hline
            multicolumn{5}{|c|}{textbf{Crop field location info}} \
            hline
            textbf{District name} & multicolumn{2}{ |c| }{textbf{Tehsil name}}
            & textbf{UC name} & textbf{UC #}\
            & multicolumn{2}{ |c| }{} & &\
            hline
            multicolumn{5}{|c|}{textbf{Farmer's info}} \
            hline
            textbf{Farmer name} & multicolumn{2}{|c|}{textbf{Farmer contact #}}
            & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
            & multicolumn{2}{ |c| }{} & multicolumn{2}{ |c| }{} \
            hline
            textbf{Item} & textbf{Unit} & textbf{Quantity} & textbf{Rate/Unit} & textbf{Total Cost}\
            hline
            & multicolumn{4}{ c| }{textbf{Land preparation cost}} \
            hline
            Ploughing & planking (Bullocks) & Rs./hr & & & \
            hline
            Leveling (Bullocks) & Rs./hr & & & \
            hline
            end{tabular}

            end{document}


            More information on the correct usage can be found at latex_tables






            share|improve this answer


























            • there is no need to multicol package

              – touhami
              Jun 23 '15 at 7:03











            • @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

              – lenxn
              Jun 23 '15 at 9:05














            1












            1








            1







            You could use the multicol package for this task. Here I have an example of the first few rows:



            documentclass{article}
            usepackage{multicol}

            begin{document}

            begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| }
            hline
            multicolumn{5}{|c|}{textbf{Crop field location info}} \
            hline
            textbf{District name} & multicolumn{2}{ |c| }{textbf{Tehsil name}}
            & textbf{UC name} & textbf{UC #}\
            & multicolumn{2}{ |c| }{} & &\
            hline
            multicolumn{5}{|c|}{textbf{Farmer's info}} \
            hline
            textbf{Farmer name} & multicolumn{2}{|c|}{textbf{Farmer contact #}}
            & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
            & multicolumn{2}{ |c| }{} & multicolumn{2}{ |c| }{} \
            hline
            textbf{Item} & textbf{Unit} & textbf{Quantity} & textbf{Rate/Unit} & textbf{Total Cost}\
            hline
            & multicolumn{4}{ c| }{textbf{Land preparation cost}} \
            hline
            Ploughing & planking (Bullocks) & Rs./hr & & & \
            hline
            Leveling (Bullocks) & Rs./hr & & & \
            hline
            end{tabular}

            end{document}


            More information on the correct usage can be found at latex_tables






            share|improve this answer















            You could use the multicol package for this task. Here I have an example of the first few rows:



            documentclass{article}
            usepackage{multicol}

            begin{document}

            begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| }
            hline
            multicolumn{5}{|c|}{textbf{Crop field location info}} \
            hline
            textbf{District name} & multicolumn{2}{ |c| }{textbf{Tehsil name}}
            & textbf{UC name} & textbf{UC #}\
            & multicolumn{2}{ |c| }{} & &\
            hline
            multicolumn{5}{|c|}{textbf{Farmer's info}} \
            hline
            textbf{Farmer name} & multicolumn{2}{|c|}{textbf{Farmer contact #}}
            & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \
            & multicolumn{2}{ |c| }{} & multicolumn{2}{ |c| }{} \
            hline
            textbf{Item} & textbf{Unit} & textbf{Quantity} & textbf{Rate/Unit} & textbf{Total Cost}\
            hline
            & multicolumn{4}{ c| }{textbf{Land preparation cost}} \
            hline
            Ploughing & planking (Bullocks) & Rs./hr & & & \
            hline
            Leveling (Bullocks) & Rs./hr & & & \
            hline
            end{tabular}

            end{document}


            More information on the correct usage can be found at latex_tables







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 23 '15 at 9:11

























            answered Jun 23 '15 at 7:01









            lenxnlenxn

            153210




            153210













            • there is no need to multicol package

              – touhami
              Jun 23 '15 at 7:03











            • @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

              – lenxn
              Jun 23 '15 at 9:05



















            • there is no need to multicol package

              – touhami
              Jun 23 '15 at 7:03











            • @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

              – Muhammad Toseef
              Jun 23 '15 at 8:21











            • I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

              – lenxn
              Jun 23 '15 at 9:05

















            there is no need to multicol package

            – touhami
            Jun 23 '15 at 7:03





            there is no need to multicol package

            – touhami
            Jun 23 '15 at 7:03













            @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

            – Muhammad Toseef
            Jun 23 '15 at 8:21





            @lenxn I wrote the below code so far but I don't know what to do for column division for below the 'Farmer contact #' and 'Farmer's Land holding (coloumns)'. The code is in the next comment.

            – Muhammad Toseef
            Jun 23 '15 at 8:21













            begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

            – Muhammad Toseef
            Jun 23 '15 at 8:21





            begin{tabular}{ |p{5cm}|p{4cm}|p{3cm}|p{3cm}| } hline multicolumn{4}{|c|}{textbf{Crop field location info}} \ hline textbf{District name} & textbf{Tehsil name} & textbf{UC name} & textbf{UC #}\ & & &\ hline multicolumn{4}{|c|}{textbf{Farmer's info}} \ hline textbf{Farmer name} & textbf{Farmer contact #} & multicolumn{2}{ |c| }{textbf{Farmer's land holding (acres)}} \ & & multicolumn{2}{ |c| }{} \ hline textbf{Item} & textbf{Unit} & textbf{Rate/Unit} & textbf{Total Cost}\ hline end{tabular}

            – Muhammad Toseef
            Jun 23 '15 at 8:21













            I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

            – lenxn
            Jun 23 '15 at 9:05





            I just noticed, that most of the table has five columns, so i think the best way to go is to use a tabular with initially five columns. I have updated my code example accordingly.

            – lenxn
            Jun 23 '15 at 9:05


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f251648%2ftable-with-multirow-and-multicolumn%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt