March 2018

Making books for A-

March 3, 2018 - Categories: drawing, parenting, publishing, writing

A- loves being read to. She picks up new words and ideas from the books we read, requests both favourites and new books again and again, and can identify objects in photographs and drawings. I borrowed a few children’s books from the library in case reading about upcoming changes or challenges helps her understand. The books were okay, but didn’t quite fit the words we use or the way we like to handle things. So this week, I decided to make my own books for A-, especially since there are few books that cover things like microphthalmia.

The first book I made was about night weaning, since we might have to do that in preparation for dental surgery under anaesthesia. I sketched it using ZoomNotes on my iPad, exported the SVG, tinkered with it in Inkscape, exported PNGs, combined the PNGs with ImageMagick, and created a 12-page PDF with 7″x8.5″ pages. That let me print the book out on legal-size paper (8.5″x14″), 2 pages per sheet, duplex printing set to flip on the short side, using this page order:
12, 1, 2, 11, 10, 3, 4, 9, 8, 5, 6, 7. I folded each sheet in half. Instead of hand-sewing the binding, I just taped the pages together. And just like that, I had a book that I could page through properly: “No More Nursing, Time to Sleep.”

I read the new book to A-. She asked me to reread it several times. She pointed to the book and said, “A-!” She pointed to the stick figure for me and said, “Mama!” Success!

The next thing I wanted to try was printing in colour. We recently replaced our printer with an HP M277dw colour laser printer that could print duplex, so I was looking forward to giving that a try. I wanted to make a book about the conformer in A-‘s little eye. This time, I drew the pages of the book using layers in Medibang Paint. I drew on the bus home from Riverdale Farm, working around a sleeping A- snuggled in my carrier. I exported each layer as a PNG, used ImageMagick to convert pairs of pages into what I needed to print (page order: 8, 1, 2, 7, 6, 3, 4, 5), combined those into a PDF. I couldn’t figure out how to get the HP app to properly scale the document and print in duplex, but printing from Linux worked fine. I quickly had another book in my hands: “My Conformer.”

She’s starting to echo phrases from the to books, and it’s been only a few days. Wow!

I’m working on a third book now. Time for something fun: “Let’s Make a Smoothie,” since she enjoys making and drinking them. She already knows all the words, so this is more about enjoyment. This time, I’m going to make a workflow that lets me draw on two-page spreads. I don’t have any wide drawings planned yet, but it could be handy for later. I made an Inkscape template to help me keep margins in mind. I learned how to use Medibang Paint’s folders to organize all the layers, and I’m getting the hang of digitally tracing and painting the photos I took.

I’m looking forward to making even more books and refining my workflow along the way. Here are a few things I want to try:

  • Flat colour
  • Painting
  • Programmatically adding text
  • Printing photos
  • Two-page drawing
  • Parametric templates
  • Smaller format by cutting
  • Programmatically adding photos
  • Heavier-weight paper
  • Board book replacement
  • Printing at Staples or similar
  • Print-on-demand book
  • Handstitching
  • Binding with a cover
  • Smaller format by folding and gluing
  • Mobile workflow
  • Vector drawing

And a few quick ideas for possible next books:

  • Potty Time
  • Brushing Teeth
  • Feelings
  • When I Feel Nervous
  • When I Feel Sad
  • Going to Sleep at the Dentist
  • My Life
  • My Day
  • Going Out
  • At Home
  • I Can…
  • I Can Draw
  • Waiting
  • Try Again
  • Dressing Up
  • Alimango sa Dagat
  • Leron Leron Sinta

Planning a few activities for A-

March 4, 2018 - Categories: parenting

Registration opens this week for City of Toronto recreation programs, so I’ve been thinking about what to experiment with next. For this phase (2-3 years old), A- will probably be focusing on learning about:

  • independence
  • movement
  • language and music
  • emotions
  • socialization
  • the world around us

What have I learned from the classes we’ve taken and the memberships we have?

I was not keen on the Recreation Discovery with Caregiver class that we signed up for during the fall term, since it was hard to wake up A- in the morning and the class didn’t offer much beyond what we could get at drop-in centres.

