I have a csv file, keywords_table.csv
. I made it in Excel. Here it is:
Keyword Category,Number of keywords used in searches,Examples
Names of drugs,111,"tamoxifen, aspirin, tamiflu"
Names of categories,15,"cancer drug, NSAID, flu vaccine"
"Synonyms for ""child"" and ""pediatric""",11,"pediatric, child, prepubertal, adolescent, teenage, early life, kid"
Names of physiological systems,47,"urinary, hematologic, cardiovascular, musculoskeletal, endocrine, sensory, reproductive, skin, salivary"
Names and synonyms of adverse drug reactions,10,"adverse event, adverse reaction, side effect, adverse drug reaction, AE, ADR, ADE"
Exclusion terms,5,"mouse, mice, rat, animal model, scale, addict"
My goal: put a table in my LaTeX document. I'd like to do it with a separate csv file, since that's easier to update for me in other software instead of having to change values manually inside a standard Latex table.
I've been trying for a few hours now to use csvsimple
to do so, but I haven't succeeded. I've read through that package's documentation and various examples online to try and get this thing to work, but no dice. I'm very much a LaTeX novice, so I apologize if this is a trivial question.
My LaTeX workflow is MikTex on Windows 10 Pro, and I'm using TexMaker. I'm rendering with XeLaTeX and BibTex. Here's the code I use to try and get the table going with csvautotabular
, including my preamble:
\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\MakeOuterQuote{"}
\usepackage{csvsimple}
\usepackage{longtable}
%\usepackage{tikz}
%\usepackage{pgf}
\usepackage{graphicx}
%\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{fullpage}
\usepackage{setspace}
\usepackage{fontspec}
\setmainfont{Adobe Garamond Pro}
\usepackage{color,soul}
\usepackage[left]{lineno}
\linenumbers
\doublespacing
\usepackage{anysize}
\usepackage[
backend=biber,
style=apa
]{biblatex}
\addbibresource{C:/stuff/bib.bib}
\title{HEY LOOK A TITLE}
\author{ME}
\begin{document}
\maketitle
\csvautotabular{keywords_table.csv}
\printbibliography
\end{document}
The code executes perfectly well if I remove \csvautotabular{keywords_table.csv}
. That's all I'm trying to do. I don't care about formatting or anything.
Here's a screenshot of the litany of error messages that TexMaker spits back to me when I try to run XeLaTeX:
These are uninterpretable to me. Where is it inserting anything? I've gone through my whole document to see if there were missing {'s or }'s to no avail. Like I said, the document runs without the \csvautotabular
line.
Sorry again for this. I'd be very grateful for any help.