Updated the latex style to match the JMK style.

This commit is contained in:
Jeff MacKinnon 2024-04-16 15:52:26 -03:00
parent 0f72668f28
commit 0e0aa762f5
10 changed files with 435 additions and 19 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

76
frUpwork/conf.py Normal file
View file

@ -0,0 +1,76 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'JMK Engineering Arc Flash Report Template'
copyright = '2024, Jeff MacKinnon'
author = 'Jeff MacKinnon'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
source_suffix = {
'.rst': 'restructuredtext',
'.ipynb': 'myst-nb',
'.myst': 'myst-nb',
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Latex setup
latex_additional_files = [
'_static/JMKEngineering-Logo-Small.jpg',
]
latex_elements = {
'pointsize':'12pt',
'classoptions': ',openany,oneside',
'preamble' : PREAMBLE,
'extrapackages': r'\usepackage{lipsum}',
}
latex_logo = '_static/JMKEngineering-Logo-Small.jpg'
latex_show_urls = 'inline'

174
frUpwork/jmk.sty Normal file
View file

@ -0,0 +1,174 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% jmk.sty
%
% LaTeX package for Sphinx override template
%
% © Jeff MacKinnon
% code by E. A. Farina latex.guru
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jmk}[2024/04/05 v1.0 LaTeX package for Sphinx override template]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Useful packages
\RequirePackage{tikz}
\RequirePackage{xcolor}
\RequirePackage{anyfontsize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colors
\definecolor{JMKblue}{HTML}{004360}%{17365d}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Layout
\newlength{\MARmar}\setlength{\MARmar}{1in}
\newlength{\MARlef}\setlength{\MARlef}{\MARmar}
\newlength{\MARrig}\setlength{\MARrig}{\MARmar}
\newlength{\MARtop}\setlength{\MARtop}{\MARmar}
\newlength{\MARbot}\setlength{\MARbot}{\MARmar}
\RequirePackage[letterpaper,portrait,includehead,includefoot,margin=\MARmar,headheight=10mm]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Language
\RequirePackage[english]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tokens
\newcommand{\dbclient}{}\newcommand{\client}[1]{\renewcommand{\dbclient}{#1}}
\newcommand{\dbrevision}{}\newcommand{\revision}[1]{\renewcommand{\dbrevision}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page style
\RequirePackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\headfoot}{\fancyhf{}\fancyhead[C]{\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
%\node at (current page.center) {\includegraphics[width=\paperwidth,page=2]{TEST.pdf}};
% HEAD
\coordinate (TOPl) at ([shift={(\MARlef+100pt,0pt)}]current page.north west);
\coordinate (TOPr) at ([shift={(-\MARrig-100pt,0pt)}]current page.north east);
% Logo
\node[anchor=north west] (LOGO) at ([shift={(\MARlef,-35pt)}]current page.north west) {\includegraphics[height=55pt]{JMKEngineering-Logo.jpg}};
% Title
\node[anchor=north west,font=\fontsize{12pt}{14pt}\sffamily\selectfont] at (TOPl|-LOGO.north) {\@title};
% Client
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at (TOPl|-LOGO.south) {CLIENT: \strut\dbclient};
% Revision
\node[anchor=north west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] (REV) at (TOPr|-LOGO.center) {\strut Revision: \strut\dbrevision};
% Project
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(0pt,+3pt)}]REV.north west) {\strut Project \#: \version};
% Page
\node[anchor=north west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(0pt,-3pt)}]REV.south west) {\strut Page \thepage};
% FOOT
% Date
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(\MARlef,64pt)}]current page.south west) {\strut Publish Date: \@date};
% Filename
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(\MARlef,50pt)}]current page.south west) {\strut Filename: \jobname.pdf};
% Page
\node[anchor=south east,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(-\MARrig,50pt)}]current page.south east) {\strut\thepage};
\end{tikzpicture}}}
\fancypagestyle{plain}{\headfoot}
\fancypagestyle{normal}{\headfoot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Headings
%\RequirePackage[Bjornstrup]{fncychap}% Loaded by conf.py but remove by Elio
%\RequirePackage[explicit]{titlesec}
\def\FONTchapter{\Large\bfseries}
\titleformat{\chapter}[hang]{\FONTchapter}{\thechapter.}{1em}{}[]
\titleformat{name=\chapter,numberless}[hang]{\FONTchapter}{}{0pt}{}[]
\titlespacing*{\chapter}{0pt}{0pt}{\baselineskip}
%
\def\FONTsection{\large\bfseries}
\titleformat{\section}[hang]{\FONTsection}{\thesection.}{1em}{}[]
\titleformat{name=\section,numberless}[hang]{\FONTsection}{}{0pt}{}[]
\titlespacing*{\section}{0pt}{\baselineskip}{0pt}
%
\def\FONTsubsection{\bfseries}
\titleformat{\subsection}[hang]{\FONTsubsection}{\thesubsection.}{1em}{}[]
\titleformat{name=\subsection,numberless}[hang]{\FONTsubsection}{}{0pt}{}[]
\titlespacing*{\subsection}{0pt}{\baselineskip}{0pt}
%
\def\FONTsubsubsection{\itshape}
\titleformat{\subsubsection}[hang]{\FONTsubsubsection}{\thesubsubsection.}{1em}{}[]
\titleformat{name=\subsubsection,numberless}[hang]{\FONTsubsubsection}{}{0pt}{}[]
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{0pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Intentionally Blank Page
\newcommand{\IBP}{\clearpage\pagestyle{plain}
\strut\par
\vfill
\centerline{\textbf{\sffamily Intentionally Blank Page}}\par
\vfill
\strut
\clearpage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
\renewcommand{\sphinxmaketitle}{\pagestyle{empty}\pagenumbering{roman}\strut
\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
% Logo
\node[anchor=north west] (LOGO) at ([shift={(125pt,-100pt)}]current page.north west) {\includegraphics[height=72pt]{JMKEngineering-Logo_text.jpg}};
% Title
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{34pt}{40pt}\color{JMKblue}\bfseries\selectfont] (TITLE) at ([shift={(0pt,-18pt)}]LOGO.south west) {\@title};
% Project num
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{12pt}{14pt}\color{JMKblue}\sffamily\selectfont] (VER) at ([shift={(0pt,-15pt)}]TITLE.south west) {Project Number: \strut\version};
% Left band
\draw[JMKblue,line width=1.2pt] ([shift={(-5pt,10pt)}]LOGO.north west) coordinate (LS) --([yshift=-10pt]LS|-VER.south);
% Date
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,100pt)}]TITLE.west|-current page.south) {Issue Date: \strut\@date};
% Revision
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,80pt)}]TITLE.west|-current page.south) {Revision: \strut\dbrevision};
\end{tikzpicture}
\IBP
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of figures and tables
\RequirePackage{float}
\floatstyle{boxed}
\restylefloat{figure}
\restylefloat{table}
\newif\iffigures
\newif\iftables
\makeatletter
\AtEndDocument{%
\if@filesw
\ifnum\value{figure}=\z@ % no figures
\immediate\write\@mainaux {\global\string\figuresfalse}%
\else
\immediate\write\@mainaux {\global\string\figurestrue}%
\fi
\ifnum\value{table}=\z@ % no tables
\immediate\write\@mainaux {\global\string\tablesfalse}%
\else
\immediate\write\@mainaux {\global\string\tablestrue}%
\fi
\fi
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of contents
\setcounter{tocdepth}{1}
\renewcommand{\sphinxtableofcontents}{%
%\pagenumbering{roman}%
\begingroup
%\parskip \z@skip
\sphinxtableofcontentshook
\tableofcontents
\endgroup
% List of figures
\iffigures
\addcontentsline{toc}{section}{List of figures}
\listoffigures
\fi
% List of tables
\iftables
\addcontentsline{toc}{section}{List of tables}
\listoftables
\fi
\ifnumodd{\value{page}}{\clearpage\IBP\clearpage}{\clearpage}
% before resetting page counter, let's do the right thing.
%\if@openright\cleardoublepage\else\clearpage\fi
% Start the mainmatter
\pagenumbering{arabic}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hyperref
\hypersetup{hidelinks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

174
source/_static/jmk.sty Normal file
View file

@ -0,0 +1,174 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% jmk.sty
%
% LaTeX package for Sphinx override template
%
% © Jeff MacKinnon
% code by E. A. Farina latex.guru
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jmk}[2024/04/05 v1.0 LaTeX package for Sphinx override template]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Useful packages
\RequirePackage{tikz}
\RequirePackage{xcolor}
\RequirePackage{anyfontsize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colors
\definecolor{JMKblue}{HTML}{004360}%{17365d}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Layout
\newlength{\MARmar}\setlength{\MARmar}{1in}
\newlength{\MARlef}\setlength{\MARlef}{\MARmar}
\newlength{\MARrig}\setlength{\MARrig}{\MARmar}
\newlength{\MARtop}\setlength{\MARtop}{\MARmar}
\newlength{\MARbot}\setlength{\MARbot}{\MARmar}
\RequirePackage[letterpaper,portrait,includehead,includefoot,margin=\MARmar,headheight=10mm]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Language
%\RequirePackage[english]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tokens
\newcommand{\dbclient}{}\newcommand{\client}[1]{\renewcommand{\dbclient}{#1}}
\newcommand{\dbrevision}{}\newcommand{\revision}[1]{\renewcommand{\dbrevision}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page style
\RequirePackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\headfoot}{\fancyhf{}\fancyhead[C]{\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
%\node at (current page.center) {\includegraphics[width=\paperwidth,page=2]{TEST.pdf}};
% HEAD
\coordinate (TOPl) at ([shift={(\MARlef+100pt,0pt)}]current page.north west);
\coordinate (TOPr) at ([shift={(-\MARrig-100pt,0pt)}]current page.north east);
% Logo
\node[anchor=north west] (LOGO) at ([shift={(\MARlef,-35pt)}]current page.north west) {\includegraphics[height=55pt]{JMKEngineering-Logo.jpg}};
% Title
\node[anchor=north west,font=\fontsize{12pt}{14pt}\sffamily\selectfont] at (TOPl|-LOGO.north) {\@title};
% Client
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at (TOPl|-LOGO.south) {CLIENT: \strut\dbclient};
% Revision
\node[anchor=north west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] (REV) at (TOPr|-LOGO.center) {\strut Revision: \strut\dbrevision};
% Project
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(0pt,+3pt)}]REV.north west) {\strut Project \#: \version};
% Page
\node[anchor=north west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(0pt,-3pt)}]REV.south west) {\strut Page \thepage};
% FOOT
% Date
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(\MARlef,64pt)}]current page.south west) {\strut Publish Date: \@date};
% Filename
\node[anchor=south west,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(\MARlef,50pt)}]current page.south west) {\strut Filename: \jobname.pdf};
% Page
\node[anchor=south east,font=\fontsize{10pt}{12pt}\sffamily\selectfont] at ([shift={(-\MARrig,50pt)}]current page.south east) {\strut\thepage};
\end{tikzpicture}}}
\fancypagestyle{plain}{\headfoot}
\fancypagestyle{normal}{\headfoot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Headings
%\RequirePackage[Bjornstrup]{fncychap}% Loaded by conf.py but remove by Elio
%\RequirePackage[explicit]{titlesec}
\def\FONTchapter{\Large\bfseries}
\titleformat{\chapter}[hang]{\FONTchapter}{\thechapter.}{1em}{}[]
\titleformat{name=\chapter,numberless}[hang]{\FONTchapter}{}{0pt}{}[]
\titlespacing*{\chapter}{0pt}{0pt}{\baselineskip}
%
\def\FONTsection{\large\bfseries}
\titleformat{\section}[hang]{\FONTsection}{\thesection.}{1em}{}[]
\titleformat{name=\section,numberless}[hang]{\FONTsection}{}{0pt}{}[]
\titlespacing*{\section}{0pt}{\baselineskip}{0pt}
%
\def\FONTsubsection{\bfseries}
\titleformat{\subsection}[hang]{\FONTsubsection}{\thesubsection.}{1em}{}[]
\titleformat{name=\subsection,numberless}[hang]{\FONTsubsection}{}{0pt}{}[]
\titlespacing*{\subsection}{0pt}{\baselineskip}{0pt}
%
\def\FONTsubsubsection{\itshape}
\titleformat{\subsubsection}[hang]{\FONTsubsubsection}{\thesubsubsection.}{1em}{}[]
\titleformat{name=\subsubsection,numberless}[hang]{\FONTsubsubsection}{}{0pt}{}[]
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{0pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Intentionally Blank Page
\newcommand{\IBP}{\clearpage\pagestyle{plain}
\strut\par
\vfill
\centerline{\textbf{\sffamily Intentionally Blank Page}}\par
\vfill
\strut
\clearpage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
\renewcommand{\sphinxmaketitle}{\pagestyle{empty}\pagenumbering{roman}\strut
\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
% Logo
\node[anchor=north west] (LOGO) at ([shift={(125pt,-100pt)}]current page.north west) {\includegraphics[height=72pt]{JMKEngineering-Logo_text.jpg}};
% Title
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{34pt}{40pt}\color{JMKblue}\bfseries\selectfont] (TITLE) at ([shift={(0pt,-18pt)}]LOGO.south west) {\@title};
% Project num
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{12pt}{14pt}\color{JMKblue}\sffamily\selectfont] (VER) at ([shift={(0pt,-15pt)}]TITLE.south west) {Project Number: \strut\version};
% Left band
\draw[JMKblue,line width=1.2pt] ([shift={(-5pt,10pt)}]LOGO.north west) coordinate (LS) --([yshift=-10pt]LS|-VER.south);
% Date
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,100pt)}]TITLE.west|-current page.south) {Issue Date: \strut\@date};
% Revision
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,80pt)}]TITLE.west|-current page.south) {Revision: \strut\dbrevision};
\end{tikzpicture}
\IBP
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of figures and tables
\RequirePackage{float}
\floatstyle{boxed}
\restylefloat{figure}
\restylefloat{table}
\newif\iffigures
\newif\iftables
\makeatletter
\AtEndDocument{%
\if@filesw
\ifnum\value{figure}=\z@ % no figures
\immediate\write\@mainaux {\global\string\figuresfalse}%
\else
\immediate\write\@mainaux {\global\string\figurestrue}%
\fi
\ifnum\value{table}=\z@ % no tables
\immediate\write\@mainaux {\global\string\tablesfalse}%
\else
\immediate\write\@mainaux {\global\string\tablestrue}%
\fi
\fi
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of contents
\setcounter{tocdepth}{1}
\renewcommand{\sphinxtableofcontents}{%
%\pagenumbering{roman}%
\begingroup
%\parskip \z@skip
\sphinxtableofcontentshook
\tableofcontents
\endgroup
% List of figures
\iffigures
\addcontentsline{toc}{section}{List of figures}
\listoffigures
\fi
% List of tables
\iftables
\addcontentsline{toc}{section}{List of tables}
\listoftables
\fi
\ifnumodd{\value{page}}{\clearpage\IBP\clearpage}{\clearpage}
% before resetting page counter, let's do the right thing.
%\if@openright\cleardoublepage\else\clearpage\fi
% Start the mainmatter
\pagenumbering{arabic}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Hyperref
\hypersetup{hidelinks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput

View file

@ -62,25 +62,26 @@ html_theme = "sphinx_book_theme"
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = ['_static']
# Latex setup # Latex setup
latex_additional_files = [
'_static/logo.jpg',
]
PREAMBLE = r""" PREAMBLE = r"""
\setcounter{tocdepth}{1} \usepackage{jmk}
""" """
latex_additional_files = [
'_static/JMKEngineering-Logo.jpg',
'_static/JMKEngineering-Logo_text.jpg',
'_static/jmk.sty',
]
latex_elements = { latex_elements = {
'pointsize':'12pt', 'pointsize':'12pt',
'classoptions': ',openany,oneside', 'classoptions': ',openany,oneside',
'geometry' : '\\usepackage[letterpaper, portrait, includehead, includefoot,margin=1in,headheight=10mm]{geometry}',
'babel': '\\usepackage[english]{babel}',
'fncychap': '\\usepackage[Bjornstrup]{fncychap}',
'preamble' : PREAMBLE, 'preamble' : PREAMBLE,
'extrapackages': r'\usepackage{fancyhdr}\usepackage{lipsum}', 'extrapackages': r'\usepackage{lipsum}',
} }
latex_logo = '_static/logo.jpg' latex_logo = '_static/logo.jpg'

View file

@ -2,15 +2,6 @@
.. |Title| replace:: Title of the Report .. |Title| replace:: Title of the Report
.. |SubTitle| replace:: Subtitle of the Report .. |SubTitle| replace:: Subtitle of the Report
.. raw:: latex
\pagestyle{fancy}
% Clear all headers and footers (see also \fancyhf{})
\fancyhead{}\fancyfoot{}
\fancyhead[L]{\includegraphics[width=10mm]{logo.jpg}}
\fancyfoot[R]{\reporttitle}
\fancyfoot[R]{\thepage}
|Title| |Title|
========================== ==========================