I want to make a function that takes a function as a parameter and prints an integral with the function inside. I've tried this:
L[f_, a_, b_] := HoldForm[Integrate[f[x], {x, a, b}]]
L[E^-Sqrt[#] &, 0, 1]
But it gives me this:
$$\int_0^1 \left(e^{-\sqrt{\text{#1}}}\text{&}\right)[x] \, dx$$
I want the integrand to look normal, that's all, so I want the variable x to be substituted inside it, but not evaluated any further. Is this possible?