Italicizing inside a literal block

80 views
Skip to first unread message

Janmenjaya Panda

unread,
Jun 23, 2024, 12:39:09 AM (10 days ago) Jun 23
to sage-devel
Could someone please mention, how to italicize a particular term inside a literal block?
Use of `term` results as it is in the HTML document instead of italicizing it.

Thanks and warm regards,
Janmenjaya 

Emmanuel Charpentier

unread,
Jun 24, 2024, 3:28:42 PM (8 days ago) Jun 24
to sage-devel
"Literal" and "formatted" is an oxymoron.

David Roe

unread,
Jun 24, 2024, 11:27:14 PM (8 days ago) Jun 24
to sage-...@googlegroups.com
Could you explain more why you want to italicize something inside a literal block?
David

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/3c87586c-ac90-4998-84be-46dd4d938430n%40googlegroups.com.

Janmenjaya Panda

unread,
Jun 25, 2024, 8:56:12 AM (8 days ago) Jun 25
to sage-devel
Hi,

Consider the following description.

def is_matching_covered(self, matching=None, algorithm='Edmonds', coNP_certificate=False,
solver=None, verbose=0, *, integrality_tolerance=0.001):
r"""
Check if the graph is matching covered.

A connected nontrivial graph wherein each edge participates in some
perfect matching is called a `matching` `covered` `graph`.

If a perfect matching of the graph is provided, for bipartite graph,
this method implements a linear time algorithm as proposed in [LM2024]_
that is based on the following theorem:

Given a connected bipartite graph `G[A, B]` with a perfect matching
`M`. Construct a directed graph `D` from `G` such that `V(D) := V(G)`
and for each edge in `G` direct the corresponding edge from `A` to `B`
in `D`, if it is in `M` or otherwise direct it from `B` to `A`. The
graph `G` is matching covered if and only if `D` is strongly connected.

For nonbipartite graph, if a perfect matching of the graph is provided,
this method implements an `\mathcal{O}(|V| \cdot |E|)` algorithm, where
`|V|` and `|E|` are the order and the size of the graph respectively.
This implementation is inspired by the `M`-`alternating` `tree` `search`
method explained in [LZ2001]_. For nonbipartite graph, the
implementation is based on the following theorem:

Given a nonbipartite graph `G` with a perfect matching `M`. The
graph `G` is matching covered if and only if for each edge `uv`
not in `M`, there exists an `M`-`alternating` odd length `uv`-path
starting and ending with edges not in `M`.

The time complexity may be dominated by the time needed to compute a
maximum matching of the graph, in case a perfect matching is not
provided. Also, note that for a disconnected or a trivial graph, a
:class:`ValueError` is returned.


There are two paragraphs: 
1. Given a connected bipartite graph `G[A, B]` ... `D` is strongly connected, and
2. Given a nonbipartite graph `G` ... with edges not in `M`.

Note that these two paragraphs capture two theorems related to the algorithm that is implemented in that particular method. So, I thought it will be better to put them in a literal block, as it will be easy to read and will look good. 
For more info, you may please have a look at this PR.
I just realized that there is this `\mathcal{O}(|V| \cdot |E|)` that is there in the second theorem. So, in fact, it not only requires the variables to be italicized, but also requires the math mode. 


Thanks and warm regards,
Janmenjaya 
Message has been deleted

John H Palmieri

unread,
Jun 25, 2024, 3:53:17 PM (7 days ago) Jun 25
to sage-devel
It doesn't sound like you want a literal block, but rather a block quote or similar: a block of text that is parsed but highlighted somehow. Maybe (but this is untested)

.. rubric: Theorem

    include text here

Reply all
Reply to author
Forward
0 new messages