1

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.
9
  • 1
    Can you provide a .lyx minimal example? (a .lyx file is just a text file so you can copy/paste and post as code). For more information, see: wiki.lyx.org/FAQ/MinimalExample
    – scottkosty
    Jun 2, 2016 at 5:35
  • That would definitely help a lot. What makes a good MWE meta.tex.stackexchange.com/q/3343/90087 might be of help.
    – A Feldman
    Jun 2, 2016 at 5:37
  • if your error is about a missing }for \textenglish what makes you think the problem is the table? Please provide an example. using \resizebox around tables should be a last resort it leads to inconsistent font sizes, better to specify the table columns so they are not wider than the page an no scaling is required. Jun 2, 2016 at 7:06
  • 1
    If you have to use \resizebox (which you mostly don't want to, cf. David's comment), it should be placed inside the table float, surrounding only the table itself, not the containing environment and caption. Jun 2, 2016 at 7:53
  • 1
    @scottkosty Done (a little while ago now.) Jun 3, 2016 at 13:22

1 Answer 1

1

Your .lyx file doesn't seem to show this, but the error message you posted indicate where things went wrong:

Runaway argument?
{\noindent \resizebox {\textwidth }{!}{\begin {table} \begin {tabular\ETC.

This tells me that you put the \resizebox around both the floating container (\begin{table} in the code) and the table itself (\begin{tabular), which is wrong. It should be placed inside the float, surrounding just the table itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.