Skip to content

Instantly share code, notes, and snippets.

@noxeee
noxeee / vancouver-biblatex-constructed.tex
Created November 25, 2023 02:40
My version of the vancouver citation style with biblatex
\usepackage[%
defernumbers=true % helps me index into two bibliographies
,backend=biber
,style=numeric-comp % numeric style with multiple references shown like [1-3]
,sorting=none
,sortcites=true
,block=none
,indexing=false
,citereset=none
,bibencoding=utf8
@noxeee
noxeee / pagination_peewee.html
Created July 1, 2022 15:12
Pagination in Jinja2 from Peewee search results
<nav aria-label="Page navigation">
<ul class="pagination">
{% if page == 1 %} <!-- Disabling the link for the previous page if the page is the first page -->
<li class="page-item disabled">
<span class="page-item"><a class="page-link" href="./?page={{ page - 1 }}">Previous</a></span>
</li>
{% else %}
<li class="page-item"><a class="page-link" href="./?page=1">First</a></li>
<li class="page-item"><a class="page-link" href="./?page={{ page - 1 }}">Previous</a></li>
@noxeee
noxeee / commafy.html
Created July 1, 2022 15:10
How to commafy a large number in jinja2/python
{{ "{:,}".format(total_count) }} total results