A couple of Jekyll updates

    Since moving to Jekyll last year, I’ve done relatively little to tweak the inner workings of this site. After all, one of the most appealing things about having a static site is that it doesn’t need to have a lot of moving parts. It just works.

    But today I finally got around to a couple of housekeeping items that have been on my list: image captions and MathJax.

    Image captions

    For image captions, I settled on a beautifully simple solution posted by Andrew Wei on Stack Overflow:


    This takes advantage of the fact that you can create CSS for combinations of HTML elements. In this case, I can use

    img + em { display: block; text-align: center;}

    to target the *image_caption* text only and center it under images, which are also centered on this site by default. It works perfectly, and this isn’t even Jekyll-specific. Anyone publishing in Markdown could do this.


    Jekyll + MathJax

    Adding MathJax took a little more time, but not much. It was worth it just to remind me of the brilliance of Jekyll’s architecture. Even though the Jekyll site mentions MathJax, it doesn’t say enough to be of immediate use. It basically points to a blog post that entails switching from the default kramdown Markdown converter to redcarpet. Given that I’m happy with kramdown and not in the mood to backtest a bunch of blog posts with a different converter, I wanted to stick with kramdown.

    A series of subsequent web searches lead me to a Github issue thread for a Jekyll theme that I’m not even using, but I found a really efficient implementation of MathJax there by user “mmistakes,” who suggested adding a mathjax variable in each page’s YAML front matter that could be set to true on a post by post basis.

    The elegance of this solution is that the MathJax script will only be written into the HTML of posts that actually have MathJax in them. This seemed super appealing to me because it meant that I didn’t have to worry about MathJax being triggered by some accidental combination of characters in an old blog post.

    I ended up adding

    {% if page.mathjax %}
    <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
    {% endif %}

    to my head.html file, which contains Ruby instructions for building the contents of each page’s <head> element. For any page where the YAML front matter has mathjax: true, the MathJax script will be included. I decided to always include it in the site’s index.html file, which shows recent posts. And going forward, I can simply include it in the YAML front matter of any individual post. For example, this post’s front matter is:

    layout: post
    title: A couple of Jekyll updates
    mathjax: true

    I just finished up a project where I worked with MathJax a lot, and I continue to be impressed at how many LaTeX commands it handles. MathJax even has a special enclose library that handles special actuarial notation that eludes so many people. For example,

    $$\require{enclose} {}_{17|}\ddot{a}_{x:\enclose{actuarial}{n}}^{(4)}$$

    turns into:


    Look but don't type

    Even though Gabe and I sometimes have slightly differing views on the iPad’s productivity value compared to the Mac, with his latest post, I think we are completely in sync—metaphorical Chris Farley falls and all.

    In particular, he nails a massive friction point for me with the iPad:

    I can type more comfortably on my iPhone than I can with my iPad Pro on the couch, in bed, or even just reclined in the backyard. I’m sure there’s a good case out there that will solve this problem, but I’d rather see Apple solve it.

    I’ve tried using various keyboards for my 13” iPad Pro, but I’ve never found one that let me comfortably type while sitting away from a flat table or desk. This has been a huge failure point from a practical perspective for me because the iPad, by design, begs to be used away from conventional “work stations.” So the irony is that the only time I can do serious word creation on my iPad is while sitting at a desk or table.

    If I want to escape those confines, which is a frequent want, I use my 13” MacBook Pro, which has the same form factor as the big-big iPad, but allows for lap typing.

    Like Gabe, I also find myself in the funny position of using my iPhone to type more, even when my iPad is at hand. A great example: if I’m reading a book on my iPad, it’s actually easier to write notes about the book using my iPhone. I even wrote this entire post in Drafts on my iPhone at the breakfast table. My iPad is in sight across the kitchen.

    I still use the iPad a lot, but its use cases for typing still remain very limited for me. The Mac and iPhone just have superior keyboard forms.

    It doesn’t want anything

    Tim Cook’s entire commencement address to the MIT class of 2017 is an instant classic, but this is the part I want to echo forever:

    Technology is capable of doing great things. But it doesn’t want to do great things. It doesn’t want anything. That part takes all of us. It takes our values and our commitment to our families and our neighbors and our communities. Our love of beauty and belief that all of our faiths are interconnected. Our decency. Our kindness.

    I’m not worried about artificial intelligence giving computers the ability to think like humans. I’m more concerned about people thinking like computers without values or compassion, without concern for consequences. That is what we need you to help us guard against. Because if science is a search in the darkness, then the humanities are a candle that shows us where we’ve been and the danger that lies ahead.

    Thinking out loud about the Apple Watch

    PCs lead us indoors. Smartphones lead us into isolation. The Apple Watch is—sort-of—leading us back out into the real world again by encouraging movement, keeping phones in pockets, and most importantly, looking up again.

    I’ve owned an Apple Watch since the Series 0 started shipped 26 months ago. I can’t imagine ever not owning one again. Actually I can, but only when some higher form of “wearable” supersedes the form of a wrist watch.

    If I were to say, “I’m more active because of the Apple Watch,” a non-Watch person might say “You shouldn’t need a watch to make you more active. After all, people were active for millennia without smart watches.”

    Well played armchair anthropologist, but that perspective overlooks the motionlessness of modernity. In the blink of an eye, humans have simply stopped moving. Being indoors with technology is too appealing, and our bodies,… on yeah, we still have bodies! We have all kinds of shit going on besides thumbs and eyes. Well, we should probably move the other parts around a little. Who knows—maybe even a lot.

    In other words, we’re poorly adapted for the environment we suddenly created for ourselves at the turn of the 21st century. But we are human. And we are nothing if not interested in solving the problems we create for ourselves. I think health-aware technology is a natural adaptation to health-hostile effects of generations one and two of personal computing.

    Oh yeah… I just bought a new Apple Watch. More honestly, I just bought a new health-tracking wrist computer that’s more waterproof so I don’t have to take it off when I go swimming with my kids—the only time I’ve had to take off my original Apple Watch in the 26 months I’ve owned it.

    Bigger picture, I’ve decided that if I’m going to have the benefits of technology that makes me sit still, I also need technology to counteract that. This is life, and these are not horrible problems to have to solve.

    One-off shell script execution in BBEdit

    I’ve been meaning to talk more about my “Sublime Text and BBEdit” workflow, and this is a powerful (if mundane) example.

    I don’t write a ton of scripts on my Mac and generally don’t spend much time in Terminal. But when I need a script, I really need a script. My work is very file-heavy. I juggle large numbers of .tex (LaTeX) files across several large folder structures. Every so often I need to copy a subset of files within one folder to another folder so that I can do things to them.

    In most cases, I have a list of the files in a plain text .tex file, and I just need to do some file operations on them. Selecting them individually in Finder is tedious and error-prone, so the solution is usually a simple bash script with a bunch of cp commands.

    The main friction with bash scripting for folks like me that don’t live in Terminal is that you have to create a .sh script and then web search for now to make it executable (because I can never remember the chmod command).

    Creating the shell commands is straightforward, especially in Sublime Text. After adding the necessary #!/bin/bash line with TextExpander and defining the “to” and “from” file paths as variables, the magic of Sublime Text’s multiple cursors makes it easy to put cp commands and the folder path variables around each file to be copied.

    Sublime Text multiple cursors in action

    Since Sublime Text won’t execute these commands in an unsaved file that hasn’t been given proper execute permissions, I simply copy this text into an untitled, unsaved BBEdit window and hit ⌘R. BBEdit has the extremely useful ability to immediately recognize the syntax and execute it right there on the spot.


    I realize this post is a weird way to promote BBEdit, which is a powerful text editor that, in this case, I’m not even using as an editor. Hopefully I’ll find some time to talk more about other ways I’m using it with Sublime Text.

    Lessons from the president

    Like many other parents, I’ve struggled to make sense of the current president in the context of parenthood. How do you even talk about it?

    But I’ve realized that much can be taught by studying the commander-in-clown’s example. After all he’s the perfect anti-role model for young kids, teens, and adults of all ages: someone we should all aspire not to be when we grow up.

    Here are the top five lessons we can learn from our president.

    5. Things you put on social media are permanent.

    If you tweet strong, emotionally charged opinions reflexively, they will almost certainly come back to haunt you.

    What’s better: Think before you act. Ask for advice. Do like Lincoln, and write an angry letter that you never send.

    4. People who constantly attack others verbally are highly insecure.

    The more they attack, the more they broadcast their insecurities and invite hate from others. Bullies seem a lot less intimidating the more you realize that they are more terrified of the world than you are of them.

    What’s better than being a bully: Promote things you truly believe in. Use positive reinforcement to advance just causes. If you need to be critical, support your position with facts, and don’t contradict yourself or allow yourself to be distracted by things that trigger your insecurities.

    3. It’s OK to be wrong, but you have to admit it.

    Everyone is wrong about something. Vulnerability is mightier than the strongest ego. It will win you the most loyal followers.

    2. Very wealthy people who attempt to increase their wealth at all costs are not heroes of capitalism.

    They are among the greatest cowards on earth. They live in constant fear of losing what they have and will never experience even basic happiness.

    What’s better: Use your excess to help others. Be in constant thanks for what you have rather than dwell on what you don’t have. You will be happier and healthier.

    1. Credibility and trust are vital ingredients of leadership.

    A ruler who rules only by law will never be as effective as a leader who rules by trust. If no one trusts you, then you cannot trust anyone either. That’s a perfect model for a miserable life—whether you are a clown, the leader of the free world, or both.

    The boring truth about email security

    David Sparks and John Gruber have said all that needs to be said about the revelation that Unroll.me was selling its users’ email data.

    It was easy for me to delete my Unroll.me account because I had really stopped looking at it already. Last year, I decided to just get out of the way of my email and just let Gmail’s stock filters for “social,” “promotions,” and “updates” channel 80% of my email into those non-action buckets.

    On the surface, it may seem odd that I would favor one ad company over another: dump Unroll.me but stay with Google’s Gmail. A lot of people have ostensibly moved away from Gmail for the same reason people were throwing up in their mouths over Unroll.me this week.

    But I have been using Gmail for a long time, and I have no plans to leave now. I understand that Google sees my email and pours it into its Alphabet soup, and I’m OK with that—not because I think Google is especially benevolent, but because I accept the truth about email data.

    I think a lot of people who leave Gmail because of privacy concerns are following the false hope that another company can magically “secure” their email. The truth is that your email will never be totally private. With the exception of email you send to yourself, email takes at least two servers to tango.

    Every copy of every email sent to/from you resides on some other email server. If you regularly email a specific person, there are probably thousands of your emails on their hard drive—perhaps the one in the old computer they just sold without wiping the hard drive.

    In other words, email is not the same as your note archive or your document repository. Email is necessarily out there. Everywhere.

    So in my mind, the solution to email privacy is email avoidance:

    • Take advantage of iMessage’s encryption for chats with friends and family
    • Move your project or work communication to an app like Basecamp

    That’s what I’ve done. Today, I see my email as a bloated version of Twitter: a constant inflow of chaff with the occasional strand of wheat, which mostly takes the form of customer email.

    I have no control over how many computers email me every day. But I can definitely control how much email I create myself.

    Be still my rolling Pencil

    If I’m using my iPad Pro, I’m almost always using my Apple Pencil, too. For me, the Pencil was a massive extension for the iPad and basically made it the go-to environment for reading, studying, and annotating PDFs.

    The Apple Pencil is great at many things. Staying still on a flat table is not one of them.

    I’ve tried several accessories and tricks for keeping the Pencil from racing away, but nothing works as well as the FRTMA Apple Pencil Magnetic Sleeve.

    • It makes the Pencil non-round, so it stays where you set it
    • It is extremely sleek, preserving the svelteness of the Pencil’s design, yet the sleeve adds a bit of tackiness that I actually prefer when writing
    • It’s magnetic, so it sticks to any iPad case

    The magnet is very strong. When attached to an iPad case, you can shake the case really hard, and it will not come off. It will, however, come off sometimes when it’s in my backpack, but in my experience, “losing” my Apple Pencil inside my backpack is the very best place to lose it—far better than seeing it race across a flat table and down the stairs of my favorite coffee shop.

    From clips to stories

    Renie Ritchie apparently wrote a treatise on Apple’s new Clips app, but don’t let that intimidate you. Clips is ridiculously easy to use, and most of its features are discoverable by just playing with it.

    The real brilliance of Clips is that you don’t even feel like you’re doing movie editing, but that’s exactly what you’re doing. Being able to shoot video is just one step of making a visual story. A movie obviously can’t exist without that step. But in my opinion, editing is way more important. Cutting, blending, and curating is what really makes something a story.

    I think the “cutting” step is what most iPhone-created movies need the most. I went a long way in solving this problem (accidentally) when I started using Snapchat about a year ago. Before Snapchat, I shot plenty of video with the iPhone, but I almost never did anything with it. The main problem was that my videos tended to be too long. This made them:

    1. Usually boring
    2. Longer than most people wanted to watch
    3. Too much of a hassle to upload due to their file size

    So on my phone they sat—unwatched.

    The more I used Snapchat for video, the more I realized the brilliance of its ten-second limitation. This constraint made it impossible to shoot long, boring videos and also forced me to throw away outtakes immediately. Before long, I wasn’t just using Snapchat to send video snaps, I was saving the videos to my phone.

    Now that Clips is here, I’m using the iPhone’s camera app for video more often, but I’m still shooting very short duration clips a la Snapchat. Clips makes it ridiculously easy to fuse some or all of any video into a series of clips. Being able to mix videos and pictures into a single clip creates the same effect of a Snapchat story, but it keeps everything on my phone so that I can share it in other ways—notably with people who don’t use Snapchat.

    It’s really the story you should be after.

    If you pay attention to almost any TV show, movie, or professionally-made internet video, the very longest shots last no more than than five to eight seconds. In action movies, shot length can average as little as two seconds! Some action movies have over 3,000 shots in them. Changing scenes and angles just makes the visual aspect more engaging.

    I used Clips to make a couple of short “movies,” each consisting of 5–10 short videos and photos I took last week on a family vacation. In a lot of cases, I only grabbed a few of the best seconds of each clip. Creating each “movie” took just minutes using only my iPhone. I’m 100% sure none of those individual videos would have gotten shared if I hadn’t used Clips to make them into a story.

    Thoughts on iOS automation

    It’s funny to hear so many people complain about the lack of automation in iOS. In reality, iOS automation has already happened. We were just looking the other way, and when we turned around, we couldn’t remember what was there before.

    I can’t think of a better measure of the success of automation than how quickly an automated process becomes forgotten. Automation’s role in the human experience, after all, is to make us forget. Automation frees us to work on new problems beyond the old problem horizon. Automation paves over cavernous ravines, replacing them with short, straight paths to the adjacent possible.

    There are countless examples of how iOS has done this. Take photography.

    Before the PC, the steps to share pictures usually spanned weeks:

    1. Remember to bring a camera with me
    2. Take pictures on film
    3. Physically deliver the film to a developer days later
    4. Wait more days for the film to be developed
    5. Physically pick up the developed photos
    6. Physically mail the photos to someone, who would receive them days later

    When digital photography and the PC arrived, the process shortened, and the output expanded:

    1. Remember to bring a camera with me
    2. Take a picture on a memory card
    3. Remove the memory card from the camera and insert it into a PC
    4. Upload to websites, instantly sharing with hundreds of people or more

    Once the iPhone camera fully came of age, the steps became:

    1. Pull out my phone and shoot
    2. Tap to share

    Weeks reduced to seconds. The need to bring a physical object with me: gone. The monetary cost of photography: eliminated. And in many cases, the quality of the final product: dramatically better.

    The hassles of pre-iPhone photography: forgotten.

    The adjacent possibilities unlocked by the confluence of the iPhone’s camera and mobile connectivity:

    • Shareable HD video from anyone’s pocket
    • FaceTime and other wireless video calling
    • Document scanning
    • Snapchat, or more generally, the concept of photo messaging
    • Augmented reality

    There are so many examples of other things iOS has automated that we never even thought needed automating. Just look at your home screen. The iPhone is essentially a universal remote for modern life.

    Traditional computer automation (scripting, better inter-app communication, etc.) is a pretty narrow frontier of iOS automation yet to be fully solved. I’m not convinced that it even needs to be solved as long as we have traditional computers with open file systems. But I believe it will either be solved, or the need for solving it will be obviated by other advances in iOS.

    For now, I will continue to enjoy using iOS and macOS, which are much greater together than they are apart. It is impossible to predict the future, but I’m pretty sure we can rule out a “single device for all uses” scenario.

    Computers will continue to automate things we never associated with computers. We will continue looking for new problems. And we will continue forgetting about the tedium of times gone by.

    And, not or

    During Sal Soghoian’s appearance on Mac Power Users, he talks about his philosophy on “and, not or”:

    A lot of people mistakenly embrace the concept of or when it’s not necessary. There really needs to be and. And and doesn’t necessarily cost more… it just offers more.

    Every minute of this show is worth listening to because Sal exudes genius every time he speaks, but his “and, not or” philosophy is a seriously great piece of wisdom, and I hope that now that Sal is outside of Apple he has more opportunity to speak and write about it.

    In my experience—observing both myself and others—the “or” mindset usually leads to paralysis or unneeded time spent rebuilding an entire workflow to fit perfectly in a new framework.

    The most agile, modular solution is usually some of this and that. “Or” breeds an “all or nothing” approach that usually just ends in nothing. “And” moves things forward

    What’s the best computer for productivity? A MacBook and an iPad Pro.

    Where should I store notes? DEVONthink and Apple Notes.

    Where should I write? Drafts and Ulysses and Sublime Text.

    What’s the best way to outline? Plain text and iThoughts and OmniOutliner.

    What camera should I use? A DSLR and my iPhone.

    What’s the best way to sketch a visual design concept? Real paper and an Apple Pencil / iPad.

    Where do tasks belong? OmniFocus and Reminders and TaskPaper.

    What PDF app should I use for mark up? PDF Expert and LiquidText and Notability.

    In each case, the “and” mindset lets my mind get out of the way of itself. “And” imposes less friction between ideas and actions.

    LaTeX comes to Pages

    As you may have heard, Pages now supports LaTeX equations in both iOS and macOS. Even though it’s not nearly as robust as writing and typesetting LaTeX using MacTeX, it’s extremely well implemented and will be a huge convenience, especially for one-off files and shorter documents.

    I like how the Equation editor in Pages provides a live preview of the equation as you type it:

    As an added bonus, even though Keynote does not have the same direct LaTeX support as Pages, I found that you can copy the equation in Pages as an image and simply paste it into Keynote. The image appears to be a vector graphic because it scales perfectly without any resolution loss.

    In a nutshell, this means you can also quickly add equations to Keynote via Pages on the fly.

    LiquidText 3.0 redefines what's possible with a PDF and an iPad once again

    MacStories has a nice review of the latest update to LiquidText. At last, it supports the Apple Pencil.

    Part of what makes this version of LiquidText so amazing to use is that your finger and the Pencil can do different things. It’s like having two tools in your hand.

    Finger selections can make excerpts even while the Pencil is in drawing or highlighting mode. The Pencil can draw anywhere—not just on the PDF like most PDF editors, but even in the LiquidText workspace, right alongside your excerpts and comments.

    You can even drawn a circle or box around anything in the PDF, and it extracts it as an image to the workspace. The image can be copied to your clipboard and even pasted into other apps. This is the first time I’ve ever been able to capture a portion of a PDF as an image without having to screenshot the whole screen and crop in Photos. This opens a lot of possibilities—like being able to capture a graphic and paste it into an app like Notability, to collect it with other visual notes.

    The makers of LiquidText are really redefining what you can do with an iPad. Bigger picture, the iPad Pro + Apple Pencil + software like LiquidText, DEVONthink, PDF Expert, and Notability make for an incredible PDF system—one that is way more powerful than a traditional desktop computer.

    Next fun

    If a project, task, or reminder is stalled, overly deferred, or procrastinated, the correct next action is always: Decide how to make this fun.

    The cost of monetization

    David Heinemeier Hansson going off on monetization schemes:

    Consumption of monetized apps should always be pondered with skepticism. The whole lot of them fall into what we should label “a family of products with known mental carcinogens; further study recommended”.

    Consume or be consumed.