Skip to content

Instantly share code, notes, and snippets.

@BaoshanPang
BaoshanPang / emacs_shr_sup_override.md
Last active March 4, 2025 19:12
override shr-tag-sup to display 'superscript' in a better way

When emacs in text mode, the 'shr' is not rendering the superscript corretly. For this html snippet:

<strong>Explanation:</strong> 12 = 3<sup>1</sup> + 3<sup>2</sup>

It would be rendered as this: Explanation: 12 = 31 + 32

This is really confusing especially when you don't know what html was given.

By override the shr-tag-sup function, it would be rendered like this:

@BaoshanPang
BaoshanPang / build_cross_gcc
Last active September 14, 2015 21:31 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.