ドキュメントのフッターにミニページを作成する方法

ドキュメントのフッターにミニページを作成する方法

次のような出力を生成するドキュメントがあります:

ここに画像の説明を入力してください

緑色のセクションのサイズは、リスト内の項目の数に応じて変わります。

緑のセクションの大きさに関係なく、「発送先:」および「追加情報」セクションを常にページの下部に配置するようにします。

フッターを使用してこれを行う必要があると思いますか? フッターについて読んでいますが、フッターを次のようなミニページにする方法がよくわかりません。

\begin{minipage}[t]{.3\textwidth}
        {\bf SHIP TO:}\\

        \textit{[email protected]}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\textwidth}
        {\bf ADDITIONAL INFORMATION:}\\

        \textit{We accept payment by cash or cheque. Payment Is due upon receipt, and must be paid in full within {\bf 30 days}.}
\end{minipage}

TEX ファイル全体:

\documentclass[letterpaper,currency=pound]{dapper-purchase_order}
\defaultfontfeatures{ Path = ./Fonts/ }
%\usepackage{fontawesome}                                                                                                                
\definecolor{Mblue}{RGB}{231,255,229}
%                                                                                                                                        
%%%%%%%%%%%%%%%%%% HEADING SECTION %%%%%%%%%%%%%%%%%%                                                                                    
\newcommand{\purchaseOrderNo}{31401} % Invoice Number                                                                                    
\newcommand{\Date}{01/01/2018} % Date                                                                                                    
\newcommand{\clientName}{CUSTOMER NAME LTD} % Client Name                                                                                
%----------------------------------------------------                                                                                    
%                                                                                                                                        
\begin{document}

\newfontface\mainLightItalic{OpenSans-LightItalic}
\makeheader{\purchaseOrderNo}

\addvspace{8ex}

{\Large DATE: \textit{\Date}}

\addvspace{2ex}

{\Large FOR: \textit{\clientName}}

\addvspace{4ex}

\hspace{-.9\marginparwidth}%                                                                                                             
\colorbox{Mblue}{\begin{minipage}{\paperwidth}%                                                                                          

\vspace{.3in}

\begin{hoursItemization}
%                                                                                                                                        
%%%%%%%%%%%%%%%%%% TABLE OF EXPENSES %%%%%%%%%%%%%%%%%%                                                                                  
%                                                                                                                                        
% Put your expenses here in this order: \lineitem{QTY}{PRICE}{ITEM}                                                                      
%                                                                                                                                        
    \lineitem{1}{3075}{550 Litre indirect Storage Vessel with Unvented Kit}
%                                                                                                                                        
    \lineitem{2}{214}{3 kW Aquarius Towel Rail Heating Element with Chrome Finish}
%                                                                                                                                        
    \lineitem{1}{225}{9 kW Stainless Steel Immersion Heater}
%------------------------------------------------------                                                                                  
%                                                                                                                                        
%%%%%%%%%%%%%%%%%%% SUMMARY SECTION %%%%%%%%%%%%%%%%%%%                                                                                  
%                                                                                                                                        
    \beginsummary
%                                                                                                                                        
    \summaryline{SUBTOTAL}{\InvoiceTotal}
%                                                                                                                                        
    \summaryline{V.A.T. @ 20\%}{\vat}
%                                                                                                                                        
    \summaryline{TOTAL}{\total}
%------------------------------------------------------                                                                                  
%                                                                                                                                        
\end{hoursItemization}

\vspace{.3in}

\end{minipage}}

\addvspace{10ex}

\begin{minipage}[t]{.3\textwidth}
        {\bf SHIP TO:}\\

        \textit{[email protected]}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\textwidth}
        {\bf ADDITIONAL INFORMATION:}\\

        \textit{We accept payment by cash or cheque. Payment Is due upon receipt, and must be paid in full within {\bf 30 days}.}
\end{minipage}

\end{document}

(クラス ファイルは長いので、問題に対処する必要はないと思うので投稿しません)。

答え1

多くのオプションがありますが、おそらく最も単純なのは\vfill、物事を一番下に押し出す です。ドキュメントクラスがないので、一般的な例で2つのオプションを示します。その他のオプションには、tikzpagenodeTiに付属する絶対配置を作成する パッケージがあります。Zの方が簡単。

\documentclass{article}
\usepackage{eso-pic} % only needed for the second option
\pagestyle{empty}
\begin{document}
First option: \verb|\vfill|
\vfill
Bottom--line: \verb|\vfill| works
\clearpage
Another option: use \texttt{eso-pic}
\AddToShipoutPicture{%
     \AtTextUpperLeft{%
         \put(0,-500){\begin{minipage}{\textwidth}
         Bottom--line: also works. you may want to adjust the
         $y$ value \texttt{500} to your needs. This option is particularly useful if
         you want to write many pages with the same bottom--line.
         \end{minipage}}%
     }%
}
\end{document}

答え2

フッターを使用せずに必要な動作を実現する簡単な方法は、vspace と strecth 係数を組み合わせて追加することです。

\vspace*{\stretch{2}}2つのミニページの前に追加します送り先そして追加情報。は、それらをページの下部に押し出します。このコマンドは、上に追加されたコンテンツに応じて垂直方向のスペースを調整します。

答え3

フッターで見つけた唯一の問題は、段落を受け入れないことです。あなたの場合は、\\[<length>]そこに固定コンテンツがあるため、これは簡単に解決できます。私はfancyhdr自分の MWE でパッケージを使用しましたが、アクセスできないため、あなたのプライベートなものを削除する必要がありました。以下を参照してください。

\documentclass[a4paper, 10pt]{article}

%% geometry package was used to build a page that was similar to yours
\usepackage[left=15mm,right=15mm]{geometry}

%% lipsum to create filler text 
\usepackage{lipsum} 

\usepackage{fancyhdr}
\pagestyle{fancy}

%% set the footer
\cfoot{
  % \begin{tabular}{p{\linewidth}}
  \begin{minipage}[t]{.3\textwidth}
    {\bf SHIP TO:}\\[1mm] %% <- changed here
    \textit{[email protected]}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.4\textwidth}
    {\bf ADDITIONAL INFORMATION:}\\[1mm] %% <- changed here    
    \textit{We accept payment by cash or cheque. Payment Is due upon receipt, and must be paid in full within {\bf 30 days}.}
  \end{minipage}
}

%% remove the top line, which is default in fancyhdr
\renewcommand{\headrulewidth}{0pt}

\begin{document}
\lipsum[1-20]
\end{document}

ここに画像の説明を入力してください

答え4

ムウェ

これも を使用しますfancyhdrが、下のページの中央番号を許可します。(楽しみのためだけに、tikz、tabular、minipages は使用しません)。

注意:\bfは非推奨のコマンドです。 {\bfseries ...}またはを使用してください。\textbf{...}

\documentclass[a4paper]{article}
\usepackage{lipsum,parskip}
\usepackage[margin=2cm,bmargin=6cm,footskip=4cm]{geometry}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}%
\lfoot{\leavevmode
\vbox to 20ex{\hsize.6\linewidth{\bfseries SHIP TO:}\\[1ex]\itshape
[email protected]}%
\vbox to 20ex{\hsize.4\linewidth {\bfseries 
ADDITIONAL INFORMATION:}\\[1ex]\normalfont\itshape
We accept payment by cash or cheque. Payment is due upon receipt, 
and must be paid in full within {\bfseries 30 days}.}}

\pagestyle{fancy}

\begin{document}
\lipsum[1-50]
\end{document}

関連情報