Skip to main content
3 of 4
completeness
lf_araujo
  • 841
  • 1
  • 8
  • 22

Table keeps going off the text width

I have been using LyX 2.1.4 on Manjaro Linux. LyX works great and I get great quality work done on it, however what keeps me from moving my workflow into LyX is this annoying problem with tables. If they are a bit complex, they keep going off the text limits.

I did my research and similar question has been made on this site: 1,2, 3, 4. This last one was even marked as duplicate.

What is different in my case? None of the solutions previously proposed worked. It seems the most common solution has been adding

\noindent\resizebox{\textwidth}{!}{% 

before the table and

} 

after it.

This results in compilation error with exit:

Emergency stop: File ended while scanning use of \\textenglish. <*> Progress_report_later.tex *** (job aborted, no legal \end found) 

Also, I am expecting a LyX answer, not a pure LaTeX one. Is it possible to fix this in LyX?

Edit 2.Jun Thanks for the comments, I followed instructions to have a MWE, however after anonymizing the fields and reducing the text I was unable to reproduce the same error.

Here is a little more information before reducing the text:

[28]) Runaway argument? {\noindent \resizebox {\textwidth }{!}{\begin {table} \begin {tabular\ETC. ! File ended while scanning use of \\textenglish. <inserted text> \par <*> Progress_report_later.tex I suspect you have forgotten a `}', causing me to read past where you wanted me to stop. I'll try to recover; but if the error is serious, you'd better type `E' or `X' now and fix your file. ! Emergency stop. <*> Progress_report_later.tex *** (job aborted, no legal \end found) Here is how much of TeX's memory you used: 22263 strings out of 493668 428192 string characters out of 6150756 662734 words of memory out of 5000000 25355 multiletter control sequences out of 15000+600000 10559 words of font info for 80 fonts, out of 8000000 for 9000 1328 hyphenation exceptions out of 8191 61i,11n,75p,21755b,552s stack positions out of 5000i,500n,10000p,200000b,80000s Output written on Progress_report_later.pdf (28 pages). 

Here is the .lyx after obfuscating sensitive info:

#LyX 2.1 created this file. For more info see http://www.lyx.org/ \lyxformat 474 \begin_document \begin_header \textclass scrartcl \begin_preamble %%% LaTeX Template %%% This template can be used for both articles and reports. %%% %%% Copyright: http://www.howtotex.com/ %%% Date: February 2011 %%% Preamble % Article class of KOMA-script with 11pt font and a4 format \usepackage{multicol} \usepackage[english,portuguese]{babel} % English language/hyphenation \usepackage{fontspec} \usepackage[left,modulo]{lineno} \usepackage[protrusion=true]{microtype}% Better typography \usepackage{amsfonts}\usepackage{amsthm}% Math packages % Enable pdflatex %\usepackage{color,transparent} % If you use color and/or transparency \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}% Custom captions under/above floats \usepackage{epstopdf}% Converts .eps to .pdf % Subfigures \usepackage{booktabs}% Nicer tables %%% Advanced verbatim environment \usepackage{fancyvrb}\DefineShortVerb{\|} % delimiter to display inline verbatim text %%% Custom sectioning (sectsty package) \usepackage{sectsty}% Custom sectioning (see below) \allsectionsfont{% % Change font of al section commands %\usefont{OT1}{bch}{b}{n} % bch-b-n: CharterBT-Bold font %\hspace{15pt} % Uncomment for indentation } \sectionfont{% % Change font of \section command %\usefont{OT1}{bch}{b}{n}% % bch-b-n: CharterBT-Bold font %\sectionrule{0pt}{0pt}{-5pt}{0.8pt}% % Horizontal rule below section } %%% Custom headers/footers (fancyhdr package) \usepackage{fancyhdr} \fancyhead{} % No page header \fancyfoot[C]{\thepage} % Pagenumbering at center of footer \fancyfoot[R]{\small \texttt{HowToTeX.com}} % You can remove/edit this line \renewcommand{\headrulewidth}{0pt} % Remove header underlines \renewcommand{\footrulewidth}{0pt} % Remove footer underlines \setlength{\headheight}{13.6pt} %%% Equation and float numbering \numberwithin{equation}{section} % Equationnumbering: section.eq# \numberwithin{figure}{section} % Figurenumbering: section.fig# \numberwithin{table}{section} % Tablenumbering: section.tab# %%% Title \title{ \vspace{-1in} %\usefont{OT1}{bch}{b}{n} \huge \strut xxx \strut \\ \large \bfseries \strut \strut } \author{ \large xxx\\ %\usefont{OT1}{bch}{m}{n} \large The University of xxx\\ %\usefont{OT1}{bch}{m}{n} \large Department of xx\\ \small \texttt{lxxx} } %%% Begin document \end_preamble \use_default_options false \begin_modules fixltx2e minimalistic \end_modules \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding default \font_roman Charter \font_sans Fira Sans \font_typewriter Fira Mono \font_math auto \font_default_family default \use_non_tex_fonts true \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize 12 \spacing other 1.03 \use_hyperref false \papersize default \use_geometry false \use_package amsmath 2 \use_package amssymb 2 \use_package cancel 1 \use_package esint 1 \use_package mathdots 0 \use_package mathtools 1 \use_package mhchem 0 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date true \justification true \use_refstyle 0 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation skip \defskip 1.5text% \quotes_language swedish \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Section \lang australian Summary and brief timeline \end_layout \begin_layout Standard \begin_inset Float table wide false sideways false status open \begin_layout Plain Layout \begin_inset Tabular <lyxtabular version="3" rows="3" columns="7"> <features rotate="0" tabularvalignment="middle"> <column alignment="left" valignment="top" width="0pt"> <column alignment="center" valignment="top" width="0pt"> <column alignment="center" valignment="top" width="0pt"> <column alignment="center" valignment="top" width="0pt"> <column alignment="center" valignment="top" width="0pt"> <column alignment="center" valignment="top"> <column alignment="center" valignment="top" width="0pt"> <row> <cell alignment="left" valignment="top" topline="true" bottomline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small Model \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series bold \shape up \size small \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none N \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series bold \shape up \size small \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none df \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series bold \shape up \size small \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none RMSEA \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small CFI \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small Chi-square (p-value) \end_layout \end_inset </cell> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small Chi-square diff (p-value) \end_layout \end_inset </cell> </row> <row> <cell alignment="left" valignment="top" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small Reflective \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XXX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \end_layout \end_inset </cell> </row> <row> <cell alignment="left" valignment="top" bottomline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \series bold \size small MIMIC \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XXX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XXX \end_layout \end_inset </cell> <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none"> \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \strikeout off \uuline off \uwave off \noun off \color none XXX \end_layout \end_inset </cell> </row> </lyxtabular> \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption Standard \begin_layout Plain Layout The fit indices for the semi-equivalent models. df, degrees of freedom; RMSEA, Root Mean Square Error of Approximation; CFI, Confirmatory Fit Index; Chi-square difference, difference between the chi-square of the model with the previous one, followed by the p-value of the chi-square difference test (anova). \end_layout \end_inset \end_layout \end_inset \end_layout \end_body \end_document 

But then the error changes to:

Latex error: Not in outer par mode } You've lost some text. Try typing <return> to proceed. If that doesn't work, type X <return> to quit. 

And:

Undefined control sequence: } The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. 
lf_araujo
  • 841
  • 1
  • 8
  • 22