Between a long trip to the Philippines and a late-waking A-, we missed many sessions of the Smart Start music classes at the Royal Conservatory of Music. Even though she mostly clung to me during the sessions that we did manage to attend, she somehow absorbed plenty from the class. At home, she’s been singing, dancing, galloping, marching, banging rhythm sticks together, playing on the piano and the xylophone, blowing into the recorder, tapping on the table, and even arranging chairs for sitting on – “Just like music class,” she exclaims. I think it’s worth a significant premium over city music classes or the 15-minute circle times at free drop-ins, considering A- gets exposed to well-maintained instruments and a highly skilled music teacher. I’ve picked up more melodic variants of the nursery rhymes I learned elsewhere, learned a few Canadian folk songs, and grown more comfortable with singing. If I can find a summer session in the afternoon, I might consider that.

For spring, I signed A- up for gymnastics classes through the City of Toronto. She’s gotten a lot more active, and I think it might be nice to explore what she can do with more facilities. I hope there’ll be a large padded mat and a few activities for balance and coordination. Even if she ends up being mostly reserved during class, I know she’ll pick up a lot by observing the teacher and the other kids, and I can set up things at home so that she can practice. The age range for the class is pretty big (2 – 5 years old), so I hope there’ll be other toddlers, a small class, and/or a teacher good at managing such a large range.

A- likes swimming too. I think we’ll keep that pretty informal for now, since it’s easy for me to take her to various pools depending on the gaps in our week and when she wakes up. She had fun kicking while wearing a flotation device, and she’s also curious about blowing bubbles. I can probably spend the next few months bringing her to places with shallow toddler pools, and that should take care of swimming without putting too much pressure on our schedule. Besides, this way, I can invite other families along.

The city also had a few science- and engineering-type activities for little kids, but I can probably do those things on my own for now. Likewise, there are private companies that offer cooking classes for toddlers, but I can do that at home.

The High Park Nature Centre also has programs for kids this age. I’ll just start by taking her on the trails often. I’ll step up nature education when A- is about three or so, probably drawing from books like Discovering Nature with Young Children (and the rest of the Young Scientist series) and Small Wonders: Nature Education for Young Children. The nature centre has the advantage of experience and animal encounters, so we’ll look into that when she’s ready for more structure and lots of hiking.

Our Ontario Science Centre membership has definitely paid off. We go almost every week, often meeting up with Jen and E-. A- loves the pretend supermarket, the water table, the music section, and the spinning thing. I renewed that one for another two years.

I sprung for another year of the Curator’s Circle membership level for the Royal Ontario Museum. I made good use of the guest privileges last year by making it my default location for inviting people out, and maybe I’ll get to do more of that this year. A- often requests to go to the museum after music class, since it’s right next door. She’s still not keen on the drop-in centre with toys, but she likes the animal exhibits and can point to many large animals when prompted.

We went to Riverdale Farm a couple of times this year. She’s beginning to be more interested in the animals there, although she’s still wary of the sheep. (“Sheep big! Sheep noisy!”) Worth the occasional trip out even though we haven’t made it to any of the farmer demos, and easy to combine with a short walk to the Children’s Book Bank.

A- liked going to the bouldering gym, too. There’s one near us that has a small kiddie area that has a slide. It’s a three-person affair, since W- needs to hold A- up and I need to climb to the top so that I can lift her over the ledge and slide down with her. I pay for a pass for her, a pass for me, and my shoe rental, and I get to have a short workout climbing too. It’s good for her to see us trying, falling, picking ourselves up, and learning. J- goes to the same gym, so more modeling there too. We’ve gone twice. I’m up for going again when W- and J-‘s schedules permit.

Some playgrounds also have climbing features, and some even use rock-climbing holds. I remember seeing them at Regent Park and at Withrow Park. When the weather warms up, we’ll go on a tour of playgrounds.

