具有垂直多行的长表 - 分页/定位

具有垂直多行的长表 - 分页/定位

我最近重新整理了我的糖尿病日志,将日期设置为单独的多行列,而不是额外的一行,这样会浪费水平空间。但是,使用新设置后,我不确定如何让页面末端的日期不出现分页符,而不会出现多次分页符并浪费垂直空间。

认为单页滚动式文档不存在,所以我正在寻找任何解决方案。以下是我使用的 -

\documentclass{article}[9pt]
\usepackage[table]{xcolor}
\usepackage{graphicx,color,longtable,multirow,multicol,rotating,booktabs}
\usepackage[top=1cm, bottom=1.5cm, left=1.25cm, right=1.25cm]{geometry}
\begin{document}
\selectcolormodel{gray}\rowcolors{2}{white}{yellow}
\footnotesize
\begin{longtable}{l l| l l l l l | p{11cm}}

\rowcolor{white}\caption{title}\\
%
\rowcolor{white}\multicolumn{2}{c|}{Time} & BG & Ins. & CHO & Pro & Fat & Remarks \\ \hline\endfirsthead
%
\rowcolor{white}\caption{\emph{cont.}}\\ 
\rowcolor{white}\multicolumn{2}{c|}{Time} & BG & Ins. & CHO & Pro & Fat & Remarks \\ \hline\endhead
\hline\endfoot
%%% Copy-paste as many date as necessary to see issue
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\\cellcolor{yellow}&
    &  &  &  &  &  &  \\
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
%%% 
\end{longtable}
\end{document}  

實際的例子。

答案1

如果使用,\multirow则应始终\\*在跨行上使用以阻止跨度中出现中断。

在此处输入图片描述

我修复了文档序言中的一些不相关的内容

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{graphicx,longtable,multirow,booktabs}
\usepackage[top=1cm, bottom=1.5cm, left=1.25cm, right=1.25cm]{geometry}
\begin{document}
\selectcolormodel{gray}\rowcolors{2}{white}{yellow}
\footnotesize
\begin{longtable}{l l| l l l l l | p{11cm}}

\rowcolor{white}\caption{title}\\
%
\rowcolor{white}\multicolumn{2}{c|}{Time} & BG & Ins. & CHO & Pro & Fat & Remarks \\ \hline\endfirsthead
%
\rowcolor{white}\caption{\emph{cont.}}\\ 
\rowcolor{white}\multicolumn{2}{c|}{Time} & BG & Ins. & CHO & Pro & Fat & Remarks \\ \hline\endhead
\hline\endfoot
%%% Copy-paste as many date as necessary to see issue
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
    \cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*\cellcolor{yellow}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{yellow}\rotatebox{90}{08.03.18}} &  &  &  &  &  &  &  \\\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*\cellcolor{white}&
    &  &  &  &  &  &  \\*
\multirow{-11}{*}{\cellcolor{white}\rotatebox{90}{09.03.18}} &  &  &  &  &  &  &  \\
%%% 
\end{longtable}
\end{document}  

答案2

好吧,经过几天的折腾,我终于找到了自己的解决方案,至少它是有效的。简化它降低了复杂性,也让错误更容易修复。

編輯- 1) 目前,所有\mutlirows 都已正确对齐;\ddate需要mrow>2,因此如果 ,您将获得 2 位数的年份mrow>4。2) 如果页面顶部出现的日期少于 3 行,则下一个日期未对齐,由于错误,重新处理了宏中的一些冗余。3) 我制作了一个包含所有命令和计数器的 .sty;再次简化为一个命令\QQQ,缺点是如果某一天断线,下一页上的日期将不会是相同的颜色,日期将出现,因此这更像是一种审美上的滋扰。4) 使用短/长日期格式垂直对齐日期,并进行微小更改。5) 所有内容均已对齐总是,备注栏中的额外文本行m会根据它是否是日期的最后一行进行计数,始终是\myc每页的行数;只有两个命令可用\QQQ-\ddate当下一个条目在 23:59 之后时,这样放入文件中的参数.dat就有正确的时间日期。无需输入日、月、年。

\documentclass{article}
%========================PACKAGES%========================
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[table]{xcolor}
\usepackage{
    lmodern,
    microtype,
    % showframe,
    etoolbox,
    calc,
    xstring,
    rotating,
    booktabs,
    array,
    longtable,
    multicol,
    multirow,
    newfile,
    pgf
    }
