Revising an academic paper is really a hard work. What makes things worse is that WinEdit used by my advisor is only capable of handling .tex files with CRLF
line breaks while TeXShop.app uses LF
as a line ending.
Although I can use other applications like TextWrangle.app to convert text files between the two formats, I really do not want to open an extra window. So I find unix2dox, a command line tool that is developed to “convert text between DOS, UNIX, and Mac formats”. And with Automator, I get a better solution.
-
Install unix2dos:
brew install unix2dos
-
Create a new service in Automator. Drag a “Run Shell Script” action from the Library and type in the following commands:
for f in "$@"
do
unix2dos "$f"
done
Make sure that choose “as argument” for the option “Pass input”.
- “unix2dos” will show up in the services when you right click on any text files.