The Scripta Sinica Database 漢籍電子文獻資料庫 is a treasure house for scholars of premodern China, especially those fortunate to have institutional subscription to the proprietary portions. I use this database regularly, but occasionally I run into a small technical problem: when copying texts from the database (in my case, always as plain text), what to do with the occasional interlinear annotations, like the following:
If I copy the text before expanding the annotations, I will have the main text but not the annotations. If I copy everything after expanding the annotations, I get a text that contains both the main text and the annotations jumbled together. Needless to say, this would be very confusing to read.
Ideally, I want to save a copy of the main text followed by all annotations at the bottom, like this:
Up to now, I have always copy-pasted the annotations one by one. But recently, I became irritated by the time-consuming process. So I started asking: How can I copy all annotations at once and save my precious time?
Fortunately, it turns out that there is an easy trick for Mac users. (I’m sure similar solutions are available on Windows. If anyone is aware of one, please let me know.)
- After expanding the annotations, copy everything and paste it into TextEdit:
- Select one or more characters from any of the annotations:
- Go to Format>Font>Styles. You should see a window like the following. Click on “Select.”
- Check “Select by style” (uncheck everything else), and select “Select within entire document” (default setting). Now click on “Select.”
- All the annotations should be automatically selected. Copy and paste into your working file, and voilà, you have all the annotations. Happy copying!