Notes: Difference between revisions

From Hackspire
Jump to navigation Jump to search
(Created page with "= Notes = == Raw == <syntaxhighlight lang="xml"> <wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0"> <np:mFlags>1024</np:mFlags> <np:value>3</np:value> <np:fmtxt>{ARBR...")
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Notes =
= Notes Meta-data=
== Raw ==
== Raw ==


Line 6: Line 6:
<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
<np:mFlags>1024</np:mFlags>
<np:mFlags>1024</np:mFlags>
<np:value>3</np:value>
<np:value>{TEMPLATE}</np:value>
<np:fmtxt>{ARBRE}</np:fmtxt>
<np:fmtxt>{TREE}</np:fmtxt>
</wdgt>
</wdgt>
</syntaxhighlight>
</syntaxhighlight>
Line 15: Line 15:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0"> <!-- Version 2.0 depuis que l'on peut ajouter des images? -->
<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0"> <!-- -->
<np:mFlags>1024</np:mFlags> <!--  -->
<np:mFlags>1024</np:mFlags> <!--  -->
<np:value>3</np:value> <!-- -->
<np:value>{TEMPLATE}</np:value> <!-- 1:Q&A 2:Proof 3:Default -->
<np:fmtxt>{ARBRE}</np:fmtxt> <!-- Le texte est stocké dans cet arbre -->
<np:fmtxt>{TREE}</np:fmtxt> <!-- Text is in this tree -->
</wdgt> <!--  -->
</wdgt> <!--  -->
</syntaxhighlight>
</syntaxhighlight>


= Notes Text-tree =
Text is stored in a tree beginning by <r2dtotree> and ending by </r2dtotree>.
All < , > , " , ect... should be written as &amp;lt; , &amp;gt;... Here they are transformed so you can read easily.
== Doc ==
<syntaxhighlight lang="xml">
<node name="1doc">{paragraphs}</node> <!-- If you put several 1doc, only the last one will be displayed (at least in "default" mode) -->
</syntaxhighlight>
== Paragraph ==
<syntaxhighlight lang="xml">
<node name="1para">{lines}</node> <!-- New paragraph each time you're forcing a new line (pressing "enter") -->
</syntaxhighlight>
== Line ==
<syntaxhighlight lang="xml">
<node name="1rtline">{words}</node> <!-- Stupidly recomputed by the nspire, so its often useless to create a new line -->
</syntaxhighlight>
== Word ==
Several types of words: 1word : normal // 1keyword : bold // 1subhead : italic // 1title : underline // 1subscrp : subscript // 1supersc : superscript . Thus, you can't have a bold underline word.
<syntaxhighlight lang="xml">
<leaf name="1{typeofword}">{text}</leaf> <!-- There should be a leaf per word, but you can put several word in a leaf (using regular spaces) -->
</syntaxhighlight>
== Cursor ==
Put this anywhere in the text (see raw examples). Putting more than one crashes the nspire.
<syntaxhighlight lang="xml">
<cursor index="0"/>
</syntaxhighlight>


= Raw exemple=
= Raw exemple=
Line 65: Line 106:
<leaf name="1word" continuation="1">
<leaf name="1word" continuation="1">
llllllllllllllllllllllllllllllllllllllllllllllllllllllll
llllllllllllllllllllllllllllllllllllllllllllllllllllllll
</leaf>
</node>
</node>
<node name="1para">
<node name="1rtline">
<leaf name="1word">
&amp;amp;é&amp;quot;&amp;apos;(-è_çà)=
</leaf>
</leaf>
</node>
</node>
Line 95: Line 128:
</r2dtotree>
</r2dtotree>
</np:fmtxt>
</np:fmtxt>
</wdgt>
<!-- Another example -->
<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
<np:mFlags>1024</np:mFlags>
<np:value>3</np:value>
<np:fmtxt>
    <r2dtotree>
        <node name="1doc">
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L1normal</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L2</leaf>
                    <leaf name="1keyword">gras</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L3</leaf>
                    <leaf name="1subhead">italique</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1subhead">L4</leaf>
                    <leaf name="1word">blabla</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1title">L5</leaf>
                    <leaf name="1title">souligné</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L6</leaf>
                    <leaf name="1supersc">up</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L7</leaf>
                    <leaf name="1subscrp">down</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">L8</leaf>
                    <leaf name="1word">on</leaf>
                    <leaf name="1title">mixxe|xx|</leaf>
                    <leaf name="1keyword">
                        <cursor index="0"/>eeee</leaf>
                    <leaf name="1keyword">==></leaf>
                    <leaf name="1keyword">fail</leaf>
                </node>
            </node>
            <node name="1para">
                <node name="1rtline">
                    <leaf name="1word">Et</leaf>
                    <leaf name="1word">ci</leaf>
                    <leaf name="1word">on</leaf>
                    <leaf name="1word">fait</leaf>
                    <leaf name="1word">ça?:</leaf>
                    <leaf name="1word"></leaf>
                    <leaf name="1keyword">11</leaf>
                    <leaf name="1title">22</leaf>
                    <leaf name="1keyword">11</leaf>
                </node>
            </node>
        </node>
    </r2dtotree>
</np:fmtxt>
</wdgt>
</wdgt>
</syntaxhighlight>
</syntaxhighlight>
[[Catégorie:XML format used in TNS&TNSP files]]

Latest revision as of 22:49, 29 January 2012

Notes Meta-data

Raw

<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
<np:mFlags>1024</np:mFlags>
<np:value>{TEMPLATE}</np:value>
<np:fmtxt>{TREE}</np:fmtxt>
</wdgt>

Explanation

<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">	<!--  -->
<np:mFlags>1024</np:mFlags>					<!--  -->
<np:value>{TEMPLATE}</np:value>					<!-- 1:Q&A 2:Proof 3:Default -->
<np:fmtxt>{TREE}</np:fmtxt>					<!-- Text is in this tree -->
</wdgt>								<!--  -->


Notes Text-tree

Text is stored in a tree beginning by <r2dtotree> and ending by </r2dtotree>.

All < , > , " , ect... should be written as &lt; , &gt;... Here they are transformed so you can read easily.


Doc

<node name="1doc">{paragraphs}</node> <!-- If you put several 1doc, only the last one will be displayed (at least in "default" mode) -->


Paragraph

<node name="1para">{lines}</node> <!-- New paragraph each time you're forcing a new line (pressing "enter") -->


Line

<node name="1rtline">{words}</node> <!-- Stupidly recomputed by the nspire, so its often useless to create a new line -->


Word

Several types of words: 1word : normal // 1keyword : bold // 1subhead : italic // 1title : underline // 1subscrp : subscript // 1supersc : superscript . Thus, you can't have a bold underline word.

<leaf name="1{typeofword}">{text}</leaf> <!-- There should be a leaf per word, but you can put several word in a leaf (using regular spaces) -->

Cursor

Put this anywhere in the text (see raw examples). Putting more than one crashes the nspire.


<cursor index="0"/>

Raw exemple

<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
	<np:mFlags>1024</np:mFlags>
	<np:value>3</np:value>
	<np:fmtxt>
		<r2dtotree>
			<node name="1doc">
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word">
							L1
						</leaf>
					</node>
				</node>
				
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word">
							L2
						</leaf>
					</node>
				</node>
				
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word">
							L3
						</leaf>
					</node>
				</node>
				
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word" continued="1">
							llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
						</leaf>
					</node>
					<node name="1rtline">
						<leaf name="1word" continuation="1">
							llllllllllllllllllllllllllllllllllllllllllllllllllllllll
						</leaf>
					</node>
				</node>
				
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word"/>
					</node>
				</node>
					
				<node name="1para">
					<node name="1rtline">
						<leaf name="1word">
							L10!
						<cursor index="0"/>
						</leaf>
						</node>
				</node>
				
			</node>
		</r2dtotree>
	</np:fmtxt>
</wdgt>

<!-- Another example -->

<wdgt xmlns:np="urn:TI.Notepad" type="TI.Notepad" ver="2.0">
 <np:mFlags>1024</np:mFlags>
 <np:value>3</np:value>
 <np:fmtxt>
     <r2dtotree>
         <node name="1doc">
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L1normal</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L2</leaf>
                     <leaf name="1keyword">gras</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L3</leaf>
                     <leaf name="1subhead">italique</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1subhead">L4</leaf>
                     <leaf name="1word">blabla</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1title">L5</leaf>
                     <leaf name="1title">souligné</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L6</leaf>
                     <leaf name="1supersc">up</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L7</leaf>
                     <leaf name="1subscrp">down</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">L8</leaf>
                     <leaf name="1word">on</leaf>
                     <leaf name="1title">mixxe|xx|</leaf>
                     <leaf name="1keyword">
                         <cursor index="0"/>eeee</leaf>
                     <leaf name="1keyword">==></leaf>
                     <leaf name="1keyword">fail</leaf>
                 </node>
             </node>
             <node name="1para">
                 <node name="1rtline">
                     <leaf name="1word">Et</leaf>
                     <leaf name="1word">ci</leaf>
                     <leaf name="1word">on</leaf>
                     <leaf name="1word">fait</leaf>
                     <leaf name="1word">ça?:</leaf>
                     <leaf name="1word"></leaf>
                     <leaf name="1keyword">11</leaf>
                     <leaf name="1title">22</leaf>
                     <leaf name="1keyword">11</leaf>
                 </node>
             </node>
         </node>
     </r2dtotree>
 </np:fmtxt>
</wdgt>


Catégorie:XML format used in TNS&TNSP files