What do I need to learn about or prepare in order to support her learning?

  • Music: I can mix in more nursery rhymes and folk songs as she gets the hang of the ones we covered before. She’s also getting interested in instruments, so it’s good to both model having fun playing and let her explore. She’s interested in dancing, so we’ll do more of that pancreas, too.
  • Language: Time to dust off those Ready for Reading recommendations and request award-winning children’s books from the library! A- loves reading, and I absorb more ideas about art and verse as I read things over and over. I’d also like to establish a steady rhythm of making books myself, too. The fridge magnets and the availability of print in everyday life encourage A-‘s interest in identifying letters, and we can continue to let her take the lead.
  • Art: This phase focuses on making marks, exploring materials, and describing actions. I can bring drawing supplies when we visit her grandmother. I can set out large pieces of drawing paper. I can present her drawing and playdough supplies attractively, and I can make them more pleasurable to use. I can model more drawing in front of her. The Trofast drawers we set up in the living room are doing a good job of organizing A-‘s Duplo collection, and A- often plays with Duplo (building towers or playing with the playground). I can review Growing Artists for ideas to take advantage of her new capabilities.
  • Toileting: I think we can redo Oh Crap potty training whenever we’re ready. No rush. A- figured out how to get through a whole diaper-free month without accidents, but our long trip got her used to wearing diapers again. It’s a bit cool, but maybe I can offer her a choice between cloth diapers or going diaperless at home, or I can do more of a conceptual nudge through books. She’s interested in being a big kid at the moment, so it might be a good time.
  • Dressing: She’s working on more fine motor skills. I might be able to get away without fancy dressing frames or toys, since she can practice with my pajamas and my shoelaces. Although if we make it to the EarlyON centre one of these days, there’s a toy with a nice big button that she could use for practice.
  • Physical activity: Lots of walking and going to playgrounds, plus the gymnastics classes I signed up for and the occasional bouldering session too. I can also encourage her to carry heavy things.
  • Independent play: This fits naturally into our household routines. I just need to keep recognizing opportunities for her to go and explore.
  • Cooking and eating: She’s getting more comfortable with a butter knife. She can cut with a serrated knife or even a pointy knife if I carefully guide her hand-over-hand. If I look up cooking class ideas for toddlers, I’ll probably find more things we can do together. It might be time to get colour-coded measuring cups like the ones my sister got for her kids. She’s okay with tongs, too, so I’ll pick up training chopsticks as well.
  • Sleep: Most toddler activities are in the morning. A- and I both seem to be night owls. It’s been nice letting her sleep in, but maybe I should take the hit, deal with a few weeks or months of slight crankiness, and move our schedules earlier. Anyway, we’ll see how things work out as she gets older. If she accepts our nudges to night-wean, that will probably change things too.

So much to learn this year. Fun fun fun! It seems to work out pretty well if I let her take the lead, and even better if I’ve prepared the opportunities and learned more about supporting her learning. This is totally not about turning her into some kind of prodigy. It’s more fun to be a kid, and it’s better for her too. I’m just doing this because I’m having a lot of fun learning with and from her. :) We’ll see what we can learn and share!

2018-03-04 Emacs news

March 4, 2018 - Categories: emacs, emacs-news

Links from, /r/orgmode, /r/spacemacs, Hacker News,, YouTube, the changes to the Emacs NEWS file, and emacs-devel.

Week ending 2018-03-02

March 5, 2018 - Categories: review, weekly

We went to Riverdale Farm this week. A- was a little wary of the sheep, but she eventually got more used to the noise. We visited her grandmother. A- ate lots of strawberries and practised fetching things.

A- had lots of fun spinning around and around, whether it was on the platform at the Ontario Science Centre or in the kitchen at home. With a tray, too, for extra challenge points! She enjoyed rock-climbing, and so did I. She walked most of the way to the subway, too, and she walked astride her balance bike from the living room all the way to the kitchen.

She sang all of Humpty Dumpty and Hey Diddle Diddle, and has been dancing and playing instruments “just like music class.”
We played with catching and blowing feathers, too.

A- had a tantrum because she didn’t want me to go to sleep. I think adjusting her sleep schedule will have to be more about waking her up rather than trying to nudge her to sleep earlier. On the plus side, she echoed some of the sentences from the books we’ve been reading: “One step, another, fall down, and then pick myself up and try it again.” “I know it’s hard.”

I figured out how to make books! I drew a 12-page book about night weaning and an 8-page book about A-‘s conformer. I’m looking forward to making more, especially as I collect ideas and fine-tune my workflow. I managed to do Emacs News entirely on my phone, too, which bodes well for traveling without my laptop. I also worked on documenting files to back up.

Next week: new conformer, more books, and setting up some storage!

Using Org Mode, LaTeX, Beamer, and Medibang Paint to make a children’s book

March 8, 2018 - Categories: drawing, emacs, geek, org, publishing


  • It’s time to make a smoothie!
  • I pour blueberries into the blender.
  • Mama adds hemp seeds.
  • I add spinach.
  • Mama blends it all with some water.
  • I peel and add a banana.
  • I add some yogurt.
  • Mama blends it again.
  • Yum yum!


