This answer is in addition to Sjoerd's answer.
First of all, we do not need to use the FrontEnd Cell > Convert to > InputForm to get the linear shape of the boxes. We can get it by simply applying an InputForm to the output of the MakeBoxes :
In[1]:= InputForm@MakeBoxes[Subscript[x, 1,2]==(-b\[PlusMinus]Sqrt[b^2-4 ac])/(2 a)] Out[1]
Secondly, we can export the final string string string representation of the boxes in two ways with the equivalent result (the only difference is that Put wraps the text):
OutputForm@ StringInsert[ ToString[ InputForm@ MakeBoxes[ Subscript[x, 1, 2] == (-b \[PlusMinus] Sqrt[b^2 - 4 ac])/( 2 a)], OutputForm], "\\!", 1] >> "C:\\input.txt" Export["C:\\input.txt", StringInsert[ ToString[InputForm@ MakeBoxes[ Subscript[x, 1, 2] == (-b \[PlusMinus] Sqrt[b^2 - 4 ac])/(2 a)], OutputForm], "\\!", 1], "String"]
In both cases, we get a file with one line: \!\(x\_\(1, 2\) == \(\(-b\) ± \@\(b\^2 - \(4\ a\ c\)\)\)\/\(2\ a\)\) .
Inserting this line into Notepad in FrontEnd gives the original expression (try it yourself!):

Alexey Popkov Jun 21 2018-11-21T00: 00Z
source share