-
Notifications
You must be signed in to change notification settings - Fork 22
/
pmix.sty
1089 lines (920 loc) · 40 KB
/
pmix.sty
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
% This is pmix.sty, the preamble and style definitions for the PMIx specification.
%
% This specification file, and latex structure was derived from/inspired by the OpenMP specification. So some similarity between the two latex files is expected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Quick list of the environments, commands and macros supported.
% Search below for more details.
%
% Formatting Text:
% -----------------------
% \notestart - "Note:" Callout section
% \noteheader - \noteheader is optional "Note:" prefix for text
% ...
% \noteend
% -----------------------
% \rationalestart - "Rationale" Callout section
% ...
% \rationaleend
% -----------------------
% \adviceuserstart - "Advice to users" Callout section
% ...
% \adviceuserend
% -----------------------
% \adviceimplstart - "Advice to PMIx library implementers" Callout section
% ...
% \adviceimplend
% -----------------------
% \advicermstart - "Advice to PMIx server hosts" Callout section
% ...
% \advicermend
% -----------------------
%
% Formatting Code:
% \code{} - Code text
% \var{} - Variable
% -----------------------
% \begin{codepar} - Section of generic code
% ... - use language specific macro if language specific code
% \end[codepar}
% -----------------------
% \cspecificstart - C specific code block
% ...
% \cspecificend
% -----------------------
%
% Attributes:
% \refAttributeItem{} - Cross reference
% \refattr{} - Same as above
% \pasteAttributeItem{} - Paste full description
%
% Structures:
% \refstruct{} - Reference a structure
% \structref{} - Same as above
% \specrefstruct{} - Reference a structure by section number and page
%
% APIs:
% \refapi{} - Reference an API function
% \refconst{} - Constant reference
% \refarg{} / \argref{} - Reference an argument to an API function
%
% Cross referencing:
% \chapterref{} - Reference a Chapter by number and page
% \specref{} - Reference a Section by number and page
% \appendixref{} - Reference an Appendix by number and page
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{comment} % allow use of \begin{comment}
\usepackage{changes} % Allows new and deleted text to be called out
\usepackage{ifpdf,ifthen} % allow conditional tests in LaTeX definitions
\usepackage{makecell} % Allows common formatting in cells with \thread & \makecell
\usepackage[T1]{fontenc} % Allow us to use underscore freely in the document
\catcode`\_=12 % Use \sb for subscripts
\usepackage{verbatim}
\usepackage{scrextend}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document data
%
\author{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{courier}
\usepackage{helvet}
\usepackage[utf8]{inputenc}
\usepackage{textgreek}
% Main body serif font:
\usepackage{tgtermes}
\usepackage[T1]{fontenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphic elements
\usepackage{graphicx}
\usepackage{framed} % for making boxes with \begin{framed}
\usepackage{tikz} % for flow charts, diagrams, arrows
\usepackage{wrapfig}
\usepackage{subcaption} % for side-by-side figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page formatting
\usepackage[paperwidth=7.5in, paperheight=9in,
top=0.75in, bottom=1.0in, left=1.4in, right=0.6in]{geometry}
\usepackage{changepage} % allows left/right-page margin readjustments
\setlength{\oddsidemargin}{0.185in}
\setlength{\evensidemargin}{0.185in}
\raggedbottom
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Indexing and Table of Contents
\usepackage{imakeidx}
\usepackage[nodotinlabels]{titletoc} % required for its [nodotinlabels] option
% Clickable links in TOC and index:
\usepackage[hyperindex=true,linktocpage=true]{hyperref}
\hypersetup{
bookmarksnumbered = true,
bookmarksopen = false,
colorlinks = true, % Colors links instead of red boxes
urlcolor = blue, % Color for external links
linkcolor = blue % Color for internal links
}
% Formatting for "Definition" items in the index
\newcommand{\indexfmt}[1]{\textbf{\underline{#1}}}
% Formatting for deprecated items in the index
\newcommand{\indexdepfmt}[1]{\textbf{\underline{#1}}}
% Formatting for removed items in the index
\newcommand{\indexrmfmt}[1]{\textbf{\underline{#1}}}
% \url styled in Roman font.
\urlstyle{rm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paragraph formatting
\usepackage{setspace} % allows use of \singlespacing, \onehalfspacing
\usepackage{needspace} % allows use of \needspace to keep lines together
\usepackage{parskip} % removes paragraph indenting
\raggedright
\usepackage[raggedrightboxes]{ragged2e} % is this needed?
\lefthyphenmin=60 % only hyphenate if the left part is >= this many chars
\righthyphenmin=60 % only hyphenate if the right part is >= this many chars
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulleted (itemized) lists
% Align bullets with section header
% Align text left
% Small bullets
% \compactitem for single-spaced lists (used in the Examples doc)
\usepackage{enumitem} % for setting margins on lists
\setlist{leftmargin=*} % don't indent bullet items
\renewcommand{\labelitemi}{{\normalsize$\bullet$}} % bullet size
% There is a \compactitem defined in package parlist (and perhaps others), however,
% we'll define our own version of compactitem in terms of package enumitem that
% we already use:
\newenvironment{compactitem}
{\begin{itemize}[itemsep=-1.2ex]}
{\end{itemize}}
\newenvironment{compactitemize}
{\begin{itemize}[itemsep=-1.2ex]}
{\end{itemize}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Text placement in the left margin
%
% - \textInMargin{text} Add the text to the left margin between line numbers and text
%\usepackage[showboxes]{textpos}
%\usepackage{textpos}
%\setlength{\TPHorizModule}{1pt}
%\setlength{\TPVertModule}{1pt}
%\TPMargin{0pt}
%\textblockcolor{red}
\usepackage{lipsum}% for random text only
\usepackage{soul}
\usepackage{marginnote}
% Lengths to get place the \textInMargin consistently on odd and even pages
\newlength{\InternalNoteOddmarginwidth}
\setlength{\InternalNoteOddmarginwidth}{\marginparwidth}
\addtolength{\InternalNoteOddmarginwidth}{-1.4in}
\newlength{\InternalNoteOddtextwidth}
\setlength{\InternalNoteOddtextwidth}{\textwidth}
\addtolength{\InternalNoteOddtextwidth}{0.2in}
\newlength{\InternalNoteEvenmarginwidth}
\setlength{\InternalNoteEvenmarginwidth}{\marginparwidth}
\addtolength{\InternalNoteEvenmarginwidth}{-1.45in}
\newlength{\InternalNoteEventextwidth}
\setlength{\InternalNoteEventextwidth}{-70pt}
\newcommand*\textInMargin[1]{%
% \edef\marginnotevadjust{0pt}%
\checkoddpage%
\ifthenelse{\boolean{oddpage}}
{
\edef\marginparwidth{\InternalNoteOddmarginwidth}%
\edef\marginnotetextwidth{\the\InternalNoteOddtextwidth}%
\marginnote[#1]{}[0pt]%
}{
\edef\marginparwidth{\InternalNoteEvenmarginwidth}%
\edef\marginnotetextwidth{\InternalNoteEventextwidth}%
\marginnote[]{#1}%
}
}
\reversemarginpar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Floating version
%
% - \versionMarker{1.2} Puts "PMIx v1.2" in the margin
\newcommand{\versionMarker}[1]{%
\textInMargin{\textit{PMIx v#1}}%
}
\newcommand{\versionMarkerProvisional}[1]{%
\textInMargin{\small{\hl{\textit{Provisional v#1}}}}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PMIx Standard Process markers
%
% - Provisional items
% \provisionalMarker Add a provisional label
% \markProvisional Add a provisional label and highlight the provided text
%
% Putting this in the margin is not consistently working.
% Instead put this marker in-line in the text.
%\newcommand{\provisionalMarker}[0]{% -14
% \textInMargin{\small{\hl{\textit{Provisional}}}}%
%}
\newcommand{\provisionalMarker}[0]{% -14
\small{\hl{\textit{(Provisional)}}}%
}
\newcommand{\provisionalChapter}[1]{% -14
\chapter{#1 \small{\textit{(Provisional)}}}%
}
\newcommand{\provisionalSection}[1]{% -14
\section{#1 \small{\textit{(Provisional)}}}%
}
\newcommand{\markProvisional}[1]{% -14
\sethlcolor{yellow}%
\provisionalMarker{}%
\hl{#1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Enumerated list with lowercase alphabet lettering
% \alphaenum for default-spaced lists
% \compactalphaenum for single-spaced lists
% There is a \compactitem defined in package parlist (and perhaps others), however,
% we'll define our own version of compactitem in terms of package enumitem that
% we already use:
\newenvironment{alphaenum}
{\begin{enumerate}[label=\alph*)]}
{\end{enumerate}}
\newenvironment{compactalphaenum}
{\begin{enumerate}[label=\alph*),itemsep=-1.2ex]}
{\end{enumerate}}
% Argument list for an interface, for use in a \begin{arglist} section
% \argin Input argument
% \argout Output argument
% \arginout Input/Output argument
% \argreturn Value returned
%%% Old Method using tables.... line numbers didn't work if a cell wrapped...
%\newlength\argdesclen
%\setlength\argdesclen{\dimexpr \linewidth -13em -4\tabcolsep}
%\newenvironment{arglist}{%
% \begin{edtable}{tabular}{p{3em}p{10em}p{\argdesclen}}}
% {\end{edtable}\vspace{.25em}}
%
%\newcommand{\argin}[2]{\textbf{IN} & \code{#1} & #2\\}
%\newcommand{\argout}[2]{\textbf{OUT} & \code{#1} & #2\\}
%\newcommand{\arginout}[2]{\textbf{INOUT} & \code{#1} & #2\\}
\newenvironment{arglist}
{\begin{description}[style=nextline,labelindent=\parindent,leftmargin=*,itemindent=\dimexpr-17pt-\labelsep\relax,itemsep=-1.3ex]}
{\end{description}}
\newcommand{\argin}[2]{\item[IN ~~~~\code{#1}] #2}
\newcommand{\argout}[2]{\item[OUT ~~~\code{#1}] #2}
\newcommand{\arginout}[2]{\item[INOUT ~\code{#1}] #2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tables
% This allows tables to flow across page breaks, headers on each new page, etc.
\usepackage{supertabular}
\usepackage{caption}
\usepackage{longtable}
\usepackage{pdflscape} % for 'landscape' environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Line numbering
\usepackage[pagewise,edtable]{lineno} % for line numbers on left side of the page
\pagewiselinenumbers
\setlength\linenumbersep{6em}
\renewcommand\linenumberfont{\normalfont\small\sffamily}
\nolinenumbers % start with line numbers off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Footers
\usepackage{fancyhdr} % makes right/left footers
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\cfoot{}
\renewcommand{\headrulewidth}{0pt}
% Left side on even pages:
% This requires that \footerText be defined in the master document:
\fancyfoot[LE]{\bfseries \thepage \mdseries \hspace{2em} \footerText}
\fancyhfoffset[E]{4em}
% Right side on odd pages:
\fancyfoot[RO]{\mdseries \leftmark \hspace{2em} \bfseries \thepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section header format - we use five levels: \chapter \section \subsection \subsubsection
\usepackage{titlesec} % format headers with \titleformat{}
% Format and spacing for chapter, section, subsection, and subsubsection headers:
\setcounter{secnumdepth}{5} % show numbers down to subsubsection level
\titleformat{\chapter}[display]%
{\normalfont\sffamily\upshape\Huge\bfseries\nolinenumbers\fontsize{20}{20}\selectfont}%
{\normalfont\sffamily\scshape\large\bfseries\nolinenumbers \hspace{-0.7in} \MakeUppercase%
{\chaptertitlename} \thechapter}%
{0em}{}[\vspace{1.0em}\hrule]
% {<left>}{<before-sep>}{<after-sep>}
\titlespacing{\chapter}{0ex}{0em plus 1em minus 1em}{1em plus 1em minus 1em}[10em]
\titleformat{\section}[hang]{\huge\bfseries\sffamily\fontsize{16}{16}\selectfont}{\thesection}{1.0em}{}
% {<left>}{<before-sep>}{<after-sep>}
\titlespacing{\section}{-5em}{2em plus 1em minus 1em}{1em plus 0.5em minus 0em}[10em]
\titleformat{\subsection}[hang]{\LARGE\bfseries\sffamily\fontsize{14}{14}\selectfont}{\thesubsection}{1.0em}{}
\titlespacing{\subsection}{-5em}{2em plus 1em minus 2.0em}{0.75em plus 0.5em minus 0em}[10em]
\titleformat{\subsubsection}[hang]{\needspace{1\baselineskip}%
\Large\bfseries\sffamily\fontsize{12}{12}\selectfont}{\thesubsubsection}{1.0em}{}
\titlespacing{\subsubsection}{-5em}{1em plus 0.8em minus 0.8em}{0.5em plus 0.5em minus 0em}[10em]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros for minor headers: Summary, Syntax, Description, etc.
% These headers are defined in terms of \paragraph
\titleformat{\paragraph}[block]{\large\bfseries\sffamily\fontsize{11}{11}\selectfont}{}{}{}
\titlespacing{\paragraph}{0em}{1.0em plus 0.55em minus 0.5em}{0.0em plus 0.55em minus 0.0em}
% Use one of the convenience macros below, or \littleheader{} for an arbitrary header
\newcommand{\littleheader}[1] {\paragraph*{#1}}
\newcommand{\comments} {\littleheader{Comments}}
\newcommand{\descr} {\littleheader{Description}}
\newcommand{\format} {\littleheader{Format}}
\newcommand{\summary} {\littleheader{Summary}}
\newcommand{\history} {\littleheader{History}}
\newcommand{\reqattr} {\littleheader{\ac{RM} Required Attributes}}
\newcommand{\optattr} {\littleheader{\ac{RM} Optional Attributes}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Clipboard
%
% \StdCopy{TAG}{BODY}
% \StdPaste{TAG}
%
% Inspired by this thread:
% https://tex.stackexchange.com/questions/150790/how-to-make-text-be-copied-to-another-part-of-a-document
\makeatletter
\newcommand\StdCopy [2] {%
\immediate\write\@auxout{\unexpanded{\global\long\@namedef{clipbrd@#1}{#2}}}
}
\newcommand\StdCopyEcho [2] {%
\StdCopy{#1}{#2}%
#2
}
\newcommand\StdPaste [1] {%
\ifcsname clipbrd@#1\endcsname
\@nameuse{clipbrd@#1}%
\else
??unknown??
\fi
}
\makeatother
%-------------------------------
% Constants
%
% \begin{constantdesc} Start a list of constant declarations
%
% \declareconstitem Declare Attribute
% \declareconstitemProvisional Declare Constant - Provisional
% \declareconstitemDEP Declare Constant - Deprecated
% \declareconstitemRM Declare Constant - Removed
% \declareconstitemvalue Declare Constant Value
%
% \pasteAttributeItem Paste a copy of the Attribute declaration
% \pasteAttributeItemBegin Paste a copy of the Attribute declaration
% \pasteAttributeItemEnd with space to extend the description.
%
% \refconst Reference a Constant
%
\newenvironment{constantdesc}
{\begin{description}[itemsep=-1.3ex,itemindent=\dimexpr-17pt-\labelsep\relax]}
{\end{description}}
\newcommand{\declareconstitem}[1]{%
\item[\code{#1}]%
\index[index_const]{#1|indexfmt} \label{const:#1}%
\hspace{1em}%
}
\newcommand{\declareconstitemvalue}[2]{%
\item[\code{#1}]%
\index[index_const]{#1|indexfmt} \label{const:#1}%
\hspace{0.25em} \code{#2} \hspace{1em}%
}
\newcommand{\declareconstitemProvisional}[1]{%
\item[\hl{\code{#1}}] \provisionalMarker{}%
\index[index_const]{#1|indexfmt} \label{const:#1}%
\hspace{1em}%
}
\newcommand{\declareconstitemvalueProvisional}[2]{%
\item[\hl{\code{#1}}]\provisionalMarker{}%
\index[index_const]{#1|indexfmt} \label{const:#1}%
\hspace{1em} \code{#2} \hspace{1em}%
}
\newcommand{\declareconstitemDEP}[1]{%
\item[\color{green!80!black}\code{#1}]%
\index[index_const]{Z_#1@\emph{#1}!\textbf{Deprecated}|indexdepfmt} \label{const:#1}
\hspace{1em}%
}
\newcommand{\declareconstitemRM}[1]{%
\item[\color{red!80!black}\code{#1}]%
\index[index_const]{Z_#1@\emph{#1}!\textbf{Removed}|indexrmfmt} \label{const:#1}%
\hspace{1em}%
}
\newcommand{\refconst}[1]{\hyperref[const:#1]{\code{#1}}}
%-------------------------------
% Envars
%
% \declareEnvar Declare Envar
% \declareEnvarProvisional Declare Envar - Provisional
% \declareEnvarDEP Declare Envar - Deprecated
% \declareEnvarRM Declare Envar - Removed
%
% \refEnvarItem or \refenvar Reference an envar
\newcommand{\InternaldeclareEnvar}[2]{%
\vspace{-1.3ex}%
\expandafter\begin{adjustwidth}{.95cm}{}%
\StdCopyEcho{#1}{#2}%
\end{adjustwidth}%
\vspace{-1.3ex}%
}
\newcommand{\declareEnvar}[2]{%
\code{#1}%
\index[index_envars]{#1|indexfmt} \label{envar:#1}%
\InternaldeclareEnvar{#1}{#2}%
}
\newcommand{\declareEnvarProvisional}[2]{%
\hl{\code{#1}} \provisionalMarker{}%
\index[index_envars]{#1|indexfmt} \label{envar:#1}%
\InternaldeclareEnvar{#1}{#2}%
}
\newcommand{\declareEnvarDEP}[2]{%
{\color{green!80!black}\code{#1}}%
\index[index_envars]{Z_#1@\emph{#1}!\textbf{Deprecated}|indexdepfmt} \label{envar:#1}%
\InternaldeclareEnvar{#1}{#2}%
}
\newcommand{\declareEnvarRM}[2]{%
{\color{green!80!black}\code{#1}}%
\index[index_envars]{Z_#1@\emph{#1}!\textbf{Removed}|indexrmfmt} \label{envar:#1}%
\InternaldeclareEnvar{#1}{#2}%
}
\newcommand{\refEnvarItem}[1]{\index[index_envars]{#1}\hyperref[envar:#1]{\code{#1}}}
\newcommand{\refenvar}[1]{\refEnvarItem{#1}}
%-------------------------------
% Attributes
%
% \declareAttribute Declare Attribute
% \declareAttributeProvisional Declare Attribute - Provisional
% \declareAttributeDEP Declare Attribute - Deprecated
% \declareAttributeRM Declare Attribute - Removed
%
% \pasteAttributeItem Paste a copy of the Attribute declaration
% \pasteAttributeItemBegin Paste a copy of the Attribute declaration
% \pasteAttributeItemEnd with space to extend the description.
%
% \refAttributeItem or \refattr Reference an Attribute
%
\newcommand{\InternaldeclareAttributeBody}[4]{%
\StdCopy{str:#1}{\code{#2}}%
\StdCopy{attr:#1}{\code{#3}}%
\expandafter\begin{adjustwidth}{.95cm}{}% Increase left margin by .95cm, without changing right margin
\setlength{\parskip}{0pt}% Don't start with a paragraph skip in this block
\StdCopyEcho{#1}{#4}%
\end{adjustwidth}%
\vspace{-1.3ex}%
}
\newcommand{\declareAttribute}[4]{%
\code{#1} ~~\code{#2}~~(\code{#3})%
\index[index_attribute]{#1|indexfmt} \label{attr:#1}%
\InternaldeclareAttributeBody{#1}{#2}{#3}{#4}%
}
\newcommand{\declareAttributeProvisional}[4]{%
\hl{\code{#1} ~~\code{#2}~~(\code{#3})} \provisionalMarker{}%
\index[index_attribute]{#1|indexfmt} \label{attr:#1}%
\InternaldeclareAttributeBody{#1}{#2}{#3}{#4}%
}
\newcommand{\declareAttributeDEP}[4]{%
{\color{green!80!black}\code{#1}} ~~\code{#2}~~(\code{#3})%
\index[index_attribute]{Z_#1@\emph{#1}!\textbf{Deprecated}|indexdepfmt} \label{attr:#1}%
\InternaldeclareAttributeBody{#1}{#2}{#3}{#4}%
}
\newcommand{\declareAttributeRM}[4]{%
{\color{red!80!black}\code{#1}} ~~\code{#2}~~(\code{#3})%
\index[index_attribute]{Z_#1@\emph{#1}!\textbf{Removed}|indexrmfmt} \label{attr:#1}%
\InternaldeclareAttributeBody{#1}{#2}{#3}{#4}%
}
\newcommand{\pasteAttributeItemBegin}[1]{
\refAttributeItem{#1} ~~\StdPaste{str:#1}~~(\StdPaste{attr:#1})
\vspace{-1.3ex}
\expandafter
\begin{adjustwidth}{.95cm}{}
\StdPaste{#1}
}
\newcommand{\pasteAttributeItemEnd}{
\end{adjustwidth}
}
\newcommand{\pasteAttributeItem}[1]{
\pasteAttributeItemBegin{#1}
\pasteAttributeItemEnd{}
}
\newcommand{\refAttributeItem}[1]{\index[index_attribute]{#1}\hyperref[attr:#1]{\code{#1}}}
\newcommand{\refattr}[1]{\refAttributeItem{#1}}
%-------------------------------
% APIs
%
% \declareapi Declare API
% \declareapiDEP Declare API - Deprecated
% \declareapiDEPNODISP Declare API - Deprecated without displaying
%
% \refapi Reference API
% \refapiDEP Reference Deprecated API
%
% \refarg or \argref Reference API argument
%
\newcommand{\declareapi}[1]{%
\index[index_api]{#1|indexfmt} \label{apifn:#1}%
}
\newcommand{\declareapiProvisional}[1]{%
\index[index_api]{#1|indexfmt} \label{apifn:#1} \provisionalMarker{}%
}
\newcommand{\declareapiDEPNODISP}[1]{%
\index[index_api]{Z_#1@#1!\textbf{(Deprecated)}|indexdepfmt} \label{apifn:#1}%
}
\newcommand{\declareapiDEP}[1]{%
{\color{green!80!black}\code{#1}}%
\declareapiDEPNODISP{#1}%
}
\newcommand{\refapi}[1]{\index[index_api]{#1}\hyperref[apifn:#1]{\code{#1}}}
\newcommand{\refapiDEP}[1]{\index[index_api]{Z_#1@#1!\textbf{(Deprecated)}}\hyperref[apifn:#1]{\code{#1}}}
\newcommand{\refarg}[1] {{\textrm{\textmd{\itshape{#1}}}}}
\newcommand{\argref}[1] {\refarg{#1}}
%-------------------------------
% API Bindings
%
% \declareapibinding Declare API Binding
%
% \refapibinding Reference API Binding
% {Language specific function}{Primary C PMIx function}{Language Classification}
\newcommand{\declareapibinding}[3]{%
\index[index_api]{#2!#1 (#3)} \label{bindingfn:#1}%
}
\newcommand{\refapibinding}[1]{\hyperref[bindingfn:#1]{\code{#1}}}
%-------------------------------
% Macros
%
% \declaremacro Declare Macro
%
% \refmacro Reference Macro
\newcommand{\declaremacro}[1]{%
\index[index_macro]{#1|indexfmt} \label{macro:#1}%
}
\newcommand{\declaremacroProvisional}[1]{%
\index[index_macro]{#1|indexfmt} \label{macro:#1} \provisionalMarker{}%
}
\newcommand{\refmacro}[1]{\index[index_macro]{#1}\hyperref[macro:#1]{\code{#1}}}
\newcommand{\declaremacroDEPNODISP}[1]{%
\index[index_macro]{Z_#1@#1!\textbf{(Deprecated)}|indexdepfmt} \label{macro:#1}%
}
\newcommand{\declaremacroDEP}[1]{%
{\color{green!80!black}\code{#1}}%
\declaremacroDEPNODISP{#1}%
}
%-------------------------------
% Terms
%
% \declaretermIdx -- internal use only
%
% \declareterm{myterm}
% - Declares a single term with no variants.
% \declaretermAlt{myterm}{myterms,ourterms}
% - Declares a single term with additional variants (myterms, ourterms)
\newcommand{\declaretermIdx}[1]{\index{#1|indexfmt}\label{term:#1}}
\newcommand{\declareterm}[1]{\emph{#1}\declaretermIdx{#1}}
\newcommand{\declaretermAlt}[2]{%
\declareterm{#1}%
\foreach \x [count=\xi] in {#2} {\declaretermIdx{\x}}%
}
\newcommand{\refterm}[1]{\index{#1}\hyperref[term:#1]{\emph{#1}}}
\newenvironment{signature}[1]{
\versionMarker{#1}
\cspecificstart
\begin{codepar}
}{
\end{codepar}
\cspecificend
}
\newcommand{\copySignature}[3]{
\StdCopyEcho{sig:#1}{
\begin{signature}{#2}
#3
\end{signature}
}
}
\newcommand{\pasteSignature}[1]{
\StdPaste{sig:#1}
}
\newlength{\sigspace}
\setlength{\sigspace}{0.083in} % width of the bolded, monospace characters used in codepar env
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code and placeholder semantic tagging.
%
% When possible, prefer semantic tags instead of typographic tags. The
% following semantics tags are defined here:
%
% \code{} % for bold monospace keywords, code, operators, etc.
% \plc{} % for italic placeholder names, grammar, etc.
%
% For function prototypes or other code snippets, you can use \code{} as
% the outer wrapper, and use \plc{{} inside. Example:
%
% \code{\#pragma omp directive ( \plc{some-placeholder-identifier} :}
%
% To format text in italics for emphasis (rather than text as a placeholder),
% use the generic \emph{} command. Example:
%
% This sentence \emph{emphasizes some non-placeholder words}.
% Enable \alltt{} for formatting blocks of code:
\usepackage{alltt}
% This sets the default \code{} font to tt (monospace) and bold:
\newcommand{\code}[1]{{\texttt{\textbf{#1}}}}
\newcommand{\var}[1] {{\textrm{\textmd{\itshape{#1}}}}}
\soulregister{\code}{1}
% Environment for a paragraph of literal code, single-spaced, no outline, no indenting:
\newenvironment{codepar}[1]
{\begin{alltt}\bfseries #1}
{\end{alltt}}
\usepackage{setspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros for the black and blue lines and arrows delineating language-specific
% and notes sections. Example:
%
% \fortranspecificstart
% This is text that applies to Fortran.
% \fortranspecificend
% local parameters for use \linewitharrows and \notelinewitharrows:
\newlength{\sbsz}\setlength{\sbsz}{0.05in} % size of arrows
\newlength{\sblw}\setlength{\sblw}{1.35pt} % line width (thickness)
\newlength{\sbtw} % text width
\newlength{\sblen} % total width of horizontal rule
\newlength{\sbht} % height of arrows
\newlength{\sbhadj} % vertical adjustment for aligning arrows with the line
\newlength{\sbns}\setlength{\sbns}{7\baselineskip} % arg for \needspace for downward arrows
% \notelinewitharrows is a helper command that makes a black Note marker:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
\newcommand{\notelinewitharrows}[2]{%
\needspace{0.1\baselineskip}%
\vbox{\begin{tikzpicture}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, #2] (2\sbsz - \sblw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\end{tikzpicture}}}
% \adviceuserline is a helper command that makes a red horizontal line, up or down arrows, and some text:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
% arg 3 = text
% arg 4 = text width
\newcommand{\adviceuserline}[4]{%
\needspace{0.1\baselineskip}%
\vbox to 1\baselineskip {\begin{tikzpicture}%
\setlength{\sbtw}{#4}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw[color=red!80!black] (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, color=red!80!black, #2] (2\sbsz - \sblw, \sbhadj) -- (0.5\sblen - 0.5\sbtw, \sbhadj);
\draw[line width=\sblw, color=red!80!black, #2] (0.5\sblen + 0.5\sbtw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw[color=red!80!black] (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\node[color=red!80!black] at (0.5\sblen, 0) {\large \textsf{\textup{#3}}};
\end{tikzpicture}}}
% \adviceimpline is a helper command that makes a green horizontal line, up or down arrows, and some text:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
% arg 3 = text
% arg 4 = text width
\newcommand{\adviceimpline}[4]{%
\needspace{0.1\baselineskip}%
\vbox to 1\baselineskip {\begin{tikzpicture}%
\setlength{\sbtw}{#4}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw[color=green!60!black] (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, color=green!60!black, #2] (2\sbsz - \sblw, \sbhadj) -- (0.5\sblen - 0.5\sbtw, \sbhadj);
\draw[line width=\sblw, color=green!60!black, #2] (0.5\sblen + 0.5\sbtw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw[color=green!60!black] (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\node[color=green!60!black] at (0.5\sblen, 0) {\large \textsf{\textup{#3}}};
\end{tikzpicture}}}
% \advicermline is a helper command that makes an orange horizontal line, up or down arrows, and some text:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
% arg 3 = text
% arg 4 = text width
\newcommand{\advicermline}[4]{%
\needspace{0.1\baselineskip}%
\vbox to 1\baselineskip {\begin{tikzpicture}%
\setlength{\sbtw}{#4}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw[color=orange!60!black] (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, color=orange!60!black, #2] (2\sbsz - \sblw, \sbhadj) -- (0.5\sblen - 0.5\sbtw, \sbhadj);
\draw[line width=\sblw, color=orange!60!black, #2] (0.5\sblen + 0.5\sbtw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw[color=orange!60!black] (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\node[color=orange!60!black] at (0.5\sblen, 0) {\large \textsf{\textup{#3}}};
\end{tikzpicture}}}
% \ratline is a helper command that makes a purple horizontal line, up or down arrows, and some text:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
% arg 3 = text
% arg 4 = text width
\newcommand{\ratline}[4]{%
\needspace{0.1\baselineskip}%
\vbox to 1\baselineskip {\begin{tikzpicture}%
\setlength{\sbtw}{#4}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw[color=purple!40] (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, color=purple!40, #2] (2\sbsz - \sblw, \sbhadj) -- (0.5\sblen - 0.5\sbtw, \sbhadj);
\draw[line width=\sblw, color=purple!40, #2] (0.5\sblen + 0.5\sbtw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw[color=purple!40] (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\node[color=purple!90] at (0.5\sblen, 0) {\large \textsf{\textup{#3}}};
\end{tikzpicture}}}
% \linewitharrows is a helper command that makes a blue horizontal line, up or down arrows, and some text:
% arg 1 = 1 or -1 for up or down arrows
% arg 2 = solid or dashed or loosely dashed, etc.
% arg 3 = text
% arg 4 = text width
\newcommand{\linewitharrows}[4]{%
\needspace{0.1\baselineskip}%
\vbox to 1\baselineskip {\begin{tikzpicture}%
\setlength{\sbtw}{#4}%
\setlength{\sblen}{\linewidth}%
\setlength{\sbht}{#1\sbsz}\setlength{\sbht}{1.4\sbht}%
\setlength{\sbhadj}{#1\sblw}\setlength{\sbhadj}{0.25\sbhadj}%
\filldraw[color=blue!40] (\sblen, 0) -- (\sblen - \sbsz, \sbht) -- (\sblen - 2\sbsz, 0) -- (\sblen, 0);
\draw[line width=\sblw, color=blue!40, #2] (2\sbsz - \sblw, \sbhadj) -- (0.5\sblen - 0.5\sbtw, \sbhadj);
\draw[line width=\sblw, color=blue!40, #2] (0.5\sblen + 0.5\sbtw, \sbhadj) -- (\sblen - 2\sbsz + \sblw, \sbhadj);
\filldraw[color=blue!40] (0, 0) -- (\sbsz, \sbht) -- (0 + 2\sbsz, 0) -- (0, 0);
\node[color=blue!90] at (0.5\sblen, 0) {\large \textsf{\textup{#3}}};
\end{tikzpicture}}}
\newcommand{\VSPb}{\vspace{0.5ex plus 5ex minus 0.25ex}}
\newcommand{\VSPa}{\vspace{0.25ex plus 5ex minus 0.25ex}}
% C
\newcommand{\cspecificstart}{\needspace{\sbns}\linewitharrows{-1}{solid}{C}{3em}}
\newcommand{\cspecificend}{\linewitharrows{1}{solid}{C}{3em}\VSPa}
% Fortran
\newcommand{\fortranspecificstart}{\VSPb\linewitharrows{-1}{solid}{Fortran}{6em}\VSPa}
\newcommand{\fortranspecificend}{\VSPb\linewitharrows{1}{solid}{Fortran}{6em}\VSPa}
% Python
\newcommand{\pyspecificstart}{\needspace{\sbns}\linewitharrows{-1}{solid}{Python}{6em}}
\newcommand{\pyspecificend}{\linewitharrows{1}{solid}{Python}{6em}\VSPa}
% Note
\newcommand{\notestart}{\VSPb\notelinewitharrows{-1}{solid}\VSPa}
\newcommand{\noteend}{\VSPb\notelinewitharrows{1}{solid}\VSPa}
% convenience macro for formatting the word "Note:" at the beginning of note blocks:
\newcommand{\noteheader}{{\textrm{\textsf{\textbf\textup\normalsize{{{{Note: }}}}}}}}
% Return values
\newcommand{\returnstart}{Returns PMIX_SUCCESS or one of the following error codes when the condition described occurs:}
\newcommand{\returnend}{If none of the above return codes are appropriate, then an implementation must return either a general \ac{PMIx} error code or an implementation defined error code as described in Section \ref{api:struct:errors}.}
\newcommand{\returnsimple}{Returns \refconst{PMIX_SUCCESS} or a negative value indicating the error.}
\newcommand{\returnsimplenb}{A successful return indicates that the request is being processed and the result will be returned in the provided \refarg{cbfunc}. Note that the library must not invoke the callback function prior to returning from the \ac{API}. The callback function, \refarg{cbfunc}, is only called when \refconst{PMIX_SUCCESS} is returned.}
% Rationale
\newcommand{\rationalestart}{\VSPb\ratline{-1}{dashed}{Rationale}{7em}\VSPa}
\newcommand{\rationaleend}{\VSPb\ratline{1}{dashed}{}{0em}\VSPa}
% Advice to users
\newcommand{\adviceuserstart}{\VSPb\adviceuserline{-1}{solid}{Advice to users}{10em}\VSPa}
\newcommand{\adviceuserend}{\VSPb\adviceuserline{1}{solid}{}{0em}\VSPa}
% Advice to implementers
\newcommand{\adviceimplstart}{\VSPb\adviceimpline{-1}{solid}{Advice to PMIx library implementers}{20em}\VSPa}
\newcommand{\adviceimplend}{\VSPb\adviceimpline{1}{solid}{}{0em}\VSPa}
% Advice to hosts
\newcommand{\advicermstart}{\VSPb\advicermline{-1}{solid}{Advice to PMIx server hosts}{16em}\VSPa}
\newcommand{\advicermend}{\VSPb\advicermline{1}{solid}{}{0em}\VSPa}
% Required attributes
\newcommand{\reqattrstart}{\VSPb\adviceuserline{-1}{dashed}{Required Attributes}{16em}\VSPa}
\newcommand{\reqattrend}{\VSPb\adviceuserline{1}{dashed}{}{0em}\VSPa}
% Optional attributes
\newcommand{\optattrstart}{\VSPb\adviceimpline{-1}{dashed}{Optional Attributes}{16em}\VSPa}
\newcommand{\optattrend}{\VSPb\adviceimpline{1}{dashed}{}{0em}\VSPa}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Glossary formatting
\newcommand{\glossaryterm}[1]{\needspace{1ex}
\begin{adjustwidth}{-0.75in}{0.0in}
\nolinenumbers\parbox[b][-0.95\baselineskip][t]{1.4in}{\flushright \textbf{#1}}
\end{adjustwidth}\linenumbers}
\newcommand{\glossarydefstart}{
\begin{adjustwidth}{0.79in}{0.0in}}
\newcommand{\glossarydefend}{
\end{adjustwidth}\vspace{-1.5\baselineskip}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cross reference macros
% This defines:
% \specref cross reference label as "Section X on page Y"
% \refsection Link this label to a specific section label in the document
%
% \declarstruct Mark the declaration of a structure
% \refstruct Reference the structure declaration
%
% \declareapi Mark the declaration of an API function
% \refapi Reference the API declaration
%
% \declaremacro Mark the declaration of a user-level macro
% \refmacro Reference the macro declaration
%
\newcommand{\chapterref}[1]{Chapter~\ref{#1} on page~\pageref{#1}}
\newcommand{\specref}[1]{Section~\ref{#1} on page~\pageref{#1}}
\newcommand{\appendixref}[1]{Appendix~\ref{#1} on page~\pageref{#1}}
\newcommand{\refsection}[2]{\hyperref[#1]{#2}}
\newcommand{\declarestruct}[1]{\index[index_struct]{#1|indexfmt} \label{struct:#1}}
\newcommand{\refstruct}[1]{\index[index_struct]{#1}\hyperref[struct:#1]{\code{#1}}}
\newcommand{\structref}[1] {\refstruct{#1}}
\newcommand{\specrefstruct}[1]{Section~\ref{struct:#1} on page~\pageref{struct:#1}}
% Place in text for in-text questions during review
\newcommand{\rcomment}[1]{(REVIEW COMMENT: \textbf{#1})}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set default fonts:
\rmfamily\mdseries\upshape\normalsize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define a divider for splitting implementer vs host attribute requirements/options
\newcommand{\divider}{\noindent\makebox[\linewidth]{\rule{\linewidth}{0.8pt}}}
\newcounter{pycounter}
\newcommand{\pylabel}[1]{\refstepcounter{pycounter} \label{appB:#1}}
\newcommand{\refpy}[1]{\hyperref[appB:#1]{\code{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code examples
% Install: (if using Python 3 then use pip3)
% sudo pip2 install --upgrade pip setuptools
% sudo pip2 install Pygments
% Ubuntu:
% sudo apt update
% sudo apt install python-pip
% sudo pip3 install Pygments
%
% package to work around "No room for a new \write" message
\usepackage{morewrites}
\morewritessetup{allocate=10}
% package for code highlighting
\usepackage[chapter]{minted}
\usemintedstyle{default}