Graphics, Figures & TablesCSVReader[] with multicolumn

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
snorte
Posts: 3
Joined: Thu Feb 01, 2018 3:02 pm

CSVReader[] with multicolumn

Post by snorte »

I would like to create this table imported by csv file. My problem is to create some multicolumn in the table. Like this:
Table example
Table example
latex_tab.png (23.03 KiB) Viewed 5840 times

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{longtable}
\usepackage{csvsimple}
\usepackage[landscape, margin=3cm,left=1cm]{geometry}%\usepackage{lscape} %pacote pagina horizontal
%\usepackage{adjustbox}
\usepackage{tabularx}
% \usepackage{longtable}
\usepackage{array,longtable}
%permite centrar os dados ao centro da tabela
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
%encoding
%--------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{graphicx}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\chead{\includegraphics[width=12cm]{logotipo_novo.png}}
\usepackage{color}
%--------------------------------------
%Portuguese-specific commands
%--------------------------------------
\usepackage[portuguese]{babel}
%--------------------------------------
%Hyphenation rules
%--------------------------------------
\usepackage{hyphenat}
\hyphenation{mate-mática recu-perar}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thank you very much for the help

Stéphane

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

CSVReader[] with multicolumn

Post by Stefan Kottwitz »

Hi Stéphane,

welcome to the forum!

Can you please also post the CSV file as .txt document, so we can test it with that table?

Stefan
LaTeX.org admin
snorte
Posts: 3
Joined: Thu Feb 01, 2018 3:02 pm

CSVReader[] with multicolumn

Post by snorte »

mat.csv
CSV
(4.84 KiB) Downloaded 347 times
Thanks,

Stéphane
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

CSVReader[] with multicolumn

Post by Stefan Kottwitz »

Hi Stéphane,

I tested but it seems to be challenging. I don't have much time as I'm traveling now. But I can recommend to use the pgfplotstable package (click the link to get the package page with the manual). See for example the section 2.3 Configuring Row Appearance: Styles.

But I really would not add such a lot of redundant information in every second row, it doesn't make reading easier and takes space.

Stefan
LaTeX.org admin
snorte
Posts: 3
Joined: Thu Feb 01, 2018 3:02 pm

CSVReader[] with multicolumn

Post by snorte »

Hi Stefan,

I know its not easy to make it. I will check the pgfplotstable. If somebody have others ideas or sugestions? The ideas its to read from a csv files information and to organize the date in a table with latex.

Thanks a lot
Post Reply