Skip to content

Commit

Permalink
Regular update '2024-04-23T00:10:52+00:00'
Browse files Browse the repository at this point in the history
  • Loading branch information
neruthes committed Apr 23, 2024
1 parent 50fc79c commit a10719f
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 10 deletions.
90 changes: 90 additions & 0 deletions latexlib/ns-letter.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
% Ver 2024-04-20T20:15:31+00:00
\documentclass[a4paper,10pt]{article}
\usepackage[textwidth=30em,rmargin=25mm,tmargin=90mm,bmargin=37mm]{geometry}
\usepackage{calc,fontspec,tocloft,longtable,tabu,booktabs,xcolor,datetime2,paralist,enumitem,hyphenat,graphicx,eso-pic}
\usepackage{amssymb,amsmath,multicol,fancyhdr,adjustbox}
\usepackage[hidelinks]{hyperref}
\usepackage{xeCJK,xeCJKfntef}
\xeCJKsetup{PunctStyle=plain,RubberPunctSkip=false,CJKglue=\hskip 0pt,CJKecglue=\hskip 0.35em plus 5em minus 0.09em}
\setmainfont{TeX Gyre Schola}
\setromanfont{TeX Gyre Schola}
\setsansfont{Inter}
\setmonofont{JetBrains Mono NL}
\setCJKmainfont{Noto Serif CJK SC}
\setCJKromanfont{Noto Serif CJK SC}
\setCJKsansfont{Noto Sans CJK SC}
\setCJKmonofont{Noto Sans CJK SC}

\setdefaultleftmargin{2em}{2em}{2em}{2em}{2em}{2em}

\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt}
\linespread{1.18}
\setlength{\tabulinesep}{3.5pt}
\frenchspacing

\usepackage{sectsty}
\allsectionsfont{\sffamily\raggedright}

\pagestyle{fancy}
\fancyfoot[C]{}
\fancyfoot[R]{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{15pt}


\newcommand{\sendto}[1]{
\AddToShipoutPictureFG*{
\put(25mm,54mm){%
\noindent\begin{minipage}[b][150mm][t]{43mm}%
\footnotesize\sffamily\noindent#1%
% \par\rule{10mm}{50mm}
\end{minipage}%
}%
}
}

\newcommand{\letterhello}[1]{\noindent#1\par\vskip 1em}

\newcommand{\lettersig}[1]{
\vfill
% \hfill
\noindent\parbox{\linewidth}{#1}
\vskip 1em
}


\newcommand{\footercontentright}[0]{\thepage}

\newcommand{\setupdecorations}[0]{
\AddToShipoutPictureBG{
\put(25mm,265mm){%
\noindent%
\includegraphics[width=33mm]{_dist/libvi/logocomb/Nekostein-logocombH.black.png}
}
\put(25mm,18mm){%
\parbox{\paperwidth-50mm}{%
\noindent%
\adjustbox{width=\linewidth,height=0.5pt}{%
\noindent%
\rule{4pt}{1pt}~\rule{9pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~\rule{9pt}{1pt}~~~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}~~~\rule{9pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{9pt}{1pt}~~~\rule{4pt}{1pt}~~~\rule{4pt}{1pt}~\rule{9pt}{1pt}~\rule{4pt}{1pt}~\rule{4pt}{1pt}~~~\rule{9pt}{1pt}%
}%
}
}
\put(25mm,23mm){%
\parbox{\paperwidth-50mm}{%
\footnotesize%
\sffamily\noindent%
\vphantom{1IQfgqa\"A}%
Nekostein HQ
\hfill
\footercontentright%
}
}
}
}

% =================================================
% Extra utils
% =================================================
\newcommand{\enableCjkIndenting}[0]{\setlength{\parindent}{2em}}
14 changes: 14 additions & 0 deletions misc/morsecode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const RAW_CODE_SEQ = `.- .-.. .-.. . ... .. ... - .-. .. -.-. .... - .. --. -- .. - -.. . .-. .-- . .-.. -`;

// NEKOSTEIN
// NEKOUNDKUMASINDTOMODACHIFOREVER
// ALLESISTRICHTIGMITDERWELT

const CONVERT_MAP = {
'-': '\\rule{9pt}{1pt}~',
'.': '\\rule{4pt}{1pt}~',
' ': '~~',
'/': '~~~~~~',
}

console.log(RAW_CODE_SEQ.split('').map(x => CONVERT_MAP[x]).join(''));
26 changes: 26 additions & 0 deletions res/nekstfair-old1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 10 additions & 8 deletions res/nekstfair.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions sh/11-nekstfair-logo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ function make_img() {
convert "$prefix.$output_name.png" -trim "$prefix.$output_name.trim.png"
}

make_img '000000' 'FFFFFF' black
make_img 'FFFFFF' '000000' white
make_img '000000' 'FFFFFF' white
make_img 'FFFFFF' '000000' black
29 changes: 29 additions & 0 deletions wwwmisc/doc/Letter_Example.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
\input{latexlib/ns-letter.tex}
% \renewcommand{\footercontentright}[0]{https://nekostein.com}
\renewcommand{\footercontentright}[0]{\thepage}
\enableCjkIndenting

\begin{document}
\setupdecorations
\sendto{Mr. John Appleseed\\1 Infinite Loop\\Cupertino\\CA 95014\\USA}
\letterhello{Dear John Appleseed,}

Long time no see.

This is a sample letter from Nekostein HQ to fictional figure John Appleseed,
whose name is completely made up \textit{ex nihilo}.



\lettersig{
Sincerely,\\
Neruthes\\
\vskip 1em
\includegraphics[width=9em]{.tmp/neruthes-sigalt1.png}\\
\small Torishimariyaku \& Shachou\\
Nekostein
}


\end{document}
% cp /home/neruthes/DEV/ntexlibs/pic/neruthes-sigalt1.png .tmp/neruthes-sigalt1.png

0 comments on commit a10719f

Please sign in to comment.