summaryrefslogtreecommitdiff
path: root/resources/templates/documents/Safran-doc.setup
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2021-12-12 18:37:13 +0100
committerMarius Peter <blendoit@gmail.com>2021-12-12 18:37:13 +0100
commit89f9a6db8987d41bf49071bd3f420c8315216748 (patch)
tree9b50a6dbad33ae938e58523b097402f8a5fba9fb /resources/templates/documents/Safran-doc.setup
parenteed187911ed77f7cdd9b77006388b0d12421bca6 (diff)
Safran templates!
Diffstat (limited to 'resources/templates/documents/Safran-doc.setup')
-rw-r--r--resources/templates/documents/Safran-doc.setup236
1 files changed, 236 insertions, 0 deletions
diff --git a/resources/templates/documents/Safran-doc.setup b/resources/templates/documents/Safran-doc.setup
new file mode 100644
index 0000000..aad1eeb
--- /dev/null
+++ b/resources/templates/documents/Safran-doc.setup
@@ -0,0 +1,236 @@
+# -*- mode: org; eval: (visual-line-mode); -*- #
+
+#+begin_abstract
+This document is a configuration file for Emacs [[https://orgmode.org/][Org mode]]. It describes
+how to export Org mode documents to PDFs that look visually similar to
+the Safran document templates. The configuration described in this
+document applies to this document itself; you can find the PDF version
+of this file in the same folder, or export this very file to PDF from
+within Emacs by using ~C-p~ (Control key + p) if using my /Smart
+Documents/ distribution.
+#+end_abstract
+
+
+* \huge Safran Document Template
+:PROPERTIES:
+:UNNUMBERED: t
+:END:
+
+#+ATTR_LATEX: :center nil
+| =From= | Marius Peter |
+| =To= | Safran |
+| =Date= | <2021-06-22 Tue> |
+| =Subject= | Safran template for Emacs Org mode |
+
+#+LATEX: \tableofcontents
+
+
+* Usage
+
+Towards the beginning of your Org mode file, simply add
+: #+SETUPFILE: "L:/org/templates/Safran-doc.setup"
+which will call this very file's instructions. The remainder of the
+document can be as plain as you wish.
+
+
+* The template
+
+This template provides:
+
+1. Fonts
+2. Header
+ 1. Safran logo
+ 2. Document metadata
+3. Footer
+ 1. Page numbering
+ 2. ``Proprietary and Confidential'' notice
+
+And not much else. You must either design your own title page, or copy
+the following elegant example for a minimalistic title section at the
+top of your exported PDF. The macros contained in triple curly braces
+are a convenient way to render your =#+TITLE=, =#+AUTHOR=, =#+DATE=,
+and other document properties you will have previously defined.
+
+: * \huge {{{TITLE}}}
+: :PROPERTIES:
+: :UNNUMBERED: t
+: :END:
+:
+: #+ATTR_LATEX: :center nil
+: | =From= | {{{AUTHOR}}} |
+: | =To= | Your recipient |
+: | =Date= | {{{DATE}}} |
+: | =Subject= | Description of the document subject |
+:
+: #+LATEX: \tableofcontents
+
+
+** Options
+
+#+OPTIONS: tags:nil toc:nil title:nil p:t
+: #+OPTIONS: tags:nil toc:nil title:nil p:t
+
+
+** Macros
+
+# +MACRO: test (eval (concat "This is a " $1 " that illustrates " $2))
+: # +MACRO: test (eval (concat "This is a " $1 " that illustrates " $2))
+
+
+** LaTeX
+
+LaTeX is the premier free document preparation system.
+
+
+*** Document class
+
+We choose the article class. It is generic, nice and simple.
+
+#+LATEX_CLASS: article
+: #+LATEX_CLASS: article
+
+
+*** Geometry
+
+Thanks to the geometry package, we can set the margin widths on all
+sides.
+
+#+LATEX_HEADER: \usepackage[
+#+LATEX_HEADER: left = 1.5in ,
+#+LATEX_HEADER: right = 1.5in ,
+#+LATEX_HEADER: top = 1in ,
+#+LATEX_HEADER: bottom = 2.4in ,]{geometry}
+: #+LATEX_HEADER: \usepackage[
+: #+LATEX_HEADER: left = 1.5in ,
+: #+LATEX_HEADER: right = 1.5in ,
+: #+LATEX_HEADER: top = 1in ,
+: #+LATEX_HEADER: bottom = 2.4in ,]{geometry}
+
+
+*** Fonts
+
+The ~fontspec~ package exposes convenient commands for font selection
+when using LuaTeX.
+
+#+LATEX_HEADER: \usepackage{fontspec}
+: #+LATEX_HEADER: \usepackage{fontspec}
+
+
+**** Regular
+
+Carlito is the open source alternative to Calibri on MS Windows. It
+makes for a great ``friendly'' font. Public Sans, on the other hand,
+has much sharper contours and is more ``serious''. Public Sans is a
+more balanced alternative to Arial.
+
+Public Sans relative x-height is *0.517*. By setting the Public Sans
+~Scale~ to *0.872*, we ensure that the absolute Public Sans x-height
+matches the absolute Courier Prime x-height. This results in both
+fonts appearing of pleasingly similar size.
+
+#+LATEX_HEADER: \setmainfont{publicsans}[
+#+LATEX_HEADER: Path = L:/org/fonts/ ,
+#+LATEX_HEADER: Scale = 0.872 ,
+#+LATEX_HEADER: Extension = .ttf ,
+#+LATEX_HEADER: UprightFont = *-regular ,
+#+LATEX_HEADER: BoldFont = *-bold ,
+#+LATEX_HEADER: ItalicFont = *-italic ,
+#+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+: #+LATEX_HEADER: \setmainfont{publicsans}[
+: #+LATEX_HEADER: Path = L:/org/fonts/ ,
+: #+LATEX_HEADER: Scale = 0.872 ,
+: #+LATEX_HEADER: Extension = .ttf ,
+: #+LATEX_HEADER: UprightFont = *-regular ,
+: #+LATEX_HEADER: BoldFont = *-bold ,
+: #+LATEX_HEADER: ItalicFont = *-italic ,
+: #+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+
+
+**** Sans
+
+We also use Public Sans for our Sans font.
+
+#+LATEX_HEADER: \setsansfont{publicsans}[
+#+LATEX_HEADER: Path = L:/org/fonts/ ,
+#+LATEX_HEADER: Scale = 0.872 ,
+#+LATEX_HEADER: Extension = .ttf ,
+#+LATEX_HEADER: UprightFont = *-regular ,
+#+LATEX_HEADER: BoldFont = *-bold ,
+#+LATEX_HEADER: ItalicFont = *-italic ,
+#+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+: #+LATEX_HEADER: \setsansfont{publicsans}[
+: #+LATEX_HEADER: Path = L:/org/fonts/ ,
+: #+LATEX_HEADER: Scale = 0.872 ,
+: #+LATEX_HEADER: Extension = .ttf ,
+: #+LATEX_HEADER: UprightFont = *-regular ,
+: #+LATEX_HEADER: BoldFont = *-bold ,
+: #+LATEX_HEADER: ItalicFont = *-italic ,
+: #+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+
+
+**** Monospace
+
+Courier Prime is an open source alternative to Courier New on MS
+Windows. Courier Prime relative x-height is *0.451*.
+
+#+LATEX_HEADER: \setmonofont{courierprime}[
+#+LATEX_HEADER: Path = L:/org/fonts/ ,
+#+LATEX_HEADER: Extension = .ttf ,
+#+LATEX_HEADER: UprightFont = *-regular ,
+#+LATEX_HEADER: BoldFont = *-bold ,
+#+LATEX_HEADER: ItalicFont = *-italic ,
+#+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+: #+LATEX_HEADER: \setmonofont{courierprime}[
+: #+LATEX_HEADER: Path = L:/org/fonts/ ,
+: #+LATEX_HEADER: Extension = .ttf ,
+: #+LATEX_HEADER: UprightFont = *-regular ,
+: #+LATEX_HEADER: BoldFont = *-bold ,
+: #+LATEX_HEADER: ItalicFont = *-italic ,
+: #+LATEX_HEADER: BoldItalicFont = *-bolditalic ,]
+
+
+**** Special characters
+
+We define some custom special characters.
+
+#+LATEX_HEADER: \newcommand\warningsign{\symbol{"26A0}}
+: #+LATEX_HEADER: \newcommand\warningsign{\symbol{"26A0}}
+
+
+*** Accessing document properties
+
+We include the ~titling~ package in order to reference the document
+title in the LaTeX header definition.
+
+#+LATEX_HEADER: \usepackage{titling}
+: #+LATEX_HEADER: \usepackage{titling}
+
+We include the ~lastpage~ package in order to access the total amount
+of pages in the document. This enables including a page count in the
+document footer.
+
+#+LATEX_HEADER: \usepackage{lastpage}
+: #+LATEX_HEADER: \usepackage{lastpage}
+
+
+*** Header and footer
+
+#+LATEX_HEADER: \usepackage{fancyhdr}
+#+LATEX_HEADER: \setlength{\headheight}{48pt}
+#+LATEX_HEADER_EXTRA: \pagestyle{fancy}
+#+LATEX_HEADER_EXTRA: \fancyhead[L]{\rule[-20pt]{0pt}{0pt} \includegraphics[height=32pt]{L:/Org/templates/Safran_logo.png}}
+#+LATEX_HEADER_EXTRA: \fancyhead[R]{\color{Gray} \footnotesize \texttt{\thetitle} \\ \thedate \\ \texttt{\theauthor}}
+# LATEX_HEADER_EXTRA: \renewcommand{\headrulewidth}{1.2pt}
+#+LATEX_HEADER_EXTRA: \fancyfoot[C]{\hrulefill\\[8pt]
+#+LATEX_HEADER_EXTRA: \color{Gray} Page~\thepage/\pageref*{LastPage}\\[8pt]
+#+LATEX_HEADER_EXTRA: \footnotesize \texttt{\textbf{MAG Aerospace Industries, LLC---Proprietary and Confidential.}}\\[6pt]
+#+LATEX_HEADER_EXTRA: This document contains proprietary information of MAG Aerospace Industries, LLC.
+#+LATEX_HEADER_EXTRA: This information may not, in whole or in part, be duplicated, reproduced, disclosed,
+#+LATEX_HEADER_EXTRA: or used in any way except as expressly authorized in writing by MAG Aerospace Industries, LLC.}
+: #+LATEX_HEADER: \usepackage{fancyhdr}
+: #+LATEX_HEADER: \setlength{\headheight}{48pt}
+: #+LATEX_HEADER_EXTRA: \pagestyle{fancy}
+: #+LATEX_HEADER_EXTRA: \fancyhead[L]{\rule[-20pt]{0pt}{0pt} \includegraphics[height=32pt]{L:/Org/templates/Safran_logo.png}}
+: #+LATEX_HEADER_EXTRA: \fancyhead[R]{\color{Gray} \footnotesize \texttt{\thetitle} \\ \thedate \\ \texttt{\theauthor}}
+: # LATEX_HEADER_EXTRA: \renewcommand{\headrulewidth}{1.2pt}
+: #+LATEX_HEADER_EXTRA: \fancyfoot[C]{\hrulefill\\[8pt] \color{Gray} Page~\thepage/\pageref*{LastPage}\\[8pt] \footnotesize \texttt{\textbf{MAG Aerospace Industries, LLC---Proprietary and Confidential.}}\\[6pt] This document contains proprietary information of MAG Aerospace Industries, LLC. This information may not, in whole or in part, be duplicated, reproduced, disclosed, or used in any way except as expressly authorized in writing by MAG Aerospace Industries, LLC.}
Copyright 2019--2024 Marius PETER