在复杂的标题页中定位日期很困难

在复杂的标题页中定位日期很困难

我在网上找到了以下模板(经过一些搜索),基本上我的问题是如何将日期设置在靠近标题页下部的位置。

在此处输入图片描述

我用来获取上述输出的代码如下:

\documentclass[letterpaper]{article}

\usepackage{babel,titling,float,tikz,amsmath,cancel,amsbsy,amsfonts,graphicx,adjustbox,epigraph}

\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}

\definecolor{titlepagecolor}{cmyk}{1,.60,0,.40}

\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}

\makeatletter                       
\def\printauthor{%                  
    {\large \@author}}              
\makeatother
\author{%
    \normalsize{Rodrigo Domingues (99390)\\
    Departamento de Matemática \\
    Universidade de Aveiro \\
    \texttt{[email protected]}\vspace{20pt} \\
    Beatriz Teixeira (99366) \\
    Departamento de Matemática \\
    Universidade de Aveiro \\
    \texttt{[email protected]}}
    }

% The following code is borrowed from: https://tex.stackexchange.com/a/86310/10898

\newcommand\titlepagedecoration{%
\begin{tikzpicture}[remember picture,overlay,shorten >= -10pt]

\coordinate (aux1) at ([yshift=-15pt]current page.north east);
\coordinate (aux2) at ([yshift=-410pt]current page.north east);
\coordinate (aux3) at ([xshift=-4.5cm]current page.north east);
\coordinate (aux4) at ([yshift=-150pt]current page.north east);

\begin{scope}[titlepagecolor!40,line width=12pt,rounded corners=12pt]
\draw
  (aux1) -- coordinate (a)
  ++(225:5) --
  ++(-45:5.1) coordinate (b);
\draw[shorten <= -10pt]
  (aux3) --
  (a) --
  (aux1);
\draw[opacity=0.6,titlepagecolor,shorten <= -10pt]
  (b) --
  ++(225:2.2) --
  ++(-45:2.2);
\end{scope}
\draw[titlepagecolor,line width=8pt,rounded corners=8pt,shorten <= -10pt]
  (aux4) --
  ++(225:0.8) --
  ++(-45:0.8);
\begin{scope}[titlepagecolor!70,line width=6pt,rounded corners=8pt]
\draw[shorten <= -10pt]
  (aux2) --
  ++(225:3) coordinate[pos=0.45] (c) --
  ++(-45:3.1);
\draw
  (aux2) --
  (c) --
  ++(135:2.5) --
  ++(45:2.5) --
  ++(-45:2.5) coordinate[pos=0.3] (d);   
\draw 
  (d) -- +(45:1);
\end{scope}
\end{tikzpicture}%
}

\date{8 de julho, 2022}


\begin{document}
\begin{titlepage}

\noindent
\titlefont Projeto 1 \\  
           \small Otimização em Redes e Não Linear \par 
\vspace*{.5cm}
\epigraph{If the system exhibits a structure which can be represented by a mathematical equivalent, called a mathematical model, and if the objective can be also so quantified, then some computational method may be evolved for choosing the best schedule of actions among alternatives. Such use of mathematical models is termed mathematical programming.}%
{\textit{"Linear Programming and Extensions", 2016}\\ \textsc{G. Dantzig}}
\null\vfill
\vspace*{1cm}
\noindent
\vfill
\hfill
\begin{minipage}{0.50\linewidth}
    \begin{flushright}
        \printauthor
    \end{flushright}
\end{minipage}
\begin{minipage}{0.02\linewidth}
    \rule{1pt}{125pt}
\end{minipage}
\begin{center}
    \textbf{\thedate}
\end{center}
\titlepagedecoration
\end{titlepage}

我的期望输出如下:

在此处输入图片描述

答案1

(1)加载包geometry

(2)在标题页之前添加\newgeometry{bottom=0.5cm}以扩展页面的(默认)底部边距。

(3)在日期前添加垂直空格,

(4)使用\restoregeometry恢复文档的边距。

b

\documentclass{article} 

\usepackage{geometry}% added <<<<<<<<<<

\usepackage{babel,titling,float,tikz,amsmath,cancel,amsbsy,amsfonts,graphicx,adjustbox,epigraph}

\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}

\definecolor{titlepagecolor}{cmyk}{1,.60,0,.40}

\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}

\makeatletter                       
\def\printauthor{%                  
    {\large \@author}}              
\makeatother
\author{%
    \normalsize{Rodrigo Domingues (99390)\\
        Departamento de Matemática \\
        Universidade de Aveiro \\
        \texttt{[email protected]}\vspace{20pt} \\
        Beatriz Teixeira (99366) \\
        Departamento de Matemática \\
        Universidade de Aveiro \\
        \texttt{[email protected]}}
}

% The following code is borrowed from: https://tex.stackexchange.com/a/86310/10898

\newcommand\titlepagedecoration{%
    \begin{tikzpicture}[remember picture,overlay,shorten >= -10pt]
        
        \coordinate (aux1) at ([yshift=-15pt]current page.north east);
        \coordinate (aux2) at ([yshift=-410pt]current page.north east);
        \coordinate (aux3) at ([xshift=-4.5cm]current page.north east);
        \coordinate (aux4) at ([yshift=-150pt]current page.north east);
        
        \begin{scope}[titlepagecolor!40,line width=12pt,rounded corners=12pt]
            \draw
            (aux1) -- coordinate (a)
            ++(225:5) --
            ++(-45:5.1) coordinate (b);
            \draw[shorten <= -10pt]
            (aux3) --
            (a) --
            (aux1);
            \draw[opacity=0.6,titlepagecolor,shorten <= -10pt]
            (b) --
            ++(225:2.2) --
            ++(-45:2.2);
        \end{scope}
        \draw[titlepagecolor,line width=8pt,rounded corners=8pt,shorten <= -10pt]
        (aux4) --
        ++(225:0.8) --
        ++(-45:0.8);
        \begin{scope}[titlepagecolor!70,line width=6pt,rounded corners=8pt]
            \draw[shorten <= -10pt]
            (aux2) --
            ++(225:3) coordinate[pos=0.45] (c) --
            ++(-45:3.1);
            \draw
            (aux2) --
            (c) --
            ++(135:2.5) --
            ++(45:2.5) --
            ++(-45:2.5) coordinate[pos=0.3] (d);   
            \draw 
            (d) -- +(45:1);
        \end{scope}
    \end{tikzpicture}%
}

\date{8 de julho, 2022}


\begin{document}
    \newgeometry{bottom=0.5cm} % geometry of the title page <<<<<
    
    \begin{titlepage}
        
        \noindent
        \titlefont Projeto 1 \\  
        \small Otimização em Redes e Não Linear \par 
        \vspace*{.5cm}
        \epigraph{If the system exhibits a structure which can be represented by a mathematical equivalent, called a mathematical model, and if the objective can be also so quantified, then some computational method may be evolved for choosing the best schedule of actions among alternatives. Such use of mathematical models is termed mathematical programming.}%
        {\textit{"Linear Programming and Extensions", 2016}\\ \textsc{G. Dantzig}}
        \null\vfill
        \vspace*{1cm}
        \noindent
        \vfill
        \hfill
        \begin{minipage}{0.50\linewidth}
            \begin{flushright}
                \printauthor
            \end{flushright}
        \end{minipage}
        \begin{minipage}{0.02\linewidth}
            \rule{1pt}{125pt}
        \end{minipage}      
        
        \vfill%% <<<<<<<<<<<<<<<<<<<<<<<<<
        \begin{center}
            \textbf{\thedate}
        \end{center}
    
        \titlepagedecoration%
    \end{titlepage}

\restoregeometry    % ends the  geometry of the titlepage <<<<<<<<<<<<<<<

\end{document}

答案2

一个分析,没有完整的解决方案:

  • 只需要几个包就可以呈现这个标题页
  • 包括\usepackage[showframe]{geometry}查看当前设置
  • 必须手动设置日期,作为一种解决方法
  • \end{document}在复制的源中缺失
  • 休息似乎很好:一种方法是这样做

