标准操作程序的模板?

标准操作程序的模板?

有许多关于技术参考手册、用户指南等的疑问和答案,我在网上找到了足够多的地方,这些地方都有这些模板以及其范围的详细描述。但是我在哪里可以找到专门用于标准操作程序的 TeX 模板?模板通常应具有:

  • 用于显示工序编号、公司名称等的标准页眉和页脚。
  • 标题、项目符号和子项目符号的统一格式
  • 图像的简单占位符(不是优先级)。

我工作场所的人通常使用 Word 2007 来写这种东西,但我觉得我现在正在处理的东西非常适合使用 TeX,而且使用 TeX 会给我带来很大的好处。

PS:虽然我对 LaTeX 还处于初级水平,但我用起来很顺手。另外,如果这对您的答案有任何影响,我更喜欢在简单的编辑器中完全手写(而不是使用 LyX 之类的东西)。输出为 PDF 格式。

以下是我喜欢的两个示例:

答案1

这不是您要寻找的一切,但它是一个开始,并希望让您了解文档类自定义是多么容易开始。请注意,我不会过多担心模仿 Word 文档中的坏习惯,而是专注于简单的语义内容和格式。

让我们从 PDF 中的一些最少内容开始:

\documentclass[12pt]{article}
\title{Personal Protective Clothing Level}
\date{7/24/08}
\author{Harper}
\begin{document}

\maketitle

\section{Procedures}

\subsection{Structure Fires}
\begin{enumerate}
\item All firefighters operating in the ``hot zone'' of a structure fire will be in
full turnouts to include coat, pants, helmet, hood, gloves and boots. When operating
in an IDLH atmosphere an SCBA shall be worn.

\item Engineers when operating close to the incident and exposed to products of
combustion shall also be in full PPE including SCBA. If outside the ``hot zone''
engineers will be allowed to modify their PPE accordingly. If the Engineer is
considered to be a part of the RIT team, then full PPE including an SCBA shall be
worn.
\end{enumerate}

\end{document}

使用给定的标准文章类,您将获得如下页面内容

在此处输入图片描述

在基于 article 编写一个(相对)简单的文档类之后,相同的内容(使用\documentclass[12pt]{sop}\approved{Chief Harper}代替\documentclass[12pt]{article},您将获得如下页面内容

在此处输入图片描述

在此处输入图片描述

创建此布局的文件 sop.cls 是:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{sop}[2011/07/08 v0.2 Modified article class for standard operating procedures]
% https://stackoverflow.com/questions/581916/how-do-you-extend-article-document-class-in-latex

% Passes and class options to the underlying article class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}

% Redefine the page margins
\RequirePackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}

% Modifications to the section titles
\RequirePackage{titlesec}
\renewcommand{\thesection}{\Roman{section}}
\titleformat{\section}{\normalfont\bfseries}
  {\makebox[3em][l]{\thesection{}.}}{0pt}{}
\titleformat{\subsection}{\normalfont\bfseries}
  {}{0pt}{}

% Modification of title block
\RequirePackage{titling}
\RequirePackage{multirow}
\newcommand{\approved}[1]{\newcommand{\theapproved}{#1}}
% Ref: http://tex.stackexchange.com/questions/3988/titlesec-versus-titling-mangling-thetitle
\let\oldtitle\title
\renewcommand{\title}[1]{\oldtitle{#1}\newcommand{\mythetitle}{#1}}
\renewcommand{\maketitle}{%
\begin{tabular}{|c|p{2in}|l|l|} \hline
\multirow{3}{*}{logo} & \multicolumn{1}{p{2.5in}|}{\centering Mammoth Lakes Fire Protection District } & Date: \thedate & Number: \\ \cline{2-4}
& \multicolumn{1}{p{2.5in}|}{\centering Standard Operating Procedure } & \multicolumn{2}{p{2.5in}|}{Title: \mythetitle} \\ \cline{2-4}
& Approved By: \theapproved & \multicolumn{2}{l|}{Revision Date: \quad / \quad / \quad} \\ \hline
\end{tabular}
}

% For "Page N of M"
\RequirePackage{lastpage}
% For easier construction of page headers/footers
\RequirePackage{fancyhdr}
\fancypagestyle{plain}{ % for first page
\fancyhf{}
\fancyfoot[L]{\framebox{Author: \theauthor}\\ \jobname{}.tex} 
\fancyfoot[R]{\framebox{Page: \thepage{} of \pageref*{LastPage}}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}

\pagestyle{fancy} % for other pages
\fancyhf{}
\fancyhead[R]{%
\begin{tabular}{|c|c|} \hline %
Revision Date: & Number: \\
\quad / \quad / \quad & \\ \hline
\end{tabular}%
}
\fancyfoot[L]{\framebox{Author: \theauthor}}
\fancyfoot[R]{\framebox{Page: \thepage{} of \pageref*{LastPage}}} % \pageref* if we use hyperref, \pageref otherwise
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% For easier customization of itemized, enumerated, and other lists
\RequirePackage{enumitem}
% For hyperlinked cross-references
\RequirePackage{hyperref}
% Ensure first page is correct style
\thispagestyle{plain}
% That's all, folks!
\endinput

这个问题我从哪里开始做这件事。

答案2

关于正文:那里有很多愚蠢、不一致的格式。第 I 节(范围)中的文本缩进,第 II 节(目的)中的文本有段落缩进且为粗体,第 III 节(定义)没有缩进句号,第 IV 节(职责)没有段落缩进但整个段落都缩进,等等。我在该 SOP 中看到的唯一一致性是完全缺乏一致性。使用 microstuff word 复制这种完全缺乏一致性是小菜一碟。使用 LaTeX 做到这一点会有点困难。

另一方面,摆脱这些愚蠢的垃圾(它们就是垃圾)最终会是一件好事。

页面内容周围的可爱小框也会有点挑战性,但这里的其他人将能够解决这个问题。具有挑战性的是设置那个可爱的小标题框。我为需要三个封面页(一个漂亮的封面、一个不太漂亮的封面内页和一个签名页)的文档做过这件事。它涉及一些卑鄙的 TeX 肮脏行为。类似

% \SOPtitlebox: Create the title for an SOP
% #1 - Date (format: mm/dd/yy)
% #2 - Number (format: Unknown. The example has a blank number.)
% #3 - Title (e.g. {Personal Protective Clothing Level})
% #4 - Approved by (e.g. {Chief Harper}, but probably a macro)
% #5 - Revision date (Hmmm. Example is / /, so presumably mm/dd/yy, but with blanks)
\def\SOPtitlebox#5{%
    % Contents of this macro left as an exercise for the user
}

相关内容