问题

问题

问题

以下是代码:

\documentclass[a4paper, 12pt]{report}
\usepackage{graphicx}
\usepackage{color} 
\usepackage[a4paper,landscape]{geometry}

\usepackage{spreadtab}


\title{ Dalhousie World Vision Society Budget}
\date{October 14, 2013}
\author{Joseph Harrietha\\ Treasurer, Dalhousie World Vision Society}

\begin{document}
\maketitle
\begin{spreadtab}{{tabular}{l|l|l|l|l|l}}

@ Project       &@Item               &@Quantity   &@Expense &@Notes                         &@Total (Tax Included) (\$)   \\ \midrule
@ Awareness     &@                   &@           &@        &@                              &@                             \\ \cline{2-6}
@               &@Big Posters        &@20         &@27      &@9\$ per sq ft. 3sq ft.        &\STcopy{v}{!c3*!d3*1.15}     \\ \cline{2-6}
@               &@Small Posters      &@50         &@1       &@                              &                             \\ \cline{2-6}
@               &@Brochures          &@200        &@1.50    &@                              &                             \\ \cline{2-6}
@               &@Handouts           &@100        &@1       &@                              &                             \\ \cline{2-6}
@               &@Misc Supplies      &@1          &@50      &@                              &                             \\ \midrule
@30 Hour Famine &@People Attending:  &@20         &@        &@                              &                             \\ \cline{2-6}
@               &@Food               &c8          &@20      &@                              &                             \\ \cline{2-6}
@               &@Activities         &@5          &@25      &@                              &                             \\ \cline{2-6}
@               &@Supplies           &@1          &@100     &@                              &                             \\ \midrule
@Water Run      &@People Attending:  &@No Count   &@        &@Assuming same number as 30HF  &                             \\ \cline{2-6}
@               &@Supplies           &c8          &@10      &@                              &                             \\ \cline{2-6}
@               &@Base Setup         &@1          &@100     &@                              &                             \\ \cline{2-6}
@               &@Shirts             &c8          &@10      &@                              &                             \\ \midrule
@Total          &@                   &@           &         &@                              &@Total Here
\end{spreadtab}
\end{document}

大多数错误都是这样的:“对齐制表符 & 位置错误”

更新

我删除了所有包含数字的单元格上的@,现在我有以下代码:

\documentclass[a4paper, 12pt]{report}
\usepackage{graphicx}
\usepackage{color} 
\usepackage[a4paper,landscape]{geometry}

\usepackage{spreadtab}


\title{ Dalhousie World Vision Society Budget}
\date{October 14, 2013}
\author{Joseph Harrietha\\ Treasurer, Dalhousie World Vision Society}

\begin{document}
\maketitle
\begin{spreadtab}{{tabular}{l|l|l|l|l|l}}

@ Project       &@Item               &@Quantity   &@Expense &@Notes                         &@Total (Tax Included) (\$)   \\ \midrule
@ Awareness     &@                   &@           &@        &@                              &@                             \\ \cline{2-6}
@               &@Big Posters        &20         &27      &@9\$ per sq ft. 3sq ft.        &\STcopy{v}{!c3*!d3*1.15}     \\ \cline{2-6}
@               &@Small Posters      &50         &1       &@                              &                             \\ \cline{2-6}
@               &@Brochures          &200        &1.50    &@                              &                             \\ \cline{2-6}
@               &@Handouts           &100        &1       &@                              &                             \\ \cline{2-6}
@               &@Misc Supplies      &1          &50      &@                              &                             \\ \midrule
@30 Hour Famine &@People Attending:  &20         &        &@                              &                             \\ \cline{2-6}
@               &@Food               &c8         &20      &@                              &                             \\ \cline{2-6}
@               &@Activities         &5          &25      &@                              &                             \\ \cline{2-6}
@               &@Supplies           &1          &100     &@                              &                             \\ \midrule
@Water Run      &@People Attending:  &@No Count  &@       &@Assuming same number as 30HF  &                             \\ \cline{2-6
@               &@Supplies           &c8         &10      &@                              &                             \\ \cline{2-6}
@               &@Base Setup         &@1         &@100    &                               &                             \\ \cline{2-6}
@               &@Shirts             &c8         &10      &@                               &                             \\ \midrule
@Total          &@                   &@          &        &@                              & \\
\end{spreadtab}
\end{document}

这只会产生错误:“扫描 \ST@get@body 的使用时文件结束”

答案1

有一些语法错误,例如\cline{2-6。此外,您必须排除所有没有数量值的列进行计算。正如在评论@cgniederbooktabs不见了。

\documentclass[a4paper, 12pt]{report}
\usepackage{graphicx}
\usepackage{color} 
\usepackage[a4paper,landscape]{geometry}

\usepackage{spreadtab}

\begin{document}

\begin{spreadtab}{{tabular}{l|l|l|l|l|l}}
    @ Project       &@Item               &@Quantity   &@Expense &@Notes                         &@Total (Tax Included) (\$)   \\ %\midrule
    @ Awareness     &@                   &@           &@        &@                              &@                             \\ \cline{2-6}
    @               &@Big Posters        &20         &27      &@9\$ per sq ft. 3sq ft.        &\STcopy{v}{!c3*!d3*1.15}     \\ \cline{2-6}
    @               &@Small Posters      &50         &1       &@                              &                             \\ \cline{2-6}
    @               &@Brochures          &200        &1.50    &@                              &                             \\ \cline{2-6}
    @               &@Handouts           &100        &1       &@                              &                             \\ \cline{2-6}
    @               &@Misc Supplies      &1          &50      &@                              &                             \\ %\midrule
    @30 Hour Famine &@People Attending:  &20         &        &@                              &@                             \\ \cline{2-6}
    @               &@Food               &c8         &20      &@                              &                             \\ \cline{2-6}
    @               &@Activities         &5          &25      &@                              &                             \\ \cline{2-6}
    @               &@Supplies           &1          &100     &@                              &                             \\ %\midrule
    @Water Run      &@People Attending:  &@No Count  &@       &@Assuming same number as 30HF  &@                             \\ \cline{2-6}
    @               &@Supplies           &c8         &10      &@                              &                             \\ \cline{2-6}
    @               &@Base Setup         &1         &100    &                               &                             \\ \cline{2-6}
    @               &@Shirts             &c8         &10      &@                               &                             \\ %\midrule
    @Total          &@                   &@          &        &@                              &@ \\
\end{spreadtab}

\end{document}

相关内容