diff --git a/frUpwork/JMKEngineering-Logo.jpg b/frUpwork/JMKEngineering-Logo.jpg new file mode 100644 index 0000000..53049b8 Binary files /dev/null and b/frUpwork/JMKEngineering-Logo.jpg differ diff --git a/frUpwork/JMKEngineering-Logo_text.jpg b/frUpwork/JMKEngineering-Logo_text.jpg new file mode 100644 index 0000000..90a7846 Binary files /dev/null and b/frUpwork/JMKEngineering-Logo_text.jpg differ diff --git a/frUpwork/conf.py b/frUpwork/conf.py new file mode 100644 index 0000000..fcb8742 --- /dev/null +++ b/frUpwork/conf.py @@ -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' diff --git a/frUpwork/jmk.sty b/frUpwork/jmk.sty new file mode 100644 index 0000000..f559e53 --- /dev/null +++ b/frUpwork/jmk.sty @@ -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 \ No newline at end of file diff --git a/source/_static/JMKEngineering-Logo.jpg b/source/_static/JMKEngineering-Logo.jpg new file mode 100644 index 0000000..53049b8 Binary files /dev/null and b/source/_static/JMKEngineering-Logo.jpg differ diff --git a/source/_static/JMKEngineering-Logo_blue.jpg b/source/_static/JMKEngineering-Logo_blue.jpg new file mode 100644 index 0000000..ea67dd5 Binary files /dev/null and b/source/_static/JMKEngineering-Logo_blue.jpg differ diff --git a/source/_static/JMKEngineering-Logo_text.jpg b/source/_static/JMKEngineering-Logo_text.jpg new file mode 100644 index 0000000..90a7846 Binary files /dev/null and b/source/_static/JMKEngineering-Logo_text.jpg differ diff --git a/source/_static/jmk.sty b/source/_static/jmk.sty new file mode 100644 index 0000000..c3b746a --- /dev/null +++ b/source/_static/jmk.sty @@ -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 \ No newline at end of file diff --git a/source/conf.py b/source/conf.py index 19e0a0f..1134a72 100644 --- a/source/conf.py +++ b/source/conf.py @@ -62,25 +62,26 @@ html_theme = "sphinx_book_theme" # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] + + + # Latex setup - -latex_additional_files = [ - '_static/logo.jpg', -] - PREAMBLE = r""" -\setcounter{tocdepth}{1} +\usepackage{jmk} """ +latex_additional_files = [ + '_static/JMKEngineering-Logo.jpg', + '_static/JMKEngineering-Logo_text.jpg', + '_static/jmk.sty', + +] latex_elements = { 'pointsize':'12pt', 'classoptions': ',openany,oneside', - 'geometry' : '\\usepackage[letterpaper, portrait, includehead, includefoot,margin=1in,headheight=10mm]{geometry}', - 'babel': '\\usepackage[english]{babel}', - 'fncychap': '\\usepackage[Bjornstrup]{fncychap}', 'preamble' : PREAMBLE, - 'extrapackages': r'\usepackage{fancyhdr}\usepackage{lipsum}', + 'extrapackages': r'\usepackage{lipsum}', } latex_logo = '_static/logo.jpg' diff --git a/source/index.rst b/source/index.rst index da15cec..10b3de1 100644 --- a/source/index.rst +++ b/source/index.rst @@ -2,15 +2,6 @@ .. |Title| replace:: Title 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| ==========================