Fix a non-empty open domain $\Omega\subseteq \mathbb{R}^d$ with compact closure, and a finite Borel measure $\mu$ on its closure $\overline{\Omega}$. 


In Halmos' book it is shown that:


**Classical Result:**
\*For any *bounded function* $f\in L^p\_{\mu}(\Omega;\mathbb{R})$ and every $\epsilon >0$, there exists a continuous function $g$ such that
$$
\int\_{x \in \Omega} |f(x)-g(x)|^p \mu(dx) < \epsilon.
$$\*


**Reference/Question:**
Is there an analogue of this result for the *Musielak–Orlicz spaces*? 


More specifically, I'm wondering if $p:\Omega\rightarrow \mathbb{R}$ is a measurable function satisfying the usual conditions ([for example see this paper](https://pdf.sciencedirectassets.com/272578/1-s2.0-S0022247X00X00182/1-s2.0-S0022247X01976188/main.pdf?x-amz-security-token=AgoJb3JpZ2luX2VjEPH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQDio3AjSQMZskT8%2BlM3xBKb5PN8bcJgx%2BPggGEo4xduOAIhAPRhiEGMz4OcWzb6GRsW1GmAuIj94BraC3tgbeRvE4NwKuMDCOn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMMDU5MDAzNTQ2ODY1IgyCZuE%2BlfyRUswhf0YqtwO6SdMyiXbPMy6IF4xo53tojXqTtOlt5tdGCDPE9B4QIHKCbMH0br%2BJOHVawOaCFlKZ%2Bx1EgkPJY5q%2FMqOPJgd2dd%2FUuk9De8DvYCHkNUc%2Bt%2F%2FMGuMArV1WLbHgMWSyMSNndxgoQU4%2FnB6WkN8z8KgkTpdZmLXrPnWG8qV8S1ZyYt5AP5b06z7M9n6ilr5z2qG2wRfP3xn%2BG36Lv8p3Aq5yMKD501%2Ff5DsC2sLwdZQTvvpK%2Fftfz%2F13ZQSMX01nt4sHK7BUVxSrnfWdG2DxU7gH6XShYlfD%2FiRulUERMn0zZbl%2BFgfUyypcvD2Ei%2FZHyUTMGsx8o18RQXjG3%2FtVqV9FN%2FOCWOGjfix9v9nxKlY5FzKi%2F5pRbEjvQeZdKC0HJwl%2FliLeMEIbLRxUcwI%2FflqNfgXcsG9acDIba%2B2i89%2BCQZAp7MVcpokTdORSMevhKXotWdMZKliv3%2FtOlIQedXnqDwgEoXdn7x2zAe3mnIS7vJMhgFcBV%2FpMmsD7MNnkpZ3CxUzgNGpgXL0qAwlb%2B1pKlMxivt4yZWbMzzHFccuPxJnTKUTJcSaAukWiZfZ1228J7pEY3p1oMPqW7%2BYFOrMBVUfoKp3prGFApAbBRoFQ5m7B9%2BdzbVtWz05mO5XjzBNEYDRM%2BBIdIetHwu20E%2BC33fr18hNKwVnqkAtsK33QEYscf8uM4iLacHgZLFo8Vk4Vf1bLbnnjuwiRDeshFgmv4tbYGNhVrcQLNW0VpcEX16g33L2rrRpnZK%2FkTDLtYKJzcVjnBAe1SjAUjH962yUxqPtakHfO9yT5CigLeYeI6wDwvC5eA3vSmxvcnYC%2Fxztcge4%3D&AWSAccessKeyId=ASIAQ3PHCVTYQXGPTMN2&Expires=1557912442&Signature=2MeZStSLy4yh9aeuRPbFXCx%2BUn0%3D&hash=bfd4279aebb19e53b658c05f4c2cecbf40fa873285ee5d438ffe453b9c409f98&host=68042c943591013ac2b2430a89b270f6af2c76d8dfd086a07176afe7c76c2c61&pii=S0022247X01976188&tid=spdf-02ec9a6e-a8f1-450e-8d47-4cb63b396182&sid=7991127238e0c147f95a3279620c89386b9fgxrqb&type=client)), and 
$
f \in L^{p(x)}\_{\mu}(\Omega),$
then for every $\epsilon>0$, can we find a continuous function $g$ on $\overline{\Omega}$ such that
$$
\|f-g\|\_{\mu,p}<\epsilon,
$$


**Background:**
Where in the above:
$$ 
L^{p(x)}\_{\mu}(\Omega)\triangleq \left\{
f:\Omega \rightarrow \mathbb{R}: \mbox{f is measurable and } \int\_{x \in \overline{\Omega}} |f(x)|^{p(x)} \mu(dx)<\infty
\right\},
$$
and can be seen to be a Musielak–Orlicz space space under the Luxemburg norm $\|\cdot\|\_{\mu,p}$ defined by
$$
\|f\|\_{\mu,p}\triangleq 
\inf\left\{
\lambda >0 : 
\int\_{x \in \overline{\Omega}} \left(\frac{|f(x)|}{\lambda}\right)^{p(x)} \mu(dx) \leq 1
\right\}
.
$$



Reference Request: $L^p(x)$/(Musielak–Orlicz space) analogue of classical $L^p$ result
Yes this is true (in the variable exponent's case which was the objective of the question). 


See [Theorem 3.4.12 of this book:](http://www.mathematik.uni-muenchen.de/~diening/archive/book.pdf#equation.3.4.12) "Lebesgue and Sobolev spaces with variable exponents" by "Lars Diening, Petteri Harjulehto,Peter Hästö, and Michael Růžička". 