因此,从绘制的框架来看,日期已经“在底部”。

建议

  • 将日期移至页脚
  • 或者根据需要删除页脚并扩展布局,即textheight
  • 有关详细信息,请参阅文档ctan geometryhttps://ctan.org/pkg/geometry

带框架的页面

\documentclass[letterpaper]{article}

%\usepackage{babel,titling,float,tikz,amsmath,cancel,amsbsy,amsfonts,graphicx,adjustbox,epigraph}

\usepackage{epigraph, adjustbox, tikz}% <<< only what's needed here
\usepackage[showframe]{geometry}% <<< to show frames

\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}

\definecolor{titlepagecolor}{cmyk}{1,.60,0,.40}

\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}

\makeatletter                       
\def\printauthor{%                  
    {\large \@author}}              
\makeatother
\author{%
    \normalsize{Rodrigo Domingues (99390)\\
    Departamento de Matemática \\
    Universidade de Aveiro \\
    \texttt{[email protected]}\vspace{20pt} \\
    Beatriz Teixeira (99366) \\
    Departamento de Matemática \\
    Universidade de Aveiro \\
    \texttt{[email protected]}}
    }

% The following code is borrowed from: https://tex.stackexchange.com/a/86310/10898

\newcommand\titlepagedecoration{%
\begin{tikzpicture}[remember picture,overlay,shorten >= -10pt]

\coordinate (aux1) at ([yshift=-15pt]current page.north east);
\coordinate (aux2) at ([yshift=-410pt]current page.north east);
\coordinate (aux3) at ([xshift=-4.5cm]current page.north east);
\coordinate (aux4) at ([yshift=-150pt]current page.north east);

\begin{scope}[titlepagecolor!40,line width=12pt,rounded corners=12pt]
\draw
  (aux1) -- coordinate (a)
  ++(225:5) --
  ++(-45:5.1) coordinate (b);
\draw[shorten <= -10pt]
  (aux3) --
  (a) --
  (aux1);
\draw[opacity=0.6,titlepagecolor,shorten <= -10pt]
  (b) --
  ++(225:2.2) --
  ++(-45:2.2);
\end{scope}
\draw[titlepagecolor,line width=8pt,rounded corners=8pt,shorten <= -10pt]
  (aux4) --
  ++(225:0.8) --
  ++(-45:0.8);
\begin{scope}[titlepagecolor!70,line width=6pt,rounded corners=8pt]
\draw[shorten <= -10pt]
  (aux2) --
  ++(225:3) coordinate[pos=0.45] (c) --
  ++(-45:3.1);
\draw
  (aux2) --
  (c) --
  ++(135:2.5) --
  ++(45:2.5) --
  ++(-45:2.5) coordinate[pos=0.3] (d);   
\draw 
  (d) -- +(45:1);
\end{scope}
\end{tikzpicture}%
}

\date{8 de julho, 2022}


\begin{document}
\begin{titlepage}

\noindent
\titlefont Projeto 1 \\  
           \small Otimização em Redes e Não Linear \par 
\vspace*{.5cm}
\epigraph{If the system exhibits a structure which can be represented by a mathematical equivalent, called a mathematical model, and if the objective can be also so quantified, then some computational method may be evolved for choosing the best schedule of actions among alternatives. Such use of mathematical models is termed mathematical programming.}%
{\textit{"Linear Programming and Extensions", 2016}\\ \textsc{G. Dantzig}}
\null\vfill
\vspace*{1cm}
\noindent
\vfill
\hfill
\begin{minipage}{0.50\linewidth}
    \begin{flushright}
        \printauthor
    \end{flushright}
\end{minipage}
\begin{minipage}{0.02\linewidth}
    \rule{1pt}{125pt}
\end{minipage}
\begin{center}
%    \textbf{\thedate}% <<< didn't work
    \textbf{8 de julho, 2022}% <<< workaround
\end{center}

\titlepagedecoration

\end{titlepage}
\end{document}% was missing (!)

相关内容