Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Indicator Function XMath
<?xml version="1.0" encoding="UTF-8"?>
<?latexml searchpaths="/home/dreamweaver/testbed"?>
<?latexml class="article"?>
<?latexml package="amsmath"?>
<?latexml RelaxNGSchema="LaTeXML"?>
<document xmlns="http://dlmf.nist.gov/LaTeXML">
<resource src="LaTeXML.css" type="text/css"/>
<resource src="ltx-article.css" type="text/css"/>
<para xml:id="p1">
<equation xml:id="S0.Ex1">
<Math mode="display" tex="\mathbf{1}_{A}(x):=\begin{cases}1&amp;\text{if }x\in A,\\&#10;0&amp;\text{if }x\notin A.\end{cases}" text="1 _ A * x assign cases@(1, [if ] * x element-of A, 0, [if ] * x not-element-of A)" xml:id="S0.Ex1.m1">
<XMath>
<XMApp>
<XMTok meaning="assign" role="RELOP">:=</XMTok>
<XMApp>
<XMTok meaning="times" role="MULOP">⁢</XMTok>
<XMApp>
<XMTok role="SUBSCRIPTOP" scriptpos="post2"/>
<XMTok font="bold" meaning="1" role="NUMBER">1</XMTok>
<XMTok font="italic" fontsize="70%" role="UNKNOWN">A</XMTok>
</XMApp>
<XMDual>
<XMRef idref="S0.Ex1.m1.5"/>
<XMWrap>
<XMTok role="OPEN" stretchy="false">(</XMTok>
<XMTok font="italic" role="UNKNOWN" xml:id="S0.Ex1.m1.5">x</XMTok>
<XMTok role="CLOSE" stretchy="false">)</XMTok>
</XMWrap>
</XMDual>
</XMApp>
<XMDual>
<XMApp>
<XMTok meaning="cases"/>
<XMRef idref="S0.Ex1.m1.1"/>
<XMRef idref="S0.Ex1.m1.2"/>
<XMRef idref="S0.Ex1.m1.3"/>
<XMRef idref="S0.Ex1.m1.4"/>
</XMApp>
<XMWrap>
<XMTok role="OPEN" stretchy="true">{</XMTok>
<XMArray>
<XMRow>
<XMCell align="left">
<XMTok meaning="1" role="NUMBER" xml:id="S0.Ex1.m1.1">1</XMTok>
</XMCell>
<XMCell align="left">
<XMDual xml:id="S0.Ex1.m1.2">
<XMRef idref="S0.Ex1.m1.2.1"/>
<XMWrap>
<XMApp xml:id="S0.Ex1.m1.2.1">
<XMTok meaning="element-of" name="in" role="RELOP">∈</XMTok>
<XMApp>
<XMTok meaning="times" role="MULOP">⁢</XMTok>
<XMText>if </XMText>
<XMTok font="italic" role="UNKNOWN">x</XMTok>
</XMApp>
<XMTok font="italic" role="UNKNOWN">A</XMTok>
</XMApp>
<XMTok role="PUNCT">,</XMTok>
</XMWrap>
</XMDual>
</XMCell>
</XMRow>
<XMRow>
<XMCell align="left">
<XMTok meaning="0" role="NUMBER" xml:id="S0.Ex1.m1.3">0</XMTok>
</XMCell>
<XMCell align="left">
<XMDual xml:id="S0.Ex1.m1.4">
<XMRef idref="S0.Ex1.m1.4.1"/>
<XMWrap>
<XMApp xml:id="S0.Ex1.m1.4.1">
<XMTok meaning="not-element-of" name="notin" role="RELOP">∉</XMTok>
<XMApp>
<XMTok meaning="times" role="MULOP">⁢</XMTok>
<XMText>if </XMText>
<XMTok font="italic" role="UNKNOWN">x</XMTok>
</XMApp>
<XMTok font="italic" role="UNKNOWN">A</XMTok>
</XMApp>
<XMTok role="PERIOD">.</XMTok>
</XMWrap>
</XMDual>
</XMCell>
</XMRow>
</XMArray>
</XMWrap>
</XMDual>
</XMApp>
</XMath>
</Math>
</equation>
</para>
</document>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment