Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a indexstyle #50

Merged
merged 7 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/status_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ name: status check compile (does not push)
types:
- opened
- edited
- synchronize

jobs:
build:
Expand All @@ -27,8 +26,8 @@ jobs:
path: |
build
sub_*
key: ${{ runner.os }}-pengu-cache-doc-${{ github.run_id }}
restore-keys: ${{ runner.os }}-pengu-cache-doc-
key: ${{ runner.os }}-pengu-cache-doc-v2-${{ github.run_id }}
restore-keys: ${{ runner.os }}-pengu-cache-doc-v2-
- name: Compile the Documentation, showcase and minimal
uses: xu-cheng/latex-action@v2
with:
Expand All @@ -43,3 +42,8 @@ jobs:
build/minimal.pdf
build/showcase.pdf
build/documentation.pdf
build/documentation.log
build/documentation.aux
build/documentation.ilg
build/documentation.ind
build/documentation.idx
3 changes: 2 additions & 1 deletion .latexmkrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ $pdf_update_method = 1;
$out_dir = 'build';
$postscript_mode = 0;
$dvi_mode = 0;
$pdflatex = 'pdflatex %O -shell-escape %S';
$pdflatex = 'pdflatex %O -shell-escape %S';
$makeindex = "makeindex -s ../indexstyle.ist %O -o %D %S";
2 changes: 1 addition & 1 deletion documentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
\usepackage{adjustbox}
\usepackage{xstring}

\makeindex[title={Key Overview},columns=2,columnsep=.75cm,noautomatic=true]
\makeindex[title={Key Overview},columns=2,columnsep=.75cm,noautomatic=true,options=-s indexstyle.ist]
\deffootnote{1.5em}{1em}{\textsuperscript{\hyperref[\BackrefFootnoteTag]{\thefootnotemark}}\thinspace}
\def\thefootnote{$\langle$\arabic{footnote}$\rangle$}

Expand Down
51 changes: 51 additions & 0 deletions indexstyle.ist
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
% comment - in case of need :D
heading_prefix "\n% Header (guard)
\\ifcsname needspace\\endcsname \\needspace{3\\baselineskip}\\fi
\\ifcsname tikz\\endcsname
\\def\\ledx@head#1{\\tikz{\\node[text width=3cm,align=center] (hr)at(0,0){\\textbf{#1}};\\draw[rounded corners=3pt,thick,line cap=round]([yshift=-.125cm]hr.north west)|-(hr.north east)--++(0,-.125cm);\\draw[rounded corners=2.5pt,thick,line cap=round] ([yshift=.125cm]hr.south west)|-(hr.south east)--++(0,.125cm);}}
\\else\\let\\ledx@head\\textbf\\fi\\medskip\\par\\color{black}{\\centering\\ledx@head{"
heading_suffix "}\\nopagebreak\\medskip\\par}\\nopagebreak "
headings_flag 1
preamble "\\begin{theindex}%
\\providecommand*\\indexgroup[1]{\\item\\textbf{#1}\\nopagebreak}~\\par\\providecommand\\idxfsize{\\normalsize}\\makeatletter
\\ifcsname hyperpage\\endcsname
\\LetLtxMacro\\ledx@h\\hyperpage
\\newif\\ifledx@rc@
\\def\\ledx@@s{%
\\def\\ledx@fs{Y}\\gdef\\ledx@@u{}\\gdef\\ledx@@b{}%
\\def\\hyperpage##1{\\g@addto@macro\\ledx@@u{##1}\\global\\let\\ledx@@b\\ledx@@u\\ledx@h{##1}}}%
\\def\\ledx@@sl{%
\\def\\ledx@fs{Y}\\ledx@rc@true\\global\\let\\ledx@@u\\ledx@@b
\\def\\hyperpage##1{\\ifledx@rc@\\def\\ledx@@u{}\\ledx@rc@false\\fi\\g@addto@macro\\ledx@@u{##1}\\ledx@h{##1}}}%
\\def\\ledx@@d{%
\\def\\ledx@fs{}%
\\def\\hyperpage##1{\\g@addto@macro\\ledx@cpb{##1}\\ledx@h{##1}}}%
\\else\\def\\ledx@@s{}\\def\\ledx@@d{}\\fi
\\def\\ledx@@msub{\\ifx\\ledx@fs\\@empty,\\space\\else\\subsubitem\\ledx@@d\\color{gray}\\footnotesize\\fi}%
\\def\\ledx@lb@encap#1{\\gdef\\ledx@cpb{}\\sbox\\z@{#1}\\ifx\\ledx@@u\\ledx@cpb\\else\\textsuperscript{(#1)\\kern-.1em}\\fi}
"
postamble "\n\n\\end{theindex}\n"
group_skip "%\n\\indexspace\n"
numhead_positive "\\small Numbers"
numhead_negative "\\small Numbers"
symhead_positive "\\small Symbole"
symhead_negative "\\small Symbole"
delim_0 "\\thinspace\\dotfill\\thinspace {"
delim_1 "\:~~{"
delim_2 "\\ledx@lb@encap{\\relax "
item_0 "\n\n \\item\\ledx@@s\\color{black}\\idxfsize "
item_01 "\n \\subitem\\ledx@@s\\color{black}\\small "
item_x1 "\n \\subitem\\ledx@@sl\\color{black}\\small "
item_1 "\n \\subitem\\ledx@@sl\\color{black}\\small "
item_12 "\n \\subsubitem\\ledx@@d\\color{gray}\\footnotesize "
item_x2 "\n \\subsubitem\\ledx@@d\\color{gray}\\footnotesize "
item_2 "\\ledx@@msub "
encap_prefix "\\"
encap_infix "{"
encap_suffix "}"
quote '#'
actual '?'
delim_t "}\\relax "
delim_n ", "
indent_space "\t\t"
indent_length 16