spread0.png spread1.png spread2.png spread3.png spread4.png spread5.png


  • Prerequisites

    • ImageMagick
    • Texlive (probably)
    • latex-beamer
    • Org Mode and Emacs
  • Set up Org Mode export to Beamer

    (eval-after-load "ox-latex"
      ;; update the list of LaTeX classes and associated header (encoding, etc.)
      ;; and structure
      '(add-to-list 'org-latex-classes
                      ,(concat "\\documentclass[presentation]{beamer}\n"
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))

  • Set up image directories

    mkdir text-pages blank-spreads drawn drawn-pages

    text-pages Will contain one image per page of just the plain text.
    blank-spreads Will contain text spreads ready for drawing
    drawn Export one image per spread (without the text layers) from your drawing program
    drawn-pages Will contain one image per page combining text and drawing
  • Tweak the header.tex

    This file gets included in the LaTeX file for the children’s book. Tweak it to change the appearance. In this example, I use black serif text at the bottom of the page.

    \setbeamercolor{normal text}{fg=black,bg=white}

  • Write the story

    I used Org Mode to make it easy to write the story.

    Some considerations:

    • Because we’re printing this as a saddle-stitched booklet, the number of lines should be a multiple of four. Sixteen is probably a good maximum.
    • The first heading is actually for the last page.
    • The second heading is for the cover page.
    • The third heading is for the first inner page, the fourth heading is for the second inner page, and so on.
    #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc author:nil date:nil
    #+OPTIONS: H:1
    #+startup: beamer
    #+LaTeX_CLASS: beamer
    #+LaTeX_CLASS_OPTIONS: [20pt]
    #+LATEX_HEADER: \input{header.tex}
    #+PROPERTY: header-args :var pages=12
    * Story
    ** It's time to make a smoothie!
    ** I pour blueberries into the blender.
    ** Mama adds hemp seeds.
    ** I add spinach.
    ** Mama blends it all with some water.
    ** I peel and add a banana.
    ** I add some yogurt. 
    ** Mama blends it again.
    ** Yum yum!

  • Make the tex, PDF, page PNGs, and spread PNGs

    1. Go to the subtree for the story and use M-x org-export-dispatch (C-c C-e) with the subtree option (C-s) to export it as a Beamer file (option l b).
    2. Use pdflatex to convert the .tex to PDF.

      pdflatex index.tex

    3. Create one PNG per text page with:

      convert -density 300 index.pdf -quality 100 text-pages/page%02d.png

    4. Create spreads to draw on with:

      montage text-pages/page*.png -tile 2x1 -mode Concatenate blank-spreads/spread%d.png

    5. Optionally, create a layered PSD with:

      convert blank-spreads/spread*.png \( -clone 1,0 -background white -flatten -alpha off \) -reverse spreads-for-drawing.psd

  • Draw

    I imported the PNG layers into MediBang Paint on a Samsung Note 8 Android phone, and then:

    • imported photos
    • traced them
    • painted and shaded them
    • hid the text layers
    • exported one PNG per spread to QuickPic, renamed them, and uploaded them to Dropbox, because I couldn’t figure out how to export to Dropbox directly

    Layer folders were handy for organizing spread-related images. I couldn’t seem to move all of the layers in a layer folder together on Android, but the iPad was able to do so. If I didn’t have the iPad handy, I combined the layers by exporting a PNG and then importeing it back into MediBang Paint.

    This was a decent setup that allowed me to draw and paint even when I was in bed nursing A- and waiting for her to fall asleep. I held the phone with one hand and rotated the canvas as needed so that it was easier for me to draw lines with my right. Because of the awkward position and the small screen size, the lines are not as smooth as I might like, but the important thing is that they’re there. Whee! =)

    It turns out to be possible to use the free MediBang Pro drawing program under Wine on Linux to import the PSD and save it to the cloud. I was also sometimes able to switch to drawing with iPad Pro with Pencil, but it was harder to find time to do that because that usually made A- want to draw too.

    Anyway, after I drew and exported the PNGs, the next step was to…

  • Convert the drawn spreads back to pages and combine them with the text

    Here’s some code that combines the drawing and the text. Keeping the drawing and the text separate until this stage (instead of exporting the PNGs with the text) makes it easier to change the text later by recreating the text PNGs and running this step.

    (defun my/combine-spread-drawing-and-text (page num-pages)
      (let ((gravity (if (= (% page 2) 1) "West" "East"))
            (spread (/ (% page num-pages) 2)))
           (concat "convert \\( "
                   "drawn/spread%d.png -gravity %s "
                   "-chop 50%%x0 +repage \\) "
                   "text-pages/page%02d.png -compose darken "
                   "-composite drawn-pages/page%02d.png")
           spread gravity page page))))
    (cl-loop for i from 0 to (1- pages) do
             (my/combine-spread-drawing-and-text i pages))

  • Create print spreads for saddle-stitching

    This code pairs up the drawn pages into a PDF that can be printed duplex. Make sure to choose the option to flip along the short edge. I hard-coded the page orders for 4-, 8-, 12-, and 16-page booklets.

    (let* ((page-order
            '((0 1 2 3)   ; hard-coded page sequences
              (0 1 2 7 6 3 4 5)
              (0 1 2 11 10 3 4 9 8 5 6 7)
              (0 1 2 15 14 3 4 13 12 5 6 11 10 7 8 9)))
            (mapconcat (lambda (d) (format "drawn-pages/page%02d.png" d))
                       (elt page-order (1- (/ pages 4))) " ")))
        "montage %s -tile 2x1 -mode Concatenate print-duplex-short-edge-flip.pdf"

  • Print and bind

    After printing and folding the book, I used tape to make the book hold together. Tada!

  • Create on-screen PDF for reading

    A little bit of manipulation so that the last page is in the right place:

      (format "convert %s onscreen.pdf" 
        (mapconcat 'identity (cl-loop for i from 1 to pages 
          collect (format "drawn-pages/page%02d.png" (% i pages))) " ")))

  • Create thumbnails of spreads

     for i from 0 to (1- (/ pages 2)) do 
       (concat "convert "
               "\\( blank-spreads/spread%d.png "
               "drawn/spread%d.png "
               "-compose darken "
               "-resize %dx -flatten \\) "
               "\\( +clone -background black -shadow 50x1+%d+%d \\) "
               "+swap -compose src-over -composite "
       i i width shadow shadow i)))

  • Ideas for next steps

    • Better thumbnails for easy previews
    • PDF for online reading
    • More layout possibilities (photos, verses, etc.)
    • Smaller books:

      • crop marks on a full-page print, or
      • the right imposition rules to print more pages on a sheet

