latex notes and sed replacement method