Opened 7 years ago

Closed 7 years ago

# FiniteStateMachine._latex_: typeset state labels in math mode

Reported by: Owned by: cheuberg major sage-6.2 combinatorics finite_state_machine dkrenn, skropf Clemens Heuberger Daniel Krenn N/A 4d389d9 4d389d92b022cb0b8a49b4884e8635d0fb0ae9a4

### Description

Currently, state labels are not typeset in LaTeX's math mode, but transition labels are. Furthermore, the default behaviour is to pipe the label through latex(), which by definition produces output suitable for math mode. Therefore, I consider this to be a bug and change the behaviour.

This is an incompatible change; however, relying on the old behaviour will either make no difference (if the label was an integer or a string (this is protected by \text anyway)) or lead to an error when typesetting with tikz.

While doing that, I also include a space after the comma in the coordinate tuples (PEP 8 probably does not apply to TeX code included in a docstring, but nevertheless ...).

### comment:1 Changed 7 years ago by cheuberg

• Branch set to u/cheuberg/fsm/latex-state-label

### comment:2 Changed 7 years ago by cheuberg

• Commit set to 4d389d92b022cb0b8a49b4884e8635d0fb0ae9a4
• Status changed from new to needs_review

New commits:

 ​4d389d9 FiniteStateMachine._latex_: typeset state labels in math mode (#16200)

### comment:3 Changed 7 years ago by dkrenn

• Reviewers set to Daniel Krenn
• Status changed from needs_review to positive_review

reviewed changes, code is ok, doctests pass, documentation builds --> positive_review

### comment:4 Changed 7 years ago by vbraun

• Branch changed from u/cheuberg/fsm/latex-state-label to 4d389d92b022cb0b8a49b4884e8635d0fb0ae9a4
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.