February 2018

March 11, 2018 - Categories: monthly, review

In addition to our usual field trips to the Science Centre and the ROM, we went to Riverdale Farm. A- named the animals and enjoyed talking about them, although she found the sheep a little loud. We also started visiting family more often, for both big things like Chinese New Year and A-‘s birthday as well as small things like an afternoon of hanging out.

A- wanted to build a Duplo tower so tall that she had to stand on a chair to add blocks to it. She got pretty good at inserting shapes into her sorter and screwing together the nuts and bolts in her toolkit.

She walked astride her balance bike all the way to the kitchen by herself. She carried empty containers on a tray. She danced a lot and imitated other aspects of music class. She enjoyed bouldering. She wanted to try out a life jacket while swimming, and she kicked her legs too. She picked up diving rings with her foot.

She sang Humpty Dumpty, Baa Baa Black Sheep, and Hey Diddle Diddle practically in full. I could prompt her to show me a sleepy face, a sad face, and so on. She talked about recent events and how she felt, often revisiting moments that were particularly significant to her. She echoed many of the things we often say, such as “Give it a try.” She asked for specific things using “I need…” and often thanked us.

She played more independently, often amusing herself for a number of minutes or toddling off to a different room while telling us to stop. She confidently touched different textures in books. She asked to be pushed faster while in the playground swing, and she wanted to go down the twisty slide.

Her eye exam went well. The pediatrician is working on referrals to Sick Kids for dentistry and endocrinology.

We replaced our printer with an HP M277dw, and I learned how to use it to make short books for A-. I figured out an Emacs News workflow that I can do entirely from my phone, and I set up Syncthing for my files too. We organized A-‘s toys and clothes into IKEA Trofast drawers. I uploaded old photos to Google Photos. Progress!

March: A new conformer, a consultation with the anesthesia dentist, more children’s books, and lots of time with A-. We’ll figure this out!

2018-03-12 Emacs news

March 12, 2018 - Categories: emacs, emacs-news

Links from, /r/orgmode, /r/spacemacs, Hacker News,, YouTube, the changes to the Emacs NEWS file, and emacs-devel.

Using exiftool to put date, rating, and title in photo filenames

March 14, 2018 - Categories: geek, organization

Now that we have a Synology backup server, I want to get better at keeping and organizing photos. I’ve got lots of pictures and videos of A- in Google Photos, but I don’t want to rely only on that. When Google eventually decommissions the service (no signs of this now, but you can never tell), I’d like to already have copies of my favourite photos and videos all prioritized and backed up instead of spending days wading through accumulated cruft.

I had previously added significant moments to a “Weekly highlights” album in the Google Photos app. I had also tried to select a number of those for “Level 2 highlights” and “Level 3 highlights” roughly approximating monthly and yearly filters. This was awkward, though, since Google Photos didn’t let me see which photos were already in an album or which timespans weren’t well represented. I wanted a five-star rating system so that I could gradually winnow images I liked, and I wanted tags for more flexibility.

The F-Stop Gallery app on Android seemed to be a quick way to sort through images, rate them, and tag them. I liked how it stored the metadata in the file instead of in a separate database. The bulk management tools were decent, although of course it would be even better to do things with fewer taps.

I downloaded ZIPs of my highlight albums and extracted them to a Samba share so that I could access them from my phone. I rated the level 3 highlights as 5 stars, level 2 as 3 stars, and weekly highlights as 2 stars, leaving the 4-star level for finer distinctions if I need to fiddle with things. Then I used cp -n (no clobber; don’t overwrite existing files) to copy the 5-star photos, then the 3-star photos, and lastly the 2-star photos. That way, even if a photo was in multiple albums, the file would have just the highest rating I assigned.

I can’t always rely on apps to index and search by the metadata in a file, so I like putting that information in the filename. A good filename might look like this:

2016-08-01-20-14-44 ### Relaxing on the deck #family.jpg

It starts with a date and time, since timelines make sense. I add one to the number of stars and convert that to # so that I can easily search for, say, ### to show me all entries that have at least two stars. This also creates a neat ASCII bar chart effect when looking at lists of filenames. I want to include the title if available, and any tags for easy searching as well.

Here’s the Bash script that takes an image file and renames it accordingly:

exiftool -m \
  -"Filename<\${DateTimeOriginal;s/[ :]/-/g} \${Rating;s/([1-5])/'#' x (\$1 + 1)/e} \${Title} \${Subject;s/^/#/;s/, / #/g}.%e" \
  "[email protected]"

This probably has bugs, but it seems to be a decent start.

It was great to find out that I can pass Perl expressions to exiftool to modify the field value. I figured out that I could combine that with the /e flag for executable replacements so that I could generate a string of N+1 characters. While tinkering with the code, I accidentally used \1 instead of \$1 in my Org Mode block. That made a number such as 5 turn up as a scalar with a six-digit value, so I ended up with a really long line of #####... in my Org file. Emacs was definitely not happy. I ended up opening my Org file in vi so that I could delete the offending line. Anyway, I managed to recover from that and figure out what I needed to put in. Yay!

It would be pretty neat to have some kind of inotify thing watching my NAS inbox and processing files accordingly. In the meantime, I don’t mind running another script. We’ll see how this goes!

Week ending 2018-03-10

March 14, 2018 - Categories: review, weekly

A- got a new conformer last week. Progress: she didn’t cry in the waiting room, although she still burst into tears as soon as she saw the ocularist. We’re continuing with the conformer approach instead of switching to a painted shell because A- still rubs the conformer out of her eye from time to time, and it’s easier to replace a conformer. Maybe we’ll switch when she’s closer to school age.

I asked her where she wanted to go for Field Trip Friday. She said, “Riverdale Farm. I miss that. I have fun. Big sheep make big noises.” So we went, and we enjoyed looking at the baby goats. We passed by the Children’s Book Bank, and I was delighted to find that you can take double the number of books on Fridays. I picked up a few more Seuss books.

We’ve been making more of an effort to explore and catalogue places so that we can make the most of Toronto’s resources. We checked out Baird Park, which has a playset with a short tunnel that A- actually worked up the courage to go through. She liked going down the twisty slide on my lap, and then graduated to going down the twisty slide at Lithuania Park with a little push. I posted a few park reviews in Google just in case other people find those notes handy, and I should find some way of organizing my own copy of the notes too.

