-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathheria.dtx
2853 lines (2678 loc) · 100 KB
/
heria.dtx
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
% \iffalse meta-comment
%
% Copyright 2023, 2024 Tristan Miller
% -----------------------------------
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{heria.dtx}
%</driver>
%<*class>
%% Copyright 2023, 2024 Tristan Miller
%% Copyright 2016 John Kormylo
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
%</class>
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{heria}
%<*class>
[2024-09-03 v3.4.1.3 Class for Horizon Europe (R)IA proposals]
%</class>
%
%<*driver>
\documentclass{ltxdoc}
\DisableCrossrefs
\CodelineIndex
\RecordChanges
\addtolength\marginparwidth{5ex}
\addtolength\oddsidemargin{6ex}
\addtolength\evensidemargin{6ex}
\begin{document}
\DocInput{heria.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{1521}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
%
% \GetFileInfo{heria.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
%
% \title{\textsf{heria}: A \LaTeX\ class for\\ Horizon Europe RIA and
% IA grant proposals\thanks{This document corresponds to
% \textsf{heria}~\fileversion, dated \filedate. See §\ref{sec:version}
% for an explanation of the versioning scheme.}}
%
% \author{Tristan Miller\\
% Department of Computer Science\\
% University of Manitoba\\
% \texttt{[email protected]}}
%
% \maketitle
% \tableofcontents
%
% \section{Introduction}\label{sec:introduction}
%
% This document describes the usage of \textsf{heria}, a \LaTeX\ class
% that facilitates the preparation of Research and Innovation Action
% (RIA) and Innovation Action (IA) funding proposals for the European
% Commission's~(EC) Horizon Europe program. The Commission prescribes
% a detailed, structured format for the technical description
% (``Part~B'') of these proposals, but provides templates only in Rich
% Text Format (RTF), a format that does not lend itself well to
% collaborative authorship and \mbox{(cross-)}reference management.
% The \textsf{heria} class is a conversion of the official Part~B
% template into \LaTeX; it preserves the formatting and most of the
% instructions of the original version, and has the additional feature
% that tables (listing the participants, work packages, deliverables,
% etc.)\ are programmatically generated according to data supplied by
% the user. The advantage of this becomes clear when one considers
% that much of the data is reused across multiple tables.
%
% The \textsf{heria} package can be used to write proposals using
% either Version~3.2 (2022-11-15), 3.3 (2023-09-27), or 3.4
% (2024-04-04) of the official Part~B template.
%
% \bigskip
%
% \noindent Besides this technical manual, there is a journal article
% that describes the motivation for and development of \textsf{heria}:
%
% \begin{quote}
% Tristan
% Miller. \href{https://dx.doi.org/10.47397/tb/45-1/tb139miller-horizon}{Preparing
% Horizon Europe proposals in \LaTeX\ with
% \textsf{heria}}. \emph{TUGboat: The Communications of the \TeX\
% Users Group}, 45(1):\allowbreak 59–64, 2024. ISSN 0896-3207. DOI:
% \href{https://dx.doi.org/10.47397/tb/45-1/tb139miller-horizon}{10.47397/tb/45-1/tb139miller-horizon}.
% \end{quote}
%
% \noindent Please cite this journal article if you want to refer to
% \textsf{heria} in a publication.
%
% \section{Usage}
%
% The EC's official template is structured in such a way that form and
% content cannot be entirely separated. The best way of starting a new
% proposal is therefore to make a copy of \texttt{heria-proposal.tex},
% the skeleton proposal distributed with this package, and then adapt
% it to your project. The following subsections describe the various
% macros and environments provided by \textsf{heria}, roughly in the
% same order presented in the skeleton proposal.
%
% \subsection{Preamble}
%
% Your proposal document should begin with the following line if you
% want the template instructions to be included in the output:
% \begin{quote}\verb|\documentclass[showinstructions]{heria}|\end{quote}
% Otherwise you can omit the \verb|showinstructions| option:
% \begin{quote}\verb|\documentclass{heria}|\end{quote}
%
% The \verb|heria| class is based on the default \LaTeX\
% \verb|article| class, and so all of the macros and environments from
% the latter are available for you to use. The class automatically
% sets the font, margins, etc.\ mandated by the official instructions,
% and redefines some of the \verb|article| macros as described later
% in this document.
%
% \medskip
%
% \noindent Following \cs{documentclass} you should tell
% \textsf{heria} which version of the official Part~B template you
% want to use:
%
% \DescribeMacro{\templateversion} This macro sets the version of the
% official Part~B template the proposal should use. It takes a single
% argument; valid values are \verb|3.2|, \verb|3.3|, and \verb|3.4|.
% If you omit this macro, \textsf{heria} will default to using the
% latest version of the template.
%
% \medskip
%
% \noindent You should then provide the proposal metadata using the
% following macros:
%
% \DescribeMacro{\title} This macro takes the title of the proposal as
% its sole argument. This title will be printed by the \cs{maketitle}
% macro (see below) and used for the PDF metadata.
%
% \DescribeMacro{\callname} This macro takes as its sole argument the
% official natural-language description of the call to which the
% proposal is being submitted. It will be printed in the page header.
%
% \DescribeMacro{\callidentifier} This macro takes as its sole
% argument the identifier of the call to which the proposal is being
% submitted, which will be printed in the page header. Call
% identifiers normally have the format
% \texttt{HORIZON-XX0-0000-XXXXX-00-XXXXX}.
%
% \DescribeMacro{\calltopic} This macro takes as its sole argument the
% identifier of the specific topic within the call to which the
% proposal is being submitted. Such identifiers normally have the
% format \texttt{HORIZON-XX0-0000-XXXXX-00-00}. The official template
% does not require proposals to mention the call topic, so you are
% free to omit the \cs{calltopic} macro. If you do use it, it will be
% printed by \cs{maketitle} below the proposal title.
%
% \subsection{Title}
%
% \DescribeMacro{\maketitle} This is generally the first macro that
% should be called in the main body of the document. As with the
% standard \verb|article| class, it typesets the title.
%
% \subsection{Section headings, tags, and instructions}
%
% \DescribeMacro{\heinstructions} When the \verb|showinstructions|
% options is passed to the document class, the \cs{heinstructions}
% macro prints instructions from the official EC template. These
% instructions are contained in files distributed with the
% \textsf{heria} class; the macro's sole argument is used to construct
% the name of one of these files. To suppress printing of individual
% instructions, you can simply remove or comment out the corresponding
% \cs{heinstructions} macro.
%
% \DescribeMacro{\opentag}\DescribeMacro{\closetag} The official
% template includes a number of ``tags'' that are used for the EC's
% ``internal processing of information, mostly for statistical
% gathering.'' The \cs{opentag} and \cs{closetag} macros are used to
% emit the tags at the appropriate places in the proposal, and so
% should be left in their original positions in the skeleton template.
% The EC asks that proposal authors ``not move, delete, re-order, or
% alter tags in any way''.
%
% \DescribeMacro{\section}\DescribeMacro{\subsection}\DescribeMacro{\subsubsection}
% These three macros take a mandatory argument specifying the title of
% the corresponding section, subsection, or subsubsection,
% respectively. These document subdivisions are fixed by the official
% template and so generally should not be renamed or reordered, though
% it is probably safe to add additional ones where it does not disrupt
% the numbering of the existing ones. Many sections and subsections
% \emph{must} be preceded or followed by certain tags, which are
% specified in the first and second optional arguments, respectively.
% The third optional argument contains the recommended page limit,
% when specified by the official template. The page limit will be
% printed only when the \verb|showinstructions| option is passed to
% the document class.
%
% \subsection{Participants}
%
% \DescribeMacro{\participant} Participants should be listed in the
% same order as in Part~A of the proposal, which is completed using an
% online form. Use one invocation of \cs{participant} for each
% participant, with the following three mandatory arguments, in order:
% the participant's full name, the participant's short name, and the
% participant's two-letter country code. The first participant will
% be marked in the participant table as the project coordinator. Note
% that while the short name is typeset in the proposal, it is also
% used internally by the \verb|heria| class as part of a \LaTeX\
% counter name, and so should generally consist only of ASCII letters.
%
% \DescribeMacro{\makeparticipantstable} This macro emits the table of
% participants using the data from the \cs{participant} macro.
% Participants are automatically numbered according to the order of
% the \cs{participant} macros.
%
% \subsection{Summary tableau}
%
% \DescribeEnv{summarycanvas} \DescribeEnv{summarybox} Proposals must
% include a summary tableau of six boxes that briefly describe the
% project's specific needs; expected results; dissemination,
% exploitation, and communication measures; target groups; outcomes;
% and impacts. The \verb|summarycanvas| and \verb|summaryenv|
% environments are provided for this purpose. Each \verb|summarybox|
% environment typesets a shaded box headed by its mandatory argument.
% Three such boxes can be grouped side by side into a single
% \verb|summarycanvas| environment. The skeleton proposal
% demonstrates how all six boxes can be placed in a floating figure on
% a single landscape page, though other arrangements seem to be
% permissible.
%
% \subsection{Work packages and deliverables}
%
% \DescribeMacro{\makeworkpackagestable} This macro emits the table of
% work packages, using the data from the \cs{workpackage} macros. Work
% packages are automatically numbered according to the order of the
% \cs{workpackage} macros.
%
% \DescribeMacro{\workpackage} This macro declares a work package, and
% takes five mandatory arguments: a unique identifier (used only
% internally by \verb|heria| for cross-referencing purposes), the work
% package title, the short name of the lead participant (as specified
% in the corresponding \cs{participant} macro), the numeric starting
% month (measured from the start of the project), and the numeric
% ending month. Since the unique identifier is used as part of a
% \LaTeX\ counter name, you should generally use only ASCII letters.
% Work packages are automatically numbered. You should use one
% \cs{workpackage} macro for each work package in your project.
%
% \DescribeEnv{objectives} This environment typesets a box containing
% an enumerated list of objectives for the most recently declared work
% package. Use the \cs{item} macro to begin each objective.
%
% \DescribeEnv{descriptionofwork} This environment typesets a box
% where you can describe the work program of the most recently
% declared work package. You can enter this information in free-form
% and\slash or use the \cs{task} macro to enumerate individual tasks.
%
% \DescribeMacro{\task} This macro typesets basic information about a
% work package task. The format used by this macro is not strictly
% mandated by the official template, but you may nonetheless find it
% useful. The macro takes three mandatory arguments: the task name,
% the short name of the lead participant (as specified in the
% corresponding \cs{participant} macro), a list of other participants
% (as free-form text, but advisedly using short names of participants
% where appropriate), and the starting and ending months for the task
% (as free-form text). You should use one \cs{task} macro for each
% task in your work package. You can, if you wish, follow each
% \cs{task} macro with a free-form description of the task.
%
% \DescribeMacro{\deliverable} This macro declares a deliverable for
% the most recently declared work package. There are six mandatory
% arguments: the deliverable name, a short description of the
% deliverable, the short name of the lead participant (as specified in
% the corresponding \cs{participant} macro), the deliverable type, the
% dissemination level, and the numeric delivery month (in months from
% the beginning of the project). The type and dissemination level
% arguments must be selected from the identifiers given in the
% template instructions.
%
% \DescribeMacro{\makedeliverablestable} This macro emits the table of
% deliverables, using the data from the \cs{deliverable}
% macros. Deliverables are automatically numbered according to the
% order of the \cs{deliverable} macros.
%
% \subsection{Milestones}
%
% \DescribeMacro{\milestone} This macro declares a project milestone.
% It takes four mandatory arguments: the milestone name, a free-form
% list of related work packages, the due date (in number of months
% from the start of the project), and a free-form means of
% verification. You should use one \cs{milestone} macro for each
% milestone in your project.
%
% \DescribeMacro{\makemilestonestable} This macro emits the table of
% milestones, using the data from the \cs{milestone}
% macros. Milestones are automatically numbered according to the order
% of the \cs{milestone} macros.
%
% \subsection{Critical risks}
%
% \DescribeMacro{\criticalrisk} This macro declares a critical risk
% for the project. It takes five mandatory arguments: a free-form
% description of the risk, the likelihood of the risk, the severity of
% the risk, and a free-form description of proposed mitigation
% measures. The likelihood and severity arguments must be selected
% from the identifiers given in the template instructions. You should
% use one \cs{criticalrisk} macro for each critical risk in your
% project.
%
% \DescribeMacro{\makecriticalriskstable} This macro emits the table
% of critical risks, using the data from the \cs{criticalrisk}
% macros. Critical risks are output in the order of the
% \cs{criticalrisk} macros.
%
% \subsection{Summary of staff effort}
%
% \DescribeMacro{\staffeffort} This macro declares the number of
% person-months a given project participant will spend on a given work
% package. It takes three mandatory arguments: the short name of the
% participant (as specified in the corresponding \cs{participant}
% macro), the short name of the work package (as specified in the
% corresponding \cs{workpackage} macro), and the number of months.
% You must provide one and only one \cs{staffeffort} macro for every
% possible combination of participant and work package in your project.
%
% \DescribeMacro{\makestaffefforttable} This macro emits the summary
% of staff effort table, using the data from the \cs{staffeffort}
% macros. The table rows and columns are automatically ordered
% according to the order of the \cs{participant} and \cs{workpackage}
% macros, respectively, and the total person-months per participant
% and total person-months per work package are automatically
% calculated.
%
% \subsection{Costs}
%
% \DescribeMacro{\subcontractingcost} This macro declares a
% subcontracting cost. It takes three mandatory arguments: the short
% name of a participant (as specified in the corresponding
% \cs{participant} macro), the amount of the subcontracting cost in
% euros, and a free-form description of the tasks and justification
% for the subcontracting cost. You should use one
% \cs{subcontractingcost} macro for each subcontracting cost in your
% project.
%
% \DescribeMacro{\makesubcontractingcoststable} This macro emits the
% tables of subcontracting costs, using the data from the
% \cs{subcontractingcost} macros. Subcontracting costs are
% automatically grouped by participant and then output according to
% the order of the \cs{participant} and \cs{subcontractingcost}
% macros.
%
% \DescribeMacro{\purchasecost} This macro declares the purchase costs
% for a participant. It takes eight mandatory arguments:
% \begin{quote}\cs{purchasecost}\marg{participant}\verb|%|\\
% \hspace*{5ex}\marg{goodscost}\marg{justification}\verb|%|\\
% \hspace*{5ex}\marg{travelcost}\marg{justification}\verb|%|\\
% \hspace*{5ex}\marg{equipmentcost}\marg{justification}\verb|%|\\
% \hspace*{5ex}\marg{remainingcosts}\end{quote}
% Here \meta{participant} is the short name of a participant (as
% specified in the corresponding \cs{participant} macro);
% \meta{goodscost}, \meta{travelcost}, \meta{equipmentcost}, and
% \meta{remainingcost} are the amount of the ``other goods, works and
% services'', ``travel and subsistence'', ``equipment'', and
% ``remaining purchase costs'', respectively, in euros; and the
% \meta{justification} arguments are free-form justifications for the
% immediately preceding cost. (According to the official template,
% the remaining purchase costs do not require a justification.) You
% should use one \cs{purchasecost} macro for each participant with
% purchase costs in your project.
%
% \DescribeMacro{\makepurchasecoststable} This macro emits the tables
% of purchase costs, using the data from the \cs{purchasecost} macros.
% Purchase costs are output according to the order of the
% \cs{participant} macros, and then in reverse order of the largest
% costs, with the ``remaining purchase costs'' output last.
%
% \DescribeMacro{\othercost} This macro declares an ``other'' cost
% (i.e.,\ in the ``other costs'' category). It takes three mandatory
% arguments: the short name of a participant (as specified in the
% corresponding \cs{participant} macro), the amount of the ``other''
% cost in euros, and a free-form justification for the cost. You
% should use one \cs{othercost} macro for each ``other'' cost in your
% project.
%
% \DescribeMacro{\makeothercoststable} This macro emits the tables of
% ``other'' costs, using the data from the \cs{othercost} macros.
% ``Other'' costs are automatically grouped by participant and then
% output according to the order of the \cs{participant} and
% \cs{othercost} macros.
%
% \DescribeMacro{\inkindcontribution} This macro declares an in-kind
% contribution. It takes five mandatory arguments: the short name of a
% participant (as specified in the corresponding \cs{participant}
% macro), the third party name, the category of the contribution
% (selected from \texttt{Seconded personnel}, \texttt{Travel and
% subsistence}, \texttt{Equipment}, \texttt{Other goods, works and
% services}, and \texttt{Internally invoiced goods and services}), the
% amount of the cost in euros, and a free-form justification for the
% in-kind contribution. You should use one \cs{inkindcontribution}
% macro for each in-kind contribution in your project.
%
% \DescribeMacro{\makeinkindcontributionstable} This macro emits the
% tables of in-kind contributions, using the data from the
% \cs{inkindcontribution} macros. In-kind contributions are
% automatically grouped by participant and then output according to
% the order of the \cs{participant} and \cs{inkindcontribution}
% macros.
%
% \section{Hints and tips}
%
% \paragraph{Part A.} Some proposal data---in particular, the list of
% participants and the costs---must be entered not just in Part~B of
% the proposal, but also in the online Part~A form. It is your
% responsibility to ensure that this data is consistent across the two
% parts of the proposal.
%
% \paragraph{File structure.} Rather than putting all the work package
% data into your main proposal document, you may find it convenient to
% put the \cs{workpackage} macro, the \verb|objectives| environment,
% the \verb|descriptionofwork| environment, and the \cs{deliverable}
% macros corresponding to a single work package into a dedicated file,
% which you can then include in your main proposal document with the
% \cs{input} macro. This will make it easier for you to shuffle the
% order of work packages as you write your proposal. (You may wish to
% split off other sections of the proposal into their own files,
% though the official template gives considerably less freedom to
% reorder them.)
%
% \paragraph{Vertical spacing.} The \textsf{heria} class applies the
% same vertical spacing as the \textsf{article} class; this is
% particularly generous around section headings. If you find yourself
% running up against the page limit, you may wish to add some
% \cs{vspace} commands, with a negative length as the argument, to
% tighten up the spaces before section headings, and perhaps also the
% tables.
%
% \section{Limitations and caveats}
%
% \paragraph{Table 3.1h.} The instructions in the official template
% are ambiguous about the construction of the tables for purchase
% costs. In particular, it's not clear whether each individual cost
% exceeding 15\% of the personnel costs must be listed in a separate
% row, or whether all costs in each category (``travel and
% subsistence'', ``equipment'', etc.)\ should be combined into a
% single row. The \textsf{heria} class takes the latter
% interpretation; this may or may not be the same interpretation
% adopted by the funding agency and its reviewers.
%
% \paragraph{Error handling.} The class currently does very little
% error checking on its input. Usually invalid input (e.g., mistyping
% the short name of a participant or work package in a macro argument,
% or neglecting to provide a macro necessary to generate a table)
% \emph{will} result in an error that prevents the document from
% compiling, though the diagnostic message emitted by \LaTeX\ may be
% somewhat cryptic.
%
% \paragraph{Coverage of instructions.} The class reproduces most,
% but not all, of the instructions from the official template. In
% particular, it omits all the instructions occurring before the title
% of the proposal, including three pages of introductory material and
% definitions. You should not rely solely on the instructions emitted
% by the class, which are provided only as a convenience; be sure to
% also read the instructions in the official template (and in the text
% of the call to which you are applying).
%
% \section{Package development}
%
% \subsection{Source repository and bug tracker}
%
% For now, the package's source code is hosted on GitHub at
% \url{https://github.com/logological/heria}. There you will also
% find an issue tracker for reporting bugs and feature requests.
%
% \subsection{Versioning scheme}\label{sec:version}
%
% Each release of the \textsf{heria} class carries a version number in
% the format \textit{omaj.\allowbreak omin.\allowbreak maj.\allowbreak
% min}. Here \textit{omaj.omin} is the highest version number of the
% official Horizon Europe RIA template that the class implements, and
% \textit{maj} and \textit{min} represent, respectively, major and
% minor revisions to the class (including any ancillary files, such as
% the skeleton proposal and documentation). A major revision is one
% that includes potentially breaking changes or significant new
% features; minor revisions are for all other changes. While efforts
% will be made to preserve compatibility with earlier versions of the
% official template (via the \cs{templateversion} macro), any change
% to \textit{omaj.omin} could unavoidably introduce breaking changes
% to the class interface. Any such changes will be noted in the
% package documentation.
%
% \subsection{Version history}
%
% \begin{description}
% \item[v3.4.1.3 (2024-09-03)] Fixed a bug where the person-months in
% Table 3.1a were doubled.
% \item[v3.4.1.2 (2024-09-03)] Fixed a bug where the column totals in
% Table 3.1f were doubled.
% \item[v3.4.1.1 (2024-08-14)] Update documentation with a reference
% to the \emph{TUGboat} paper on \textsf{heria}.
% \item[v3.4.1.0 (2024-07-14)] Add support for version 3.4 of the
% official Part~B template and the \cs{templateversion} macro for
% backward compatibility with earlier versions.
% \item[v3.2.1.0 (2023-12-04)] Initial release.
% \end{description}
%
% \section{Disclaimer}
%
% The \textsf{heria} package is distributed in the hope that it will
% be useful, but WITHOUT ANY WARRANTY; without even the implied
% warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
% PURPOSE. (See the \LaTeX\ Project Public License for further
% details.) In particular, users should understand that the
% \textsf{heria} proposal template is wholly unofficial, and its
% author(s) accept no responsibility for any omissions, errors, or
% discrepancies with respect to the requirements set forth in the
% official Horizon Europe templates and associated documentation. If
% you produce a proposal with this template, then you alone are
% responsible for ensuring that it matches all the official
% requirements before submitting it to the funding body.
%
% \appendix
%
% \section{Implementation}
%
% \StopEventually{}
%
% \subsection*{Basic setup}
%
% Import the \verb|article| class and set up some basic features
% (margins, hyperlinks, etc.)
%
%\iffalse
%<*class>
%\fi
% \begin{macrocode}
\LoadClass[11pt,a4paper]{article}
\RequirePackage[T1]{fontenc} % T1 font encoding
\RequirePackage[left=15mm,
top=15mm,
bottom=15mm,
right=15mm,
includehead,
includefoot,
headheight=10pt,
headsep=5mm,
footskip=18pt,
]{geometry}
\RequirePackage[pdftex]{graphicx} % For graphics
\RequirePackage[pdftex,pdfusetitle]{hyperref} % Hyperlinks
\hypersetup{%
colorlinks=true,
breaklinks=true,
urlcolor=black,
linkcolor=black,
citecolor=black,
pdfsubject={},
pdfkeywords={},
}
\RequirePackage{xfp} % Floating point numbers
% \end{macrocode}
%
% A helper function to display variables
%
% \begin{macrocode}
\newcommand{\disptoken}[1]{%
\csname#1\endcsname
}
% \end{macrocode}
%
% \subsection*{Tables and framed boxes}
%
% \begin{macrocode}
\RequirePackage{colortbl} % for shaded table rows
\RequirePackage{xltabular} % for breakable tables with var-width columns
\RequirePackage[table]{xcolor} % for colours and shaded table cells
\RequirePackage[breakable,raster]{tcolorbox} % for framed boxes
% \end{macrocode}
%
% \subsection*{Colours}
%
% \begin{macrocode}
\definecolor{taggrey}{HTML}{B5B5B5}
\definecolor{footergrey}{HTML}{D8D8D8}
\definecolor{tablegrey}{HTML}{F2F2F2}
\definecolor{summaryblue}{HTML}{00B0F0}
% \end{macrocode}
%
% \subsection*{Set official Horizon Europe template version}
%
% \begin{macrocode}
\gdef\@templateversion{3.4} % Default version
\def\@supportedtemplateversions{3.2,3.3,3.4} % Supported versions
\ExplSyntaxOn
\NewDocumentCommand{\templateversion}{m}{%
\clist_if_in:NnTF {\@supportedtemplateversions} {#1}
{\gdef\@templateversion{#1}}
{\PackageError{heria}%
{unsupported~template~version}%
{Use~one~of~\@supportedtemplateversions}
}%
}
\ExplSyntaxOff
% \end{macrocode}
% \subsection*{Basic proposal variables}
%
% \begin{macrocode}
\newcommand{\callname}[1]{\gdef\@callname{#1}}%
\newcommand{\callidentifier}[1]{\gdef\@callidentifier{#1}}%
\newcommand{\calltopic}[1]{\gdef\@calltopic{#1}}%
% \end{macrocode}
%
% \subsection*{Participants}
%
% \begin{macrocode}
\newcounter{@pcount} % Participant counter
\newcommand{\participant}[3]{%
\stepcounter{@pcount}%
\newcounter{@p#2num}%
\setcounter{@p#2num}{\value{@pcount}}%
\expandafter\xdef\csname @pFullName\arabic{@p#2num}\endcsname{#1}%
\expandafter\xdef\csname @pShortName\arabic{@p#2num}\endcsname{#2}%
\expandafter\xdef\csname @pCountry\arabic{@p#2num}\endcsname{#3}%
\newcounter{@pSubcontractingCosts\arabic{@p#2num}}%
\newcounter{@pPurchaseCosts\arabic{@p#2num}}%
\newcounter{@pOtherCosts\arabic{@p#2num}}%
\newcounter{@pInkindContributions\arabic{@p#2num}}%
}
% \end{macrocode}
%
% Get participant number from short name
%
% \begin{macrocode}
\newcommand{\getPnum}[1]{%
\@ifundefined{c@@p#1num}{}{\arabic{@p#1num}}%
}
% \end{macrocode}
%
% Participants table row
%
% \begin{macrocode}
\newcommand{\ptablerow}[1]{%
\stepcounter{#1}
\the\value{#1}
\ifthenelse{\value{#1}=1}{ (Coordinator) &}{&}%
\disptoken{@pFullName\arabic{#1}} (\disptoken{@pShortName\arabic{#1}}) &
\disptoken{@pCountry\arabic{#1}} \\
\hline%
}
% \end{macrocode}
%
% Participants table
%
% \begin{macrocode}
\newcommand{\makeparticipantstable}{%
\newcounter{@ptable}
\begin{center}
\begin{xltabular}{0.9\textwidth}{|l|X|l|}
\hline
\textbf{Participant No.} &
\textbf{Participant organisation name} &
\textbf{Country} \\
\hline
\whiledo%
{\value{@ptable}<\numexpr\value{@pcount}-1}%
{\ptablerow{@ptable}}%
\ptablerow{@ptable}
\end{xltabular}
\end{center}
}
% \end{macrocode}
%
% \subsection*{Work packages}
%
% \begin{macrocode}
\RequirePackage{atveryend}
\newcounter{@wpcount} % Work package counter
\newcommand{\workpackage}[5]{%
\stepcounter{@wpcount}%
\newcounter{@wp\arabic{@wpcount}deliverable}%
\newcounter{@wp\arabic{@wpcount}task}%
\newcounter{@wp#1num}%
\setcounter{@wp#1num}{\value{@wpcount}}%
\expandafter\xdef\csname %
@wpPersonMonths\arabic{@wp#1num}\endcsname{0}%
\expandafter\xdef\csname @wpShortName\arabic{@wp#1num}\endcsname{#1}%
\expandafter\xdef\csname @wpTitle\arabic{@wp#1num}\endcsname{#2}%
\expandafter\xdef\csname %
@wpLeadParticipantShortName\arabic{@wp#1num}\endcsname{#3}%
\expandafter\xdef\csname @wpStartMonth\arabic{@wp#1num}\endcsname{#4}%
\expandafter\xdef\csname @wpEndMonth\arabic{@wp#1num}\endcsname{#5}%
\@bsphack
\protected@write\@auxout{}%
{\string\makeworkpackagestable@data{\arabic{@wp#1num}
& #2 & \getPnum{#3} & #3 & %
\@ifundefined{@wpTotalPersonMonths\arabic{@wp#1num}}%
{\textbf{??}}%
{\fpeval{\disptoken{@wpTotalPersonMonths\arabic{@wp#1num}}/2}}%
& #4 & #5}}%
\@esphack
\ifthenelse{\arabic{@wp#1num}=1}{}{\bigskip}
\noindent\begin{tabularx}%
{1.0\linewidth}{|>{\columncolor{tablegrey}}l|X|}
\hline
\bfseries Work package number & \arabic{@wp#1num} \\
\hline
\bfseries Work package title & #2 \\
\hline
\end{tabularx}
}
\newcommand{\makeworkpackagestable@data}[1]{%
\g@addto@macro\makeworkpackagestable@body{#1 \\ \hline}%
}
\def\makeworkpackagestable@body{}% initialize
\AtBeginDocument{\global\let\makeworkpackagestable@body@startup%
\makeworkpackagestable@body}
\AtEndDocument{%
\global\let\makeworkpackagestable@body@end\@empty
\def\makeworkpackagestable@data#1%
{\g@addto@macro\makeworkpackagestable@body@end{#1 \\ \hline}}%
}
\AtVeryEndDocument{%
\ifx\makeworkpackagestable@body@startup%
\makeworkpackagestable@body@end\else
\@latex@warning{Rerun for \string\makeworkpackagestable}%
\fi
}
% \end{macrocode}
%
% Work packages table
%
% \begin{macrocode}
\RequirePackage{makecell}
\newcommand{\makeworkpackagestable}{%
\begin{center}
\renewcommand\theadfont{\normalsize\bfseries}
\begin{xltabular}{1.0\textwidth}{|c|X|c|c|c|c|c|}
\hline
\rowcolor{tablegrey}%
\thead{Work\\ package\\ No.} &
\thead{Work package title} &
\thead{Lead\\ participant\\ No.} &
\thead{Lead\\ participant\\ short name} &
\thead{Person-\\months} &
\thead{Start\\ month} &
\thead{End\\ month} \\
\hline
\makeworkpackagestable@body
\end{xltabular}
\end{center}
}
% \end{macrocode}
%
% Get work package number from short name
%
% \begin{macrocode}
\newcommand{\getWPnum}[1]{%
\@ifundefined{c@@wp#1num}{}{\arabic{@wp#1num}}%
}
% \end{macrocode}
%
% Work package objectives
%
% \begin{macrocode}
\newenvironment{objectives}{%
\begin{tcolorbox}[colback=white,
parbox=false,
boxrule=0.75pt,
boxsep=0mm,
breakable
]%
\textsf{\textbf{Objectives}~~~}%
\begin{enumerate*}[nolistsep,noitemsep,itemjoin={~---~},%
label=\textbf{O\arabic{@wpcount}.\arabic*}]%
}{%
\end{enumerate*}%
\end{tcolorbox}%
}
% \end{macrocode}
%
% Work package description
%
% \begin{macrocode}
\newenvironment{descriptionofwork}{%
\begin{tcolorbox}[colback=white,
parbox=false,
boxrule=0.75pt,
boxsep=0mm,
breakable
]%
\textsf{\textbf{Description of work}~~~}
}{%
\end{tcolorbox}%
}
% \end{macrocode}
%
% Tasks
%
% \begin{macrocode}
\NewDocumentCommand{\task}{mmmm}{%
\stepcounter{@wp\arabic{@wpcount}task}
\par\medskip\noindent\textbf{Task %
\arabic{@wpcount}.\arabic{@wp\arabic{@wpcount}task}: #1}
\textit{(Lead: #2; Participants: #3; Month: #4)}\hspace{1em}%
}
% \end{macrocode}
%
% \subsection*{Deliverables}
%
% \begin{macrocode}
\newcounter{@dcount} % Deliverable counter
\newcommand{\deliverable}[6]{%
\stepcounter{@wp\arabic{@wpcount}deliverable}%
\stepcounter{@dcount}%
\expandafter\xdef\csname @dNumber\arabic{@dcount}\endcsname%
{\arabic{@wpcount}.\arabic{@wp\arabic{@wpcount}deliverable}}%
\expandafter\xdef\csname %
@dWorkPackage\arabic{@dcount}\endcsname{\arabic{@wpcount}}%
\expandafter\xdef\csname @dName\arabic{@dcount}\endcsname{#1}%
\expandafter\gdef\csname @dDescription\arabic{@dcount}\endcsname{#2}%
\expandafter\xdef\csname @dLead\arabic{@dcount}\endcsname{#3}%
\expandafter\xdef\csname @dType\arabic{@dcount}\endcsname{#4}%
\expandafter\xdef\csname %
@dDisseminationLevel\arabic{@dcount}\endcsname{#5}%
\expandafter\xdef\csname @dDeliveryDate\arabic{@dcount}\endcsname{#6}%
}
% \end{macrocode}
%
% Deliverables table row
%
% \begin{macrocode}
\newcommand{\dtablerow}[1]{%
\stepcounter{#1}
\disptoken{@dNumber\arabic{#1}} &
\disptoken{@dName\arabic{#1}} &
\disptoken{@dDescription\arabic{#1}} &
\disptoken{@dWorkPackage\arabic{#1}} &
\disptoken{@dLead\arabic{#1}} &
\disptoken{@dType\arabic{#1}} &
\disptoken{@dDisseminationLevel\arabic{#1}} &
\disptoken{@dDeliveryDate\arabic{#1}} \\
\hline%
}
% \end{macrocode}
%
% Deliverables table
%
% \begin{macrocode}
\newcommand{\makedeliverablestable}{%
\newcounter{@dtable}
\begin{center}
\renewcommand\theadfont{\normalsize\bfseries}
\begin{xltabular}{1.0\textwidth}%
{|c|>{\raggedright\hsize=.667\hsize\linewidth=\hsize}X%
|>{\hsize=1.333\hsize\linewidth=\hsize}X|c|c|c|c|p{15mm}|}
\hline
\rowcolor{tablegrey}%
\thead{\#} &
\thead{Name} &
\thead{Short description} &
\thead{WP\\ \#} &
\thead{Lead\\ participant} &
\thead{Type} &
\thead{Dissem.\\ level} &
\thead{Delivery\\ month} \\
\hline
\whiledo%
{\value{@dtable}<\numexpr\value{@dcount}-1}%
{\dtablerow{@dtable}}%
\dtablerow{@dtable}
\end{xltabular}
\end{center}
}
% \end{macrocode}
%
% \subsection*{Milestones}
%
% \begin{macrocode}
\newcounter{@mcount} % Milestone counter
\newcommand{\milestone}[4]{%
\stepcounter{@mcount}%
\expandafter\gdef\csname @mName\arabic{@mcount}\endcsname{#1}%
\expandafter\xdef\csname @mWorkPackages\arabic{@mcount}\endcsname{#2}%
\expandafter\xdef\csname @mDueDate\arabic{@mcount}\endcsname{#3}%
\expandafter\xdef\csname %
@mMeansOfVerification\arabic{@mcount}\endcsname{#4}%
}
% \end{macrocode}
%
% Milestones table row
%
% \begin{macrocode}
\newcommand{\mtablerow}[1]{%
\stepcounter{#1}
\arabic{#1} &
\disptoken{@mName\arabic{#1}} &
\disptoken{@mWorkPackages\arabic{#1}} &
\disptoken{@mDueDate\arabic{#1}} &
\disptoken{@mMeansOfVerification\arabic{#1}} \\
\hline%
}
% \end{macrocode}
%
% Milestones table
%
% \begin{macrocode}
\newcommand{\makemilestonestable}{%
\newcounter{@mtable}
\begin{center}
\renewcommand\theadfont{\normalsize\bfseries}
\begin{xltabular}{1.0\textwidth}{|c|X|p{26mm}|c|p{26mm}|}
\hline
\rowcolor{tablegrey}%
\thead{\#} &
\thead{Milestone\\ name} &
\thead{Related\\ WP(s)} &
\thead{Month\\ due} &
\thead{Means of\\ verification} \\
\hline
\whiledo%
{\value{@mtable}<\numexpr\value{@mcount}-1}%
{\mtablerow{@mtable}}%
\mtablerow{@mtable}
\end{xltabular}
\end{center}
}
% \end{macrocode}
%
% \subsection*{Critical risks}
%
% \begin{macrocode}
\newtcbox{\risktag}[1][black]{%
fontupper=\scriptsize\sffamily\bfseries,%
on line,%
arc=3pt,%
colupper=white,%
colback=#1!50!black,%
colframe=#1!50!black,%
before upper={\rule[-3pt]{0pt}{10pt}},%
boxrule=1pt,%
boxsep=0pt,%
left=2pt,%
right=2pt,%
top=1pt,%
bottom=.5pt%
}
\newcounter{@crcount} % Critical risk counter
\newcommand{\criticalrisk}[5]{%
\stepcounter{@crcount}%
\expandafter\gdef\csname %
@crDescription\arabic{@crcount}\endcsname{#1}%
\expandafter\xdef\csname @crLikelihood\arabic{@crcount}\endcsname{#2}%
\expandafter\xdef\csname @crSeverity\arabic{@crcount}\endcsname{#3}%
\expandafter\xdef\csname %
@crWorkPackages\arabic{@crcount}\endcsname{#4}%
\expandafter\gdef\csname @crMitigation\arabic{@crcount}\endcsname{#5}%
}
% \end{macrocode}
%
% Critical risk table row
%
% \begin{macrocode}
\newcommand{\crtablerow}[1]{%