I didn't not understand your question, I am french.

But I use show(LatexExpr(r" c'est  \ en \ français") ) for the text

show(LatexExpr(r" \sqrt x^2") ) for maths and I obtain nice things

Le 03/11/2021 à 09:17, 'Martin R' via sage-support a écrit :
Sorry for answering my own question.

It seems that

sage: P = Poset([[1,2,3,4], [[1,2], [2,3], [1,4]]])
sage: e = {i: LatexExpr("q^%s" % i) for i in P}
sage: c = {(i,j): LatexExpr("%s^%s" % (i, j)) for i, j in P.cover_relations()}

sage: H = P.hasse_diagram()
sage: [H.set_edge_label(v1, v2, c[(v1, v2)]) for v1, v2 in P.cover_relations()]
sage: H.relabel({v: e[v] for v in P})
sage: H.set_latex_options(format="dot2tex", edge_labels=True)
sage: view(H)

works.
Martin R schrieb am Dienstag, 2. November 2021 um 19:37:34 UTC+1:

    is it possible to display a poset with (LaTeX) labels on the
    covering relations and (LaTeX) labels on the vertices?

    For example:

    sage: P = Poset([[1,2,3,4], [[1,2], [2,3], [1,4]]])
    sage: e = {i: "$q^%s$" % i for i in P}
    sage: c = {(i,j): "$%s^%s$" % (i, j) for i, j in P.cover_relations()}
    sage: P.plot(element_labels=e, cover_labels=c)

    This almost works.  Unfortunately, the layout is not the dot2tex
    layout, which I need because my posets are large, and it displays
    'None' instead of the edge label.

    Martin

--
You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/91981ecf-1172-4a75-8f4e-8189aa83502bn%40googlegroups.com <https://groups.google.com/d/msgid/sage-support/91981ecf-1172-4a75-8f4e-8189aa83502bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/69d4c584-6851-75ac-ad22-41cbe83dab36%40gmail.com.

Reply via email to