In the middle of the desert you can say anything you want
A minimal citation style(for grant proposals) – anton.cromba.ch
Quarto – Document Language is related but different.
R package for this, but R: ropensci-review-tools/babelquarto: Renders a Multilingual Quarto Project (Book or Website)
Mario Angst - A multi-language (German/ English) Quarto website
oooo12 - Multi-language Blog with Quarto - Guide profiles as well.
Approach for now — write them in separate files, and optionally at some point include them in the visible-when option?..
quarto create project
---
title: "Blog"
listing:
- id: test-l1
contents: "blog_posts/*"
sort: "date desc"
type: table
categories: true
- id: test-l2
contents: "blog_posts/*"
sort: "date desc"
type: default
categories: true
- id: test-l3
contents: "blog_posts/*"
sort: "date desc"
type: grid
categories: true
---
This will be a test listing page.
## Table listing
::: {#test-l1}
:::
## Default listing
::: {#test-l2}
:::
## Grid listing
::: {#test-l3}
:::
_metadata.yml
with configs that will be applied to all files in that directoryTo get something like Drew Dimmery - Research or our old wowchemy thingy some magic will be needed.
Doing
---
title: "Publications and Awards"
bibliography: "./publications/papers.bib"
nocite: |
@*
---
results in a list in a certain CSL format, which is limited — no ways to link videos/slides/… etc.
So likely it’ll be yet another listings view, or how Drew Dimmery - Quarto for an Academic Website did it — papers to YAML with ALL the metadata, then python script (inside quarto qmds, first nice case I see for this!) to convert it into the on-screen form.
And if code — then maybe it’s a conveter package from wowchemy yaml thingy?
OK, then:
(Alternatively — just use the dirs as-is and do no yaml)
Albert Rapp - The ultimate guide to starting a Quarto blog
Quarto – Article Layout is my friend — columns, margins, overflows etc.
Code/Other links text can be changed here: quarto-cli/src/resources/language/_language.yml at main · quarto-dev/quarto-cli
Quarto glob syntax can do a lot: Quarto – Quarto Glob Syntax
cool pic sources:
sample of including a style in the qmd: quarto-web/docs/gallery/index.qmd at main · quarto-dev/quarto-web
This convets bibtex into directory+md: GetRD/academic-file-converter: 📚 Import Bibtex publications and Jupyter Notebook blog posts into your Markdown website or book. 将Bibtex转换为Markdown网站
Hugo Blox template? hugo-blox-builder/modules/blox-bootstrap/layouts/publication/single.html at main · HugoBlox/hugo-blox-builder
Gallery example: https://github.com/quarto-dev/quarto-web/blob/main/docs/gallery/gallery.ejs
:::
in a template: quarto-web/ejs/links.ejs at main · quarto-dev/quarto-webWould be cool to have the format consistent with the existing quarto infra: quarto-web/docs/journals/authors.qmd at main · quarto-dev/quarto-web
EJS
<% for (let i = 0; i < item['authors'].length; i++) { %>
<%= item['authors'][i] %>,
<% } %>
date
is publishing date of the paper, not of its page — publishDate
doesn’t existIn *journal*
, just journal
This and only this will be supported:
title: 'Title'
authors:
- TODO
- TODO
date: '2010-10-20T00:00:00Z'
doi:
# Publication name and optional abbreviated publication name.
publication: 'Proceedings of the World Congress on Engineering and Computer Science. Vol. 1'
publication_short: 'WCeCS 2010'
abstract: 'Long abstract'
links:
- name: TODO Anthology
url: https://aclanthology.org/L14-1240
url_pdf:
slides:
video:
tags:
- paper-tag
EDIT: more fields here: hugo-blox-builder/modules/blox-bootstrap/archetypes/publication/index.md at main · HugoBlox/hugo-blox-builder
url_pdf:
url_code:
url_dataset:
url_poster:
url_source:
url_project:
url_slides:
url_video:
Datetime formatting / customization in ejs - Stack Overflow describes ways to do things with dates in EJS/JS
<%= new Date().getFullYear();%>
OK so I can use JS?
// Works
<%= new Date(item.date).getFullYear() %>
I can’t seem to use shortcodes inside html EJS (same as markdown problem I guess?)
But I can use the CSS (and ofc just download the PNG files)
.. in a file inside same dir as paper markdown.
Problem: no access to filename being rendered!
item.filename
is the name, not path. I can’t do “link to file in the same directory as the one being listed”
Find the name of the current file being rendered in Quarto - General - Posit Community
At some point you could use shortcodes in frontmatter: Variables in categories (in frontmatter) do not parse properly when categories
is set to true in listing · Issue #5578 · quarto-dev/quarto-cli
[FR] New Lua utility function to access qmd input filename · Issue #2249 · quarto-dev/quarto-cli
Just realized that for listings item.path
(=location of page) is just what I need — I just need to change the last element
Most horrible thing I’ve ever written but seems to work:
<%= item.path %><br>
<% let x= item.path.split('/') %>
<% x.pop() %>
<%- x.join('/') %>
<%- x.join('/') %>/cite.bib
// ---
<% let x= item.path.split('/'); x.pop(); let biburi = x.join('/')+'/cite.bib' %>
<a href="<%- biburi %>">
<%= biburi %>
</a>
(I should just do a lua filter or something at this point)
Idea: link from elsewhere directly to the paper in papers
Final system: described in 240618-1448 Quarto publications page and adding anchors
Obyde needs 3.8 and fails otherwise, new OS maybe time for new ways to convert. There are many actually. Some active mantained and expandable.
For later:
obsidian-to-hugo doesn’t support assets/images :( Leaving only ukautz/obsidian-meets-hugo: Command line tool to export Obsidian Vault into Hugo published website for me.
_index.md
files, and converts existing ones in Obsidian to -index.md
-i tag1 -i tag2 -i tag3
1Current CLI:
go run cmds/omh/main.go --obsidian-root=../public_obs/ -R --hugo-root=../dtb/ --sub-path= -i=uni -i=zc/it -i=zc/rl
Is linksphoto.md unpublished (draft, expired, or future)? Or, to put it another way, what happens when you run
hugo server -DEF
?
var insane = regexp.MustCompile(`[^a-zA-Z0-9\-]`)
func Sanitize(in string) string {
return insane.ReplaceAllString(in, "")
}
[^a-zA-Z0-9\-\p{Cyrillic}]
— now it does upper+lowercase cyrillics — so now it’s 220407-2246-Чебуреки.md
in the md filename, but the URI has it lowercased.disablePathToLower
in config2 — not changing because cool URIs don’t change and this was the default for years on this website![2024-05-13-182935_1304x442_scrot.png](//assets/2024-05-13-182935-1304-x-442-scrot.png)
//assets
alrighty…By default, the static/ directory in the site project is used for all static files (e.g. stylesheets, JavaScript, images). The static files are served on the site root path (eg. if you have the file static/image.png you can access it using http://{server-url}/image.png, to include it in a document you can use !
[Example image](/image.png)
).
/xxx
will refer to the website and not my local install//assets/..
to /assets
(one slash) then it shows up nicely locallyomh.go
this happens: return fmt.Sprintf("[%s](/%s/%s)", title, c.SubPath, target)
if c.SubPath == "" {
return fmt.Sprintf("[%s](%s/%s)", title, c.SubPath, target)
} else {
return fmt.Sprintf("[%s](/%s/%s)", title, c.SubPath, target)
_index
I realize that it takes Hugo frontmatter title from note title, which in turn is the filename, NOT the obsidian file frontmatter title :(
// Keep title in Obsidian front-matter as note title if it's there (a la obyde),
// otherwise use Obsidian filename for this (standard behaviour).
oldTitle := hugo["title"]
if oldTitle==nil {
log.Warn("No title in front-matter, using filename in ", note.Title)
// must have title
hugo["title"] = note.Title
} else {
log.Warn("Using frontmatter title for ", oldTitle)
}
had to figure this syntax out based on other github issues: StringSlice behavior different for command line flag and environment variable · Issue #380 · spf13/viper ↩︎
Wanted to do Manjaro, after googling found out it has a very bad reputation (arindas/manjarno: Reasons for which I don’t use Manjaro anymore) — I’ll go with EndeavourOS. OpenSUSE Tumbleweed will be my next choice if this fails.
Strategy:
/opt
will have executable programs
rm
s /etc
12.
OK, EndeavourOS+btfrs it is.
Why should I switch my file system to btrfs? : r/archlinux ↩︎
TIL BTRFS is neat for smaller filesystems! ↩︎
https://www.kaggle.com/code/datark1/what-are-dcm-and-nii-files-and-how-to-read-them
NII files are typical for MRI data
This library can open them: https://nipy.org/nibabel/gettingstarted.html
Read and write access to common neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2 and later), GIFTI, NIfTI1, NIfTI2, CIFTI-2, MINC1, MINC2, AFNI BRIK/HEAD, ECAT and Philips PAR/REC. In addition, NiBabel also supports FreeSurfer’s MGH, geometry, annotation and morphometry files, and provides some limited support for DICOM.
Cool viewers exist
list of others: https://docs.facebase.org/docs/nifti-files/
https://github.com/niivue/niivue even better list of others
Other
I usually clone a circle and distribute it evenly next to the text object
<C-u-2022>
adds a bullet point symbolQuarto’s roughnotation works either in speaker view or in the presentation, separately from each other.
Very brittle, but:
.. yeah.
So I learned that poster videos are a thing, 10 years ago I’d have used Prezi but not now
And TIL inkscape has neat keybindings for zooming.
So.
View -> Zoom has a list as well
3
zooms in to the selected element
1-6 are all zooming things (from the docu):
3-Layout-extraction-1 is a 6min description I have not watched but could be nice.
A particularly complex file after a crash became cursed: two boxes would export to PNG fine, but not to PDF.
After closing and opening these two boxes became just as in the PDF export.
Solution: delete the problematic elements from the PDF and recreate them.