\usepackage[top=0.5cm, bottom=0.8cm, left=1cm, right=1cm]{geometry}
\usepackage[font={rm,small}, labelfont=sc]{caption}
\usepackage{bookmark}
%========================COLOR OPTIONS%========================
    \definecolor{oddRowColor}{cmyk}{0.1,0.5,0.1,0.91}% 
    \definecolor{evenRowColor}{cmyk}{0.3,0.5,0.1,0.97}% 
    \colorlet{evenRowTextColor}{-evenRowColor}% 
    \colorlet{oddRowTextColor}{-oddRowColor}%
    \definecolor{pageBG}{HSB}{47,22,26}%
    % TABLE RULES, HEADERS, FOOTERS COLOR
    \definecolor{tc0}{cmyk}{.40,0,0,.15}% 
    % CAPTION COLOR
    \DeclareCaptionFont{cc}{\color{green!70}}%
    \captionsetup{font+={cc}}%
    \AtBeginDocument{
        \pagecolor{pageBG}%
        \color{tc0}%
        \rowcolors{2}{oddRowColor}{evenRowColor}%
        }%
%========================COUNTERS%========================
    \newbool{rcc}
    \newbool{rc}
    % HYPERREF TO LABEL LONGTABLE ROWS
    \newcounter{ltrow}
    % MULTIROW LENGTH AND PAGE ROW #
    \newcounter{mrow}
    \newcounter{row}
    % DATE COUNTERS
    \newcounter{year}
    \newcounter{month}[year]
    \newcounter{day}[month]
