Reformat.

This commit is contained in:
Dmitry Voronin 2024-03-06 02:49:41 +03:00
parent 91905281c7
commit 53d17dc176
31 changed files with 366 additions and 283 deletions

1
.NixRootDefault Symbolic link
View file

@ -0,0 +1 @@
/nix/store/i2jv330lmlfmdw3qlhq4mzgj5qr62x7y-nix-shell

View file

@ -1,12 +1,12 @@
color = 000000
color = 000000
photo = true
extra = true
extra = true
build = $(CURDIR)/build
src = $(CURDIR)/tex
target = $(src)/main.tex
output = $(build)/main.pdf
outputen = $(build)/document_en.pdf
outputru = $(build)/document_ru.pdf
target = $(src)/Main.tex
output = $(build)/Main.pdf
outputen = $(build)/DocumentEn.pdf
outputru = $(build)/DocumentRu.pdf
export DOCUMENT_COLOR := $(color)
export DOCUMENT_PHOTO := $(photo)
@ -16,7 +16,7 @@ export DOCUMENT_EXTRA := $(extra)
all: clean icon en ru open
.PHONY: clean
clean:
clean:
@rm -rf $(build)
.PHONY: icon

View file

@ -1,11 +1,13 @@
# Tex template.
## How to build.
```bash
$ make
```
### Available targets.
Taget | Description
--- | ---
all | Clean, build and open document.
@ -16,11 +18,13 @@ ru | Build Russian document.
open | Open built document in default PDF viewer.
## Requirements.
* `GNU/Linux` (not tested on other platforms).
* `LuaLaTeX` for the document itself.
* `ImageMagick` (optional) for colored icons.
### Texlive setup.
```text
$ wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
$ tar -xf install-tl-unx.tar.gz
@ -30,9 +34,6 @@ $ ./install-tl
```
### Installing missing dependencies.
When trying to build the project, lualatex may throw missing dependency errors.
To install them use `$ tlmgr install $dependency`.
## TODO.
- [ ] Add samples of all the styles and views to default.
- [ ] Keep template up-to-date.
When trying to build the project, lualatex may throw missing dependency errors.
To install them use `$ tlmgr install {dependency}`.

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1707092692,
"narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "faf912b086576fd1a15fca610166c98d47bc667e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

55
flake.nix Normal file
View file

@ -0,0 +1,55 @@
{
description = "LuaLaTeX build env.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @inputs: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-basic
amsmath
babel
capt-of
catchfile
collection-fontsextra
cyrillic
dvipng
dvisvgm
environ
etoolbox
fancyhdr
fontspec
geometry
hyperref
listofitems
luacode
luatexbase
montserrat
parskip
pgf
tcolorbox
tocloft
ulem
wrapfig
xcolor;
#(setq org-latex-compiler "lualatex")
#(setq org-preview-latex-default-process 'dvisvgm)
});
in {
devShells.${system} = {
default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
gnumake
imagemagick
tex
];
buildInputs = with pkgs; [];
};
};
};
}

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

22
tex/Const.tex Normal file
View file

