ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 Aug 2018 17:51:51 +0200LaTeX shortcuts in iPython Notebookhttps://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/ Is there a way to load a file containing many LaTeX shortcuts (like `\newcommand{...}{...}`) into an iPython notebook, so that these can be used throughout?
Or is it possible to add to a (hopefully hidden) cell? If so, what would be the syntax?Tue, 21 Aug 2018 22:43:46 +0200https://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/Comment by John Palmieri for <p>Is there a way to load a file containing many LaTeX shortcuts (like <code>\newcommand{...}{...}</code>) into an iPython notebook, so that these can be used throughout?</p>
<p>Or is it possible to add to a (hopefully hidden) cell? If so, what would be the syntax?</p>
https://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/?comment=43439#post-id-43439Does `latex.add_to_preamble(r"\newcommand{...}{...}")` do what you want?Tue, 21 Aug 2018 23:41:20 +0200https://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/?comment=43439#post-id-43439Comment by lrfinotti for <p>Is there a way to load a file containing many LaTeX shortcuts (like <code>\newcommand{...}{...}</code>) into an iPython notebook, so that these can be used throughout?</p>
<p>Or is it possible to add to a (hopefully hidden) cell? If so, what would be the syntax?</p>
https://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/?comment=43446#post-id-43446No, it does not work. (Assuming you run that command in a cell or load it from a file.) But thanks for the suggestion!Wed, 22 Aug 2018 17:51:51 +0200https://ask.sagemath.org/question/43437/latex-shortcuts-in-ipython-notebook/?comment=43446#post-id-43446