%========================COMMANDS%========================
    \newcommand*{\ddate}{% calls date, then increments
        \small%
        \ifbool{rcc}% DATE TEXT COLOR
            {\color{oddRowTextColor}\global\boolfalse{rcc}}%
            {\color{evenRowTextColor}\global\booltrue{rcc}}%
        \ifnumcomp{\value{mrow}}{>}{2}% ROOM FOR DATE?
            {% DATE FORM
                \ifnumcomp{\value{mrow}}{>}{4}% 
                    {\multirow{-\value{mrow}}{*}}%
                    {\multirow{-\value{mrow}}{*}}%
                {\rotatebox{90}{% for m column
                    \ifnumcomp{\value{day}}{<}{10}% IF SINGLE DIGIT DAY
                        {0\theday.}%
                        {\theday.}%
                    \ifnumcomp{\value{month}}{<}{10}% IF SINGLE DIGIT MONTH
                        {0\themonth.}%
                        {\themonth.}%
                    \ifnumcomp{\value{mrow}}{>}{4}% ROOM FOR YEAR?
                        {\StrRight{\theyear}{2}}%
                        {}%
                    }%
                }%
            }%
            {}%
        \ifnum 
            \value{day} = 31%
            \ifnum \value{month} = 12%
                \stepcounter{year}% YEAR STEP
                \else% NO YEAR STEP REQUIRED
                \fi
            \stepcounter{month}%
            \else% NOT 31
            \ifnum \value{day} = 30% NOT 31, 30?
                \ifnum \value{month} = 4%
                    \stepcounter{month}%
                    \else
                    \ifnum \value{month} = 6%
                        \stepcounter{month}%
                        \else
                        \ifnum \value{month} = 9%
                            \stepcounter{month}%
                            \else
                            \ifnum \value{month} = 11%
                                \stepcounter{month}%
                                \else
                                \fi
                            \fi
                        \fi
                    \fi
                \else% NOT 30
                \ifnum \value{month} = 2% IS IT FEB?
                    \pgfmathparse{int(ceil(mod(\theyear,4)))}%
                    \ifnum \pgfmathresult = 0% LEAP YEAR?
                        \ifnum \value{day} = 29%
                            \stepcounter{month}%
                            \else
                            \fi
                        \else% feb, NOT LEAP YEAR
                            \ifnum \value{day} = 28%
                                \stepcounter{month}%
                                \else
                                \fi
                        \fi
                    \else% NOT FEB AND/OR DAY TOO LOW
                    \fi
                \fi
            \fi
        \stepcounter{day}% DAY GETS STEPED NO MATTER WHAT
        \setcounter{mrow}{0}%
        &%
        }
    \newcommand*{\dddate}{% CALLS DATE, DOESN'T INCREMENT, FOR USE ON TOP PART OF PAGEBROKEN DAY
        \small%
        \ifbool{rcc}% DATE TEXT COLOR
            {\color{oddRowTextColor}}%
            {\color{evenRowTextColor}}%
        \ifnumcomp{\value{mrow}}{>}{2}%
            {% DATE FORM
                \ifnumcomp{\value{mrow}}{>}{4}% 
                    {\multirow{-\value{mrow}}{*}}%
                    {\multirow{-\value{mrow}}{*}}%
                {\rotatebox{90}{% for m column
                    \ifnumcomp{\value{day}}{<}{10}% IF SINGLE DIGIT DAY
                        {0\theday.}%
                        {\theday.}%
                    \ifnumcomp{\value{month}}{<}{10}% IF SINGLE DIGIT MONTH
                        {0\themonth.}%
                        {\themonth.}%
                    \ifnumcomp{\value{mrow}}{>}{4}% ROOM FOR YEAR?
                        {\StrRight{\theyear}{2}}%
                        {}%
                }}%
            }%
            {}%
        \setcounter{mrow}{0}%
        &%
        }
    \newcommand*{\QQ}[8][&]{%
        \ifblank{#8}%
            {\stepcounter{row}\stepcounter{mrow}}%
            {% REMARKS NOT BLANK
                \setbox1=\hbox{\noindent#8}% fixme
                \pgfmathparse{int(ceil(divide(\wd1,312.4)))}%
                \ifstrequal{#1}{&}%
                    {\addtocounter{row}{\pgfmathresult}\addtocounter{mrow}{\pgfmathresult}}%
                    {\addtocounter{row}{\pgfmathresult}\stepcounter{mrow}}%
            }%
        \ifblank{#3}{}{\addtostream{data}{\theyear-%
            \ifnumcomp{\value{month}}{<}{10}{0\themonth-}{\themonth-}\ifnumcomp{\value{day}}{<}{10}{0\theday}{\theday} #2, #3}}% 
        \ifbool{rc}%
            {\rowstyle{\color{evenRowTextColor}}\global\boolfalse{rc}}%
            {\rowstyle{\color{oddRowTextColor}}\global\booltrue{rc}}%
        \ifbool{rcc}%
            {\cellcolor{oddRowColor}}%
            {\cellcolor{evenRowColor}}%
        #1%  date
        #2&% time
        #3&% blood glucose
        #4&% insulin
        #5&% carbohydrates
        #6&% protein
        #7&% fat
        #8%  remarks
        \\%
        }
    \newcommand*{\QQQ}[8][]{%
        \ifnumgreater{\value{row}}{\myc}%% IS LAST ROW? FIXME, MAXROW??/
            {% LAST ROW- RESET COUNTER, UNLESS EXPLICITLY LAST ROW OF RESP. DATE, I.E., HAS DATE CALL, WILL NOT INCREMENT DAY
                \setcounter{row}{0}%
                \ifblank{#1}%
                    {\QQ[\dddate]{#2}{#3}{#4}{#5}{#6}{#7}{#8}\pagebreak}% PAGEBROKEN DAY
                    {\QQ[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}\pagebreak}%
            }%
            {% NOT LAST ROW OR SELF-CALLED  
                \ifblank{#1}%
                    {\QQ{#2}{#3}{#4}{#5}{#6}{#7}{#8}}%
                    {\QQ[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}}%
            }%
        }%
    % APPLYING TEXT COLOR FROM CELL TO CELL WITHIN ROW
    \makeatletter

    \newcommand*{\@rowstyle}{}

    \newcommand*{\rowstyle}[1]{% sets the style of the next row
    \gdef\@rowstyle{#1}%
    \@rowstyle\ignorespaces%
    }

    \newcolumntype{=}{% resets the row style
    >{\gdef\@rowstyle{}}%
    }

    \newcolumntype{+}{% adds the current row style to the next column
    >{\@rowstyle}%
    }

    \makeatother
%
\pagestyle{empty}
\begin{document}
    \fontfamily{pag}\selectfont
    \footnotesize
    \def\myc{75}% #maxrows, determined exp.
    \rowcolors{2}{oddRowColor}{evenRowColor}
\setcounter{year}{2018}
\setcounter{month}{3}
\setcounter{day}{31}
\begin{longtable}{=l +l| +l +l +l +l +l | +m{11cm}}\hline
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
    \QQQ{}{}{}{}{}{}{}
\QQQ[\ddate]{}{}{}{}{}{}{}
\end{longtable}
\end{document}

相关内容