diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 07e7f19..769aa7f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "dockerfile": "Dockerfile" }, "features": { - "ghcr.io/devcontainers/features/common-utils:2": { + "ghcr.io/devcontainers/features/common-utils:": { "installZsh": false, "installOhMyZsh": false, "installOhMyZshConfig": false @@ -13,25 +13,52 @@ }, "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { "packages": "make, tex-fmt, chktex, texlive-latex-extra, latexmk, texlive-bibtex-extra, texlive-lang-english, texlive-lang-portuguese, texlive-science, biber" - } + }, }, "customizations": { "vscode": { "settings": { "editor.formatOnSave": true, "latex-workshop.bibtex-format.sort.enabled": true, + "latex-workshop.bibtex-fields.order": [ + "title", + "author" + ], + "terminal.integrated.suggest.enabled": false, + "latex-workshop.bibtex-format.trailingComma": true, + "latex-workshop.bibtex-fields.sort.enabled": true, + "ltex.bibtex.fields": { + "issn": false, + "title": false, + "booktitle": false, + "eventtitle": false, + "eventtitleaddon": false, + "booktitleaddon": false, + "series": false, + "journaltitle": false + }, + "latex-workshop.format.fixMath.enabled": true, + "latex-workshop.format.fixQuotes.enabled": true, "latex-workshop.formatting.latex": "tex-fmt", "latex-workshop.intellisense.citation.backend": "biblatex", - "latex-workshop.latex.external.build.command": "make", "latex-workshop.linting.chktex.enabled": true, - "latex-workshop.synctex.afterBuild.enabled": true + "latex-workshop.synctex.afterBuild.enabled": true, + "ltex.additionalRules.motherTongue": "pt-BR", + "ltex.language": "pt-BR" } }, "extensions": [ "James-Yu.latex-workshop", "github.vscode-pull-request-github", - "valentjn.vscode-ltex" + "ltex-plus.vscode-ltex-plus" ] }, + // // Para podman com SELinux + // "securityOpt": [ + // "label=disable" + // ], + // "remoteEnv": { + // "PODMAN_USERNS": "keep-id" + // }, "remoteUser": "vscode" -} \ No newline at end of file +} diff --git a/Makefile b/Makefile index 465769c..0d60095 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,8 @@ else endif # Arquivos pdf no diretório de saída a partir dos arquivos de entrada -PDFFILES := $(TEXFILES:$(SRCDIR)/%.tex=$(OUTDIR)/%.pdf) +PDFFILES := $(TEXFILES:%.tex=%.pdf) +OUTPDFFILES := $(TEXFILES:$(SRCDIR)/%.tex=$(OUTDIR)/%.pdf) # Flags para os comandos LATEXFLAGS = -pdf @@ -33,31 +34,41 @@ LATEXFLAGS += -halt-on-error .PHONY: all all: pdf-synctex -## Debug -# print-%: -# @echo '$*=$($*)' -# @echo ' origin = $(origin $*)' -# @echo ' flavor = $(flavor $*)' -# @echo ' value = $(value $*)' - .PHONY: pdf pdf: $(PDFFILES) +.PHONY: pdf-out +pdf-out: $(OUTPDFFILES) + .PHONY: pdf-synctex pdf-synctex: LATEXFLAGS += -synctex=1 pdf-synctex: pdf -# Regra para gerar .pdf a partir de .tex. +# Regra para gerar .pdf a partir de .tex (pasta out) .PHONY: FORCE_MAKE $(OUTDIR)/%.pdf: $(SRCDIR)/%.tex FORCE_MAKE latexmk $(LATEXFLAGS) -aux-directory=$(CURDIR)/$(dir $(TMPDIR)/$*) -output-directory=$(CURDIR)/$(dir $@) $< +# Regra para gerar .pdf a partir de .tex (pasta src) +$(SRCDIR)/%.pdf: $(SRCDIR)/%.tex FORCE_MAKE + latexmk $(LATEXFLAGS) $< + # Limpa os arquivos temporários -.PHONY: clean-tmp -clean-tmp: +.PHONY: clean-tmp-dir +clean-tmp-dir: rm -rf $(TMPDIR) # Limpa os arquivos de saída e temporários -.PHONY: clean -clean: clean-tmp +.PHONY: clean-dir +clean-dir: clean-tmp rm -rf $(OUTDIR) + +# Limpa os arquivos temporários +.PHONY: clean-tmp clean-tmp-dir +clean-tmp: LATEXFLAGS += -c +clean-tmp: pdf-synctex + +# Limpa arquivos de saída e temporários +.PHONY: clean +clean: LATEXFLAGS += -C +clean: pdf-synctex clean-dir