1

I have a bunch of longtables of varying lengths displayed 1 right after the other. Is there a way using longtable to auto run a macro or something on a just the first table of each page (regardless of whether it is a brand new table, or a longtable that has spanned multiple pages)? I want to display an image in the caption on JUST the first table of each page.

EDIT: I'll include a bit more detail to explain and illustrate what I'm trying to accomplish. I'm generating a catalog, and there are several groups of products that contain the same image as the group that precedes it. In order to make the book smaller and cleaner, I'm just displaying the image for the first group, and then displaying the table for any tables that have the same image until the image changes or there is a new page. There are times when tables span multiple pages (which is why I'm using longtable). I want to display the image for the group if it is the first on the page, regardless of whether it's a new table or a spanned table. Problem I'm running into is there is the perfect storm of a table that is the first on the page, and is a brand new table (meaning one that is not spanned from a previous page). When this happens, it skips the first table, and instead displays the image on the next table (if there is one). I'm trying to remedy this by using a flag that gets set to true at each new page using an AddEverypageHook. It seems to be getting executed, but doesn't take effect until the second table. I will include the code I'm using (sorry if there's some things in there that don't need to be, but at least you can see what I'm trying to do).

\documentclass[8pt]{report}
\usepackage[final]{pdfpages}
\usepackage{fancyhdr}
\usepackage[letterpaper, margin=1in]{geometry}
\usepackage{caption}
\usepackage{tocloft}
\usepackage[export]{adjustbox}
\usepackage{longtable}
\usepackage{hyperref}
\usepackage{helvet}
\usepackage{everypage}
\usepackage[space]{grffile}
\renewcommand{\familydefault}{\sfdefault}

\hypersetup{%
    pdfborder = {0 0 0}
}
\setcounter{tocdepth}{5}
\pagestyle{fancy}

\renewcommand\footrule{\begin{minipage}{1\textwidth}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\global\importanttrue
\end{minipage}\par}%

\lfoot{\today}
\rfoot{\thepage}
\cfoot{}
\rhead{}
\lhead{\leftmark}
\renewcommand {\headrulewidth}{0.4pt}
\renewcommand {\footrulewidth}{0.4pt}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\captionsetup{labelsep=space,singlelinecheck=off,labelformat=empty,labelfont=bf}
%
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
%


\newif\ifimportant\importantfalse

\AddEverypageHook{
    \global\importanttrue
}

\begin{document}\thispagestyle{empty}
\setlength\unitlength{1in}
\begin{titlepage}
\begin{center}

\includegraphics[width=.5\textwidth]{/var/www/html/hvac/css/catalog_logo.jpg}~\\[1cm]

\huge
{\fontsize{50}{60}\selectfont Product Catalog}\\
\vspace{.25in}
{\fontsize{30}{40}\selectfont DOUG PETERSON}\\
\vspace{.25in}
{\fontsize{20}{30}\selectfont \today}

\vfill

% Bottom of the page
{\large www.contractorshvacsupply.com}

\end{center}
\end{titlepage}
\setcounter{page}{2}
\tableofcontents
\includepdfset{pagecommand=\thispagestyle{fancy}}

\clearpage\phantomsection
\addcontentsline{toc}{chapter}{Residential Heating \& Cooling Equipment}
\markboth{Residential Heating \& Cooling Equipment}{}
\clearpage\phantomsection
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 92\% Legacy Single-Stage--912BA}
\global\importanttrue
Important is true


\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 92\% Legacy Single-Stage--912BA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 92\% Legacy Single-Stage--912BA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\\hline

\end{longtable}
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Legacy Single-Stage--915SA}

\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Legacy Single-Stage--915SA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Legacy Single-Stage--915SA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    328431 & 915SA30040S14 & 915SA30040S14 1STG 95 FURNACE & \$1183.96 ea\\\hline
    404315 & 915SA36040S17 & 915SA36040S17 1STG 95 FURNACE & \$1194.63 ea\\\hline
    330654 & 915SA42060S17 & 915SA42060S17 1STG 95 FURNACE & \$1224.64 ea\\\hline
    330662 & 915SA42100S21 & 915SA42100S21 1STG 95 FURNACE & \$1355.81 ea\\\hline
    330658 & 915SA48080S17 & 915SA48080S17 1STG 95 FURNACE & \$1314.06 ea\\\hline
    330661 & 915SA60080S21 & 915SA60080S21 1STG 95 FURNACE & \$1328.39 ea\\\hline
    330665 & 915SA60100S21 & 915SA60100S21 1STG 95 FURNACE & \$1372.00 ea\\\hline
    330666 & 915SA60120S24 & 915SA60120S24 1STG 95 FURNACE & \$1411.96 ea\\\hline
    330668 & 915SA60140S24 & 915SA60140S24 1STG 95 FURNACE & \$1444.31 ea\\\hline

