init : tear down from resume.
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
build/*
|
47
Makefile
Normal file
|
@ -0,0 +1,47 @@
|
|||
color = 3EB489
|
||||
photo = 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
|
||||
|
||||
export DOCUMENT_COLOR := $(color)
|
||||
export DOCUMENT_PHOTO := $(photo)
|
||||
export DOCUMENT_EXTRA := $(extra)
|
||||
|
||||
.PHONY: all
|
||||
all: clean icon en ru open
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf $(build)
|
||||
|
||||
.PHONY: icon
|
||||
icon:
|
||||
@mkdir -p $(build)/image;\
|
||||
cd image/icon;\
|
||||
for file in *; do convert "$$file" -fill "#$$DOCUMENT_COLOR" -colorize 100 $(build)/image/"$$file" &> /dev/null || cp "$$file" $(build)/image/; done
|
||||
|
||||
.PHONY: en
|
||||
en: icon
|
||||
@mkdir -p $(build);\
|
||||
cd $(src);\
|
||||
export DOCUMENT_LANG=en;\
|
||||
lualatex --output-dir=$(build) $(target);\
|
||||
mv $(output) $(outputen)
|
||||
|
||||
.PHONY: ru
|
||||
ru: icon
|
||||
@mkdir -p $(build);\
|
||||
cd $(src);\
|
||||
export DOCUMENT_LANG=ru;\
|
||||
lualatex --output-dir=$(build) $(target);\
|
||||
mv $(output) $(outputru)
|
||||
|
||||
.PHONY: open
|
||||
open:
|
||||
@xdg-open $(outputen);\
|
||||
xdg-open $(outputru)
|
37
README.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Tex template.
|
||||
|
||||
## How to build.
|
||||
```bash
|
||||
$ make
|
||||
```
|
||||
|
||||
### Available targets.
|
||||
Taget | Description
|
||||
--- | ---
|
||||
all | Clean, build and open document.
|
||||
clean | Clean project from build files.
|
||||
icon | Build colored icons.
|
||||
en | Build English document.
|
||||
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
|
||||
$ rm install-tl-unx.tar.gz
|
||||
$ cd ./install-tl-*
|
||||
$ ./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.
|
||||
- [ ] Keep template up-to-date.
|
BIN
image/icon/ic_cake.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
image/icon/ic_call.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
image/icon/ic_email.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
image/icon/ic_link.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
image/icon/ic_location.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
image/icon/ic_radio_checked.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
image/icon/ic_radio_unchecked.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
22
tex/const.tex
Normal 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.
|
49
tex/i18n/month.tex
Normal 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{Декабрь}
|
||||
}
|
52
tex/main.tex
Normal file
|
@ -0,0 +1,52 @@
|
|||
\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}
|
||||
|
||||
\end{document}
|
5
tex/page.tex
Normal file
|
@ -0,0 +1,5 @@
|
|||
% this is used to create constant reference links within document.
|
||||
\def\pexample{%
|
||||
\en{SAMPLE PAGE}%
|
||||
\ru{ПРИМЕР СТРАНИЦЫ}
|
||||
}
|
1
tex/page/example.tex
Normal file
|
@ -0,0 +1 @@
|
|||
\stitle{\pexample}\spar\vspace{-4mm}\noindent
|
5
tex/shell.tex
Normal 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}
|
65
tex/style.tex
Normal file
|
@ -0,0 +1,65 @@
|
|||
% 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{\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{#1}{\textcolor{link}{\sunderline{#2}}}} % link webpage.
|
||||
\newcommand{\sname} [1]{\fontsize{21}{21}{\selectfont{\ssemibold{#1}}}} % name style.
|
||||
\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{\slist} [1]{\textcolor{lgray}{#1}} % list numbers.
|
||||
\newcommand{\sbullet} [0]{\raisebox{0.5mm}{\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.
|
||||
|
||||
\newcommand{\sjposition}[1]{\stext{#1}} % job position.
|
||||
\newcommand{\sjlink} [1]{\sicon{ic_link}\ \href{https://#1}{\sitallic{#1}}} % job webpage.
|
||||
\newcommand{\sjplace}[2]{\sreset{\ssemibold{#1}}\sreset\hfill\fontsize%
|
||||
{10}{10}\selectfont\textcolor{gray}{(#2)}} % job place.
|
||||
|
||||
% 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.
|
11
tex/view/place.tex
Normal file
|
@ -0,0 +1,11 @@
|
|||
% args: company's name, period, position, url, tasks (separated by ;).
|
||||
\newcommand{\place}[5]{%
|
||||
\noindent
|
||||
\sjplace{#1}{#2}\newline
|
||||
\stext{#3}\newline
|
||||
\setsepchar{;}%
|
||||
\ignoreemptyitems%
|
||||
\readlist\tasks{#5}%
|
||||
\foreachitem\task\in\tasks{\stext{\slist{\sbullet}\ \task}\newline}
|
||||
\def\plink{#4}\ifx\plink\empty{}\else{\sjlink{#4}\spar}\fi
|
||||
}
|
7
tex/view/radio.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\newcommand{\radio}[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
|
||||
}
|