Skip to content
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
**/*.run.xml
**/tex/main.pdf
**/tex/cv-two-pages.pdf
**/tex/cv-n-pages.pdf
**/tex/cv-n-pages.bcf-SAVE-ERROR
**/tex/cv-n-pages.bbl-SAVE-ERROR
**input.pdf

##/png images
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,22 @@ Alternatively, you can simply view the PNG pages: [page-0](docs/cv-page-0.png) a
[<img src="docs/cv-page-1.png" width="400">](https://github.com/mxochicale/cv/blob/generated-pdfs/cv-two-pages.pdf)


## (0) Dependencies
* latex > https://github.com/mxochicale/tools/tree/main/latex/installation
```bash
sudo apt install texlive-fonts-extra
```

## (1) Build CV locally
Open a terminal to build cv locally
```bash
cd $HOME/repositories/mxochicale/cv/tex
bash localbuilt.sh TwoPages
make clean #clean project
make two
make view
#----
make npages
make view-npages
make distclean #clean project
```
For further details see [here](tex)

Expand Down
114 changes: 76 additions & 38 deletions tex/Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,76 @@
fileinfo := LaTeX Makefile
author := Miguel Xochicale
## Usage
# run "make" in the terminal to build local pdf
# run "make view" to see pdf file
# run "make clean" when you finished your local changes

## References
# https://gist.github.com/dogukancagatay/2eb82b0233829067aca6
# https://www.latex4technics.com/?note=5fu0y6
# https://www.drewsilcock.co.uk/using-make-and-latexmk

## Tools
LATEXMK = latexmk
RM = rm -f
EVINCE = evince

##Project name
PROJNAMENP=cv-n-pages
PROJNAMETP=cv-two-pages

## Rules
TwoPages: $(PROJNAMETP).tex
$(LATEXMK) -pdf -pdflatex="pdflatex -synctex=1 -file-line-error %O %S" $<
$(EVINCE) $(PROJNAMETP).pdf

NPages: $(PROJNAMENP).tex
$(LATEXMK) -pdf -pdflatex="pdflatex -synctex=1 -file-line-error %O %S" $<
$(EVINCE) $(PROJNAMENP).pdf

#view:

mostlyclean:
$(LATEXMK) -silent -C

clean: mostlyclean
$(LATEXMK) -silent -c
$(RM) main.pdf *.bbl *.run.xml -rf _minted-main *.pyg example.out
# ============================================================================
# LaTeX Makefile (tab-safe version using .RECIPEPREFIX)
# Author: Miguel Xochicale
# ============================================================================

.RECIPEPREFIX := >

# ----------------------------------------------------------------------------
# Tools
# ----------------------------------------------------------------------------
LATEXMK := latexmk
PDFLATEX := pdflatex
VIEWER := evince
RM := rm -rf

# ----------------------------------------------------------------------------
# Project names
# ----------------------------------------------------------------------------
TWO_PAGE := cv-two-pages
N_PAGE := cv-n-pages

# Default target
.DEFAULT_GOAL := two

# ----------------------------------------------------------------------------
# Build flags
# ----------------------------------------------------------------------------
LATEX_FLAGS := -pdf \
-interaction=nonstopmode \
-synctex=1 \
-file-line-error \
-pdflatex="$(PDFLATEX) %O %S"

# ----------------------------------------------------------------------------
# Targets
# ----------------------------------------------------------------------------

.PHONY: all two npages view clean distclean help

all: two

# Build two-page CV
two: $(TWO_PAGE).tex
> $(LATEXMK) $(LATEX_FLAGS) $<

# Build n-page CV
npages: $(N_PAGE).tex
> $(LATEXMK) $(LATEX_FLAGS) $<

# View two-page PDF
view:
> $(VIEWER) $(TWO_PAGE).pdf >/dev/null 2>&1 &

# View n-page PDF
view-npages:
> $(VIEWER) $(N_PAGE).pdf >/dev/null 2>&1 &

# Clean auxiliary files
clean:
> $(LATEXMK) -c
> $(RM) *.bbl *.run.xml *.bcf *.pyg *.out

# Full cleanup (including PDFs)
distclean: clean
> $(LATEXMK) -C
> $(RM) *.pdf _minted-*

# Help menu
help:
> @echo "Available targets:"
> @echo " make Build default two-page CV"
> @echo " make two Build two-page CV"
> @echo " make npages Build n-page CV"
> @echo " make view Open PDF"
> @echo " make clean Remove aux files"
> @echo " make distclean Remove all generated files"
9 changes: 6 additions & 3 deletions tex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
Open terminal and run:
```bash
cd $HOME/repositories/mxochicale/cv/tex
bash localbuilt.sh TwoPages
bash localbuilt.sh NPages
make two
make view
#----
make npages
make view-npages
```
to clean project, then type:
```bash
make clean
make distclean #clean project
```

## tex built with github action
Expand Down
Loading