\end{longtable}
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Single-Stage ECM--925SA}

\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Single-Stage ECM--925SA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Single-Stage ECM--925SA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    210145 & 925SA30040E14 & 925SA30040E14 1STG ECM FURNACE & \$1233.76 ea\\\hline
    210244 & 925SA42060E17 & 925SA42060E17 1STG ECM FURNACE & \$1315.63 ea\\\hline
    210687 & 925SA48080E17 & 925SA48080E17 1STG ECM FURNACE & \$1446.71 ea\\\hline
    210908 & 925SA48100E21 & 925SA48100E21 1STG ECM FURNACE & \$1520.87 ea\\\hline
    211134 & 925SA66120E24 & 925SA66120E24 1STG ECM FURNACE & \$1595.16 ea\\\hline

\end{longtable}
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Two-Stage ECM--925TA}

\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Two-Stage ECM--925TA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 95\% Preferred Two-Stage ECM--925TA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    335968 & 925TA60100E21 & 925TA60100E21 2STG ECM FURNACE  & \$1818.50 ea\\\hline
    212066 & 925TA66120E24 & 925TA66120E24 2STG ECM FURNACE PLEASE SEE 986TB & \$2020.93 ea\\\hline

\end{longtable}
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 96\% Evolution Two-Stage Variable--986T}

\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 96\% Evolution Two-Stage Variable--986T}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 96\% Evolution Two-Stage Variable--986T}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    213086 & 986TA66120V24 & 986TA66120V24 EVO 2STG VS FURNACE & \$2104.24 ea\\\hline
    448615 & 986TB42060V17 & 986TB42060V17 EVO 2STG VS FURNACE & \$1734.14 ea\\\hline
    448616 & 986TB42080V17 & 986TB42080V17 EVO 2STG VS FURNACE & \$1796.61 ea\\\hline
    448629 & 986TB60080V21 & 986TB60080V21 EVO 2STG VS FURNACE & \$1837.86 ea\\\hline
    448661 & 986TB66100V21 & 986TB66100V21 EVO 2STG VS FURNACE & \$2065.30 ea\\\hline
    448662 & 986TB66120V24 & 986TB66120V24 EVO 2STG VS FURNACE & \$2217.87 ea\\\hline

\end{longtable}
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 97\% Evolution Modulating Variable--987MA}

