Hello all,
I am trying to create a custom LaTeX file that can be used to create many standard documents quickly where only key parts can be exchanged and the main content for each document will be through R Markdown for specific content. (I have the basic template below that was created in word.) The .tex file that I am trying to create would make it easier to quickly change out the Logo and ownership titles and names across multiple R Markdown files using this template. The rest of the header information and document specifics would come from the specific R Markdown file. I am familiar with R Markdown but not so much with LaTeK. I have tried several different solutions but I can't get the mixture of variables (some coded in the .tex file and some in the R Markdown file) to knit together. Any help or suggestions would be appreciated!
Example Template from word
LaTeX code:
\documentclass[a4paper,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{hyperref}
\usepackage{array}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage[hmargin=2cm,top=4cm,headheight=65pt,footskip=65pt]{geometry}
\setlength{\parindent}{0.95cm}
\pagestyle{fancy}
%% Header & Footer Defined
\renewcommand{\headrulewidth}{0pt}
\fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers
% Header Development
\fancyhead[C]{%
\begin{tabular}{|m{3.0cm}|m{8.0cm}|m{5.0cm}|}
\hline
\includegraphics[height=1.5cm,width=2.5cm]{logo.png} &
\centering
\textbf{TITLE} &
\raggedright
\small{Number: TYP-DOC-0001 \
Revision: 01 \
Release Date: 03MAR20}\tabularnewline
\hline
\end{tabular}%
}
%% Footer Development
\fancyfoot[CE,CO,LE,LO,RE,RO]{} %% clear out all footers
\fancyfoot[C]{%
\begin{tabular}{m{0.0cm} m{16.0cm} m{0.0cm}}
&
\centering
\small{Page \thepage\ of \pageref{LastPage}} \
\tiny{Proprietary Statement} &
\tabularnewline
\end{tabular}%
}
\begin{document}
%% add this if you want the fancy style also on the first page of a chapter:
\thispagestyle{fancy}
\section{Section title}
Body of document here
\end{document}