Hi all,
>> From: Peter RapĨan <[email protected]>
>> Date: September 9, 2010 4:19:50 PM GMT+02:00
>> To: [email protected]
>> Subject: [TeXmacs] TeX export problem
>> Reply-To: [email protected]
>>
>> Hi,
>>
>> I have the following problem. I defined macros for Dirac notation, which
>> work fine in texmacs. After exporting to latex, the macro definitions are
>> present, e.g. a \ket is defined, in the latex file but the latex file does
>> not contain the calls to the macros themselves, nor the parameters (there is
>> an empty space instead). I attach a .tm file, macro definitions and the
>> generated tex file. Any help is appreciated.
>>
>> Cheers,
>>
Actually after some more digging, it seems to be a problem which does not
depend on latex conversion routines,
The following simplified document
---------------------------------------------------------
<TeXmacs|1.0.7.6>
<style|article>
<\body>
<\hide-preamble>
<include|./texmacs_macros/macro_definitions.tm>
\;
</hide-preamble>
The ket <ket|\<psi\>> will not export to tex.
</body>
---------------------------------------------------------
produce the following call to the texmacs->latex scheme routine in
TeXmacs/progs/convert/latex/tmtex.scm
texmacs->latex [((last? . #f) (texmacs->latex:use-macros . on)
(texmacs->latex:use-catcodes . off) (texmacs->latex:indirect-bib . off)
(texmacs->latex:expand-user-macros . off) (texmacs->latex:expand-macros . on)
(texmacs->latex:replace-style . on))], (document (TeXmacs 1.0.7.6) (style
(tuple article)) (body (document (hide-preamble (document (with info-flag paper
preamble true (document (concat (assign bra (quote (macro x (with mode math
(concat (left langle) (arg x) (right |)))))) (assign ket (quote (macro x (with
mode math (concat (left |) (arg x) (right rangle)))))) (assign braket (quote
(macro x y (with mode math (concat (left langle) (arg x) (mid |) (arg y) (right
rangle)))))) (assign braket-element (quote (macro x A y (with mode math (concat
(left langle) (arg x) (mid |) (arg A) (mid |) (arg y) (right rangle))))))
(assign ketbra (quote (macro x y (with mode math (concat (left |) (arg x) (mid
rangle) (mid langle) (arg y) (right |))))))) )) )) (concat The ket (error
compound ket) will not export to tex.))) (initial (collection (associate
info-flag short) (associate language english) (associate page-even 1.8cm)
(associate page-medium paper) (associate page-odd 1.8cm) (associate page-right
1.8cm) (associate page-screen-margin false) (associate page-show-hf true)
(associate page-type letter) (associate preamble false) (associate sfactor 6))))
texmacs->latex [((last? . #f) (texmacs->latex:use-macros . on)
(texmacs->latex:use-catcodes . off) (texmacs->latex:indirect-bib . off)
(texmacs->latex:expand-user-macros . off) (texmacs->latex:expand-macros . on)
(texmacs->latex:replace-style . on))], (!file (document (hide-preamble
(document (with info-flag paper preamble true (document (concat (assign bra
(quote (macro x (with mode math (concat (left langle) (arg x) (right |))))))
(assign ket (quote (macro x (with mode math (concat (left |) (arg x) (right
rangle)))))) (assign braket (quote (macro x y (with mode math (concat (left
langle) (arg x) (mid |) (arg y) (right rangle)))))) (assign braket-element
(quote (macro x A y (with mode math (concat (left langle) (arg x) (mid |) (arg
A) (mid |) (arg y) (right rangle)))))) (assign ketbra (quote (macro x y (with
mode math (concat (left |) (arg x) (mid rangle) (mid langle) (arg y) (right
|))))))) )) )) (concat The ket (error compound ket) will not export to tex.))
(article) english (collection (associate info-flag short) (associate language
english) (associate page-even 1.8cm) (associate page-medium paper) (associate
page-odd 1.8cm) (associate page-right 1.8cm) (associate page-screen-margin
false) (associate page-show-hf true) (associate page-type letter) (associate
preamble false) (associate sfactor 6)) /Users/mgubi/t/clean32/TeXmacs)
as you can see here the portion related to the typesetted text is
(concat The ket (error compound ket) will not export to tex.)
where the macro call has been replaced by error, so the converter routine
simply discard the information.
There should be some problem when converting the tree to a scheme expression.
Joris?
max
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev