Notes: Difference between revisions

From Hackspire
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
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>{TREE}</np:fmtxt>
<np:fmtxt>{TREE}</np:fmtxt>
</wdgt>
</wdgt>
Line 17: Line 17:
<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> <!-- 1:Q&A 2:Proof 3:Default -->
<np:fmtxt>{TREE}</np:fmtxt> <!-- Text is in this tree -->
<np:fmtxt>{TREE}</np:fmtxt> <!-- Text is in this tree -->
</wdgt> <!--  -->
</wdgt> <!--  -->
Line 27: Line 27:
Text is stored in a tree beginning by <r2dtotree> and ending by </r2dtotree>.
Text is stored in a tree beginning by <r2dtotree> and ending by </r2dtotree>.


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




== Doc ==
== Doc ==
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<node name="1doc">{paragraphs}</node> <!-- I could not find a way to have several of these in the tree. -->
<node name="1doc">{paragraphs}</node> <!-- If you put several 1doc, only the last one will be displayed (at least in "default" mode) -->
</syntaxhighlight>
</syntaxhighlight>


Line 44: Line 44:
== Line ==
== Line ==
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<node name="1rtline">{words}</node> <!-- New line when it makes a new line due to screen size not being infinite. Not sure if you must put several of them because it depends on font size. -->
<node name="1rtline">{words}</node> <!-- Stupidly recomputed by the nspire, so its often useless to create a new line -->
</syntaxhighlight>
</syntaxhighlight>


Line 52: Line 52:
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.
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">
<syntaxhighlight lang="xml">
<leaf name="1{typeofword}">{text}</leaf> <!-- There should be a leaf per word, but maybe you can bypass it and put a word per line -->
<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>
</syntaxhighlight>


Line 97: 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 129: Line 130:
</wdgt>
</wdgt>


<!-- Another example (not properly indented) -->
<!-- Another example -->


<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>3</np:value>
<np:fmtxt>
<np:fmtxt>
<r2dtotree>
    <r2dtotree>
<node name="1doc">
        <node name="1doc">
<node name="1para">
            <node name="1para">
<node name="1rtline">
                <node name="1rtline">
<leaf name="1word">L1normal</leaf>
                    <leaf name="1word">L1normal</leaf>
</node>
                </node>
</node>
            </node>
<node name="1para">
            <node name="1para">
<node name="1rtline">
                <node name="1rtline">
<leaf name="1word">L2 </leaf>
                    <leaf name="1word">L2</leaf>
<leaf name="1keyword">gras</leaf>
                    <leaf name="1keyword">gras</leaf>
</node>
                </node>
</node>
            </node>
<node name="1para">
            <node name="1para">
<node name="1rtline">
                <node name="1rtline">
<leaf name="1word">L3  
                    <leaf name="1word">L3</leaf>
</leaf>
                    <leaf name="1subhead">italique</leaf>
<leaf name="1subhead">italique</leaf>
                </node>
</node>
            </node>
</node>
            <node name="1para">
<node name="1para">
                <node name="1rtline">
<node name="1rtline">
                    <leaf name="1subhead">L4</leaf>
<leaf name="1subhead">L4 </leaf>
                    <leaf name="1word">blabla</leaf>
<leaf name="1word">blabla</leaf>
                </node>
</node>
            </node>
</node>
            <node name="1para">
<node name="1para">
                <node name="1rtline">
<node name="1rtline">
                    <leaf name="1title">L5</leaf>
<leaf name="1title">L5 </leaf>
                    <leaf name="1title">souligné</leaf>
<leaf name="1title">souligné</leaf>
                </node>
</node>
            </node>
</node>
            <node name="1para">
<node name="1para">
                <node name="1rtline">
<node name="1rtline">
                    <leaf name="1word">L6</leaf>
<leaf name="1word">L6 </leaf>
                    <leaf name="1supersc">up</leaf>
<leaf name="1supersc">up</leaf>
                </node>
</node>
            </node>
</node>
            <node name="1para">
<node name="1para">
                <node name="1rtline">
<node name="1rtline">
                    <leaf name="1word">L7</leaf>
<leaf name="1word">L7 </leaf>
                    <leaf name="1subscrp">down</leaf>
<leaf name="1subscrp">down</leaf>
                </node>
</node>
            </node>
</node>
            <node name="1para">
<node name="1para">
                <node name="1rtline">
<node name="1rtline">
                    <leaf name="1word">L8</leaf>
<leaf name="1word">L8 </leaf>
                    <leaf name="1word">on</leaf>
<leaf name="1word">on </leaf>
                    <leaf name="1title">mixxe|xx|</leaf>
<leaf name="1title">mixxe|xx|</leaf>
                    <leaf name="1keyword">
<leaf name="1keyword"><cursor index="0"/>eeee </leaf>
                        <cursor index="0"/>eeee</leaf>
<leaf name="1keyword">==> </leaf>
                    <leaf name="1keyword">==></leaf>
<leaf name="1keyword">fail</leaf>
                    <leaf name="1keyword">fail</leaf>
</node>
                </node>
</node>
            </node>
<node name="1para">
            <node name="1para">
<node name="1rtline">
                <node name="1rtline">
<leaf name="1word">Et </leaf>
                    <leaf name="1word">Et</leaf>
<leaf name="1word">ci </leaf>
                    <leaf name="1word">ci</leaf>
<leaf name="1word">on </leaf>
                    <leaf name="1word">on</leaf>
<leaf name="1word">fait </leaf>
                    <leaf name="1word">fait</leaf>
<leaf name="1word">ça?: </leaf>
                    <leaf name="1word">ça?:</leaf>
<leaf name="1word"> </leaf>
                    <leaf name="1word"></leaf>
<leaf name="1keyword">11</leaf>
                    <leaf name="1keyword">11</leaf>
<leaf name="1title">22</leaf>
                    <leaf name="1title">22</leaf>
<leaf name="1keyword">11</leaf>
                    <leaf name="1keyword">11</leaf>
</node>
                </node>
</node>
            </node>
</node>
        </node>
</r2dtotree>
    </r2dtotree>
</np:fmtxt>
</np:fmtxt>
</wdgt>
</wdgt>
</syntaxhighlight>
</syntaxhighlight>

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