# HoldForm -> InputForm without processing the contents

I have programmatically generated a large number of simple equations like 1+1/2. I need them to be 'unprocessed', so they've been run through HoldForm[] and appear like

The problem is, for the next stage in my work (which will take place outside of Mathematica), I really need these to be in InputForm, but still unprocessed. In other words, I need 1+1/2, not 1.5 or the "prettier" form shown above.

Is there any way to transform a StandardForm equation inside HoldForm into a InputForm while still "holding" it unprocessed?

• Could you expand on what you need to do in your next step where you say that you need the expressions to be in InputForm? – MarcoB Oct 3 '15 at 3:46
• The replacement HoldForm[x__] :> HoldForm[InputForm[x]] seems to do what you want. – Stephen Luttrell Oct 3 '15 at 9:00

You can convert an expression to InputForm without evaluating the expression by using the following construction:
expression /. HoldForm[x__] :> HoldForm[InputForm[x]]

Unfortunately, I can't illustrate this here with your 1+1/2 example, because there is no way (that I can see) to input 2-dimensional expressions!
• It's not exactly readable, but you can represent the boxes like so: $$1 + \(1 \/ 2$$\). Or to get the expression: \!$$1 + \(1 \/ 2$$\). – rhennigan Oct 3 '15 at 19:19