Show newer

I don't know R, and I'm following a tutorial, so I just started installing tidyverse. It appears I'm in a TeX Live situation - just how much stuff is it installing?

I have an HTML question I either don't know how to google or nobody has asked before:
I have a web-based editor for a content bank. Users can write HTML descriptions for items, which will be shown on a details page. They might want to use heading tags in their description. What should I do with heading tags so they don't mess up the page navigation when the description is embedded in a page? Shift everything down, so h1 → h3, h2 → h4, ...? Just leave them as they are?

thanks to @pkra for telling me about CSS scroll-snap, which lets me insist that you can't scroll halfway between slides. I've replaced the focus listener with a scroll listener, so this now works nicely with just scrolling!

Show thread

This time, there were no links or interactive bits in the slides that people might want to access on their own, do I just needed it to work for me during the presentation.

Anyway, I'm not going to make any effort to share this system for other people to make presentations with.
The point is that it's idiosyncratic, a product of exactly the things I know how to do and don't know how to do.

Show thread

To update the graphic, I added a 'focus' event listener to each <section> tag, calling a function 'update_graph' with the index of the tag among its siblings.

That's it! It worked brilliantly.

I think for a set of slides I want other people to be able to use, it'd need more stuff: at the moment it only knows which slide is shown from focus events, but it should really pay attention to scrolling too.

Show thread

I came up with something very simple: each slide is a <section> tag, styled to 100vh height and laid out vertically, so you only see one at a time. They have tabindex="0" so you move between them by pressing Tab.

I was expecting to have to write a thing to call scrollIntoView on the next slide, but Firefox automatically scrolls an element into view when you focus it, so I got the fundamentals of a slideshow without any JS!

Show thread

But it's always a faff, and reveal.js is now so big I spend a lot of time trying to understand how it works.

What do you do when you don't understand how a complicated bit of software works? Write your own copy from scratch!
Then you have only yourself to blame.

The thing that got me this time was having the same graphic displayed on a range of slides, and updating it depending on which slide is shown. I spent a couple of hours fiddling with reveal.js's events API before giving up.

Show thread

reveal.js is 10 years old now, and the way it works has changed a bit to keep up with new stuff in browsers. So each time I make a presentation, I have to decide if I'm going to update reveal.js, and see if it's got a way of doing something I had to hack in before.

My solution lately has been to use CSS display: grid on slides, because I know how to centre stuff and share out space in a fairly straightforward manner.

Show thread

A little thread about an extremely simple web-based slideshow I made for my MathsJam talk yesterday.
You can see it at
I wanted to show a little bit of text next to a graphic that changes on each slide.

For years I've been using reveal.js for presentations, because I do _not_ get on with powerpoint, and I often want to embed web stuff. It's really good, but there's always a point where I get frustrated trying to lay stuff out.

An impromptu mathematical art installation to appear behind me during my big mathsjam talk

This morning, head on the floor and bum in the air, I achieved enlightenment when I realised that yoga is stimming for neurotypical people

That's quite a thing for Outlook to log me out in the middle of writing an email!

@christianp you have several alternatives: put decimal comas as ', use ; for separate arguments are the most common I Think

@christianp There is no standard, nor a best way. You can either use coma, prime, dot, semicolon, aesthetics (size, shape, space). If your text does not include to many occurrences, a good spacing is just fine.

Europeans! You use a comma for the decimal separator, like π = 3,14159... which is FINE.

But what do you do for functions of more than one variable?

Like: f(x,t) = t(1,23, 4,56) ???

I used to have notifications of new math posts on my blog appear here, but that seems to have stopped a year ago. Meantime there have been quite a few math articles, some possibly interesting.

Lately I had a series comparing the Kuratowski {{a},{a,b}} and Wiener {{{a},∅}, {{b}}} models of ordered pairs, starting here:

Show older

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!