From 3311fe18ef3cab879ea293a33d1962373c61c39a Mon Sep 17 00:00:00 2001 From: Jurandy Soares Date: Tue, 17 Mar 2026 15:52:26 -0300 Subject: [PATCH] =?UTF-8?q?Modelo=20com=20refer=C3=AAncias=20bibliogr?= =?UTF-8?q?=C3=A1ficas=20no=20formato=20do=20Bibtex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- docs/aulas/aula-2026-03-12/index.md | 10 ++++++ docs/aulas/index.md | 5 +-- docs/conf.py | 26 ++++++++++----- docs/index.md | 5 +-- docs/referencias.md | 9 +++++ docs/refs.bib | 15 +++++++++ pyproject.toml | 1 + uv.lock | 52 +++++++++++++++++++++++++++++ 9 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 docs/aulas/aula-2026-03-12/index.md create mode 100644 docs/referencias.md create mode 100644 docs/refs.bib diff --git a/Makefile b/Makefile index 076a03c..fda4d96 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ help: .PHONY: help Makefile livehtml: Makefile - sphinx-autobuild ./docs ./docs/_build/html --open-browser + uv run make html; (cd _build/html; python -m http.server) # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). diff --git a/docs/aulas/aula-2026-03-12/index.md b/docs/aulas/aula-2026-03-12/index.md new file mode 100644 index 0000000..7313f08 --- /dev/null +++ b/docs/aulas/aula-2026-03-12/index.md @@ -0,0 +1,10 @@ +(aula:2026-03-12)= + +# Aula de 12/03/2026 + +Apresentação da disciplina. + +De acordo com {cite:t}`1987:nelson`. Isto também pode ser visto em outras fontes {cite:p}`1987:nelson`. Um livro muito bom é o do {cite:t}`kurose2013redes`. + +Veja também a {rfc}`1180`, Um Tutorial do TCP/IP. + diff --git a/docs/aulas/index.md b/docs/aulas/index.md index a2bda21..419b33f 100644 --- a/docs/aulas/index.md +++ b/docs/aulas/index.md @@ -2,7 +2,7 @@ # Aulas -:::{toctree} +```{toctree} --- maxdepth: 2 caption: Sumário @@ -10,5 +10,6 @@ glob: true --- */* -::: +``` + diff --git a/docs/conf.py b/docs/conf.py index 7233f21..fd103f1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,8 @@ release = 'ANO_PERIODO' # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ - 'myst_parser' + 'myst_parser', + 'sphinxcontrib.bibtex', ] templates_path = ['_templates'] @@ -44,13 +45,22 @@ myst_links_external_new_tab = True myst_number_code_blocks = ['Python', 'Bash'] myst_heading_anchors = 3 myst_enable_extensions = { - "colon_fence": True, - "dolarmath": True, - "deflist": True, - "linkify": True, - "replacements": True, - "strikethrough": True, - "tasklist": True, + #"colon_fence": True, +# "dolarmath": True, +# "deflist": True, +# "linkify": True, +# "replacements": True, +# "strikethrough": True, +# "tasklist": True, } +bibtex_bibfiles = ['refs.bib'] + +# Opcional: Definir o estilo da bibliografia (alpha, plain, unsrt, unsrtalpha) +# bibtex_default_style = 'alpha' +# Estilo Etiqueta (Citação) Ordenação da Bibliografia +# plain Numérica [1] Alfabética por autor. +# unsrt Numérica [1] Ordem de aparição no texto. +# alpha Alfanumérica [Nel87] Alfabética por autor. +# unsrtalpha Alfanumérica [Nel87] Ordem de aparição no texto. diff --git a/docs/index.md b/docs/index.md index 83024be..15d670f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # DOCE -:::{toctree} +```{toctree} --- maxdepth: 2 caption: Sumário @@ -8,5 +8,6 @@ glob: true --- aulas/index.md -::: +referencias.md +``` diff --git a/docs/referencias.md b/docs/referencias.md new file mode 100644 index 0000000..9e3c6fc --- /dev/null +++ b/docs/referencias.md @@ -0,0 +1,9 @@ +# Referências bibliográficas + +```{bibliography} +--- +style: alpha +--- +``` + + diff --git a/docs/refs.bib b/docs/refs.bib new file mode 100644 index 0000000..987c0cc --- /dev/null +++ b/docs/refs.bib @@ -0,0 +1,15 @@ +@book{1987:nelson, + author = {Edward Nelson}, + title = {Radically Elementary Probability Theory}, + publisher = {Princeton University Press}, + year = {1987} +} + +@book{kurose2013redes, + title={Redes de computadores e a internet: uma abordagem top-down}, + author={Kurose, J.F. and Ross, K.W.}, + isbn={978-85-8143-677-7}, + year={2013}, + publisher={Pearson} +} + diff --git a/pyproject.toml b/pyproject.toml index 1ab52e1..f4d0d44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,4 +9,5 @@ dependencies = [ "myst-parser>=5.0.0", "sphinx>=9.1.0", "sphinx-autobuild>=2025.8.25", + "sphinxcontrib-bibtex>=2.6.5", ] diff --git a/uv.lock b/uv.lock index 9701d78..2f19f71 100644 --- a/uv.lock +++ b/uv.lock @@ -121,6 +121,7 @@ dependencies = [ { name = "myst-parser" }, { name = "sphinx" }, { name = "sphinx-autobuild" }, + { name = "sphinxcontrib-bibtex" }, ] [package.metadata] @@ -129,6 +130,7 @@ requires-dist = [ { name = "myst-parser", specifier = ">=5.0.0" }, { name = "sphinx", specifier = ">=9.1.0" }, { name = "sphinx-autobuild", specifier = ">=2025.8.25" }, + { name = "sphinxcontrib-bibtex", specifier = ">=2.6.5" }, ] [[package]] @@ -195,6 +197,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, ] +[[package]] +name = "latexcodec" +version = "3.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/27/dd/4270b2c5e2ee49316c3859e62293bd2ea8e382339d63ab7bbe9f39c0ec3b/latexcodec-3.0.1.tar.gz", hash = "sha256:e78a6911cd72f9dec35031c6ec23584de6842bfbc4610a9678868d14cdfb0357", size = 31222, upload-time = "2025-06-17T18:47:34.051Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b5/40/23569737873cc9637fd488606347e9dd92b9fa37ba4fcda1f98ee5219a97/latexcodec-3.0.1-py3-none-any.whl", hash = "sha256:a9eb8200bff693f0437a69581f7579eb6bca25c4193515c09900ce76451e452e", size = 18532, upload-time = "2025-06-17T18:47:30.726Z" }, +] + [[package]] name = "markdown-it-py" version = "4.0.0" @@ -284,6 +295,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, ] +[[package]] +name = "pybtex" +version = "0.25.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "latexcodec" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5f/bc/c2be05ca72f8c103670e983df8be26d1e288bc6556f487fa8cccaa27779f/pybtex-0.25.1.tar.gz", hash = "sha256:9eaf90267c7e83e225af89fea65c370afbf65f458220d3946a9e3049e1eca491", size = 406157, upload-time = "2025-06-26T13:27:41.903Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/68/ceb5d6679baa326261f5d3e5113d9cfed6efef2810afd9f18bffb8ed312b/pybtex-0.25.1-py2.py3-none-any.whl", hash = "sha256:9053b0d619409a0a83f38abad5d9921de5f7b3ede00742beafcd9f10ad0d8c5c", size = 127437, upload-time = "2025-06-26T13:27:43.585Z" }, +] + +[[package]] +name = "pybtex-docutils" +version = "1.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "pybtex" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7e/84/796ea94d26188a853660f81bded39f8de4cfe595130aef0dea1088705a11/pybtex-docutils-1.0.3.tar.gz", hash = "sha256:3a7ebdf92b593e00e8c1c538aa9a20bca5d92d84231124715acc964d51d93c6b", size = 18348, upload-time = "2023-08-22T18:47:54.833Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/b1/ce1f4596211efb5410e178a803f08e59b20bedb66837dcf41e21c54f9ec1/pybtex_docutils-1.0.3-py3-none-any.whl", hash = "sha256:8fd290d2ae48e32fcb54d86b0efb8d573198653c7e2447d5bec5847095f430b9", size = 6385, upload-time = "2023-08-22T06:43:20.513Z" }, +] + [[package]] name = "pygments" version = "2.19.2" @@ -427,6 +464,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" }, ] +[[package]] +name = "sphinxcontrib-bibtex" +version = "2.6.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "pybtex" }, + { name = "pybtex-docutils" }, + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/de/83/1488c9879f2fa3c2cbd6f666c7a3a42a1fa9e08462bec73281fa6c092cba/sphinxcontrib_bibtex-2.6.5.tar.gz", hash = "sha256:9b3224dd6fece9268ebd8c905dc0a83ff2f6c54148a9235fe70e9d1e9ff149c0", size = 118462, upload-time = "2025-06-27T10:40:14.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/a0/3a612da94f828f26cabb247817393e79472c32b12c49222bf85fb6d7b6c8/sphinxcontrib_bibtex-2.6.5-py3-none-any.whl", hash = "sha256:455ea4509642ea0b28ede3721550273626f85af65af01f161bfd8e19dc1edd7d", size = 40410, upload-time = "2025-06-27T10:40:12.274Z" }, +] + [[package]] name = "sphinxcontrib-devhelp" version = "2.0.0"