Skip to content

Instantly share code, notes, and snippets.

@sampollard
Created April 8, 2020 04:06
Show Gist options
  • Save sampollard/cc9d8640e1b3b1a501150dc071dd1676 to your computer and use it in GitHub Desktop.
Save sampollard/cc9d8640e1b3b1a501150dc071dd1676 to your computer and use it in GitHub Desktop.
Italicise every other character in LaTeX
#!/bin/bash
# usage: ital.sh <filename>
echo '/\\begin{document}/+,/\\end{document}/-s/\(.\)\(.\)/\\emph{\1}\2/g | w' | vim -e "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment