# Print JuMP model in IJulia in plain text (i.e. non-LaTeX)

**URL:** <https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [October 26, 2022, 7:36am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276 "2022-10-26T07:36:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleimgruber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fleimgruber/32/16127_2.png) [@fleimgruber](https://discourse.julialang.org/u/fleimgruber)\
**Post date:** [October 26, 2022, 7:37am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276/1 "2022-10-26T07:37:00Z")

</div>

I want to use JuMP with the IJulia server, but in a reduced editing environment, i.e. not inside a browser. For this reason I want a call to `print(model)` to print in plain text instead of LaTeX. I found (old) code examples where I tried `print(model; latex=false)` but that does not work. The [docs](https://jump.dev/JuMP.jl/stable/moi/submodules/Utilities/overview/#Printing) say that IJulia will use LaTeX per default, but no mention of changing that behaviour.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [October 26, 2022, 8:07am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276/2 "2022-10-26T08:07:45Z")

</div>

What is the motivation?

Try `print(stdout, model)`

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fleimgruber/32/16127_2.png) [@fleimgruber](https://discourse.julialang.org/u/fleimgruber)\
**Post date:** [October 26, 2022, 8:31am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276/3 "2022-10-26T08:31:07Z")

</div>

Thanks for the answer! Motivation: I am using a plain text interface, specifically [Org mode](https://orgmode.org/) inside Emacs with [emacs-jupyter](https://github.com/nnicandro/emacs-jupyter) to interact with an IJulia server. emacs-jupyter and Org mode can render LaTeX as well, but sometimes just plain text works better for me.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [October 26, 2022, 8:59am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276/4 "2022-10-26T08:59:02Z")

</div>

> Thanks for the answer!

Did it work?

I think we decided against keeping `latex = false` because the only situation where it would be needed is somewhere with a `text/latex` backend that the user didn’t want to use. It still seems sufficiently niche that I don’t know if we want to bring it back. Often printing the model isn’t very helpful anyway. It works for toy models when teaching, but it isn’t helpful for printing any models of a reasonable size.

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fleimgruber/32/16127_2.png) [@fleimgruber](https://discourse.julialang.org/u/fleimgruber)\
**Post date:** [October 26, 2022, 9:07am UTC](https://discourse.julialang.org/t/print-jump-model-in-ijulia-in-plain-text-i-e-non-latex/89276/5 "2022-10-26T09:07:57Z")

</div>

> Did it work?

Yes, thanks, that’s why I marked your answer as a solution.

My situation is exactly the one you described. I agree to your reasoning about it being niche and indeed it is only for teaching purposes. `latex = false` was just something I found and tried. Your solution works well and I would even consider it better than the API option.
