"Of course, your R options and/or code lines will be polluted, but I think
it can solves/work around this problem. ;-)"

Thank you Leslie. But Sweave is usefull **because** it just runs the R code
with no modification...

I'm currently testing another approach to avoid the problem. I will show you
when it's done ! =o)

Thank you very much.

david

2009/1/9 Leslie Harlley Watter <les...@watter.org>

> Hi David,
>
> I don't know if your problem is only with the < and  > simbols, but you
> can write a postproc like this:
>
> %!postproc(tex): '-LT-' '<'
> %!postproc(tex): '-GT-' '>'
>
> Of course, your R options and/or code lines will be polluted, but I think
> it can solves/work around this problem. ;-)
>
> Cheers,
>
>
> Leslie
>
> Em Wed, Jan 07, 2009 at 02:57:48PM +0100, David Hajage escreveu o seguinte:
> >) Date: Wed, 7 Jan 2009 14:57:48 +0100
> >) From: David Hajage <dhajag...@gmail.com>
> >) To: Leslie Harlley Watter <les...@watter.org>
> >) Subject: Re: [t2t] Feature request ?
> >) Cc: txt2tags mailing list <txt2tags-list@lists.sourceforge.net>
> >)
> >) Thank you Leslie.
> >)
> >) One problem is that <<options>>= could be several things, for example:
> >) <<tabAge,echo=F,results=verbatim>>=
> >) or
> >) <<otherTitle,echo=T,fig=T>>=
> >)
> >) But I could make several lines of preproc, so I think this part is ok.
> >)
> >) But when I use txt2tags, despite the use of """, some R code is modified
> by
> >) txt2tags. For example, '2+2<5' becomes '2+2$<$5' in latex, and '2+2 &lt;
> 3' in
> >) html.
> >)
> >) I think I can't use a postproc line there, because I don't want to
> replace all
> >) $<$ or &lt; by < in my document (only for R code, not for all the text).
> """
> >) don't protect enough my code...
> >)
> >) 2009/1/7 Leslie Harlley Watter <les...@watter.org>
> >)
> >)     Hi David,
> >)
> >)     You can use postproc to add <<options>>= like as you want:
> >)
> >)     try adding these to your heading:
> >)
> >)     %!postproc(tex): '-ROPTIONS-' '<<options>>='
> >)
> >)     and your options block quote will be like this:
> >)
> >)     -ROPTIONS-
> >)     """
> >)     2+2
> >)     @
> >)     """
> >)
> >)     I've put the three quotes to t2t don't interpret the block.
> >)
> >)     Cheers,
> >)
> >)     LEslie
> >)
> >)
> >)
> >)
> >)     Em Wed, Jan 07, 2009 at 10:51:57AM +0100, David Hajage escreveu o
> seguinte:
> >)     >) Date: Wed, 7 Jan 2009 10:51:57 +0100
> >)     >) From: David Hajage <dhajag...@gmail.com>
> >)     >) To: txt2tags-list@lists.sourceforge.net
> >)     >) Subject: [t2t] Feature request ?
> >)     >) Reply-To: txt2tags mailing list <
> txt2tags-list@lists.sourceforge.net>
> >)     >)
> >)     >) Hello txt2tags users and developpers.
> >)     >)
> >)     >) I've just discovered txt2tags, and I absolutely love this program
> !
> >)     Thank you
> >)     >) very much !
> >)     >)
> >)     >) I'm also an R user (R is a free software environment for
> statistical
> >)     computing
> >)     >) and graphics : http://www.r-project.org/). R has a fantastic
> tool called
> >)     >) Sweave. With Sweave, you can write a LaTeX or HTML document,
> include in
> >)     it some
> >)     >) R statistical code, and Sweave can replace R code by results.
> >)     >)
> >)     >) Example for latex document :
> >)     >) \documentclass{...}
> >)     >) \begin{document}
> >)     >)
> >)     >) blablalba
> >)     >)
> >)     >) Some R code :
> >)     >) <<options>>=
> >)     >) 2+2
> >)     >) @
> >)     >)
> >)     >) \end{document}
> >)     >)
> >)     >) Everything between <<options>>= and @ will be replace by the
> result :
> >)     >) > 2+2
> >)     >) [1] 4
> >)     >) and the rest of the file (text and latex markup) doesn't change.
> >)     >)
> >)     >) I would like to use txt2tags to write my report. With txt2tags, I
> will
> >)     be able
> >)     >) to convert my report in latex or in html, then run Sweave on it
> to
> >)     replace R
> >)     >) code by results.
> >)     >)
> >)     >) I tried, but there is a problem : txt2tags transforms
> <<options>>= and R
> >)     code
> >)     >) into something else.
> >)     >)
> >)     >) Example :
> >)     >) Before txt2tags :
> >)     >) <<options>>=
> >)     >) 2+2 < 5
> >)     >) @
> >)     >) After txt2tags (latex)
> >)     >) $<$$<$options$>$$>$=
> >)     >) 2+2 $<$ 5
> >)     >) @
> >)     >)
> >)     >) Before txt2tags :
> >)     >) <<options>>=
> >)     >) 2+2 < 5
> >)     >)
> >)     >) @
> >)     >)
> >)     >) After txt2tags (latex) :
> >)     >) \begin{verbatim}
> >)     >)
> >)     >) <<options>>=
> >)     >) 2+2 < 5
> >)     >) @
> >)     >) \end{verbatim}
> >)     >) After txt2tags (xhtml)
> >)     >)
> >)     >) <pre>
> >)     >)   &lt;&lt;options&gt;&gt;=
> >)     >)   2+2 &lt; 5
> >)     >)   @
> >)     >) </pre>
> >)     >)
> >)     >)
> >)     >) Thus, I would like to know if there is a way (a markup ?) to
> protect
> >)     some text
> >)     >) from any transformation by txt2tags. I don't have other example
> in mind,
> >)     but I
> >)     >) think this feature could be helpfull in some situation.
> >)     >)
> >)     >) Thank you for reading me, and thank you very much for this tool.
> >)     >)
> >)     >) Best regards.
> >)     >)
> >)     >) David Hajage
> >)
> >)     >)
> >)
> ------------------------------------------------------------------------------
> >)     >) Check out the new SourceForge.net Marketplace.
> >)     >) It is the best place to buy or sell services for
> >)     >) just about anything Open Source.
> >)     >) http://p.sf.net/sfu/Xq1LFB
> >)     >) _______________________________________________
> >)     >) txt2tags-list mailing list
> >)     >) https://lists.sourceforge.net/lists/listinfo/txt2tags-list
> >)
> >)     >) :-- final da mensagem [t2t] Feature request ? de David Hajage <
> >)     dhajag...@gmail.com> --:
> >)
> >)     --
> >)     Leslie H. Watter
> >)
> >)
> >) :-- final da mensagem Re: [t2t] Feature request ? de David Hajage <
> dhajag...@gmail.com> --:
>
> --
> Leslie H. Watter
>
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list

Reply via email to