0

I am trying to create a quite long table that will also contain citations inside, but the \breakcites macro apparently does not work inside tabular environment. Placing \citep inside \makecell does not work, either.

Here is MWE: (I am using XeLaTeX)

\documentclass[fontsize=12pt]{scrbook}
\usepackage[paperwidth=8.5in, paperheight=11in, top=1.88in, bottom=1.25in, left=1.25in, right=1.13in]{geometry}
\usepackage{newlfont}
\usepackage{epstopdf}
\usepackage[utf8]{inputenc}
\allowdisplaybreaks

\usepackage{breakcites}
\usepackage{longtable}
\usepackage{setspace}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\pagestyle{plain}
%\usepackage[style=authoryear,backend=biber]{biblatex} 

\usepackage[natbibapa]{apacite}
\bibliographystyle{apacite}

\doublespacing
\usepackage{times}

\begin{document}

\begin{longtable}{ll}
\caption{Summary of relevant computational parameters from various computational studies. This table is modified from \cite{Rojas}.}
\hline
Computational parameter            & Utilized parameter \\ 
\hline
Program                            & \begin{tabular}[c]{@{}l@{}}\makecell{Spanish Initiative for Electronic Simulation with \\ Thousands of Atoms (SIESTA) \citep{lopezcorral,Sigal}} \\  \\ Vienna Ab-Inito Simulation Package (VASP) \\ \citep{Gurel,Rojas,ZhouMiao,Li2015,ChiChen} \\ Gaussian 09 \\ \citep{Gholami2016,Rad} \\ Quantum Espresso \\ \citep{Khodadadi,Wong} \\ DMol3 \citep{Jungsuttiwong} \end{tabular}                     \\
\hline
\end{longtable}

\bibliography{biblio}

\end{document}

I used a separate bib file for the references. Here is screenshot of what happens when I compile the code above:

enter image description here

Is there a way to force line breaks at the \citep?

Note: I know the tabular inside tabular is not the optimal way to do stuff but I did not change it to another form since the output looks nice, and I don't think it has something to do with the problem. I have tried a cleaner code but the same problem arises.

epR8GaYuh
  • 2,432
r302839
  • 13
  • 1
    AFAICS this is not specific to \citep it would happen with every other text as well. l columns in tables never automatically break lines, instead they expand to the natural width of their content. You could use p columns (but would need to give a fixed length, i.e. p{2cm} instead of just l). But that would give you justified text, which you may not like, in which case you may be interested in https://tex.stackexchange.com/q/12703/35864. If you don't want to give the column width manually, you may want to look at tabularx's X columns. – moewe Oct 17 '19 at 05:26
  • @moewe the solution at the link worked! would you like to post this as separate answer? – r302839 Oct 17 '19 at 05:38
  • 1
    Do you want me to type up an answer or would you also be OK with marking this question as a duplicate? – moewe Oct 17 '19 at 05:49
  • I am okay with marking this as duplicate to direct them to the link you shared a while ago. – r302839 Oct 17 '19 at 05:59

0 Answers0