Hello,

Franz Lehner reported in a private mail that he formerly used TexFormat
to display picture environments by simply putting it into a string an
have it shown inside emacs with )set output tex on.

Of course, after I fixed the display of special characters, that
(misuse) doesn't work anymore since the string output is put into
\verb#...#.

\documentclass{article}\usepackage[active,dvips,tightpage,displaymath]{preview}\begin{document}\begin{preview}$$
\verb#"\begin{picture}(38,9.5)(1,0)
\put(2,0){\line(0,1){4.5}}
\put(8,0){\line(0,1){7.5}}
\put(14,0){\line(0,1){10.5}}
\put(20,0){\line(0,1){4.5}}
\put(26,0){\line(0,1){7.5}}
\put(32,0){\line(0,1){10.5}}
\put(38,0){\line(0,1){4.5}}
\put(2,4.5){\line(1,0){0}}
\put(20,4.5){\line(1,0){0}}
\put(8,7.5){\line(1,0){18}}
\put(14,10.5){\line(1,0){18}}
\put(38,4.5){\line(1,0){0}}
\end{picture}"#
\leqno(144)
$$

\end{preview}\end{document}

In order to get raw TeX into the output, one can use my new TexFormat
like this. (See attached pic.input.)

Note that you should use this inside a newly compiled fricas.

mkdir $HOME/fricas-test
cd $HOME/fricas-test
git clone https://github.com/hemmecke/fricas.git
mkdir install
cd fricas
git checkout tex-latex
./configure --prefix=$HOME/fricas-test/install
make
make install
$HOME/fricas-test/install/bin/efricas

Inside efricas type

)read /path/to/pic.input

I hope that makes at least one person a bit happy. ;-)

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
)clear completely
)set output algebra on
)set output tex off

picture: List String := [_
    "\begin{picture}(38,9.5)(1,0)",_
    "\put(2,0){\line(0,1){4.5}}",_
    "\put(8,0){\line(0,1){7.5}}",_
    "\put(14,0){\line(0,1){10.5}}",_
    "\put(20,0){\line(0,1){4.5}}",_
    "\put(26,0){\line(0,1){7.5}}",_
    "\put(32,0){\line(0,1){10.5}}",_
    "\put(38,0){\line(0,1){4.5}}",_
    "\put(2,4.5){\line(1,0){0}}",_
    "\put(20,4.5){\line(1,0){0}}",_
    "\put(8,7.5){\line(1,0){18}}",_
    "\put(14,10.5){\line(1,0){18}}",_
    "\put(38,4.5){\line(1,0){0}}",_
    "\end{picture}"_
  ]

raw: OutputForm := outputForm("RAWTEX"::Symbol)
picenv: OutputForm := raw [outputForm(p::Symbol)$OutputForm for p in picture]

E       ==> OutputForm
I       ==> Integer
L       ==> List
S       ==> String
LE      ==> List E
LS      ==> List String
OFT     ==> OutputFormTools
HANDLER ==> (I, LE) -> LS -- (precedence, arguments) +-> resultstring
verbatimtex(p: I, args: LE): LS == [string(symbol(e)$OFT) for e in args]
setHandler!(-1, "RAWTEX", verbatimtex)
)set output tex on
)set output algebra off
picenv

Reply via email to