A- has been having fun with both fine and gross motor skills. She practised using a ladle to pour and a butter knife to spread. She goose-stepped and danced.

A- can talk about more abstract things. She scribbled and said she was drawing “nervous.” One time, W- was carrying her up the stairs to change her diaper, and she was getting a little wriggly and distracted. He said, “Focus.” She said with enthusiasm, “Diaper!”

She likes being involved. When she was at the sink, she said with delight: “Yes! I’m busy!”

One time, she insisted that I carry her up bridal-style in my arms (which she accomplished by flopping in a certain way and protesting if I tried changing things). I was mystified, but it all became clearer once we got upstairs and she wanted me to read Emma to her. The Cozy Classics version has just twelve words, and “carry” is one of them. “Frank Churchill carry. Emma,” she said. Aha!

She often sings nursery rhymes and other songs. She sang part of “Mamma Mia” while dancing, and then obligingly repeated while I suppressed my laughter long enough to record her on video.

Little improvements:

  • W- set up a Synology DS718 network-attached storage server. Wheee! I feel more grown-up with proper backups. I set up borg backups for my server and my laptop. Next: Docker containers for testing the backups…
  • I set up lots of voice shortcuts to help me with groceries and with tracking. For example, I can say, “Okay Google, baby awake” and it will log that in my system. I explored Tasker’s Memento support, too.
  • I figured out how to use Org Mode and LaTeX to typeset drawing templates for children’s books, and I used that to make a book about smoothies. Next: photos, more layouts
  • Lots of tidying up in the basement, too. Whee!
  • I switched to writing in Markor on Android. I briefly enabled Markdown support in WordPress, but it was messing up some of my other posts, so I turned it off again.
  • I set up god-mode in Emacs, which does make phone use a bit easier.

Making an 8-page 7″x4.25″ captioned photo book with Org Mode and LaTeX

March 16, 2018 - Categories: emacs, org, publishing

Here’s another technique that makes a simple photo book. I wanted to
make an 8-page book that could be printed 4 pages to a 8.5″x14″ sheet
(duplex, flip along the short edge), with a final page size of

Sample with my own photos:



  • ImageMagick
  • Texlive (probably)
  • latex-beamer
  • Org Mode and Emacs


We can define the labels and their captions in a named table like this:

Let’s Go for a Walk  
Caption for photo 1 placeholder.png
Caption for photo 2 placeholder.png
Caption for photo 3 placeholder.png
Caption for photo 4 placeholder.png
Caption for photo 5 placeholder.png

Note that the first page is row #1 this time, instead of starting with
the last page.

Then we generate the LaTeX code with some Emacs Lisp, like so:

#+begin_src emacs-lisp :var pages=story :results value latex :exports results
(mapconcat (lambda (row) (format "\\graphicframe{%s}{%s}" (cadr row) (org-export-string-as (car row) 'latex t))) pages "\n")

I put that in a subtree for easier exporting with C-c C-e C-s l b (org-export-dispatch, subtree, LaTeX, Beamer).



  • Set up Org Mode export to Beamer
    (eval-after-load "ox-latex"
      ;; update the list of LaTeX classes and associated header (encoding, etc.)
      ;; and structure
      '(add-to-list 'org-latex-classes
                      ,(concat "\\documentclass[presentation]{beamer}\n"
                      ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
  • Set up the header.tex

    This file gets included in the LaTeX file for the children’s book.
    Tweak it to change the appearance. In this example, I use black serif
    text text on the left side of a picture, both occupying roughly half
    of the page. I also experimented with using a different font this time, which you might need to install (for me, I did apt-get install texlive-fonts-extra).

    \setbeamercolor{normal text}{fg=black,bg=white}
    %% \setbeamertemplate{frametitle}
    %% {
    %%   \begin{center}
    %%   \noindent
    %%   \insertframetitle
    %%   \end{center}
    %% }
    \newcommand{\graphicframe}[2] {
       %% \if #1\empty 
       %% \usebackgroundtemplate{}
       %% \fi
  • Create the PDF
    pdflatex index.tex
  • Create one PNG per page
    mkdir pages
    convert -density 300 index.pdf -quality 100 pages/page%d.png
  • Create the 4-up imposition

    The diagram at was helpful.

    montage \( page4.png -rotate 180 \) \( page3.png -rotate 180 \) page7.png page0.png -tile 2x2 -mode Concatenate front.png
    montage \( page2.png -rotate 180 \) \( page5.png -rotate 180 \) page1.png page6.png -tile 2x2 -mode Concatenate back.png
    convert front.png back.png -density 300 ../print.pdf

Other notes

Placeholder image from – public domain.

Dealing with thought fragmentation, reducing mental waste

March 17, 2018 - Categories: kaizen, parenting

I’ve been figuring out how to deal with the mental fragmentation that can come with being the primary caregiver of a nursing toddler.

It was useful for me to let go of wanting to focus. If I think of childcare as a distraction from what I really want to do, I miss out on what I can get from childcare too. Instead, I’ve been looking for ways to make the most of this stop-and-go life.

Kaizen emphasizes reducing waste. What does mental waste look like when it comes to thinking with a toddler around?

I waste energy if I let my mind fill up with mental clutter. So:

  • Appointments go on my calendar so that I don’t have to worry about forgetting them, and a weekly review helps me remember to check the week ahead.
  • Near-term tasks go into my todo list. Tasks Free lets me quickly reprioritize tasks so that I know what to do the moment A- lets me unlatch and slip away.
  • Blog post ideas go into Markor so that I can write them in Markdown and export them to HTML for my blog.
  • Long-term ideas and notes go into Org Mode. It’s been super helpful to have step-by-step instructions and checklists for things I do infrequently.

Waste happens if I prioritize ineffectively. So:

  • Once A- is asleep, I quickly take care of personal and household tasks, and then work on my laptop. I can do phone tasks while I’m nursing her in bed, but laptop time is very rare. If I focus on improving my systems and making more things doable from my phone, the benefits compound.
  • Small tasks with small benefits tend to beat large tasks with large benefits, because of interruptions. I try to find ways to break large tasks down into small ones with incremental benefits. Many things can wait until next year.

Waste also happens if I repeat myself. So:

  • When I manage to have computer time, I slow down and write notes in an Org Mode file instead of trying to speed ahead and do everything before A- wakes up. This helps me resume my train of thought after the inevitable interruption. It also helps me put together blog posts, which means I can find things in my archive, help people, and maybe even learn from people’s comments.
  • If I’m thinking about a question or idea, I jot down keywords. That makes it easier to remember those thoughts and build on them. I scribble these on paper if I’m around A-, so that she can see me writing and so that she doesn’t get distracted by my phone. If a thought looks promising, I stick it in my pocket in case I want to refer to it during phone time.

Waste happens if I do low-value activities instead of high-value ones. It’s easy to get sucked into reading lots of social media or books on my phone, so I work on getting more value out of phone time. I can:

  • write
  • ssh to my web server or backup server, and code or run scripts – hard with a virtual keyboard and no swiping to type, but doable
  • organize pictures and other files
  • prepare an Emacs News summary
  • read e-books from the library, mainly looking for interesting parenting ideas to try or things to learn about early childhood education

Waste happens when I don’t notice, so it’s good to get enough sleep and to pay attention.

Waste happens when I forget, so it’s good to write, reflect, and organize my notes.

Waste happens when we stay too comfortable and when we push too hard. It’s good to work on finding the sweet spot – the zone of proximal development for A-.

I can reduce waste further by getting more value from my time. For example, being interested in making books for A- lets me get more out of reading books with A-. Writing about stuff lets me remember, and I might even be able to help or learn from other people.

This phase is temporary. Next year, A- will probably be more interested in playing with her peers, and she might be independent enough to participate in activities without me. The year after that, she’ll be old enough for school. I want to make the most of this time instead of rushing ahead. I guess that’s part of why I haven’t prioritized night weaning or finding a babysitter. There’s still plenty of potential to explore even with the setup, and it’s fun working with the constraints.

What could better look like?

  • Sleeping more predictably or more in sync: She seems to adjust her sleep cycle earlier if I go to sleep when she does instead of staying up to do my discretionary things, so maybe I can sacrifice a week or two of discretionary time to see if we can shift to using daytime better
  • Written note workflow: maybe snapping a quick picture and then referring to it when I type; maybe doing small sketchnotes that can be cleaned up by an app and included as images
  • Trying out other ssh apps to see which one I like the most, in case that makes it easier to code
  • Trying more things (new food, etc.), which could take a bit of planning

Lots of things to play with!