\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
    \caption{
    \ifimportant
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false
    \fi
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 97\% Evolution Modulating Variable--987MA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endfirsthead
    \caption[]{
    \protect\includegraphics[width=1.875in,height=1.875in,keepaspectratio,right]{Bry_90_GasFurnacePhoto_9.jpg}
    \global\importantfalse
    Important is false 2
    Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 97\% Evolution Modulating Variable--987MA}\\
    \hline
    Product\# & Model\# & Description & Price\\
    \hline
    \endhead
    213244 & 987MA42060V17 & 987MA42060V17 EVO MOD VS FURNACE & \$2012.46 ea\\\hline
    213456 & 987MA42080V17 & 987MA42080V17 EVO MOD VS FURNACE & \$2148.37 ea\\\hline
    335981 & 987MA60080V21 & 987MA60080V21 EVO MOD VS FURNACE & \$2193.49 ea\\\hline
    392719 & 987MA66100V21 & 987MA66100V21 EVO MOD VS FURNACE & \$2387.93 ea\\\hline
    213711 & 987MA66120V24 & 987MA66120V24 EVO MOD VS FURNACE & \$2525.09 ea\\\hline

\end{longtable}
\clearpage\phantomsection

\end{document}

The following is the result of the generated PDF. If you notice on page 4, it does not display the image on the first table, but does display on the second. I want it to display on the first, not the second: Result

5
  • If you read the manual, you'll find that on page 4 the command \endhead exactly for this purpose.
    – henry
    Commented Oct 10, 2014 at 15:10
  • Sorry, probably my bad for not including a MWE and for probably over-simplifying my problem, but I am using \endhead. I will edit my original question and include more detail.
    – CGRemakes
    Commented Oct 10, 2014 at 15:19
  • That is not an MWE, sorry. Random bit though: you can use the option hidelinke for hyperref instead if oyu want the boxes for links to disappear (although this is just a guess for your 0 0 0 values there.
    – henry
    Commented Oct 10, 2014 at 16:17
  • You do not need to supply the optional square brackets for \caption. Anyway why do you put a caption into a longtable? And then above the picture?? :)
    – henry
    Commented Oct 10, 2014 at 16:19
  • I'm open to suggestions as to how to simplify it and clean it up. I'm trying to display an image, with basically the breadcrumbs leading up to the group above the table. If it will help to accomplish what I need without including it as a caption, that's perfectly acceptable. Which package that I have loaded would help with converting it to a demo to make it a true MWE? I played with doing \usepackage[demo]{graphicx}, but couldn't get it to work. Did it at least make sense what I'm trying to accomplish. It's fairly complex, so not sure if I did a good job of that.
    – CGRemakes
    Commented Oct 10, 2014 at 16:51

1 Answer 1

1

Alright had a go at it. You mixed up the \caption-command. Below is one way of doing things. Also, you'll observe I just put one longtable-environment there as it demonstrates the problem/solution. I also stripped the code of all the options (actually only the majority, not all) which do not relate to the task at hand. So this is what an MWE is for, hope it is clearer now.

\documentclass[
fontsize=10pt,
a4paper,
DIV=15,
parskip=half
]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{
lmodern,
lipsum
}

\listfiles
%==================================================
%feel free to comment out the content up to this line and comment in lines 20--23
%==================================================
%\begin{document}
%\documentclass[
%8pt,
%]{report}

\usepackage[letterpaper, margin=1in]{geometry}
\usepackage{caption}
\usepackage{longtable}
\usepackage{fancyhdr}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{hyperref}
\hypersetup{%
hidelinks=true
}

\begin{document}
\thispagestyle{empty}

\begin{center}
\fbox{Dummy text for your} \verb+\includegraphics+-commands\\
\huge Product Catalog\\
\vspace{.25in}
\large DOUG PETERSON
\vspace{.25in}
{\large{\today}}
\vfill
% Bottom of the page
{\large www.contractorshvacsupply.com}
\end{center}
\newpage

%\addchap{Residential Heating \& Cooling Equipment} %I strongly suggest using this variant! Must admit I do not get through the following lines.
\clearpage\phantomsection
\addcontentsline{toc}{chapter}{Residential Heating \& Cooling Equipment}
\markboth{Residential Heating \& Cooling Equipment}{}
\clearpage\phantomsection
\addcontentsline{toc}{section}{Bryant Residential - Bryant Furnaces - Bryant High Effciency Furnaces - 92\% Legacy Single-Stage--912BA}

Text.
\begin{center}
\captionof{table}{Bla text} %only works with a KOMA class (scrartcl, scrreprt or scrbook) or, if not KOMA class in use, with the package 'capt-of'
\begin{longtable}{|p{.625in}|p{1.5in}|p{2.75in}|p{.875in}|}
\multicolumn{4}{c}{\fbox{Dummy text for your \texttt{graphic}}}\\
\hline
Product\# & Model\# & Description & Price\\
\hline
\endhead
\hline
\multicolumn{4}{r}{\emph{continued on next page}}
\endfoot
\hline
\hline
\endlastfoot
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
394688 & 912SB48100S21 & 912SB48100S21 1STG 92 FURNACE & \$1285.43 ea\\
\end{longtable}
\end{center}
\end{document}
7
  • 1
    I sure appreciate you going above and beyond. I'll see if I can kinda adapt your solution to my needs and go from there.
    – CGRemakes
    Commented Oct 10, 2014 at 19:35
  • Glad to read that. No problem. Please do set the check mark if you accept my reply. Also, I checked your history, you seem to be leaving your threads/questions "alone" (for the lack of a better term). It would be just normal to give feedback to your helpers on here. This is how this community works. :)
    – henry
    Commented Oct 10, 2014 at 19:39
  • I went ahead and gave some of my other posts some love, so they don't feel so "alone". ;) Your solution is much cleaner than mine, but I think I will still run into the same problem. Did you happen to look at the PDF in post #1? That shows what is currently being generated. Everything is perfect, except for the 1st table on page 4. The image that displays in the second table is supposed to be displayed in table 1. I'm trying to set a flag at the beginning of each page so the program knows it needs to apply the image, but it doesn't seem to apply the flag until the second table is generated.
    – CGRemakes
    Commented Oct 10, 2014 at 20:01
  • @CGRemakes Good good. :) Well, hm. Complex longtables need a few compiles to get set correctly. So do not hesitate just to compile a bit more often. My 2 cents: forget about the flag. Properly formatting the content up to \endhead or either \endfirsthead should make it work. I don't really get through your code, as in I am, plainly put, too busy and thus too reluctant to analyze it. Again, when I use longtable, I get the stuff on each page with endhead and rather compile too often than not. Rather safe than sorry.
    – henry
    Commented Oct 10, 2014 at 20:10
  • No problem, I do appreciate your assistance. Yeah, this is a fairly complex longtable combining both tex code and PHP that I'm using to generate the tex code. I posted just 1 group, but the catalog will be hundreds of pages when it's all said and done. I'll play with it some more and see what I can come up with. I'm running it 3 times currently, but I'll try more and see if maybe it just needs an extra time or 2 to display properly.
    – CGRemakes
    Commented Oct 10, 2014 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .