-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FiniteStateMachine._latex_: more options, better documentation #16207
Comments
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
comment:5
trac's automerge fails. Patch is based on 6.2.beta8, it merges cleanly with 6.2.rc0. |
Reviewer: Daniel Krenn |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
Changed branch from u/cheuberg/fsm/latex-improved to u/dkrenn/fsm/latex-improved |
comment:12
finished my review; everything is fine; corrected one PEP8-spacing. New commits:
|
Changed branch from u/dkrenn/fsm/latex-improved to |
Improved
FiniteStateMachine._latex_
:use state iterators instead of lists
move code format_transition_label
collect tikz options in array
typeset final_word_out, introduce relevant options: if a final state has an attribute final_word_out, this is typeset as a leaving edge. This is in preparation for FiniteStateMachine: implement final_word_out #16191
new method
latex_options
: Provide a new convenience function collecting all options for LaTeX output. While all of its functionality can also be achieved by directly setting attributes ofFiniteStateMachine
,FSMState
andFSMTransition
, this function also (somewhat) checks its input and serves to collect documentation on all these options.Added a section in the introduction to the module explaining how to latex a FiniteStateMachine and pointing to this method for details.
Similarly, expanded explanations in
setup_latex_preamble
.Use
latex_options
in other doctest instead of direct attribute assignmentnew method
default_format_transition_label
: Previously, when no custormFiniteStateMachine.format_transition_label
was provided by the user, words have simply typeset by calling latex. As words are always lists, parentheses [ ] have always been printed.This new default method typesets words by juxtaposition of their letters, the letters are piped through
format_letter
first. The latter now defaults to latex.Finally,
format_transition_label
is by default set todefault_format_transition_label
in the hope of providing a sensible default value.Convenience Formatting functions for digit problems: When using negative digits, it is quite customary to write e.g.
\overline{1}
instead of-1
in LaTeX. IntroduceFiniteStateMachine.format_letter_negative
for this purpose.Furthermore, In digit expansions, digits are frequently processed from the least significant to the most significant position, but it is customary to write the least significant digit at the right-most position. Therefore, the labels have to be reversed. Provide a method
FiniteStateMachine.format_transition_label_reversed
for this purpose.Depends on #16132
Depends on #16145
Depends on #16146
Depends on #16200
Depends on #16205
CC: @dkrenn @sagetrac-skropf
Component: combinatorics
Author: Clemens Heuberger
Branch/Commit:
e5a3191
Reviewer: Daniel Krenn
Issue created by migration from https://trac.sagemath.org/ticket/16207
The text was updated successfully, but these errors were encountered: