This repository was archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSANDreport.cls
More file actions
1941 lines (1729 loc) · 68.4 KB
/
SANDreport.cls
File metadata and controls
1941 lines (1729 loc) · 68.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% ---------------------------------------------------------------------------- %
%
% We start out with the standard LaTeX document class "article" or "report" and
% modify it so it conforms to the Sandia Technical report style.
% The modifications are based on "Guide to Preparing SAND Reports",
% SAND98-0730, edited by Tamara K. Locke, and the newer "Guide to
% Preparing SAND Reports and Other Communication Products", SAND2002-2068P.
%
% Get the latest version and more at
% http://www.cs.sandia.gov/SANDreport
%
% Originally written by Rolf Riesen
% Currently maintained by Brian Barrett and Rich Field
%
%
% 06/14/2002 v1.01
% Make distribution list wider. Spaces between area codes and phone numbers
%
% 06/17/2002 v1.02
% Use \raggedright for main title
%
% 06/19/2002 v1.03
% Set tocdepth to 2 to only list sections and subsections in TOC
%
% 08/07/2002 v1.04
% Added a Makefile based on one Mike Heroux provided
% Allow for distribution lists that span more than one page and
% typeset the distribution in two columns
%
% 11/25/2002 v1.05
% Some changes from Daniel Segalman to conform to the new guide
% (SAND2002-2068P):
% - Adjust top margin of the title page to conform to the MS Word
% template (this may or may not be correct depending on your
% latex/dvips initial setup. Use texconfig to setup paper and
% dvips).
% - Added the word "Printed" before the date on front page
% - Classification category is no longer needed on page 3; get
% rid of \SANDdistcategory
% - Added "National Nuclear Security Administration" on title page
% - Changed NTIS URL on page 2
%
% If "strict" is not used, we'll number sections to two decimal
% places (1.2.3)
%
% 02/13/2003 v1.06
% New DOEbwlogo.eps from Tim Draelos. This one is smaller and has some
% incompatible junk removed.
%
% 10/16/2003 v1.7
% Using \ifthenelse in the addcontentsline command interfered with
% the subfigure class. James Gruetzner and Todd Pitts provided a fix.
%
% Philippe Pebay reports that the color package needs to be imported
% before the graphicx package. This class file uses the graphicx package,
% so Philippe could not use the color package because graphicx was already
% loaded when his \usepackage command got executed.
%
% 11/19/2003 v1.8
% Make it work using the report class. Put "report" as an option into
% \documentclass[report]{SANDreport} to activate it. There were some other
% fixes and clean-up s as well. Mainly in the table of contents.
% - Changed NTIS URL on page 2
% - Added fleqn to \LoadClass
% - Can't get the report title to repeat on the first chapter page.
% Left it off for now.
% - The table of contents formatting for report class is more or less like
% report.cls. For article, we try to make it look like the guideline.
%
% 01/19/2004 v1.9
% - The distribution list at the end of a SAND report was modifying the
% description environment which interfered with its regular use. Created
% a separate environment to fix that.
% - If in "report", list chapters and sections in TOC
% - With the jpg option, load the jpg versions of the DOE and Sandia
% logos. This makes it possible to use pdftex which doesn't
% understand Postscript.
%
% 02/25/2004 v1.10
% - It is now SANDIA REPORT, no longer SAND REPORT. Central Technical Files
% now wants three copies. See the distribution examples. (Info from
% Philippe Pebay)
% - Added new commands for markings used in OUO, export controlled, and
% other reports not labeled "Unlimited Release". Thanks to Mark
% Ackermann for providing an OUO example.
% - In report style, the page numbers restarted after the title page. Fixed!
% - Big clean-up.
%
% 05/14/2004 v1.11
% - Had to comment out a line in fancyhdr.sty for pdflatex to work.
% Don't know why.
%
% 05/21/2004 v1.12
% - Added the options [FIGBOTCAP,normal,bf,tight] to the subfigure
% package in the example files from a suggestion by Philippe P. Pebay.
% - Added the CA and NM options to insert the respective standard distributions.
%
% 08/07/2004 v1.13
% - Use pdf versions of logos. Makes the "jpg" option obsolete. Suggestion
% and logos by Richard Lehoucq.
% - Making SANDreport.cls compatible with the hyperref package
% - Added SANDmath.tex from Philippe Pebay
%
% 08/18/2004 v1.14
% - \begin{SANDdistribution} now takes an optional argument (CA or NM). The
% respective \documentclass options are no longer valid. Several new
% commands are available within the SANDdistribution environment to
% automate distributions for special cases such as CRADA, LDRD,
% Classified, Patent, etc.
% - The distribution list is now better formatted.
% - Fixed a bug with \SANDreleaseType discovered by Mark Ackermann
% - Added the command \SANDmarkTop
%
% 05/20/2005 v1.15
% - A small change in the distribution list (D. Chavez in the LDRD office
% moved) Thanks to Brandon Rohrer.
%
% 12/05/2005 v1.16
% - New org numbers reflect new corporate structure 9616->4536, etc. Thanks
% to Philip Sackinger for doing this.
% - Philip also found out what the newest distribution rules for NM are.
% - In the example files, deleted a misleading comment about secnumdepth in
% the appendix. Thanks to John Mitchell for spotting this.
% - New SANDmath.tex from Philippe Pebay: (ver. 1.2)
% + add support for discrete intervals
% + fix some comments
% + replace incorrect \RequirePackage's by \usepackage'
% - Also from Philippe Pebay: CA distribution list changes.
% - Abstract will start on title page, even with report style. Thanks to
% Daniel Dolan for noticing it and making suggestions to fix it.
% - Put the title just above the first chapter in the report style
%
% 12/09/2005 v1.17
% - Fixed a bug introduced in the last version: The \cleardoublepage is
% only supposed to happen for chapters in the main body of a report,
% and it needs to happen before the page number is entered into the TOC.
% - Fixed several new and old bugs that dealt with markings
% - Fixed text on usage page about marking commands.
%
% 12/09/2005 v1.18
% - Make it work with hyperref again....
%
% 12/19/2005 v1.19
% - There were still problems with the hyperref package. Fixed it so that
% the page markings on the back cover are now correct.
%
% 12/21/2005 v1.20
% - Updated the distribution list according to version 2.0 of the Guide
%
% 03/22/2006 v1.21
% - Introduced \SANDrePrintDate and \begin{SANDreDistribution}
% - Put a page number (2) on the back cover
% - No institution in \SANDauthor{} in example files
% - Move the SNL logo on the cover towards the bottom of the page
% - Add a back cover with the SNL logo at the bottom of the back
% - Use \cleardouble page and add comment to example files to make
% sure TOC always starts on an odd page.
% - Don't put title on first page of body text (above introduction)
% anymore. (Changed from Ver 1.0, Sep. 2002 to Ver 2.0, Dec. 2005 of the guide.)
% - For article, start every section on a new page (report already does this)
% - Fixed URLs for DOE report ordering
% - \SANDmarkCover now takes only one argument! This makes it easier to draw a
% box around the statement and configure it as needed. See MarkOUO.tex for
% an example. Thanks to John Foster for the example.
% - Print small class file version number at bottom of inside back cover
% - Change by Daniel Dolan to make it work and look consistent with the mathptmx
% package. This leaves the Helvetica fonts on the cover alone, but lets him
% have the body of the report in Times.
% - From Debbie Johnson (Creative Arts):
% - In example files, use First Name, Middle Initial, Last Name on cover and title page
% - In example files, on cover, put author names on one line
% - Mail Stop for Central Technical Files is MS9018. (This was an error in the example
% file, not the class itself.)
% - Back cover was shifted right too far.
% - Move chapter headings up a bit.
% - Use the geometry package to get the margins right
%
% 06/10/2006 v1.22
% - Remove "Unclassified" from "Unclassified Unlimited Release" (Thanks Brett Bader and Mike Heroux)
% - Confirmed that M2497 is correct mail stop for classified reports to Central Technical
% Files. (Thanks Debbie Johnson)
% - Make the distribution list single column. This makes it easier to print labels.
% - D. Chavez, LDRD Office mail-stop changed from 0188 to 0123. (Thanks Brett Bader)
% - In examples, added \phantomsection and moved \addcontentsline{toc}{section}{References}
% just before the \bibliography{...} command. This helps putting the right page number
% into the TOC and also with hyperlinking. (Thanks Tammy Kolda)
% - Clarified usage of \SANDnum{} on Web page. (Thanks Tammy Kolda)
% - More usage and LaTeX tips on Web page. (Thanks Tammy Kolda)
% - Newer distributions have a fancyhdr.sty that works. Removed it.
%
% 06/26/2006 v1.23
% - Tammy Kolda found a bug when using amsmath. Seems to have been a problem with
% white space in the redefinition of \section. LaTeX would stop when building the TOC.
%
% 08/17/2006 v1.24
% - Changed tar file extension from .tgz to .tar.gz Some winzip versions under
% Windows don't seem to like the former. (Rich Lehoucq)
% - Org. Number for Central Technical Files changed from 8945-1 to 8944 (Tammy and Debbie)
%
% 09/19/2006 v1.25
% - David Wilson discovered that markings in report style also activated chapter
% name headings, which are unwanted and sometimes overlap with the markings.
%
% 10/03/2006 v1.26
% - Some Web page error fixes from Daniel Dunlavy
% - Mike Eldred suggested to keep internal distributions on a single line
%
% 10/03/2006 v1.27
% - Forgot to extend the width of external distributions
%
% 12/13/2007 v1.28
% - No change: Org. Number for Central Technical Files is 8944 (confirmed by Beth Watkins)
% - Mark the OUO examples as sample to avoid misunderstandings (Roger Suppona)
% - Paragraph indent is set to 0 for cover pages, but never restored (Daniel Dolan)
% - Use "Lorem ipsum" instead of "bla bla bla" in the examples (Stephanie Phillips)
% (There is a LaTeX package, lipsum.sty, that does it, but it is not always installed.
% Therefore, I included the text verbaitm, instead of generating it.)
% - If the report is an OUO document, some text on the back cover needs to disappear.
% Thanks to Marcia Cooper for discovering it, and providing the necessary LaTeX code.
% - A lot of changes from Michael Kaneshige to better match the formatting of the official
% SAND report template:
% 1. Removed the odd-even margin asymmetry - made the textwidth 6.5 in and
% both margins 1 in. This is consistent with the official cover
% templates, although it's not the standard LaTeX way of formatting double
% sided documents. If the document gets bound, the LaTeX way is better,
% but a lot of documents exist only electronically now.
%
% 2. Added more space to \topmiddlewidth and subtracted it from
% \topleftwidth and \toprightwidth so that "official Use Only / Export
% Controlled Information" would not get broken across lines on the title
% page.
%
% 3. Reduced the \vspace between the title and authors from 0.75in to
% 0.375in. This is specific to my document, but with everything we were
% required to add, and a moderate length title, LaTeX was generating a
% blank first page because the cover page was overfilled.
%
% 4. On the back cover, I centered the text block and reduced the minipage
% width to make it look more like the official covers.
%
% 5. The word "NOTICE" on the back cover was significantly larger than the
% other text, which was not consistent with the official covers. I
% removed the \fontsize command that was causing this, and it looks more
% consistent with the official covers.
%
% 6. On the title page, the top block (SAND#, OUO/ECI, Printed...) was not
% centered because there were topleft and topmiddle boxes, but no topright
% box. I think this was inherited from the report.cls and article.cls
% classes, but to fix the asymmetry, I inserted a topright box the same as
% the topleft box. It would seem to work just as well to remove both
% topleft and topright boxes, since they contain nothing, but to be
% conservative, I didn't remove anything.
%
% 7. Most of MarkOUO.tex has to be edited by the user, but the "Official
% Use Only" (SANDmarkTopBottom) should be fairly generic. To make it look
% more like the official covers, I made it bold, 12 pt, all caps. In
% addition, I reformatted the OUO box from tabular with multicolumn
% columns, hlines and vertical bars, to a minipage inside a framebox. I
% think this is smoother.
%
% - The Technical Library has a new org number again: 4536 --> 9536 (Ann Smaple via Bill Hart)
% Also changed NM tech library org to 8944, but I am mostly guessing here...
% Added (1 electronic and 1 hardcopy) for housekeeping copies and reduce spacing
% between distribution entries. (Ann Smaple via Bill Hart)
% - Central Technical Files doesn't seem to want unclassified reports anymore. (Several)
%
% 03/01/2008 v1.29
% - Added Rich Field's SAND Memo class.
%
% 04/23/2008 v1.30
% - Change the library distribution yet again (per Monica Price)
%
% 05/22/2008 v1.31
% - A template to typeset OUO memos (Rich Field)
% - Per management request, remove all references in the examples to Harry Potter and magic
%
% 04/30/2009 v1.32
% - When strict is used, section refernces do not work, since sections are
% not numbered. Not sure how to deal with this. For now just print a
% warning during compile and update the strict examples not to use \ref.
% (Problem reported by Eric Chu)
% - In article style, the list of figures and tables are now placed directly
% after the table of contents without starting a new page first. They do
% start on a new page in report style, since that is meant for longer
% documents. (Suggested by Tammy Kolda)
% - Tammy reports that R&A sometimes asks for no paragraph indentation in the
% abstract. In strict mode, this is now the case.
% - R&A also suggests that all paragraphs are indented the same. Until now the
% first paragraph after a section heading was not indented. The strict
% option now indents the first paragraph as well. (Suggested by Tammy Kolda)
% - Some people don't like their blank pages to be blank. Added the "blank"
% option which adds "Page intentionally blank" to blank pages
% - Shared text bewteen examples is now in seperate files and \input into the
% examples
%
% 07/02/2010 v1.33
% - More accurate use of \CoverFont (interlinear spacing)
% - New DOE statement on cover page
% - (electronic copy) instead of just (electronic) for the tech library distribution
%
% 08/08/2010 v1.34
% - Add the NNSA logo on page 3. Sand publication (and report) guidelines have always
% required it, but previous versions of the Word template and this class file
% have not used it. Thanks to David Thompson who worked it out with Jennifer Hallstrom
% and provided the necessary changes.
%
% 08/14/2010 v1.35
% - The NNSA logo is not necessary at CA or NM. (Linda
% Lovato-Montoya and Jennifer Hallstrom)
%
% 12/13/2010 v1.36
% - LDRD office MS is now 0359, org 1911
%
% 04/18/2012 v1.37
% - Added new background picture to front cover (Rich Field)
% - Adjusted front cover OUO markings to match new picture
%
% 06/12/2012 v1.38
% - Updated the background on the front cover to the latest from
% look & feel.
% ******************************************************************************
% Package definitions
%
% The version and date of this file
\newcommand\SANDreportVersionOnly{ v1.38 } % leave the spaces before and after version
\newcommand\SANDreportVersionDate{2012/06/12} % Date has to be in this format!
\typeout{Using Sandia Technical Report class: \SANDreportVersionDate, \SANDreportVersionOnly Rolf Riesen}
\newcommand\SANDreportVersion{\SANDreportVersionDate \SANDreportVersionOnly}
% We need LaTeX 2e or better
\NeedsTeXFormat{LaTeX2e}
% We need ifthenelse. \newboolean are false by default
\RequirePackage{ifthen}
\RequirePackage{color}
\RequirePackage{graphicx}
% Variables
\newboolean{blankSAND} % Mark blank pages
\newboolean{relaxedSAND}
\newboolean{strictSAND}
\newboolean{reportSAND}
\newboolean{SANDmainProvided}
\newboolean{SANDnumProvided}
\newboolean{SANDprintDateProvided}
\newboolean{SANDrePrintDateProvided}
\newboolean{SANDauthorProvided}
\newboolean{SANDsupersedProvided}
\newboolean{SANDdistributionProvided}
\newboolean{inAppendix}
\newboolean{SANDmarkingsRequired}
\newboolean{MarkCover}
\newboolean{MarkBack}
\newboolean{MarkTitle}
\newboolean{MarkBody}
\newboolean{MarkBottom}
\newboolean{distCA}
\newboolean{distNM}
% Added 1/11/07 M. Cooper to remove additional text unnecessary for OUO documents on pg 2.
\newboolean{SANDnoticeOUO}
% Counters
\newcounter{SANDprintingCnt}
\setcounter{SANDprintingCnt}{1}
\newcounter{SANDreDistCnt}
\setcounter{SANDreDistCnt}{1}
% We need calc to divide by 3 in setlength and other calculations
\RequirePackage{calc}
% We need the fancy headers for the report markings
\RequirePackage{fancyhdr}
% We need eso-pic packaged for background image on front cover
% (added 4/5/12 by RF)
\RequirePackage{eso-pic}
\newcommand\BackgroundPic{
\put(-3,0){
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
%\includegraphics[width=\paperwidth,height=\paperheight]{SANDbackground}
\includegraphics[width=\paperwidth,height=\paperheight]{SANDbackground.jpg}
\vfill
}}}
% Specify what this file provides
\ProvidesPackage{SANDreport}[\SANDreportVersion]
\ProvidesFile{SANDreport.cls}[\SANDreportVersion]
% We understand five options: "relax", "strict", "report", "blank", and "OUO"
% Using "relax" makes the document look more LaTeXy
% If no option are given, then we follow the format of SAND2002-2068P
% Using "strict" tries to follow the guideline even more closely
% Specifying "report" uses the report class instead of the article class
% Specifying "blank" marks blank pages with some silly text
% Specifying "OUO" removes some unnecessary text on page 2 for OUO documents
%
\DeclareOption{blank}{
\typeout{Option "blank": Mark blank pages}
\setboolean{blankSAND}{true}
}
\DeclareOption{relax}{
\typeout{Option "relax": Relaxing some of the SAND98-0730 requirements}
\setboolean{relaxedSAND}{true}
}
\DeclareOption{strict}{
\typeout{Option "strict": Follow the SAND98-0730 requirements more strictly}
\typeout{===============================================================================}
\typeout{strict: Note that section references wont work since sections are not numbered!}
\typeout{===============================================================================}
\setboolean{strictSAND}{true}
}
\ifthenelse{\boolean{relaxedSAND} \and \boolean{strictSAND}} {
\ClassWarning{SANDreport.cls}{Both, "strict" and "relax" options given}
}{
}
\DeclareOption{report}{
\typeout{Option "report": Using the report class as a base.}
\setboolean{reportSAND}{true}
}
\DeclareOption{CA}{
\ClassError{SANDreport.cls}{"CA" option is obsolete}{Use
\@backslashchar begin{SANDdistribution}[CA] instead.}
}
\DeclareOption{NM}{
\ClassError{SANDreport.cls}{"NM" option is obsolete}{Use
\@backslashchar begin{SANDdistribution}[NM] instead.}
}
% Added 1/11/07 M. Cooper to remove additional text unnecessary for OUO documents on pg 2.
\DeclareOption{OUO}{
\typeout{Option "OUO": Formatting page 2 for OUO reports}
\setboolean{SANDnoticeOUO}{true}
}
% We're based on the standard article or report class and assume certain
% options. Set those, and pass all others to the article class
\ProcessOptions % We need to do it here so we get "reportSAND", and then again
\ifthenelse{\boolean{reportSAND}} {
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions % Repeat it here, otherwise LaTeX gets confused
\LoadClass[letterpaper,twoside,final,fleqn]{report}
}{
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions % Repeat it here, otherwise LaTeX gets confused
\LoadClass[letterpaper,twoside,final,fleqn]{article}
}
%
% Setup for letter paper (This IS a SAND report!)
%
\RequirePackage{geometry}
% \geometry{pdftex, showframe, inner=1.5in, textwidth=6in, textheight=9in}
% Changed textwidth to 6.5in and inner to 1in to more closely match official SAND cover templates - MJK, 1/12/07
\geometry{pdftex, inner=1in, textwidth=6.5in, textheight=9in}
% In strict mode, we want all paragraphs indented, even the very first one after
% a section heading. The following code does that.
%
\ifthenelse{\boolean{strictSAND}} {
\RequirePackage{indentfirst}
}{
}
% ******************************************************************************
% Check some of the user directives and setup a few things
%
\AtBeginDocument{
% Do some usage checking
\ifthenelse{\boolean{SANDnumProvided}} {
}{
\ClassError{SANDreport.cls}{\@backslashchar SANDnum
not provided}{Insert \@backslashchar SANDnum in the preamble
of your document}
}
\ifthenelse{\boolean{SANDauthorProvided}} {
}{
\ClassError{SANDreport.cls}{\@backslashchar SANDauthor
not provided}{Insert \@backslashchar SANDauthor in the preamble
of your document}
}
\ifthenelse{\boolean{SANDprintDateProvided}} {
}{
\ClassError{SANDreport.cls}{\@backslashchar SANDprintDate
not provided}{Insert \@backslashchar SANDprintDate in the
preamble of your document}
}
% Save the title, it will be cleared by \maketitle, but we need it later
\newsavebox{\SANDtitletempbox}
\sbox{\SANDtitletempbox}{\parbox{\textwidth - 1.5in}{
\centering \LARGE \bf \@title \par}
}
%
% Some measurements to format the title page properly
%
\newlength{\textwidththird}
\newlength{\topheight}
\newlength{\topleftwidth}
\newlength{\topmiddlewidth}
\newlength{\toprightwidth}
\setlength{\textwidththird}{(\textwidth / 3) - (\fboxsep * 2)}
\setlength{\topleftwidth}{\the\textwidththird}
\setlength{\topmiddlewidth}{\the\textwidththird}
\setlength{\toprightwidth}{\the\textwidththird}
% Changed following to -6, +10, and -6 from -3, +4, -3, to get "Official Use Only - Export Controlled Information
% to fit on one line on title page - MJK, 1/12/07
\addtolength{\topleftwidth}{-6em}
\addtolength{\topmiddlewidth}{+10em}
\addtolength{\toprightwidth}{-6em}
\ifthenelse{\boolean{SANDsupersedProvided}} {
\setlength{\topheight}{1.5in}
}{
\setlength{\topheight}{1.0in}
}
%
% We want a blank line between paragraphs
%
\setlength\parskip{2ex}
% We don't want a head rule
\renewcommand{\headrulewidth}{0pt}
% Some people don't like their blank pages to be blank...
% Turn this on using the blank option.
\ifthenelse{\boolean{blankSAND}} {
\makeatletter % Code I found, but can't remember where
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else % \cleardoublepage from latex.ltx
\hbox{} % \cleardoublepage from latex.ltx
\vspace*{\fill} % Code I found, but can't remember where
\begin{center} % Code I found, but can't remember where
This page intentionally left blank.\\
% {\CoverFont{m}{6}{7pt}(Well, it's not blank anymore...)}
\end{center} % Code I found, but can't remember where
\vspace{\fill} % Code I found, but can't remember where
% FIXME: Maybe we still want page numbers... Maybe another option?
\thispagestyle{empty} % Code I found, but can't remember where
\newpage % \cleardoublepage from latex.ltx
\if@twocolumn\hbox{}\newpage\fi\fi\fi} % \cleardoublepage from latex.ltx
\makeatother % Code I found, but can't remember where
}{
}
} % End of AtBeginDocument{}
% ******************************************************************************
% Cover pages
%
% ------------------------------------------------------------------------ %
% Font selections for the cover page \Coverfont{series}{size}{skip}
%
\newcommand{\CoverFont}[3]{
\fontencoding{OT1}
\fontfamily{phv}
\fontseries{#1}
\fontshape{n}
% #3 should be 20% larger than #2
\fontsize{#2}{#3}
\selectfont
}
\newcommand{\doCover}{
%
% Print the cover pages
%
\SANDmarks{cover}
\newlength{\coverindent}
\setlength{\coverindent}{1em}
\newlength{\parindentsave}
\setlength{\parindentsave}{\parindent}
\setlength{\parindent}{0em}
%
% Front Cover
%
%\hspace*{-0.375in}
% Background image (added 4/5/12, RF)
\AddToShipoutPicture*{\BackgroundPic}
%
\begin{minipage}[t]{6.0in}
\CoverFont{b}{18}{22pt}
\vspace{0.25in}
SANDIA REPORT
\vspace{0.125in}\\
\CoverFont{m}{12}{14pt}
\SANDnumVar\\
\SANDreleaseTypeVar\\
\ifthenelse{\boolean{SANDrePrintDateProvided}} {
Printed \SANDrePrintDateVar
}{
Printed \SANDprintDateVar
}
\ifthenelse{\boolean{SANDsupersedProvided}} {
\vspace{0.125in}\\
\SANDsupersedVar
}{
\\
}
\vspace{0.25in}
\CoverFont{b}{24}{28pt}
\parbox[t]{\textwidth}{
\raggedright
\@title
}
% Changed this space from 0.75in to 0.375in to match official SAND covers, and provide more space to prevent
% overfilling the page - MJK, 1/12/07
\vspace{0.375in}
\CoverFont{m}{12}{14pt}
\SANDauthorVar
\vspace{0.25in}
\CoverFont{m}{8}{10pt}
Prepared by\\
Sandia National Laboratories\\
Albuquerque, New Mexico 87185 and Livermore, California 94550\\
\\
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation,\\
a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S. Department of Energy's\\
National Nuclear Security Administration under contract DE-AC04-94AL85000.\\
\\
\MarkCoverVar
\end{minipage}
\vspace*{\fill} % Move the logo to the bottom of the cover page
%\hspace*{-0.5in}
\begin{minipage}[b]{6.0in}
\includegraphics{snllineblk}
\end{minipage}
%
% Back cover
%
\newpage
% Added centering and reduced minipage width to match official SAND covers better - MJK, 1/12/07
\begin{center}
\begin{minipage}[t]{5.5in}
\fontencoding{OT1}
\fontfamily{pnc}
\fontseries{m}
\fontshape{n}
\fontsize{9}{11pt}
\selectfont
Issued by Sandia National Laboratories, operated for the
United States Department of Energy by Sandia Corporation.
\vspace{\baselineskip}
% Removed \fontsize{11}{13} to make NOTICE simply bold, to match official SAND covers better, MJK - 1/12/07
{\fontseries{b}\selectfont NOTICE:}
This report was prepared
as an account of work sponsored by an agency of
the United States Government. Neither the United
States Government, nor any agency thereof, nor any
of their employees, nor any of their contractors,
subcontractors, or their employees, make any warranty,
express or implied, or assume any legal liability or
responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product,
or process disclosed, or represent that its use
would not infringe privately owned rights. Reference
herein to any specific commercial product, process,
or service by trade name, trademark, manufacturer, or
otherwise, does not necessarily constitute or imply
its endorsement, recommendation, or favoring by the
United States Government, any agency thereof, or any
of their contractors or subcontractors. The views and
opinions expressed herein do not necessarily state
or reflect those of the United States Government,
any agency thereof, or any of their contractors.
\vspace{\baselineskip}
% Added 1/11/07 M. Cooper to remove additional text unnecessary for OUO documents on pg 2.
\ifthenelse{\boolean{SANDnoticeOUO}}{}{
Printed in the United States of America. This report has
been reproduced directly from the best available copy.
\vspace{\baselineskip}
Available to DOE and DOE contractors from\\
\begin{tabular}{ll}
\hspace*{\coverindent} & U.S. Department of Energy \\
& Office of Scientific and Technical Information \\
& P.O. Box 62 \\
& Oak Ridge, TN 37831 \\
& \\
\end{tabular}
\\
\begin{tabular}{lll}
\hspace*{\coverindent} & Telephone: & (865) 576-8401\\
& Facsimile: & (865) 576-5728\\
& E-Mail: & reports@adonis.osti.gov\\
& Online ordering: & http://www.osti.gov/bridge\\
\end{tabular}
\vspace{\baselineskip}
\vspace{0.25in}
Available to the public from\\
\begin{tabular}{ll}
\hspace*{\coverindent} & U.S. Department of Commerce \\
& National Technical Information Service \\
& 5285 Port Royal Rd \\
& Springfield, VA 22161 \\
& \\
\end{tabular}
\\
\begin{tabular}{lll}
\hspace*{\coverindent} & Telephone: & (800) 553-6847 \\
& Facsimile: & (703) 605-6900 \\
& E-Mail: & orders@ntis.fedworld.gov \\
%& Online ordering: & http://www.ntis.gov/ordering.htm \\
& Online ordering: & http://www.ntis.gov/help/ordermethods.asp?loc=7-4-0\#online \\
\end{tabular}
}% end of text for non-OUO reports
\vspace{\baselineskip}
\vspace{0.125in}
\includegraphics[width=0.75in]{DOEbwlogo}
% Not necessary for SAND reports
% \hfill
% \includegraphics[height=0.5in]{NNSAbwlogo}
\end{minipage}
\end{center}
% Restore the original paragraph indent
\setlength{\parindent}{\parindentsave}
\SANDmarks{back}
}
% ******************************************************************************
% The user commands
%
% ------------------------------------------------------------------------ %
% Here we define the mandatory declarations
%
\newcommand{\SANDnum}[1]{
\newcommand{\SANDnumVar}{#1}
\setboolean{SANDnumProvided}{true}
}
\newcommand{\SANDauthor}[1]{
\newcommand{\SANDauthorVar}{#1}
\setboolean{SANDauthorProvided}{true}
}
\newcommand{\SANDprintDate}[1]{
\newcommand{\SANDprintDateVar}{#1}
\setboolean{SANDprintDateProvided}{true}
}
% This one is optional
\newsavebox{\SANDrePrintDistBox}
\newsavebox{\SANDrePrintDistBoxSecond}
\newsavebox{\SANDrePrintDistBoxThird}
\newsavebox{\SANDrePrintDistBoxFourth}
\newsavebox{\SANDrePrintDistBoxFifth}
\newcommand{\SANDrePrintDateVar}{}
\newcommand{\SANDrePrintDate}[1]{
\renewcommand{\SANDrePrintDateVar}{#1}
\setboolean{SANDrePrintDateProvided}{true}
\stepcounter{SANDprintingCnt}
\ifthenelse{\value{SANDprintingCnt} = 2} {
\sbox{\SANDrePrintDistBoxSecond}{Second Printing, (#1):}
}{
\ifthenelse{\value{SANDprintingCnt} = 3} {
\sbox{\SANDrePrintDistBoxThird}{Third Printing, (#1):}
}{
\ifthenelse{\value{SANDprintingCnt} = 4} {
\sbox{\SANDrePrintDistBoxFourth}{Fourth Printing, (#1):}
}{
\ifthenelse{\value{SANDprintingCnt} = 5} {
\sbox{\SANDrePrintDistBoxFifth}{Fifth Printing, (#1):}
}{
\ClassError{SANDreport.cls}{\@backslashchar SANDreDistribution
used more than four times!}{Do you really have more than
five printings? If so, you need to amend SANDreport.cls}
}
}
}
}
}
% Used to need the title at the top of the first section/chapter, but that is
% not required anymore. Make sure we start on an odd page.
\newcommand{\SANDmain}{
\cleardoublepage
\setboolean{SANDmainProvided}{true}
}
\ifthenelse{\boolean{reportSAND}} {
%
% new 1
% Once we have left the preamble and are in the body of the text,
% we want each chapter to begin on an odd numbered page
%
% new 2
% After we're done with the title page, we switch to markings for body pages.
%
\renewcommand\chapter{% % \chapter from report.cls
%\if@openright\cleardoublepage\else\clearpage\fi % deleted
\ifSANDmainProvided\cleardoublepage\else\clearpage\fi % new 1
\SANDmarks{body} % new 2
% \thispagestyle{plain}% % deleted
\global\@topnum\z@ % \chapter from report.cls
\@afterindentfalse % \chapter from report.cls
\secdef\@chapter\@schapter % \chapter from report.cls
} % \chapter from report.cls
%
% We redefine \@makechapterhead and \@schapter so we can move
% the chapter title a little bit higher up.
%
%
% This is for chapters in the body
\def\@makechapterhead#1{% % \@makechapterhead from report.cls
\vspace*{-10\p@}% % Changed
{\parindent \z@ \raggedright \normalfont % \@makechapterhead from report.cls
\ifnum \c@secnumdepth >\m@ne % \@makechapterhead from report.cls
\huge\bfseries \@chapapp\space \thechapter % \@makechapterhead from report.cls
\par\nobreak % \@makechapterhead from report.cls
\vskip 20\p@ % \@makechapterhead from report.cls
\fi % \@makechapterhead from report.cls
\interlinepenalty\@M % \@makechapterhead from report.cls
\Huge \bfseries #1\par\nobreak % \@makechapterhead from report.cls
\vskip 40\p@ % \@makechapterhead from report.cls
}} % \@makechapterhead from report.cls
%
% This is for chapters in the preamble
\def\@schapter#1{\if@twocolumn % \@schapter from report.cls
\@topnewpage[\@makeschapterhead{#1}]% % \@schapter from report.cls
\else % \@schapter from report.cls
\@makeschapterhead{#1}% % \@schapter from report.cls
\@afterheading % \@schapter from report.cls
\fi} % \@schapter from report.cls
\def\@makeschapterhead#1{% % \@schapter from report.cls
\vspace*{-10\p@}% % Changed
{\parindent \z@ \raggedright % \@schapter from report.cls
\normalfont % \@schapter from report.cls
\interlinepenalty\@M % \@schapter from report.cls
\Huge \bfseries #1\par\nobreak % \@schapter from report.cls
\vskip 40\p@ % \@schapter from report.cls
}}
}{
% new 3
% We want each section starting on a new page The report class already does this
%
% new 4
% Center the section headings
%
\renewcommand\section{\clearpage% % new 3
\@startsection {section}{1}{\z@}% % \section from article.cls
{-3.5ex \@plus -1ex \@minus -.2ex}% % \section from article.cls
{2.3ex \@plus.2ex}% % \section from article.cls
%{\normalfont\Large\bfseries}% % deleted
{\normalfont\Large\bfseries\centering}% % new 4
} % \section from article.cls
% This is basicaly the same as above, but without the clearpage. We want that
% for \listof... in article.cls to conserve some paper.
\newcommand\SANDTOCsection{% % new 3
\@startsection {section}{1}{\z@}% % \section from article.cls
{-3.5ex \@plus -1ex \@minus -.2ex}% % \section from article.cls
{2.3ex \@plus.2ex}% % \section from article.cls
%{\normalfont\Large\bfseries}% % deleted
{\normalfont\Large\bfseries\centering}% % new 4
} % \section from article.cls
% Redefine \listoffigures and \listoftables to use \SANDTOCsection instead of \section
%
\renewcommand\listoffigures{% % \listoffigures from article.cls
\SANDTOCsection*{\listfigurename}% % Change \section to \SANDTOCsection
\@mkboth{\MakeUppercase\listfigurename}% % \listoffigures from article.cls
{\MakeUppercase\listfigurename}% % \listoffigures from article.cls
\@starttoc{lof}% % \listoffigures from article.cls
} % \listoffigures from article.cls
%
\renewcommand\listoftables{% % \listoftables from article.cls
\SANDTOCsection*{\listtablename}% % Change \section to \SANDTOCsection
\@mkboth{\MakeUppercase\listtablename}% % \listoftables from article.cls
{\MakeUppercase\listtablename}% % \listoftables from article.cls
\@starttoc{lot}% % \listoftables from article.cls
} % \listoftables from article.cls
}
% ------------------------------------------------------------------------ %
% Distribution page at the end
% We have to create our own description environment, so we don't
% disturb the original one.
\newlength{\SANDdistwidth} % Max width of distribution lines
\setlength{\SANDdistwidth}{0.8\textwidth}
\newlength{\SANDMSdistwidth} % Width of field for MS number
\setlength{\SANDMSdistwidth}{9ex}
\newcommand{\SANDdescriptionlabel}[1]{
\makebox[3em][r]{#1}
}
\newenvironment{SANDdescription}{
\list{}
{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\SANDdescriptionlabel}
}{
\endlist
}
\newenvironment{SANDdistribution}[1][nothing]{
\setboolean{SANDdistributionProvided}{true}
\newboolean{distCRADA}
\newboolean{distPatent}
\newboolean{distLDRD}
\newboolean{distClassified}
\newcommand{\SANDdistCRADA}{
\setboolean{distCRADA}{true}
}
\newcommand{\SANDdistPatent}{
\setboolean{distPatent}{true}
}
\newcommand{\SANDdistLDRD}{
\setboolean{distLDRD}{true}
}
\newcommand{\SANDdistClassified}{
\setboolean{distClassified}{true}
\SANDdistInternalM{2}{M2497}{Central Technical Files}{8944}
}
% Option NM given
\ifthenelse{\equal{#1}{NM}} {
\typeout{Option "NM": Using the SNL NM default distribution list.}
\setboolean{distNM}{true}
}{
}
% Option CA given
\ifthenelse{\equal{#1}{CA}} {
\typeout{Option "CA": Using the SNL CA default distribution list.}
\setboolean{distCA}{true}
}{
}
\clearpage
{\Large DISTRIBUTION:}
\normalsize
\raggedbottom
\begin{SANDdescription}
}{
\ifthenelse{\boolean{distCA}} {
% Insert the standard CA distribution
\ifthenelse{\boolean{distClassified}} {
\SANDdistInternal{2}{9018}{Central Technical Files}{8944 (1 electronic and 1 hardcopy)}
}{}
\SANDdistInternal{1}{0899}{Technical Library}{8944 (electronic copy)}