我如何创建如附图所示的文档?

我如何创建如附图所示的文档?

我是 LaTeX 的初学者,我将从一个简单的例子开始,但我无法创建,因为项目不正确,我不知道如何将元素放到位,例如:

图像、页眉和页脚必须出现在每一页上

标题(在线表格生成器,请勿在示例中创建此表)

内容

页脚

\documentclass{article} 
\usepackage{graphicx,pgffor}
\title{\vspace{-7em}MyTitle} 



\begin{document}

\header{MyHeader}

\begin{foreach} 
    \foreach \i in {1,...,10}{
        \begin{figure} \includegraphics[width=1.0\textwidth]{C:/Users/myuser/Pictures/Img/imagem\i.jpg} \end{figure}
    }
\end{foreach}

\footer{Myfooter}

\end{document}

在此处输入图片描述

答案1

下面的介绍向您展示了实现此目的的一些方法:

在此处输入图片描述

我在这里使用 TikZ 是因为我看到您已经在使用pgffor

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{mwe}%%<-- only for example text, not necessary for real document

\usepackage{lastpage}%% <-- package to remember how many pages are in document (requires two runs of LaTeX)
\usepackage{fancyhdr}%% <-- very nice package for headers and footers of each page
\pagestyle{fancy}

\renewcommand\headrulewidth{0pt}
\renewcommand\footrulewidth{0pt}
%% setting the header and footers           
%% read the documentation for `fancyhdr`    
%% this isn't the only way to approach this.
\lhead{}
\chead{}
\rhead{}
\lfoot{}
%% OK, probably fancier than you need, but it gives you an idea 
%% that these things can be done according to pages             
%% This doesn't have to be an if/then/else statement.           
\cfoot{\ifnum\thepage=1\relax Copyright blah blah blah\else Something else\fi}
\rfoot{\thepage\ of \pageref{LastPage}}%% 

%% A way to store this information.  Yes, LaTeX has its own 
%% internals for these sorts of things.  I just want to show
%% alternatives.                                            
\newcommand\mytitle{THIS IS MY TITLE}
\newcommand\mysubtitle{this is my subtitle}

\begin{document}

\noindent
\begin{tikzpicture}
  \coordinate (TL) at (0,0);
  \coordinate (TR) at (\columnwidth,0);
  \node[anchor=north west,draw,inner sep=0pt] (PIC) at (TL) {\includegraphics[width=2in]{example-image-a}};
  \coordinate (BR) at (PIC.south-|TR);
  \coordinate (CR) at (PIC.east-|TR);
  \draw (TL) rectangle (BR);
  \draw (PIC.east) -- (CR);
  \path (PIC.east) -- node[midway] {\mytitle}    (TR);
  \path (PIC.east) -- node[midway] {\mysubtitle} (BR);
\end{tikzpicture}


{\centering\Large 
  \mytitle\ Again
\par\addvspace{2ex}}
%% \par triggers \centering to take effect             
%% parentheses prevent this from effecting the rest of 
%% the document.                                       

  ARMA virumque cano, Troiae qui primus ab oris
  Italiam, fato profugus, Laviniaque venit
  litora, multum ille et terris iactatus et alto
  vi superum saevae memorem Iunonis ob iram;
  multa quoque et bello passus, dum conderet urbem,
  inferretque deos Latio, genus unde Latinum,
  Albanique patres, atque altae moenia Romae.

  Musa, mihi causas memora, quo numine laeso,
  quidve dolens, regina deum tot volvere casus
  insignem pietate virum, tot adire labores
  impulerit.  Tantaene animis caelestibus irae?

  Urbs antiqua fuit, Tyrii tenuere coloni,
  Karthago, Italiam contra Tiberinaque longe
  ostia, dives opum studiisque asperrima belli;
  quam Iuno fertur terris magis omnibus unam
  posthabita coluisse Samo; hic illius arma,
  hic currus fuit; hoc regnum dea gentibus esse,
  si qua fata sinant, iam tum tenditque fovetque.
  Progeniem sed enim Troiano a sanguine duci
  audierat, Tyrias olim quae verteret arces;
  hinc populum late regem belloque superbum
  venturum excidio Libyae:  sic volvere Parcas.
  Id metuens, veterisque memor Saturnia belli,
  prima quod ad Troiam pro caris gesserat Argis---
  necdum etiam causae irarum saevique dolores
  exciderant animo:  manet alta mente repostum
  iudicium Paridis spretaeque iniuria formae,
  et genus invisum, et rapti Ganymedis honores.
  His accensa super, iactatos aequore toto
  Troas, reliquias Danaum atque immitis Achilli,
  arcebat longe Latio, multosque per annos
  errabant, acti fatis, maria omnia circum.
  Tantae molis erat Romanam condere gentem!

  Vix e conspectu Siculae telluris in altum
  vela dabant laeti, et spumas salis aere ruebant,
  cum Iuno, aeternum servans sub pectore volnus,
  haec secum:  'Mene incepto desistere victam,
  nec posse Italia Teucrorum avertere regem?
  Quippe vetor fatis.  Pallasne exurere classem
  Argivom atque ipsos potuit submergere ponto,
  unius ob noxam et furias Aiacis Oilei?

\vspace*{\fill}

\begin{center}
\includegraphics[height=3in]{example-image}
\end{center}

\pagebreak

something else

\end{document}

我注意到你正在做的一件事情可能会让你头疼,那就是使用漂浮环境,在您想要确定图像放置位置的上下文中。如果您想将左上角的图像放置在浮动环境中,则它不应位于浮动环境中。浮动环境用于表格和图形,您愿意让 LaTeX 针对这些表格和图形进行最佳放置设计。

相关内容