@ -0,0 +1,22 @@
% Switches.
\newif\ifPhoto % Show photo.
\newif\ifExtra % Show extra content.
\newif\ifEn % English language.
\newif\ifRu % Russian language.
\newcommand{\En}[1]{\ifEn#1\fi} % Print if English language.
\newcommand{\Ru}[1]{\ifRu#1\fi} % Print if Russian language.
% Read env variables.
\def\envTrue{true} % True.
\def\envFalse{false} % False.
\def\envEn{en} % English literal.
\def\envRu{ru} % Russian literal.
\def\envEmpty{} % Empty env value.
\GetEnv[\envPhoto]{DOCUMENT_PHOTO} % Read photo shell variable.
\GetEnv[\envExtra]{DOCUMENT_EXTRA} % Read extra shell variable.
\GetEnv[\envLang]{DOCUMENT_LANG} % Read language shell variable.
\ifdefequal{\envPhoto}{\envTrue}{\Phototrue}{\Photofalse} % Show photo.
\ifdefequal{\envExtra}{\envTrue}{\Extratrue}{\Extrafalse} % Show extra content.
\ifdefequal{\envLang}{\envEn}{\Entrue}{} % Use English.
\ifdefequal{\envLang}{\envRu}{\Rutrue}{} % Use Russian.
\ifdefequal{\envLang}{\envEmpty}{\Entrue}{} % Use English by default.

59
tex/Main.tex Normal file
View file

@ -0,0 +1,59 @@
\documentclass{article} % Basic document class (template).
\usepackage[T2A,T1]{fontenc} % Specify font encodings.
\usepackage[utf8]{inputenc} % Specify input file encodings.
\usepackage[bidi=default]{babel} % Use babel for i18n.
\usepackage{graphicx} % Image support.
\usepackage{xcolor} % Colored text support.
\usepackage{montserrat} % Custom font.
\usepackage{hyperref} % Hyperlinks.
\usepackage{indentfirst} % Auto indent for paragraphs.
\usepackage{luacode} % Lua scripts support.
\usepackage{tcolorbox} % Code blocks.
\usepackage{listofitems} % For loops.
\input{Shell} % Import shell support.
% Configure geometry.
\usepackage[
a4paper,
left = 0.5in,
right = 0.5in,
top = 0.5in,
bottom = 0.5in
]{geometry}
% Paragraph spacing.
\usepackage[
skip = 4pt,
indent = 20pt
]{parskip}
% Configure hyperlinks.
\hypersetup{
linktocpage = true,
colorlinks = true,
hidelinks = true,
linktoc = all
}
% Specify where images are stored.
\graphicspath{ {../image}{../build/image} }
\babelprovide[import]{russian} % Add Russian support.
\babelfont{rm}{montserrat} % Use custom serif font for English.
\babelfont{sf}{montserrat} % Use custom sans font for English.
\babelfont{tt}{montserrat} % Use custom mono font for English.
\babelfont[russian]{rm}{montserrat} % Use custom serif font for Russian.
\babelfont[russian]{sf}{montserrat} % Use custom sans font for Russian.
\babelfont[russian]{tt}{montserrat} % Use custom mono font for Russian.
\begin{document}
\input{Style} % Import common styles.
\input{Const} % Import constant values.
\input{Page} % Import pages info.
\input{i18n/Month} % Import month values.
\input{view/Radio} % Import radio view.
\input{view/List} % Import list view.
\input{page/Example} % Example page.
\end{document}

5
tex/Page.tex Normal file
View file

@ -0,0 +1,5 @@
% This is used to create constant reference links within document.
\def\PageExample{%
\En{SAMPLE PAGE}%
\Ru{ПРИМЕР СТРАНИЦЫ}
}

5
tex/Shell.tex Normal file
View file

@ -0,0 +1,5 @@
% \GetEnv[\HOME]{HOME} % Example: Store $HOME shell var into \HOME cmd.
\usepackage{catchfile}
\newcommand{\GetEnv}[2][]{%
\CatchFileEdef{\Temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\Temp\else\let#1\Temp\fi}

59
tex/Style.tex Normal file
View file

@ -0,0 +1,59 @@
% Colors.
\GetEnv[\ColorMain]{DOCUMENT_COLOR}
\definecolor{ColorBlack}{RGB}{0,0,0}
\definecolor{ColorWhite}{RGB}{255,255,255}
\definecolor{ColorLink} {RGB}{46,116,181}
\definecolor{ColorMain} {HTML}{\ColorMain}
\definecolor{ColorGray} {RGB}{127,127,127}
\definecolor{ColorLgray}{RGB}{229,229,229}
\definecolor{ColorRef} {RGB}{53,82,105}
\definecolor{ColorCodeBackground}{RGB}{40,42,54}
\definecolor{ColorCodeText} {RGB}{248,248,242}
\definecolor{ColorCodeString} {RGB}{80,250,123}
\definecolor{ColorCodeLiteral} {RGB}{139,233,253}
\definecolor{ColorCodeProperty} {RGB}{139,233,253}
\definecolor{ColorCodeKeyword} {RGB}{255,184,108}
\definecolor{ColorCodeComment} {RGB}{98,114,164}
% Code block.
\newtcolorbox{CodeBox}[1][]{
colback = ColorCodeBackground,
colframe = ColorCodeBackground,
fontupper = \ttfamily,
nobeforeafter
}
\newenvironment{Code}{\begin{CodeBox}\catcode33=12\obeylines}{\end{CodeBox}}
% Styles.
\newcommand{\ResetStyle}[1]{\fontsize{12}{12}\selectfont\rm\color{ColorBlack}#1} % Reset font style.
\newcommand{\Par} [0]{\par} % Default paragraph break.
\newcommand{\Parn} [0]{\par\noindent} % Default paragraph break without indent.
\newcommand{\Text} [1]{\ResetStyle{#1}} % Default text.
\newcommand{\Itallic} [1]{\textit{#1}} % Itallic text.
\newcommand{\Bold} [1]{\textbf{#1}} % Bold text.
\newcommand{\Semibold} [1]{\fontseries{sb}{\selectfont{#1}}} % Semi-bold text.
\newcommand{\Underline} [1]{\underline{#1}} % Underline text.
\newcommand{\Link} [2]{\href{#2}{\textcolor{ColorLink}{\Underline{#1}}}} % Link webpage.
\newcommand{\Color} [2]{\textcolor{#1}{#2}} % Text color alias.
\newcommand{\Icon} [1]{\raisebox{-1mm}{\includegraphics[height=5mm]{#1}}} % Icons.
\newcommand{\Href} [1]{\hyperlink{#1}{\textcolor{ColorLink}{\Underline{#1}}}} % Reference section.
\newcommand{\TextRef} [1]{\textcolor{ColorRef}{#1}} % Reference text.
\newcommand{\Bullet} [0]{\Icon{IcBullet}\hspace{4mm}} % List bullet symbol.
\newcommand{\Title} [1]{\hypertarget{#1}{}\fontsize{11}{11}%
{\selectfont{\textcolor{ColorMain}{\Semibold{#1}}}}} % Section title.
\newcommand{\BlCompact}[0]{\renewcommand{\baselinestretch}{1.0}\normalsize} % Compact baseline size.
\newcommand{\BlDefault}[0]{\renewcommand{\baselinestretch}{1.5}\normalsize} % Default baseline size.
\newcommand{\CodeString} [1]{\textcolor{ColorCodeString}{#1}} % Color code string.
\newcommand{\CodeLiteral} [1]{\textcolor{ColorCodeLiteral}{#1}} % Color code literal.
\newcommand{\CodeProperty}[1]{\textcolor{ColorCodeProperty}{#1}} % Color code property.
\newcommand{\CodeKeyword} [1]{\textcolor{ColorCodeKeyword}{#1}} % Color code keyword.
\newcommand{\CodeComment} [1]{\textcolor{ColorCodeComment}{#1}} % Color code comment.
% Settings.
\linespread{1.5} % Height between non-breaking lines.
\sloppy % Correct word placement on newline.
\pagestyle{empty} % Suppress default styles, i.e. page numbers.
\BlDefault % Default baseline size.

View file

@ -1,22 +0,0 @@
% switches.
\newif\ifphoto % show photo.
\newif\ifextra % show extra content.
\newif\ifen % english language.
\newif\ifru % russian language.
\newcommand{\en}[1]{\ifen#1\fi} % print if english language.
\newcommand{\ru}[1]{\ifru#1\fi} % print if russian language.
% read env variables.
\def\envtrue{true} % true.
\def\envfalse{false} % false.
\def\enven{en} % english literal.
\def\envru{ru} % russian literal.
\def\envempty{} % empty env value.
\getenv[\envphoto]{DOCUMENT_PHOTO} % read photo shell variable.
\getenv[\envextra]{DOCUMENT_EXTRA} % read extra shell variable.
\getenv[\envlang]{DOCUMENT_LANG} % read language shell variable.
\ifdefequal{\envphoto}{\envtrue}{\phototrue}{\photofalse} % show photo.
\ifdefequal{\envextra}{\envtrue}{\extratrue}{\extrafalse} % show extra content.
\ifdefequal{\envlang}{\enven}{\entrue}{} % use english.
\ifdefequal{\envlang}{\envru}{\rutrue}{} % use russian.
\ifdefequal{\envlang}{\envempty}{\entrue}{} % use english by default.

49
tex/i18n/Month.tex Normal file
View file

@ -0,0 +1,49 @@
% Months.
\newcommand{\jan}{%
\En{January}%
\Ru{Январь}
}
\newcommand{\feb}{%
\En{February}%
\Ru{Февраль}
}
\newcommand{\mar}{%
\En{March}%
\Ru{Март}
}
\newcommand{\apr}{%
\En{April}%
\Ru{Апрель}
}
\newcommand{\may}{%
\En{May}%
\Ru{Май}
}
\newcommand{\jun}{%
\En{June}%
\Ru{Июнь}
}
\newcommand{\jul}{%
\En{July}%
\Ru{Июль}
}
\newcommand{\aug}{%
\En{August}%
\Ru{Август}
}
\newcommand{\sep}{%
\En{September}%
\Ru{Сентябрь}
}
\newcommand{\oct}{%
\En{October}%
\Ru{Октябрь}
}
\newcommand{\nov}{%
\En{November}%
\Ru{Ноябрь}
}
\newcommand{\dec}{%
\En{December}%
\Ru{Декабрь}
}

View file

@ -1,49 +0,0 @@
% months.
\newcommand{\jan}{%
\en{January}%
\ru{Январь}
}
\newcommand{\feb}{%
\en{February}%
\ru{Февраль}
}
\newcommand{\mar}{%
\en{March}%
\ru{Март}
}
\newcommand{\apr}{%
\en{April}%
\ru{Апрель}
}
\newcommand{\may}{%
\en{May}%
\ru{Май}
}
\newcommand{\jun}{%
\en{June}%
\ru{Июнь}
}
\newcommand{\jul}{%
\en{July}%
\ru{Июль}
}
\newcommand{\aug}{%
\en{August}%
\ru{Август}
}
\newcommand{\sep}{%
\en{September}%
\ru{Сентябрь}
}
\newcommand{\oct}{%
\en{October}%
\ru{Октябрь}
}
\newcommand{\nov}{%
\en{November}%
\ru{Ноябрь}
}
\newcommand{\dec}{%
\en{December}%
\ru{Декабрь}
}

View file

@ -1,59 +0,0 @@
\documentclass{article} % basic document class (template).
\usepackage[T2A,T1]{fontenc} % specify font encodings.
\usepackage[utf8]{inputenc} % specify input file encodings.
\usepackage[bidi=default]{babel} % use babel for i18n.
\usepackage{graphicx} % image support.
\usepackage{xcolor} % colored text support.
\usepackage{montserrat} % custom font.
\usepackage{hyperref} % hyperlinks.
\usepackage{indentfirst} % auto indent for paragraphs.
\usepackage{luacode} % lua scripts support.
\usepackage{tcolorbox} % code blocks.
\usepackage{listofitems} % for loops.
\input{shell} % import shell support.
% configure geometry.
\usepackage[
a4paper,
left = 0.5in,
right = 0.5in,
top = 0.5in,
bottom = 0.5in
]{geometry}
% paragraph spacing.
\usepackage[
skip = 4pt,
indent = 20pt
]{parskip}
% configure hyperlinks.
\hypersetup{
linktocpage = true,
colorlinks = true,
hidelinks = true,
linktoc = all
}
% specify where images are stored.
\graphicspath{ {../image}{../build/image} }
\babelprovide[import]{russian} % add russian support.
\babelfont{rm}{montserrat} % use custom serif font for english.
\babelfont{sf}{montserrat} % use custom sans font for english.
\babelfont{tt}{montserrat} % use custom mono font for english.
\babelfont[russian]{rm}{montserrat} % use custom serif font for russian.
\babelfont[russian]{sf}{montserrat} % use custom sans font for russian.
\babelfont[russian]{tt}{montserrat} % use custom mono font for russian.
\begin{document}
\input{style} % import common styles.
\input{const} % import constant values.
\input{page} % import pages info.
\input{i18n/month} % import month values.
\input{view/radio} % import radio view.
\input{view/list} % import list view.
\input{page/example} % example page.
\end{document}

View file

@ -1,5 +0,0 @@
% this is used to create constant reference links within document.
\def\pexample{%
\en{SAMPLE PAGE}%
\ru{ПРИМЕР СТРАНИЦЫ}
}

50
tex/page/Example.tex Normal file
View file

@ -0,0 +1,50 @@
\noindent\Title{\PageExample}\Par\vspace{0mm}\noindent
\Color{ColorBlack}{ColorBlack}\newline
\Color{ColorWhite}{ColorWhite}\newline
\Color{ColorLink}{ColorLink}\newline
\Color{ColorMain}{ColorMain}\newline
\Color{ColorGray}{ColorGray}\newline
\Color{ColorLgray}{ColorLgray}\newline
\Color{ColorRef}{ColorRef}\Parn
\begin{Code}
\CodeString{CodeString}
\CodeLiteral{CodeLiteral}
\CodeProperty{CodeProperty}
\CodeKeyword{CodeKeyword}
\CodeComment{CodeComment}
\end{Code}\Parn
\ResetStyle{ResetStyle}\newline
\Text{Text}\newline
\Itallic{Itallic}\newline
\Bold{Bold}\newline
\Semibold{Semi-bold}\newline
\Underline{Underline}\newline
\Link{Link}{https://example.com}\newline
\Icon{IcCake}\Text{Icon}\newline
\Href{Hyperlink}\newline
\TextRef{Reference}\newline
\Bullet\Text{Bullet}\newline
\Title{Title}\Parn
\BlCompact\Text{Compact}\newline\Text{Text}\Parn
\BlDefault\Text{Default}\newline\Text{Text}\Parn
\Parn
\List{%
\En{Sample list}%
\Ru{Пример списка}%
}{%
\En{Sample}%
\Ru{Пример}%
}{%
\En{Sample}%
\Ru{Пример}%
}{%
example.com%
}{%
\En{a}%
\Ru{а};%
\En{b}%
\Ru{б};%
\En{c}%
\Ru{в}%
}\Parn
\Radio{3}

View file

@ -1,50 +0,0 @@
\noindent\stitle{\pexample}\spar\vspace{0mm}\noindent
\scolor{black}{black}\newline
\scolor{white}{white}\newline
\scolor{link}{link}\newline
\scolor{main}{main}\newline
\scolor{gray}{gray}\newline
\scolor{lgray}{lgray}\newline
\scolor{ref}{ref}\sparn
\begin{scode}
\scstring{string}
\scliteral{literal}
\scproperty{property}
\sckeyword{keyword}
\sccomment{comment}
\end{scode}\sparn
\sreset{reset}\newline
\stext{text}\newline
\sitallic{itallic}\newline
\sbold{bold}\newline
\ssemibold{semi-bold}\newline
\sunderline{underline}\newline
\slink{link}{https://example.com}\newline
\sicon{ic_cake}\stext{icon}\newline
\shref{hyperlink}\newline
\sref{reference}\newline
\sbullet\stext{bullet}\newline
\stitle{title}\sparn
\sblcompact\stext{compact}\newline\stext{text}\sparn
\sbldefault\stext{default}\newline\stext{text}\sparn
\sparn
\vlist{%
\en{sample list}%
\ru{пример списка}%
}{%
\en{sample}%
\ru{пример}%
}{%
\en{sample}%
\ru{пример}%
}{%
example.com%
}{%
\en{a}%
\ru{а};%
\en{b}%
\ru{б};%
\en{c}%
\ru{в}%
}\sparn
\vradio{3}

View file

@ -1,5 +0,0 @@
% \getenv[\HOME]{HOME} % example: store $HOME shell var into \HOME cmd.
\usepackage{catchfile}
\newcommand{\getenv}[2][]{%
\CatchFileEdef{\temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\temp\else\let#1\temp\fi}

View file

@ -1,59 +0,0 @@
% colors.
\getenv[\colormain]{DOCUMENT_COLOR}
\definecolor{black}{RGB}{0,0,0}
\definecolor{white}{RGB}{255,255,255} % default white.
\definecolor{link} {RGB}{46,116,181} % web link.
\definecolor{main} {HTML}{\colormain} % main.
\definecolor{gray} {RGB}{127,127,127} % gray.
\definecolor{lgray}{RGB}{229,229,229} % light gray.
\definecolor{ref} {RGB}{53,82,105} % reference color.
\definecolor{code_background}{RGB}{40,42,54} % code background.
\definecolor{code_text} {RGB}{248,248,242} % code default text.
\definecolor{code_string} {RGB}{80,250,123} % code string colors like "hello world".
\definecolor{code_literal} {RGB}{139,233,253} % code literal colors like "8L".
\definecolor{code_property} {RGB}{139,233,253} % code properties like variables and methods.
\definecolor{code_keyword} {RGB}{255,184,108} % code keywords like "val", "fun" etc.
\definecolor{code_comment} {RGB}{98,114,164} % code comment colors like // todo.
% code block.
\newtcolorbox{scodebox}[1][]{
colback = code_background,
colframe = code_background,
fontupper = \ttfamily,
nobeforeafter
}
\newenvironment{scode}{\begin{scodebox}\catcode33=12\obeylines}{\end{scodebox}}
% styles.
\newcommand{\sreset} [1]{\fontsize{12}{12}\selectfont\rm\color{black}#1} % reset font style.
\newcommand{\spar} [0]{\par} % default paragraph break.
\newcommand{\sparn} [0]{\par\noindent} % default paragraph break without indent.
\newcommand{\stext} [1]{\sreset{#1}} % default text.
\newcommand{\sitallic} [1]{\textit{#1}} % itallic text.
\newcommand{\sbold} [1]{\textbf{#1}} % bold text.
\newcommand{\ssemibold} [1]{\fontseries{sb}{\selectfont{#1}}} % semi-bold text.
\newcommand{\sunderline}[1]{\underline{#1}} % underline text.
\newcommand{\slink} [2]{\href{#2}{\textcolor{link}{\sunderline{#1}}}} % link webpage.
\newcommand{\scolor} [2]{\textcolor{#1}{#2}} % text color alias.
\newcommand{\sicon} [1]{\raisebox{-1mm}{\includegraphics[height=5mm]{#1}}} % icons.
\newcommand{\shref} [1]{\hyperlink{#1}{\textcolor{link}{\sunderline{#1}}}} % reference section.
\newcommand{\sref} [1]{\textcolor{ref}{#1}} % reference text.
\newcommand{\sbullet} [0]{\sicon{ic_bullet}\hspace{4mm}} % list bullet symbol.
\newcommand{\stitle} [1]{\hypertarget{#1}{}\fontsize{11}{11}%
{\selectfont{\textcolor{main}{\ssemibold{#1}}}}} % section title.
\newcommand{\sblcompact}[0]{\renewcommand{\baselinestretch}{1.0}\normalsize} % compact baseline size.
\newcommand{\sbldefault}[0]{\renewcommand{\baselinestretch}{1.5}\normalsize} % default baseline size.
\newcommand{\scstring} [1]{\textcolor{code_string}{#1}} % color code string.
\newcommand{\scliteral} [1]{\textcolor{code_literal}{#1}} % color code literal.
\newcommand{\scproperty}[1]{\textcolor{code_property}{#1}} % color code property.
\newcommand{\sckeyword} [1]{\textcolor{code_keyword}{#1}} % color code keyword.
\newcommand{\sccomment} [1]{\textcolor{code_comment}{#1}} % color code comment.
% settings.
\linespread{1.5} % height between non-breaking lines.
\sloppy % correct word placement on newline.
\pagestyle{empty} % suppress default styles, i.e. page numbers.
\sbldefault % default baseline size.

14
tex/view/List.tex Normal file
View file

@ -0,0 +1,14 @@
\newcommand{\ListLink}[1]{\Icon{IcLink}\ \href{https://#1}{\Itallic{#1}}} % Job webpage.
\newcommand{\ListTitle}[2]{\ResetStyle{\Semibold{#1}}\ResetStyle\hfill\fontsize%
{10}{10}\selectfont\textcolor{ColorGray}{#2}} % Job place.
\newcommand{\List}[5]{%
\noindent
\ListTitle{#1}{#2}\newline
\Text{#3}\newline
\setsepchar{;}%
\ignoreemptyitems%
\readlist\Elements{#5}%
\foreachitem\Element\in\Elements{\Text{\Bullet\ \Element}\newline}
\def\Link{#4}\ifx\Link\empty{}\else{\ListLink{#4}\Par}\fi
}

7
tex/view/Radio.tex Normal file
View file

@ -0,0 +1,7 @@
\newcommand{\Radio}[1]{%
\ifnum#1>0{\Icon{IcRadioChecked}}\else{\Icon{IcRadioUnchecked}}\fi
\ifnum#1>1{\Icon{IcRadioChecked}}\else{\Icon{IcRadioUnchecked}}\fi
\ifnum#1>2{\Icon{IcRadioChecked}}\else{\Icon{IcRadioUnchecked}}\fi
\ifnum#1>3{\Icon{IcRadioChecked}}\else{\Icon{IcRadioUnchecked}}\fi
\ifnum#1>4{\Icon{IcRadioChecked}}\else{\Icon{IcRadioUnchecked}}\fi
}

View file

@ -1,15 +0,0 @@
% args: company's name, period, position, url, elements (separated by ;).
\newcommand{\slistlink}[1]{\sicon{ic_link}\ \href{https://#1}{\sitallic{#1}}} % job webpage.
\newcommand{\slisttitle}[2]{\sreset{\ssemibold{#1}}\sreset\hfill\fontsize%
{10}{10}\selectfont\textcolor{gray}{#2}} % job place.
\newcommand{\vlist}[5]{%
\noindent
\slisttitle{#1}{#2}\newline
\stext{#3}\newline
\setsepchar{;}%
\ignoreemptyitems%
\readlist\elements{#5}%
\foreachitem\element\in\elements{\stext{\sbullet\ \element}\newline}
\def\plink{#4}\ifx\plink\empty{}\else{\slistlink{#4}\spar}\fi
}

View file

@ -1,7 +0,0 @@
\newcommand{\vradio}[1]{%
\ifnum#1>0{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi
\ifnum#1>1{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi
\ifnum#1>2{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi
\ifnum#1>3{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi
\ifnum#1>4{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi
}