Ask Your Question

Is it possible to customize the default behavior of sagetex?

asked 2018-12-24 12:19:35 -0500

done_with_fish gravatar image

When using sagetex, I want my matrices to have square brackets and my vectors to have angled brackets. Hence, the first thing I do after \begin{document} is include the code

    latex.matrix_delimiters(left='[', right=']')
    latex.vector_delimiters(left='<', right='>')

This is very annoying. Is it possible to set sagetex up to do this by default?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-02-20 08:49:27 -0500

Juanjo gravatar image

You can follow the strategy given in my answer to this question you made later. For the sake of completeness, I adapt it here.

Write a tex file with all the code you need to config SageTeX:

   latex.matrix_delimiters(left='[', right=']')
   latex.vector_delimiters(left='<', right='>')

Call it, for example, STconfig.tex. Then write a small package mysagetex.sty with the following content:

\ProvidesPackage{mysagetex}[2019/02/20 v.0.1]

Put both files together where TeX can find them. In the source tex file, it suffices to load mysagetex instead of sagetex, e.g., add \usepackage{mysagetex} to the preamble.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-12-24 12:19:35 -0500

Seen: 104 times

Last updated: Feb 20