Debian Codegraph @

texmf-dist/doc/latex/hereapplies/hereapplies-doc.lyx

raw
1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 544
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin unavailable
7 \textclass article
8 \begin_preamble
9 \usepackage{doc}
10 \usepackage{upquote}
11
12 \AtBeginDocument{%
13 % LyX should add automatically `\usepackage{listings}` to the preamble...
14 \lstset{%
15 language=TeX,
16 basicstyle=\footnotesize,
17 numbers=left,
18 stepnumber=1,
19 showstringspaces=false,
20 tabsize=1,
21 breaklines=true,
22 breakatwhitespace=false,
23 }%
24 }
25 \end_preamble
26 \use_default_options false
27 \maintain_unincluded_children false
28 \language english
29 \language_package default
30 \inputencoding ascii
31 \fontencoding global
32 \font_roman "default" "default"
33 \font_sans "default" "default"
34 \font_typewriter "default" "default"
35 \font_math "auto" "auto"
36 \font_default_family default
37 \use_non_tex_fonts false
38 \font_sc false
39 \font_osf false
40 \font_sf_scale 100 100
41 \font_tt_scale 100 100
42 \use_microtype true
43 \use_dash_ligatures true
44 \graphics default
45 \default_output_format default
46 \output_sync 0
47 \bibtex_command default
48 \index_command default
49 \paperfontsize default
50 \spacing onehalf
51 \use_hyperref true
52 \pdf_title "The \\textquotedblleft{}Here Applies\\textquotedblright{} LaTeX Package"
53 \pdf_author "madmurphy"
54 \pdf_subject "Package documentation"
55 \pdf_keywords "Glossary, Index, LaTeX, LaTeX hyperref, LaTeX labels, LaTeX package, LyX, LyX module, TOC"
56 \pdf_bookmarks true
57 \pdf_bookmarksnumbered false
58 \pdf_bookmarksopen false
59 \pdf_bookmarksopenlevel 1
60 \pdf_breaklinks false
61 \pdf_pdfborder false
62 \pdf_colorlinks false
63 \pdf_backref false
64 \pdf_pdfusetitle false
65 \papersize a4paper
66 \use_geometry true
67 \use_package amsmath 1
68 \use_package amssymb 0
69 \use_package cancel 0
70 \use_package esint 1
71 \use_package mathdots 0
72 \use_package mathtools 0
73 \use_package mhchem 0
74 \use_package stackrel 0
75 \use_package stmaryrd 0
76 \use_package undertilde 0
77 \cite_engine basic
78 \cite_engine_type default
79 \biblio_style plain
80 \use_bibtopic false
81 \use_indices false
82 \paperorientation portrait
83 \suppress_date false
84 \justification true
85 \use_refstyle 0
86 \use_minted 0
87 \index Index
88 \shortcut idx
89 \color #008000
90 \end_index
91 \leftmargin 3.25cm
92 \topmargin 3.25cm
93 \rightmargin 3.25cm
94 \bottommargin 3.25cm
95 \secnumdepth 3
96 \tocdepth 3
97 \paragraph_separation indent
98 \paragraph_indentation default
99 \is_math_indent 0
100 \math_numbering_side default
101 \quotes_style english
102 \dynamic_quotes 0
103 \papercolumns 1
104 \papersides 1
105 \paperpagestyle default
106 \tracking_changes false
107 \output_changes false
108 \html_math_output 0
109 \html_css_as_file 0
110 \html_be_strict false
111 \end_header
112
113 \begin_body
114
115 \begin_layout Title
116 The
117 \series bold
118 Here Applies
119 \series default
120 \SpecialChar LaTeX
121 Package
122 \end_layout
123
124 \begin_layout Standard
125 \begin_inset VSpace bigskip
126 \end_inset
127
128
129 \end_layout
130
131 \begin_layout Abstract
132 A \SpecialChar LaTeX
133 package for referencing groups of pages that share something in common.
134
135 \end_layout
136
137 \begin_layout Standard
138 \begin_inset VSpace 2cm
139 \end_inset
140
141
142 \end_layout
143
144 \begin_layout Section
145 Overview
146 \end_layout
147
148 \begin_layout Standard
149
150 \series bold
151 Here Applies
152 \series default
153 is a \SpecialChar LaTeX
154 package that allows to collect groups of labels and reference them
155 altogether.
156 It can be used for creating informal glossaries that cross-link concepts
157 to their applications, or simply mentioning multiple pages that share something
158 in common.
159 \end_layout
160
161 \begin_layout Standard
162 The package offers two commands:
163 \family typewriter
164
165 \backslash
166 hereapplies
167 \family default
168 and
169 \family typewriter
170
171 \backslash
172 whereapplies
173 \family default
174 (plus their
175 \begin_inset Quotes eld
176 \end_inset
177
178 starred
179 \begin_inset Quotes erd
180 \end_inset
181
182 versions
183 \family typewriter
184
185 \backslash
186 hereapplies*
187 \family default
188 and
189 \family typewriter
190
191 \backslash
192 whereapplies*
193 \family default
194 ).
195 In both cases an identifier is passed as argument, and this can be any
196 string invented in the moment (
197 \family typewriter
198
199 \backslash
200 hereapplies
201 \family default
202 additionally supports more than one identifier in the form of a comma-separated
203 list).
204 \end_layout
205
206 \begin_layout Standard
207 Every time
208 \family typewriter
209
210 \backslash
211 hereapplies
212 \family default
213 is invoked with known identifiers, the document is made aware that the
214 place shares some kind of connection with other places in which the same
215 identifiers were used.
216 And so, every time the
217 \family typewriter
218
219 \backslash
220 whereapplies
221 \family default
222 command is invoked with a known identifier, all occurrences of the latter
223 within the entire document will be printed in the form of a linkable page
224 list (e.g.
225
226 \begin_inset Quotes eld
227 \end_inset
228
229 pp.
230 \begin_inset space \space{}
231 \end_inset
232
233 1, 5, 8–9, 14–20…
234 \begin_inset Quotes erd
235 \end_inset
236
237 ).
238 \end_layout
239
240 \begin_layout Standard
241 As
242 \family typewriter
243
244 \backslash
245 hereapplies
246 \family default
247 is designed to be invoked in the middle of a chapter or a section and that
248 location must be made linkable, the
249 \family typewriter
250
251 \backslash
252 phantomsection
253 \family default
254 directive is invoked by default before a label is added.
255 To avoid calling
256 \family typewriter
257
258 \backslash
259 phantomsection
260 \family default
261 , the
262 \begin_inset Quotes eld
263 \end_inset
264
265 starred
266 \begin_inset Quotes erd
267 \end_inset
268
269 command
270 \family typewriter
271
272 \backslash
273 hereapplies*
274 \family default
275 is available.
276 \end_layout
277
278 \begin_layout Standard
279 Finally, like
280 \family typewriter
281
282 \backslash
283 whereapplies
284 \family default
285 resembles a pluralizable version of
286 \family typewriter
287
288 \backslash
289 pageref
290 \family default
291 , its
292 \begin_inset Quotes eld
293 \end_inset
294
295 starred
296 \begin_inset Quotes erd
297 \end_inset
298
299 version
300 \family typewriter
301
302 \backslash
303 whereapplies*
304 \family default
305 will resemble a pluralizable version of
306 \family typewriter
307
308 \backslash
309 pageref*
310 \family default
311 .
312 \end_layout
313
314 \begin_layout Standard
315 If you use LyX, the package ships a LyX module as well (please check the
316
317 \family typewriter
318 lyx-module
319 \family default
320 subdirectory).
321 \end_layout
322
323 \begin_layout Standard
324 \begin_inset Newpage pagebreak
325 \end_inset
326
327
328 \end_layout
329
330 \begin_layout Section
331 Example usage
332 \end_layout
333
334 \begin_layout Standard
335 The following \SpecialChar LaTeX
336 manuscript
337 \end_layout
338
339 \begin_layout Standard
340 \begin_inset VSpace 3ex
341 \end_inset
342
343
344 \end_layout
345
346 \begin_layout Standard
347 \begin_inset CommandInset include
348 LatexCommand lstinputlisting
349 filename "hereapplies-example.tex"
350 lstparams "language=TeX"
351
352 \end_inset
353
354
355 \end_layout
356
357 \begin_layout Standard
358 \begin_inset VSpace 3ex
359 \end_inset
360
361
362 \end_layout
363
364 \begin_layout Standard
365 \noindent
366 will generate the
367 \begin_inset Flex URL
368 status collapsed
369
370 \begin_layout Plain Layout
371
372 hereapplies-example.pdf
373 \end_layout
374
375 \end_inset
376
377 document attached.
378 \end_layout
379
380 \begin_layout Section
381 A minimal tutorial
382 \end_layout
383
384 \begin_layout Standard
385 \begin_inset ERT
386 status collapsed
387
388 \begin_layout Plain Layout
389
390
391 \backslash
392 begin{macro}{
393 \backslash
394 hereapplies}
395 \end_layout
396
397 \end_inset
398
399
400 \end_layout
401
402 \begin_layout Standard
403 Syntax:
404 \end_layout
405
406 \begin_layout Standard
407 \begin_inset VSpace bigskip
408 \end_inset
409
410
411 \end_layout
412
413 \begin_layout Standard
414
415 \family typewriter
416
417 \backslash
418 hereapplies
419 \begin_inset space \enskip{}
420 \end_inset
421
422 [
423 \begin_inset Formula $\langle$
424 \end_inset
425
426
427 \shape italic
428 label
429 \shape default
430
431 \begin_inset Formula $\rangle$
432 \end_inset
433
434 ]
435 \begin_inset space \enskip{}
436 \end_inset
437
438 {
439 \begin_inset Formula $\langle$
440 \end_inset
441
442
443 \shape italic
444 identifiers
445 \shape default
446
447 \begin_inset Formula $\rangle$
448 \end_inset
449
450 }
451 \end_layout
452
453 \begin_layout Standard
454
455 \family typewriter
456
457 \backslash
458 hereapplies*
459 \begin_inset space \enskip{}
460 \end_inset
461
462 [
463 \begin_inset Formula $\langle$
464 \end_inset
465
466
467 \shape italic
468 label
469 \shape default
470
471 \begin_inset Formula $\rangle$
472 \end_inset
473
474 ]
475 \begin_inset space \enskip{}
476 \end_inset
477
478 {
479 \begin_inset Formula $\langle$
480 \end_inset
481
482
483 \shape italic
484 identifiers
485 \shape default
486
487 \begin_inset Formula $\rangle$
488 \end_inset
489
490 }
491 \end_layout
492
493 \begin_layout Standard
494 \noindent
495 \begin_inset VSpace smallskip
496 \end_inset
497
498
499 \end_layout
500
501 \begin_layout Standard
502 \noindent
503 The
504 \family typewriter
505
506 \backslash
507 hereapplies
508 \family default
509 command notifies the document that one or more identifiers apply to a particula
510 r point and adds a label to it.
511 \end_layout
512
513 \begin_layout Standard
514 If the optional argument is passed the label created will be named accordingly,
515 otherwise an opaque name will be chosen for it.
516 This argument may contain only what is legal for
517 \family typewriter
518
519 \backslash
520 pageref
521 \family default
522 .
523 \end_layout
524
525 \begin_layout Standard
526 The
527 \family typewriter
528 \shape italic
529 identifiers
530 \family default
531 \shape default
532 argument must be a comma-separated list of identifiers (leading and trailing
533 spaces around each member will be ignored).
534 Each of these strings will remain confined within the internal scope of
535 the package and will not create conflicts with possible macros or labels
536 of the same names.
537 \end_layout
538
539 \begin_layout Standard
540 After storing some internal values,
541 \family typewriter
542
543 \backslash
544 hereapplies
545 \family default
546 will expand exactly to
547 \end_layout
548
549 \begin_layout Standard
550 \begin_inset VSpace smallskip
551 \end_inset
552
553
554 \end_layout
555
556 \begin_layout Standard
557 \begin_inset listings
558 lstparams "language=TeX,numbers=none"
559 inline false
560 status open
561
562 \begin_layout Plain Layout
563
564
565 \backslash
566 phantomsection
567 \backslash
568 label{...}
569 \end_layout
570
571 \end_inset
572
573
574 \end_layout
575
576 \begin_layout Standard
577 \begin_inset VSpace smallskip
578 \end_inset
579
580
581 \end_layout
582
583 \begin_layout Standard
584 Its
585 \begin_inset Quotes eld
586 \end_inset
587
588 starred
589 \begin_inset Quotes erd
590 \end_inset
591
592 version (
593 \family typewriter
594
595 \backslash
596 hereapplies*
597 \family default
598 ) will not invoke the
599 \family typewriter
600
601 \backslash
602 phantomsection
603 \family default
604 directive.
605 \end_layout
606
607 \begin_layout Standard
608 \begin_inset ERT
609 status collapsed
610
611 \begin_layout Plain Layout
612
613
614 \backslash
615 end{macro}
616 \end_layout
617
618 \end_inset
619
620
621 \end_layout
622
623 \begin_layout Standard
624 \begin_inset VSpace smallskip
625 \end_inset
626
627
628 \end_layout
629
630 \begin_layout Standard
631 \begin_inset ERT
632 status collapsed
633
634 \begin_layout Plain Layout
635
636
637 \backslash
638 begin{macro}{
639 \backslash
640 whereapplies}
641 \end_layout
642
643 \end_inset
644
645
646 \end_layout
647
648 \begin_layout Standard
649 Syntax:
650 \end_layout
651
652 \begin_layout Standard
653 \begin_inset VSpace bigskip
654 \end_inset
655
656
657 \end_layout
658
659 \begin_layout Standard
660
661 \family typewriter
662
663 \backslash
664 whereapplies
665 \begin_inset space \enskip{}
666 \end_inset
667
668 {
669 \begin_inset Formula $\langle$
670 \end_inset
671
672
673 \shape italic
674 identifier
675 \shape default
676
677 \begin_inset Formula $\rangle$
678 \end_inset
679
680 }
681 \end_layout
682
683 \begin_layout Standard
684
685 \family typewriter
686
687 \backslash
688 whereapplies*
689 \begin_inset space \enskip{}
690 \end_inset
691
692 {
693 \begin_inset Formula $\langle$
694 \end_inset
695
696
697 \shape italic
698 identifier
699 \shape default
700
701 \begin_inset Formula $\rangle$
702 \end_inset
703
704 }
705 \end_layout
706
707 \begin_layout Standard
708 \noindent
709 \begin_inset VSpace smallskip
710 \end_inset
711
712
713 \end_layout
714
715 \begin_layout Standard
716 \noindent
717 The
718 \family typewriter
719
720 \backslash
721 whereapplies
722 \family default
723 command prints all the occurrences of an identifier, in the form
724 \begin_inset Quotes eld
725 \end_inset
726
727 p.
728 \begin_inset space \space{}
729 \end_inset
730
731 …
732 \begin_inset Quotes erd
733 \end_inset
734
735 or
736 \begin_inset Quotes eld
737 \end_inset
738
739 pp.
740 \begin_inset space \space{}
741 \end_inset
742
743 …
744 \begin_inset Quotes erd
745 \end_inset
746
747 (with page range support).
748 \end_layout
749
750 \begin_layout Standard
751 The
752 \family typewriter
753 \shape italic
754 identifier
755 \family default
756 \shape default
757 argument will remain confined within the internal scope of the package
758 and will not create conflicts with possible commands or labels of the same
759 name.
760 Leading and trailing spaces around this string will be ignored.
761 \end_layout
762
763 \begin_layout Standard
764 If the same
765 \family typewriter
766 \shape italic
767 identifier
768 \family default
769 \shape default
770 is not passed to
771 \family typewriter
772
773 \backslash
774 hereapplies
775 \family default
776 at least once throughout the document,
777 \family typewriter
778
779 \backslash
780 whereapplies
781 \family default
782 will print
783 \begin_inset Quotes eld
784 \end_inset
785
786
787 \series bold
788 ??
789 \series default
790
791 \begin_inset Quotes erd
792 \end_inset
793
794 .
795 \end_layout
796
797 \begin_layout Standard
798 The
799 \begin_inset Quotes eld
800 \end_inset
801
802 starred
803 \begin_inset Quotes erd
804 \end_inset
805
806 version of this command (
807 \family typewriter
808
809 \backslash
810 whereapplies*
811 \family default
812 ) will use
813 \family typewriter
814
815 \backslash
816 pageref*
817 \family default
818 instead of
819 \family typewriter
820
821 \backslash
822 pageref
823 \family default
824 for generating the page list.
825 \end_layout
826
827 \begin_layout Standard
828 \begin_inset ERT
829 status collapsed
830
831 \begin_layout Plain Layout
832
833
834 \backslash
835 end{macro}
836 \end_layout
837
838 \end_inset
839
840
841 \end_layout
842
843 \begin_layout Section
844 Internationalization
845 \end_layout
846
847 \begin_layout Standard
848 Currently the localization of
849 \series bold
850 Here Applies
851 \series default
852 is not automatic.
853 It is possible however to control the strings generated by overwriting
854 the four macros
855 \family typewriter
856
857 \backslash
858 hapage
859 \family default
860 ,
861 \family typewriter
862
863 \backslash
864 hapages
865 \family default
866 ,
867 \family typewriter
868
869 \backslash
870 hadelimiter
871 \family default
872 and
873 \family typewriter
874
875 \backslash
876 halastdelimiter
877 \family default
878 .
879 For example, writing at the beginning of a document
880 \end_layout
881
882 \begin_layout Standard
883 \begin_inset VSpace 3ex
884 \end_inset
885
886
887 \end_layout
888
889 \begin_layout Standard
890 \begin_inset listings
891 lstparams "language=TeX"
892 inline false
893 status open
894
895 \begin_layout Plain Layout
896
897 % German translation of **Here Applies**
898 \end_layout
899
900 \begin_layout Plain Layout
901
902 % English: "p.
903 \backslash
904 "
905 \end_layout
906
907 \begin_layout Plain Layout
908
909
910 \backslash
911 gdef
912 \backslash
913 hapage{S.
914 \backslash
915 }
916 \end_layout
917
918 \begin_layout Plain Layout
919
920 % English: "pp.
921 \backslash
922 "
923 \end_layout
924
925 \begin_layout Plain Layout
926
927
928 \backslash
929 gdef
930 \backslash
931 hapages{S.
932 \backslash
933 }
934 \end_layout
935
936 \begin_layout Plain Layout
937
938 % English: "
939 \backslash
940 and
941 \backslash
942 "
943 \end_layout
944
945 \begin_layout Plain Layout
946
947
948 \backslash
949 gdef
950 \backslash
951 halastdelimiter{
952 \backslash
953 und
954 \backslash
955 }
956 \end_layout
957
958 \begin_layout Plain Layout
959
960 % English: ",
961 \backslash
962 " (exactly like in German -- leave it)
963 \end_layout
964
965 \begin_layout Plain Layout
966
967 %
968 \backslash
969 gdef
970 \backslash
971 hadelimiter{,
972 \backslash
973 }
974 \end_layout
975
976 \end_inset
977
978
979 \end_layout
980
981 \begin_layout Standard
982 \begin_inset VSpace 3ex
983 \end_inset
984
985
986 \end_layout
987
988 \begin_layout Standard
989 \noindent
990 will translate
991 \begin_inset Quotes eld
992 \end_inset
993
994 pp.
995 \begin_inset space \space{}
996 \end_inset
997
998 2, 4 and 6
999 \begin_inset Quotes erd
1000 \end_inset
1001
1002 into
1003 \begin_inset Quotes eld
1004 \end_inset
1005
1006 S.
1007 \begin_inset space \space{}
1008 \end_inset
1009
1010 2, 4 und 6
1011 \begin_inset Quotes erd
1012 \end_inset
1013
1014 .
1015 \end_layout
1016
1017 \begin_layout Section
1018 Get involved
1019 \end_layout
1020
1021 \begin_layout Standard
1022 If you wish to get involved, please do not hesitate to send
1023 \begin_inset CommandInset href
1024 LatexCommand href
1025 name "merge requests"
1026 target "https://github.com/madmurphy/hereapplies.sty/pulls"
1027 literal "false"
1028
1029 \end_inset
1030
1031 or participate in the discussion.
1032 The package is also
1033 \begin_inset CommandInset href
1034 LatexCommand href
1035 name "available on \\textbf{CTAN}"
1036 target "https://www.ctan.org/pkg/hereapplies"
1037 literal "true"
1038
1039 \end_inset
1040
1041 under
1042 \begin_inset CommandInset href
1043 LatexCommand href
1044 name "\\texttt{macros/latex/contrib/hereapplies/}"
1045 target "https://www.ctan.org/tex-archive/macros/latex/contrib/hereapplies/"
1046 literal "true"
1047
1048 \end_inset
1049
1050 .
1051 For any issue, please
1052 \begin_inset CommandInset href
1053 LatexCommand href
1054 name "drop a message"
1055 target "https://github.com/madmurphy/hereapplies.sty/issues"
1056 literal "false"
1057
1058 \end_inset
1059
1060 .
1061 \end_layout
1062
1063 \begin_layout Section
1064 Free software
1065 \end_layout
1066
1067 \begin_layout Standard
1068
1069 \series bold
1070 Here Applies
1071 \series default
1072 is free software.
1073 You can redistribute it and/or modify it under the terms of the
1074 \series bold
1075 AGPL
1076 \series default
1077 license version 3 or any later version.
1078 See
1079 \begin_inset Flex URL
1080 status collapsed
1081
1082 \begin_layout Plain Layout
1083
1084 COPYING
1085 \end_layout
1086
1087 \end_inset
1088
1089 for details.
1090 \end_layout
1091
1092 \begin_layout Standard
1093 \begin_inset Newpage newpage
1094 \end_inset
1095
1096
1097 \end_layout
1098
1099 \begin_layout Section*
1100 Code appendix
1101 \end_layout
1102
1103 \begin_layout Standard
1104 \begin_inset ERT
1105 status collapsed
1106
1107 \begin_layout Plain Layout
1108
1109
1110 \backslash
1111 addcontentsline{toc}{section}{Code appendix}
1112 \end_layout
1113
1114 \end_inset
1115
1116
1117 \end_layout
1118
1119 \begin_layout Standard
1120 \begin_inset CommandInset include
1121 LatexCommand lstinputlisting
1122 filename "hereapplies.sty"
1123 lstparams "language=TeX"
1124
1125 \end_inset
1126
1127
1128 \end_layout
1129
1130 \end_body
1131 \end_document