Files
PrimeTeX/packages/Links.sty
Joshua Lucas e2a0277635 - Make all packages Expl3.
- Replace ifthen dependency with wrappers for Latex3 conditionals.
- Debug CrossRef and WrapBoxout.
2025-09-18 16:51:12 -05:00

121 lines
3.3 KiB
TeX

\NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{PrimeTeX/packages/Links}{2025-08-17}{1.0}{
Hyperref configuration.
}
% Use Hyperref to automatically create links in the document
\hypersetup{
final,
colorlinks = true,
pdfpagemode = UseOutlines,
pdfdisplaydoctitle = true,
bookmarksnumbered = true,
bookmarksopen = true,
bookmarksopenlevel = 2,
}
\bool_if:NTF \g_electronic_bool {
\hypersetup{
allcolors = linkColor,
}
}{
\hypersetup{
allcolors = textColor,
pdfduplex = DuplexFlipLongEdge,
pdfpagelayout = TwoPageRight,
}
}
% \str_new:N \g_SectionLabel_path_str
% \bool_new:N \l_SectionLabel_success_bool
% %\int_new:N \l_SectionLabel_slash_total_int
% % \int_new:N \l_SectionLabel_slash_count_int
% % \int_new:N \l_SectionLabel_char_count_int
% % part:chapter:section:subsection:subsubsection:paragraph:subparagraph
% \NewDocumentCommand{\SectionLabel}{
% % #1: Section Level. -1=Part, 0=Chapter, 1=Section, 2=Subsection,
% % 3=Sub-subsection, 4=Paragraph, 5=Subparagraph
% O{}
% % Label for the current section.
% m
% }{
% % \str_set:Nn \l_SectionLabel_level_str {#1}
% % \str_set:Nn \l_SectionLabel_label_str {#2}
% \expandafter\label\expandafter{
% \__SectionLabel_make:nn {\__SectionLabel_get_level:n {#1}} #2
% }
% }
% \NewDocumentCommand{\__SectionLabel_get_part:n}{m}
% \NewDocumentCommand{\__SectionLabel_make:Nnn}{m m m}{ \group_begin:
% \bool_set_false:N \l_SectionLabel_success_bool
% \int_new:N \l_SectionLabel_char_count_int
% \int_set:Nn \l_SectionLabel_char_count_int {0}
% \int_new:N \l_SectionLabel_slash_count_int
% \int_set:Nn \l_SectionLabel_slash_count_int {0}
% \int_const:Ne \l_SectionLabel_slash_total_int {#2}
% \str_const:Ne \l_SectionLabel_label_str {#3}
% \str_new:N \l_SectionLabel_index_char_str
% \str_new:N \l_SectionLabel_temp_path_str
% \str_map_variable:NNn \g_SectionLabel_path_str \l_SectionLabel_index_char_str {
% %\message{{\l_tmpa_str}~slash~count:~\int_use:N \l_SectionLabel_slash_count_int\ ~slash~total:~\int_use:N \l_SectionLabel_slash_total_int^^J}
% \int_compare:nNnT
% {\l_SectionLabel_slash_count_int} =
% {\l_SectionLabel_slash_total_int} {
% \str_set:Ne \l_tmpb_str {\str_range:Nnn #1 {1} {\l_SectionLabel_char_count_int}}
% \str_concat:NNN
% \l_SectionLabel_temp_path_str
% \l_tmpb_str
% \l_SectionLabel_label_str
% \str_map_break:n {
% %\message{success}
% \bool_set_true:N \l_SectionLabel_success_bool
% }
% }
% \int_incr:N \l_SectionLabel_char_count_int
% %\message{\l_tmpa_str}
% \str_if_eq:VnT \l_tmpa_str {/} {
% %\message{increment}
% \int_incr:N \l_SectionLabel_slash_count_int
% }
% }
% \bool_if:NF \l_SectionLabel_success_bool {
% \int_do_while:nNnn
% {\l_SectionLabel_slash_count_int} <
% {\l_SectionLabel_slash_total_int} {
% \str_put_right:Nn \l_SectionLabel_path_str {/}
% \int_incr:N \l_SectionLabel_slash_count_int
% }
% \str_put_right:Ne \l_SectionLabel_path_str {\l_SectionLabel_label_str}
% }
% \group_end: }
% \NewDocumentCommand{\__SectionLabel_get_level:n}{m}{
% \str_case:Nn \tl_to_str:n {#2} {
% {} {0}
% {-1} {0}
% {0} {1}
% {1} {2}
% {2} {3}
% {3} {4}
% {4} {5}
% {5} {6}
% {part} {0}
% {chapter} {1}
% {section} {2}
% {subsection} {3}
% {subsubsection} {4}
% {paragraph} {5}
% {subparagraph} {6}
% }
% }