1

Editing so that code should be compilable - I am listing all packages, to check for conflicts (but I don't think there should be any), and I am also leaving out the references so that you can compile without my .bib file, which shouldn't impact anything. I've commented out fontspec because it's there, but it chucked up an error with specified fonts, and you are either unlikely to have mine or they may be saved as something different.

I've tried a number of solutions, no luck. It's a very simple table (though I have more complicated ones elsewhere - I have gotten things to work before but I seem to have deleted the document, for another task).

%! TEX program = xelatex
\documentclass[a4paper, titlepage]{book}

\usepackage[utf8]{inputenc}
\usepackage[T1,LGR]{fontenc}
%\usepackage{fontspec}
\usepackage[overlap, CJK]{ruby}
\usepackage{listings}
\usepackage[style=british]{csquotes}
\usepackage{xpatch}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{ot-tableau}
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[bibencoding=utf8, backend=biber, style=authoryear-icomp, language=british]{biblatex}
\usepackage{easylist}
\usepackage{hyperref}
\usepackage{memhfixc}
\usepackage[nameinlink,noabbrev,capitalize]{cleveref}
\usepackage[nonumberlist,style=tree,abbreviations,xindy,toc]{glossaries-extra}
\usepackage{blindtext}
\usepackage{cgloss4e}
\usepackage{enumerate}
\usepackage{longtable}
\usepackage{textgreek}
\usepackage{booktabs, siunitx}
\usepackage{tabulary}
\usepackage{multirow}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{wrapfig}
\usepackage{chngcntr}
\usepackage{tablefootnote}
\usepackage[tableposition=above]{caption}
\usepackage{imakeidx}
\usepackage{xltxtra}
\usepackage{gb4e} %Ensure this is the last \usepackage

\sloppy

\begin{document}

\begin{table*}
    \centering
    \caption{Some of the events reported during muscular paralysis caused by curare injection.}
    \begin{tabulary}{\textwidth}{ll}
        \toprule
        2:11 PM: & Curare injection administered over 15 minutes.\marginpar{All events are direct quotes or paraphrases of the original report.} \\
        2:20: & Speech no longer possible. Can hear distinctly. Still able to nod head and move hands. \\
        2:22: & Subject reports by movement of head that the experience is not unpleasant. \\
        2:26: & Ability to comprehend and answer questions accurately is indicated by correctness of replies when inquiries are restated in the negative or double negative. \\
        2:45: & Subject now unable to signal response to inquiries due to complete paralysis. \\
        2:48: & Eyelids manually opened. Subject stated upon recovery that he was `clear as a bell' all this period. \\
        4:50: & Subjects is able to sit up on edge of bed. Complete subjective report dictated. \\ \bottomrule
    \end{tabulary}
\end{table*}

\end{document}

Thank you!

  • Welcome to TeX SX! Could you post a complete, compilable, code? – Bernard Feb 21 '19 at 20:18
  • Use \begin{tabulary}{\textwidth}{lL} instead of \begin{tabulary}{\textwidth}{ll}? – leandriis Feb 21 '19 at 21:08
  • Off-topic, but what do you think about \parencites[from][1-14]{smithbrowntomangoodman1947}[cited and adapted][18-19]{psylingtraxler} instead of the \mkbibparens{\cites[\nopp pp.]...}? (\nopp pp. in particular just looks odd.) – moewe Feb 21 '19 at 21:18
  • Done, @Bernard. – Kartöfluvofan Feb 21 '19 at 21:24
  • @leandriis When I do that, the table fails to print. – Kartöfluvofan Feb 21 '19 at 21:28
  • @moewe Yes, that does look better. The reason I have \nopp is that I frequently end up having something else in there, and I'm lazy and just wanted to memorise one keybinding. – Kartöfluvofan Feb 21 '19 at 21:28
  • Off-topic again: You may want to clean up your preamble a bit. Do you need all the packages you load? Do you know why you load each package? Note that TEX program = xelatex suggests that you compile with XeLaTeX. But with XeLaTeX you should not load inputenc and fontenc (cf. https://tex.stackexchange.com/q/2984/). Note that with Western European languages polyglossia offers little to no advantage over babel (but biblatex and csquotes have issues detecting language variants with polyglossia), so I would recommend babel. hyperref and cleveref should usually be loaded last. – moewe Feb 21 '19 at 21:31
  • @Kartöfluvofan: If I try to compile the code you posted in your question, I get an error message 'Not in outer par mode.' which is due to the \marginpar command in the table. You might want to consider loading the marginnote package and replace \marginpar{ by \marginnote{. This will make the code compilable. Genreally, do not look at the output if you recieve an error message, but (try to) fix the error. – leandriis Feb 21 '19 at 21:31
  • 1
    you have used \begin{tabulary}{\textwidth}{ll} l columns are always single line, and tabularly requores paragraph columsn, use LL not ll – David Carlisle Feb 21 '19 at 21:33
  • your example produces a tex error ! LaTeX Error: Not in outer par mode. – David Carlisle Feb 21 '19 at 21:35
  • 1
    never use \usepackage[T1,LGR]{fontenc} with xetex – David Carlisle Feb 21 '19 at 21:35
  • @moewe For fontenc and inputenc, that is my bad. I have been told this before, but forgot to do so. As for the packages, I usually do end up using all of them, yes, but in this case, memhfixc, blindtext, and textgreek can be removed. I often have Greek, Cyrillic, and CJK, and sometimes with other scripts such as Armenian or Devanāgarī (in some contexts these can be Romanised without the script, in others not). As an off-topic myself, I may have to write something on Luwian soon, and I've honestly no clue how I'm going to go about that. Thanks for the recommendations. – Kartöfluvofan Feb 21 '19 at 21:39
  • @DavidCarlisle I had tried LL before, which failed to print, as did lL. However, I have rearranged and cleaned my preamble as recommended by everyone, (except for keeping polyglossia - Should I load this third to last, or is there another recommendation for how to deal with the unusual requirement for it?) and the document now compiles, with the text wrapped. I'm happy to refiddle with it again later in case anyone is simply curious as to which exact issue it was.. – Kartöfluvofan Feb 21 '19 at 21:48
  • Mhhh, if you are writing in other languages I can't say for sure that babel is better than polyglossia. I can say that polyglossia development has effectively stalled and that babel development has been taken up again. Furthermore you seem to be in linguistics or a related field and so I assume you only need the foreign languages for short examples/glosses and don't want to localise your document in those languages. In that case I think a modern babel should be good enough. – moewe Feb 22 '19 at 08:03
  • @mowe If I order as you advised, but with qtree added before gb4e, I get a 'missing number, treated as zero' and a \begin{document} is missing error for babel.sty - I have circumnavigated it by moving babel to be loaded sooner, which has fixed the issue, but now I am getting issues with biblatex 'Patching footnotes failed. Footnote detection will not work.'

    I'll do some fiddling later, but I guessed you might immediately know of a cause.

    – Kartöfluvofan Feb 24 '19 at 17:15

1 Answers1

1

tabulary requires an L C or R column to do anything useful, l columns are always single line, also you can not have a \marginpar inside a table.

\documentclass[a4paper, titlepage]{book}

\usepackage{tabulary,booktabs}
\sloppy

\begin{document}

\begin{table}
    \centering
    \caption{Some of the events reported during muscular paralysis caused by curare injection.}

    \begin{tabulary}{\textwidth}{lL}
        \toprule
        2:11 PM: & Curare injection administered over 15 minutes. \\
        2:20: & Speech no longer possible. Can hear distinctly. Still able to nod head and move hands. \\
        2:22: & Subject reports by movement of head that the experience is not unpleasant. \\
        2:26: & Ability to comprehend and answer questions accurately is indicated by correctness of replies when inquiries are restated in the negative or double negative. \\
        2:45: & Subject now unable to signal response to inquiries due to complete paralysis. \\
        2:48: & Eyelids manually opened. Subject stated upon recovery that he was `clear as a bell' all this period. \\
        4:50: & Subjects is able to sit up on edge of bed. Complete subjective report dictated. \\ \bottomrule
    \end{tabulary}

\end{table}

\end{document}
David Carlisle
  • 757,742
  • Why not add the marginnote package in order to allow for the usage of a marginnote in the tabular? – leandriis Feb 21 '19 at 21:45
  • @leandriis I have done that in my local copy. Thanks. I may change it to a footnote, which is more in line with the rest of my document, I originally formatted as a marginpar because this is how Traxler has it (I mostly use marginpars to note to myself things that are taken out of end copies...) – Kartöfluvofan Feb 21 '19 at 21:57
  • @leandriis partly as I had forgotten about that and partly to concentrate on removing errors and focussing on the question in the title (but yes that's a good idea:-) – David Carlisle Feb 21 '19 at 21:59