commit 149bdaae3f96cedbf1d7e45a84dd4361f143003c
parent 1debdaf1dbefd4b7ff56bdb8912c7021f98f6d37
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date: Sat, 30 May 2026 04:12:57 -0300
xdg-base-directories
Diffstat:
4 files changed, 336 insertions(+), 286 deletions(-)
diff --git a/.bash_profile b/.bash_profile
@@ -1,5 +1,5 @@
export VISUAL="vim"
-export EDITOR="ed"
+export EDITOR="ed -p>"
export FCEDIT="$VISUAL"
export PAGER=less
export LANG=en_US.UTF-8
@@ -26,6 +26,12 @@ export RANDFILE="$XDG_RUNTIME_DIR"/rnd
export SQLITE_HISTORY=$XDG_DATA_HOME/sqlite_history
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
+export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
+
+# R
+export R_HOME_USER="$HOME/.config/R"
+export R_PROFILE_USER="$HOME/.config/R/profile"
+export R_HISTFILE="$HOME/.config/R/history"
# Perl local::lib setup
export PERL5LIB="$HOME/perl5/lib/perl5"
@@ -33,6 +39,11 @@ export PERL_LOCAL_LIB_ROOT="$HOME/perl5"
export PERL_MB_OPT="--install_base \"$HOME/perl5\""
export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"
+# TeX Live
+export TEXMFHOME=$XDG_DATA_HOME/texmf
+export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var
+export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config
+
# TeX-related editors
export TEXEDIT="${VISUAL:-$EDITOR} +%d %s"
export MFEDIT="${VISUAL:-$EDITOR} +%d %s"
@@ -48,7 +59,7 @@ export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
[ -d "$HOME"/.local/bin ] && PATH="$HOME/.local/bin:$PATH"
[ -d "$XDG_DATA_HOME"/npm/bin ] && PATH="$PATH:$XDG_DATA_HOME/npm/bin/"
-[ -d /usr/local/texlive/2025/bin/x86_64-linux ] && PATH="$PATH:/usr/local/texlive/2025/bin/x86_64-linux"
+[ -d /usr/local/texlive/2026/bin/x86_64-linux ] && PATH="$PATH:/usr/local/texlive/2026/bin/x86_64-linux"
[ -d "$XDG_DATA_HOME"/gem/ruby/3.0.0/bin/ ] && PATH="$PATH:$XDG_DATA_HOME/gem/ruby/3.0.0/bin/"
[ -d "$HOME"/perl5/bin ] && PATH="$PATH:$HOME/perl5/bin"
[ -d "$HOME"/perl5/lib ] && LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$HOME/perl5/lib"
diff --git a/.config/npm/npmrc b/.config/npm/npmrc
@@ -1,4 +1,4 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
-tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
+logs-dir=${XDG_STATE_HOME}/npm/logs
diff --git a/.local/share/texmf/tex/plain/macros.tex b/.local/share/texmf/tex/plain/macros.tex
@@ -0,0 +1,322 @@
+\pdfcompresslevel=0
+
+\baselineskip=12pt
+\lineskiplimit=0pt
+\lineskip=0pt
+\parindent=0pt
+\parskip=0pt
+\topskip=0pt
+\maxdepth=0pt
+\pdfminorversion=7
+\jot=4pt
+
+% \pretolerance=-1
+% \tolerance=9999
+% \emergencystretch=8pt
+\overfullrule=5mm
+\showboxdepth=100
+\showboxbreadth=1000
+
+\def\capitalize#1#2{\uppercase{#1}#2}
+
+% breakbox environment {{{
+\newbox\innerbox
+\newbox\innerboxfirstline
+\newbox\innerboxi
+\newbox\partialpage
+\newdimen\heightremaining
+\newdimen\heightfirstline
+\newdimen\innerwidth
+
+\def\breakbox#1#2{
+ \global\def\breakboxcolori{#1}
+ \global\def\breakboxcolorii{#2}
+ % TODO: Why do I need this? There is a problem when the page start with a breakbox. The whole line is not printed.
+ % \hbox{}
+ % First, save in \partialpage the content of the current page so far.
+ % \vbox{\unvbox255} is used instead of \box255 because the height of the
+ % \box255 is \textheight = \vsize (\pagegoal?)
+ \output{\global\setbox\partialpage=\vbox{\unvbox255}}\eject
+ \output{\myoutput}%
+ % compute the width of the innerbox
+ \innerwidth=\linewidth
+ \advance\innerwidth by-2\fboxsep
+ \advance\innerwidth by-2\fboxrule
+ % The innerbox is a vbox that will contain the content of the theorem
+ % It start a bgroup that will end at \endtheorem
+ \setbox\innerbox=\vbox\bgroup%
+ \hsize=\innerwidth
+ \linewidth=\innerwidth
+ % TODO: error when page breaking and the color was changed
+}
+
+\def\endbreakbox{%
+ % It close the innerbox that was started at \theoremii
+ \egroup
+ % Config for the vsplit's
+ \splitmaxdepth=0pt
+ \splittopskip=0pt
+ % Get the first line of the innerbox by splitting a copy
+ \setbox\innerboxfirstline=\copy\innerbox
+ \vfuzz=\maxdimen
+ \setbox\innerboxfirstline=\vsplit\innerboxfirstline to0pt
+ \vfuzz=1pt
+ \setbox\innerboxfirstline=\vbox{\hsize=\innerwidth\unvbox\innerboxfirstline}%
+ \heightfirstline=\ht\innerboxfirstline
+ \advance\heightfirstline by\dp\innerboxfirstline
+ % Compute the height remaining in the page
+ \heightremaining=\textheight
+ \advance\heightremaining by-\ht\partialpage
+ \advance\heightremaining by-\dp\partialpage
+ \advance\heightremaining by-2\fboxsep
+ \advance\heightremaining by-2\fboxrule
+ % Put the partial page back
+ \box\partialpage
+ % Check if the first line fits
+ \ifdim\heightremaining>\heightfirstline
+ % \message{First line fits}
+ % If the firstline fits, then check if the whole box fits
+ \ifdim\heightremaining<\ht\innerbox
+ % \message{The whole box does not fit}
+ % If The whole box does not fit, then split it
+ \vbadness=10000
+ \setbox\innerboxi=\vsplit\innerbox to\heightremaining
+ \vbadness=1000
+ % \vbox\unvbox\innerboxi instead of \box\innerboxi
+ \setbox\innerboxi=\vbox{\unvbox\innerboxi}
+ % Set the width of the innerbox so that the fcolorbox don't overfull
+ \wd\innerboxi=\innerwidth
+ \par\noindent\fcolorbox{\breakboxcolori}{\breakboxcolorii}{\box\innerboxi}%
+ \eject
+ \else
+ % \message{The whole box fits}
+ \fi
+ \else
+ % If the firstline does not fit then eject to finish the current column
+ % \message{First line does not fit}
+ \eject
+ \fi
+ % If the innerbox is void after the splitting, then print it
+ \ifvoid\innerbox\else
+ % \message{The innerbox is not void}
+ % Set the width of the innerbox so that the fcolorbox don't overflow
+ \wd\innerbox=\innerwidth
+ \smallskip
+ \par\noindent\fcolorbox{\breakboxcolori}{\breakboxcolorii}{\box\innerbox}\par
+ \smallskip
+ \fi
+ \par
+ \let\breakboxcolori=\relax
+ \let\breakboxcolorii=\relax
+}
+% }}}
+
+% Theorems {{{
+\newcount\thmnum
+\thmnum=0
+\def\newthm#1#2#3{
+ % \theorem
+ \expandafter\def\csname #3\endcsname{%
+ \global\advance\thmnum by1
+ % \message{\number\thmnum}%
+ \def\tmp{\futurelet\next}%
+ \expandafter\tmp\csname #3i\endcsname
+ }
+
+ % \theoremi
+ \expandafter\def\csname #3i\endcsname{%
+ \let\thmname=\relax
+ \def\tmpi[####1]{\def\thmname{####1}\csname #3ii\endcsname}%
+ \ifx\next[
+ \expandafter\tmpi
+ \else
+ \csname #3ii\endcsname
+ \fi
+ }
+
+ % \theoremii
+ \expandafter\def\csname #3ii\endcsname{%
+ \breakbox{#1}{#2}
+ {\bf \capitalize#3 \number\thmnum.}~\ifx\thmname\relax\else{\bf(\thmname)}\fi%
+ }
+
+ % \endtheorem
+ \expandafter\def\csname end#3\endcsname{%
+ \endbreakbox
+ }
+}
+% }}}
+
+% jobname {{{
+\edef\twocolumn{\detokenize{twocolumn}}
+\edef\fourcolumn{\detokenize{fourcolumn}}
+\edef\slides{\detokenize{slides}}
+\edef\xjobname{\jobname}
+
+\newcount\numcol
+\ifx\xjobname\twocolumn
+ \AtBeginDocument{
+ \pdfpageheight=297mm
+ \pdfpagewidth=210mm
+ }
+ \numcol=2
+\else\ifx\xjobname\fourcolumn
+ \numcol=4
+ \AtBeginDocument{
+ \pdfpageheight=297mm
+ \pdfpagewidth=420mm
+ \mag=707
+ }
+\else\ifx\xjobname\slides
+ \numcol=2
+ \AtBeginDocument{
+ \pdfpageheight=118.125mm
+ \pdfpagewidth=210mm
+ \mag=762
+ }
+\else
+ \numcol=1
+ \ifx\documentclass\undefined
+ \pdfpageheight=288mm
+ \pdfpagewidth=100mm
+ \else
+ \AtBeginDocument{
+ \pdfpageheight=290mm
+ \pdfpagewidth=100mm
+ }
+ \fi
+\fi\fi\fi
+
+\hoffset=-1in
+\voffset=-1in
+
+
+\countdef\pageno=0 \pageno=1
+\newcount\curcol
+\newcount\colbox
+\newcount\firstbox
+\firstbox=100
+\curcol=0
+\def\myoutput{%
+ \global\advance\curcol by1
+ {%
+ \advance\curcol by\firstbox
+ \global\setbox\curcol=\box255
+ \global\wd\curcol=\textwidth
+ }%
+ \ifnum\curcol=\numcol
+ \global\curcol=4
+ \shipout\vbox to \pdfpageheight {%
+ \vfil
+ \hbox to \pdfpagewidth {%
+ \colbox=0
+ \hfil
+ \loop
+ \ifnum\colbox<\numcol
+ \advance\colbox by1
+ {%
+ \hfil
+ \advance\colbox by\firstbox
+ \box\colbox
+ }%
+ \repeat
+ \hfil\hfil
+ }%
+ \vfil
+ }%
+ \global\advance\pageno by1
+ \global\curcol=0
+ \fi
+}
+% }}}
+
+% if latex {{{
+\ifx\documentclass\undefined\else
+ \fboxsep=2mm
+ \fboxrule=1.5pt
+
+ \def\xthm#1#2#3,{
+ \if\relax\detokenize{#3}\relax\else
+ \newthm{#1}{#2}{#3}
+ \def\tmpxthm{\xthm{#1}{#2}}
+ \expandafter\tmpxthm
+ \fi
+ }
+
+ \usepackage[pdftex]{color}
+ \definecolor{red}{RGB}{247,87,130}
+ \definecolor{green}{RGB}{86,162,43}
+ \definecolor{blue}{RGB}{126,134,244}
+ \definecolor{bts}{RGB}{244,58,232}
+ \definecolor{orange}{RGB}{235,106,44}
+ \definecolor{gray}{RGB}{145,145,145}
+ \definecolor{redlight}{RGB}{255,247,248}
+ \definecolor{greenlight}{RGB}{246,250,245}
+ \definecolor{bluelight}{RGB}{248,249,255}
+ \definecolor{btslight}{RGB}{255,247,254}
+ \definecolor{orangelight}{RGB}{255,248,245}
+ \definecolor{graylight}{RGB}{249,249,249}
+
+ \xthm{green}{greenlight}theorem,lemma,corollary,proposition,,
+ \xthm{orange}{orangelight}definition,,
+ \xthm{blue}{bluelight}question,remark,note,notation,claim,summary,acknowledgment,case,conclusion,observation,recall,affirmation,paragraph,,
+ \xthm{bts}{btslight}example,application,problem,,
+ \xthm{red}{redlight}exercise,,
+ \xthm{gray}{graylight}proof,solution,,
+
+ \ifx\xjobname\slides
+ \textheight=108.125mm
+ \else
+ \textheight=287mm
+ \fi
+ \textwidth=97.5mm
+
+ \AtBeginDocument{
+ \baselineskip=12pt
+ \abovedisplayskip=1pt
+ \belowdisplayskip=1pt
+ \abovedisplayshortskip=2pt
+ \belowdisplayshortskip=2pt
+ \output{\myoutput}%
+ \overfullrule=5mm
+ }
+
+ % list {{{
+ \catcode`\@=11
+ \def\@listi{\leftmargin\leftmargini
+ \parsep=0pt
+ \topsep=0pt
+ \itemsep=0pt
+ \partopsep=0pt}
+ \let\@listI\@listi
+ %\@listi
+ \def\@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep}
+ \def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep}
+ \def\@listiv {\leftmargin\leftmarginiv
+ \labelwidth\leftmarginiv
+ \advance\labelwidth-\labelsep}
+ \def\@listv {\leftmargin\leftmarginv
+ \labelwidth\leftmarginv
+ \advance\labelwidth-\labelsep}
+ \def\@listvi {\leftmargin\leftmarginvi
+ \labelwidth\leftmarginvi
+ \advance\labelwidth-\labelsep}
+
+ \def\labelitemi{$\circ$}
+ \catcode`\@=12
+ % }}}
+\fi
+% }}}
+
+\def\coloneqq{\mathrel{\mathop:}=}
+\def\mathclap#1{\hbox to 0pt{\hss$#1$\hss}}
+\def\mathllap{}
+
+\let\mymathbb=\mathbb
+\def\mathbb#1{\ifx1#11\hskip-4pt 1\else\mymathbb{#1}\fi}
+
+% vim: fen fdm=marker
diff --git a/texmf/tex/plain/macros.tex b/texmf/tex/plain/macros.tex
@@ -1,283 +0,0 @@
-\pdfcompresslevel=0
-
-\catcode`\@=11
-\def\@listi{\leftmargin\leftmargini
- \parsep=0pt
- \topsep=0pt
- \itemsep=0pt
- \partopsep=0pt}
-\let\@listI\@listi
-%\@listi
-\def\@listii {\leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep}
-\def\@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep}
-\def\@listiv {\leftmargin\leftmarginiv
- \labelwidth\leftmarginiv
- \advance\labelwidth-\labelsep}
-\def\@listv {\leftmargin\leftmarginv
- \labelwidth\leftmarginv
- \advance\labelwidth-\labelsep}
-\def\@listvi {\leftmargin\leftmarginvi
- \labelwidth\leftmarginvi
- \advance\labelwidth-\labelsep}
-\catcode`\@=12
-
-\baselineskip=0pt
-\lineskiplimit=0pt
-\lineskip=0pt
-\parindent=0pt
-\parskip=0pt
-\topskip=0pt
-\maxdepth=0pt
-\pdfminorversion=7
-\jot=4pt
-
-% \pretolerance=-1
-% \tolerance=9999
-% \emergencystretch=8pt
-\overfullrule=5mm
-\showboxdepth=100
-\showboxbreadth=1000
-
-\def\capitalize#1#2{\uppercase{#1}#2}
-\newbox\innerbox
-\newbox\innerboxfirstline
-\newbox\innerboxi
-\newbox\partialpage
-\newdimen\heightremaining
-\newdimen\heightfirstline
-\newdimen\innerwidth
-
-\def\breakbox#1{%
- \global\def\breakboxcolor{#1}
- % TODO: Why do I need this? There is a problem when the page start with a breakbox. The whole line is not printed.
- % \hbox{}
- % First, save in \partialpage the content of the current page so far.
- % \vbox{\unvbox255} is used instead of \box255 because the height of the
- % \box255 is \textheight = \vsize (\pagegoal?)
- \output{\global\setbox\partialpage=\vbox{\unvbox255}}\eject
- \output{\myoutput}%
- % compute the width of the innerbox
- \innerwidth=\linewidth
- \advance\innerwidth by-2\fboxsep
- \advance\innerwidth by-2\fboxrule
- % The innerbox is a vbox that will contain the content of the theorem
- % It start a bgroup that will end at \endtheorem
- \setbox\innerbox=\vbox\bgroup%
- \hsize=\innerwidth
- \linewidth=\innerwidth
- % TODO: error when page breaking and the color was changed
-}
-
-\def\endbreakbox{%
- % It close the innerbox that was started at \theoremii
- \egroup
- % Config for the vsplit's
- \splitmaxdepth=0pt
- \splittopskip=0pt
- % Get the first line of the innerbox by splitting a copy
- \setbox\innerboxfirstline=\copy\innerbox
- \vfuzz=\maxdimen
- \setbox\innerboxfirstline=\vsplit\innerboxfirstline to0pt
- \vfuzz=1pt
- \setbox\innerboxfirstline=\vbox{\hsize=\innerwidth\unvbox\innerboxfirstline}%
- \heightfirstline=\ht\innerboxfirstline
- \advance\heightfirstline by\dp\innerboxfirstline
- % Compute the height remaining in the page
- \heightremaining=\textheight
- \advance\heightremaining by-\ht\partialpage
- \advance\heightremaining by-\dp\partialpage
- \advance\heightremaining by-2\fboxsep
- \advance\heightremaining by-2\fboxrule
- % Put the partial page back
- \box\partialpage
- % Check if the first line fits
- \ifdim\heightremaining>\heightfirstline
- % \message{First line fits}
- % If the firstline fits, then check if the whole box fits
- \ifdim\heightremaining<\ht\innerbox
- % \message{The whole box does not fit}
- % If The whole box does not fit, then split it
- \vbadness=10000
- \setbox\innerboxi=\vsplit\innerbox to\heightremaining
- \vbadness=1000
- % \vbox\unvbox\innerboxi instead of \box\innerboxi
- \setbox\innerboxi=\vbox{\unvbox\innerboxi}
- % Set the width of the innerbox so that the fcolorbox don't overfull
- \wd\innerboxi=\innerwidth
- \par\noindent\fcolorbox{\breakboxcolor}{\breakboxcolor!5}{\box\innerboxi}%
- \eject
- \else
- % \message{The whole box fits}
- \fi
- \else
- % If the firstline does not fit then eject to finish the current column
- % \message{First line does not fit}
- \eject
- \fi
- % If the innerbox is void after the splitting, then print it
- \ifvoid\innerbox\else
- % \message{The innerbox is not void}
- % Set the width of the innerbox so that the fcolorbox don't overflow
- \wd\innerbox=\innerwidth
- \smallskip
- \par\noindent\fcolorbox{\breakboxcolor}{\breakboxcolor!5}{\box\innerbox}\par
- \smallskip
- \fi
- \par
- \let\breakboxcolor=\relax
-}
-
-\newcount\thmnum
-\thmnum=0
-\def\newthm#1#2#3{
- % \theorem
- \expandafter\def\csname #3\endcsname{%
- \global\advance\thmnum by1
- % \message{\number\thmnum}%
- \def\tmp{\futurelet\next}%
- \expandafter\tmp\csname #3i\endcsname
- }
-
- % \theoremi
- \expandafter\def\csname #3i\endcsname{%
- \let\thmname=\relax
- \def\tmpi[####1]{\def\thmname{####1}\csname #3ii\endcsname}%
- \ifx\next[
- \expandafter\tmpi
- \else
- \csname #3ii\endcsname
- \fi
- }
-
- % \theoremii
- \expandafter\def\csname #3ii\endcsname{%
- \breakbox{#1}
- {\bf \capitalize#3 \number\thmnum.}~\ifx\thmname\relax\else(\thmname)\fi%
- }
-
- % \endtheorem
- \expandafter\def\csname end#3\endcsname{%
- \endbreakbox
- }
-}
-
-
-\edef\twocolumn{\detokenize{twocolumn}}
-\edef\fourcolumn{\detokenize{fourcolumn}}
-\edef\xjobname{\jobname}
-
-\newcount\numcol
-\ifx\xjobname\twocolumn
- \AtBeginDocument{
- \pdfpageheight=297mm
- \pdfpagewidth=210mm
- }
- \numcol=2
-\else\ifx\xjobname\fourcolumn
- \numcol=4
- \AtBeginDocument{
- \pdfpageheight=297mm
- \pdfpagewidth=420mm
- \mag=707
- }
-\else
- \numcol=1
- \ifx\documentclass\undefined
- \pdfpageheight=288mm
- \pdfpagewidth=100mm
- \else
- \AtBeginDocument{
- \pdfpageheight=290mm
- \pdfpagewidth=100mm
- }
- \fi
-\fi\fi
-
-\hoffset=-1in
-\voffset=-1in
-
-
-\countdef\pageno=0 \pageno=1
-\newcount\curcol
-\newcount\colbox
-\newcount\firstbox
-\firstbox=100
-\curcol=0
-\def\myoutput{%
- \global\advance\curcol by1
- {%
- \advance\curcol by\firstbox
- \global\setbox\curcol=\box255
- \global\wd\curcol=\textwidth
- }%
- \ifnum\curcol=\numcol
- \global\curcol=4
- \shipout\vbox to \pdfpageheight {%
- \vfil
- \hbox to \pdfpagewidth {%
- \colbox=0
- \hfil
- \loop
- \ifnum\colbox<\numcol
- \advance\colbox by1
- {%
- \hfil
- \advance\colbox by\firstbox
- \box\colbox
- }%
- \repeat
- \hfil\hfil
- }%
- \vfil
- }%
- \global\advance\pageno by1
- \global\curcol=0
- \fi
-}
-
-\def\xthm#1#2#3,{
- \if\relax\detokenize{#3}\relax\else
- \newthm{#1}{#2}{#3}
- \def\tmpxthm{\xthm{#1}{#2}}
- \expandafter\tmpxthm
- \fi
-}
-
-\ifx\documentclass\undefined\else
- \fboxsep=2mm
- \fboxrule=1.5pt
- \usepackage{xcolor}
- \definecolor{red}{RGB}{247,87,130}
- \definecolor{green}{RGB}{86,162,43}
- \definecolor{blue}{RGB}{126,134,244}
- \definecolor{bts}{RGB}{244,58,232}
- \definecolor{orange}{RGB}{235,106,44}
- \definecolor{gray}{RGB}{145,145,145}
- \xthm{green}{green}theorem,lemma,corollary,proposition,,
- \xthm{orange}{orange}definition,,
- \xthm{blue}{blue}question,remark,note,notation,claim,summary,acknowledgment,case,conclusion,observation,recall,affirmation,,
- \xthm{bts}{bts}example,application,problem,,
- \xthm{red}{red}exercise,,
- \xthm{gray}{gray}proof,solution,,
-
- \textheight=287mm
- \textwidth=97.5mm
-
-\AtBeginDocument{
- \baselineskip=12pt
- \abovedisplayskip=1pt
- \belowdisplayskip=1pt
- \abovedisplayshortskip=2pt
- \belowdisplayshortskip=2pt
- \output{\myoutput}%
- \overfullrule=5mm
-}
-\fi
-
-\def\coloneqq{\mathrel{\mathop:}=}
-\def\mathclap#1{\hbox to 0pt{\hss$#1$\hss}}
-\def\mathllap{}