Latex 错误:扫描 \Gscale@box 的使用时文件结束

Latex 错误:扫描 \Gscale@box 的使用时文件结束

我无法找到此错误的根源。

Overview_page1(传递给 FormattedTable)当前长度为 33 个字符 - 运行我的代码后,它变为 3x11 表。但是,当我将另一列传递给表并将“SSS”更改为“SSSS”时,我尝试运行代码时收到以下错误:

LaTeX 错误:

! File ended while scanning use of \Gscale@box
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.

除了 Overview_page1 的长度之外,我没有更改任何内容,所以我不知道缺少哪个括号。这是我从 FormattedTable 中获取的带有 33 个长度列表的输出:

\scalebox{1}{
\begin{tabular}{lcc}
  \rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & \textcolor{white}{FY2017} & \textcolor{white}{FY2016} \\ 
  \rowcolor[rgb]{0.87451,0.90588,0.96078} Total & 1 & 5 \\ 
  Notion & 40 & 10 \\ 
Etc.
  \end{tabular}
}

这是长度为 44 的列表:

\scalebox{1}{
\begin{tabular}{lccc}
  \rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & \textcolor{white}{FY2017} & \textcolor{white}{FY2016} & \textcolor{white}{Change} \\ 
  \rowcolor[rgb]{0.87451,0.90588,0.96078}Total & 1 & 5 & 6 \\ 
  Notion & 40 & 10 & 6 \\ 
Etc.
  \end{tabular}
}

谢谢您的帮助!代码已发布如下。

\chapter*{Analysis}
\textsc{\LARGE{Summary
\let\thefootnote\relax\footnotetext{}\let\thefootnote\relax\footnotetext{
}}}

\vspace{2mm}
\begin{center}

<<capValue1, echo = FALSE, results = 'asis', include=TRUE>>=
cat(Caption2(paste(CaptionCount,". Overview",sep=""),"Comparison",TextWidth="18.5cm"))
CaptionCount=CaptionCount+1;
@

<<fig1-1,fig.width=20, fig.height=15, out.width='\\linewidth', echo = FALSE, results = 'asis', warning=FALSE, error=FALSE, fig.align='right'>>=
FormattedTable(Overview_page1,"SSS",Title=TRUE,Total=FALSE,ROWNAMES=FALSE,Size=1,AlignmentOveride=NULL)
@

\end{center}
\pagebreak 

答案1

在此处输入图片描述

\documentclass{article}

\usepackage{colortbl,graphicx,tikz}
\definecolor{X}{rgb}{.5,.5,.5}
\begin{document}

\begin{center}
\tikz
\draw (0,0)node[rectangle, minimum height = 0.5 cm, minimum width = \linewidth ,
fill = X, text width = 18.5cm , align = left] 
{\textcolor{white}{ 1. Overview \\*
\scriptsize{ Comparison }}};
\scalebox{1}{ 
\begin{tabular}{lccc} 
\rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & 
\textcolor{white}{FY2017} & \textcolor{white}{FY2016} &
%NO!!!!!\textcolor{white}{% Change}
\textcolor{white}{\% Change} 
\\ \rowcolor[rgb]{0.87451,0.90588,0.96078}Total & 1 & 5 & -6\% \\
 Total & 4 & 1 & -6\% \\ \end{tabular} }
 \end{center} \pagebreak 
\end{document}

您需要使用\%来获取%,因为您已经注释掉了一个}

相关内容