mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] TeX export problem


Chronological Thread 
  • From: Gubinelli Massimiliano <address@hidden>
  • To: address@hidden
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] TeX export problem
  • Date: Fri, 10 Sep 2010 10:10:39 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=u+raAitAcMK4rn+FfFpujeY3peOQoITcODt6rYpzQURNl8w15zD5zjRXqXd4jyL3hF K+mfbkYEYrwXA2BefzUfSiNpUZyQ/NoD3mF/AZdT1t22beVNXmvOwp82LAehuYkY3bGl y7IkmhUN+4rCPx6ZdyFGK2+fvyqQQYj5gdkPg=

Hi all,

From: Peter Rapčan <address@hidden>
Date: September 9, 2010 4:19:50 PM GMT+02:00
Subject: [TeXmacs] TeX export problem
Reply-To: address@hidden

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





Archive powered by MHonArc 2.6.19.

Top of page