ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problems with using PPCHTEX in LaTeX
@ 2007-12-18 14:06 Erik Stempel
  2007-12-20 10:31 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Stempel @ 2007-12-18 14:06 UTC (permalink / raw)
  To: ntg-context

Dear Mr. Hagen,

I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
After reporting this problem at GoogleGroups I get a message to report 
the problem directly to you.

The problem is, that only the including of \usepackage{m-pictex, 
m-ch-de} makes six errors (pdflatex).
The minimal example:

\documentclass{scrartcl}
\usepackage{m-ch-de}
\begin{document}
Test
\end{document}

The errors:

! Missing { inserted.
<to be read again>
                   \def
l.659 \unexpanded\def
                     \complexstartchemical[#1]%
...
! Forbidden control sequence found while scanning text of \unexpanded.
<inserted text>
                }
l.840
...
! Missing { inserted.
<to be read again>
                   \edef
l.1768 \definecomplexorsimple\chemical
...
\edef \chemical {\noexpand \docomplexorsimple \@EA \noexpand \csname
\ETC.
! Forbidden control sequence found while scanning text of \unexpanded.
<inserted text>
                }
l.1867
...
! Missing { inserted.
<to be read again>
                   \def
l.1868 \unexpanded\def
                      \chemicaloxidation#1#2#3%
...
! Forbidden control sequence found while scanning text of \unexpanded.
<inserted text>
                }
l.2026

I tried to use etex.sty, m-pictex and pstricks instead of pictex, but 
without success.
The running with latex and pstricks makes even 19 errors.

What can I do?

I hope you can help me and send you many thanks in advance.

Sincerely
Erik


PS: Sorry because of my English. I know, it's not the best.
If you can understand german, you can have a look at 
http://groups.google.de/group/de.comp.text.tex/browse_thread/thread/8d675adc0bab50fc 
where you can see the post at GoogleGroups.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-18 14:06 Problems with using PPCHTEX in LaTeX Erik Stempel
@ 2007-12-20 10:31 ` Hans Hagen
  2007-12-20 17:41   ` Mojca Miklavec
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2007-12-20 10:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Erik Stempel wrote:
> Dear Mr. Hagen,
> 
> I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
> After reporting this problem at GoogleGroups I get a message to report 
> the problem directly to you.
> 
> The problem is, that only the including of \usepackage{m-pictex, 
> m-ch-de} makes six errors (pdflatex).
> The minimal example:
> 
> \documentclass{scrartcl}
> \usepackage{m-ch-de}
> \begin{document}
> Test
> \end{document}

use the latest greatest context zips

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-20 10:31 ` Hans Hagen
@ 2007-12-20 17:41   ` Mojca Miklavec
  2007-12-20 18:09     ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: Mojca Miklavec @ 2007-12-20 17:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Dec 20, 2007 11:31 AM, Hans Hagen wrote:
> Erik Stempel wrote:
> > Dear Mr. Hagen,
> >
> > I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
> > After reporting this problem at GoogleGroups I get a message to report
> > the problem directly to you.
> >
> > The problem is, that only the including of \usepackage{m-pictex,
> > m-ch-de} makes six errors (pdflatex).
> > The minimal example:
> >
> > \documentclass{scrartcl}
> > \usepackage{m-ch-de}
> > \begin{document}
> > Test
> > \end{document}
>
> use the latest greatest context zips

I do, but it does't help. I get exactly the same error:

)) (/usr/local/gwTeX/texmf.pkgs/tex/latex/context/m-ch-de.sty
(/usr/local/gwTeX/texmf.pkgs/tex/latex/context/m-pictex.sty
(/usr/local/gwTeX/texmf.pkgs/tex/context/base/m-pictex.tex
(/usr/local/gwTeX/texmf.texlive/tex/generic/pictex/prepictex.tex)
(/usr/local/gwTeX/texmf.texlive/tex/generic/pictex/pictex.tex)
(/usr/local/gwTeX/texmf.texlive/tex/generic/pictex/postpictex.tex)))
(/usr/local/gwTeX/texmf.pkgs/tex/generic/context/m-ch-de.tex
(/usr/local/gwTeX/texmf.pkgs/tex/generic/context/ppchtex.noc
(/usr/local/gwTeX/texmf.pkgs/tex/context/base/supp-mis.tex
loading : Context Support Macros / Miscellaneous (2004.10.26)
) (/usr/local/gwTeX/texmf.pkgs/tex/context/base/syst-gen.tex
loading        : Context System Macros / General
) (/usr/local/gwTeX/texmf.pkgs/tex/context/base/syst-fnt.tex)
(/usr/local/gwTeX/texmf.pkgs/tex/context/base/ppchtex.tex
loading        : Context Chemical Macro's / 1996.3.1
ppchtex        : using PiCTeX
! Missing { inserted.
<to be read again>
                   \def
l.659 \unexpanded\def
                     \complexstartchemical[#1]%
?

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-20 17:41   ` Mojca Miklavec
@ 2007-12-20 18:09     ` Aditya Mahajan
  2007-12-20 18:32       ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2007-12-20 18:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 20 Dec 2007, Mojca Miklavec wrote:

> On Dec 20, 2007 11:31 AM, Hans Hagen wrote:
>> Erik Stempel wrote:
>>> Dear Mr. Hagen,
>>>
>>> I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
>>> After reporting this problem at GoogleGroups I get a message to report
>>> the problem directly to you.
>>>
>>> The problem is, that only the including of \usepackage{m-pictex,
>>> m-ch-de} makes six errors (pdflatex).
>>> The minimal example:
>>>
>>> \documentclass{scrartcl}
>>> \usepackage{m-ch-de}
>>> \begin{document}
>>> Test
>>> \end{document}
>>
>> use the latest greatest context zips
>
> I do, but it does't help. I get exactly the same error:

I am confused. Consider the following file:

\unexpanded\def\test{Test}
\test
\bye

Run it through ConTeXt, and it compiles fine. Run it through pdftex (plain 
format) and it gives:

This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
  %&-line parsing enabled.
entering extended mode
(./plain.tex
! Missing { inserted.
<to be read again>
                    \def
l.1 \unexpanded\def
                    \test{Test}
?
Runaway text?
\def \test {Test} \test
! Forbidden control sequence found while scanning text of \unexpanded.


Isn't \unexpanded a primitive in pdftex? Why does it behave differently in 
ConTeXt and plain pdftex?

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-20 18:09     ` Aditya Mahajan
@ 2007-12-20 18:32       ` Hans Hagen
  2007-12-20 20:01         ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2007-12-20 18:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> On Thu, 20 Dec 2007, Mojca Miklavec wrote:
> 
>> On Dec 20, 2007 11:31 AM, Hans Hagen wrote:
>>> Erik Stempel wrote:
>>>> Dear Mr. Hagen,
>>>>
>>>> I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
>>>> After reporting this problem at GoogleGroups I get a message to report
>>>> the problem directly to you.
>>>>
>>>> The problem is, that only the including of \usepackage{m-pictex,
>>>> m-ch-de} makes six errors (pdflatex).
>>>> The minimal example:
>>>>
>>>> \documentclass{scrartcl}
>>>> \usepackage{m-ch-de}
>>>> \begin{document}
>>>> Test
>>>> \end{document}
>>> use the latest greatest context zips
>> I do, but it does't help. I get exactly the same error:
> 
> I am confused. Consider the following file:
> 
> \unexpanded\def\test{Test}
> \test
> \bye
> 
> Run it through ConTeXt, and it compiles fine. Run it through pdftex (plain 
> format) and it gives:

\unexpanded is a primitive in etex, introduced when context already had 
an \unexpanded macro; the same is true for \protected

\normalunexpanded gives you the primitive

when loaded in latex, ppchtex should restore the meaning of \unexpanded 
after loading but i cannot test that here

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-20 18:32       ` Hans Hagen
@ 2007-12-20 20:01         ` Aditya Mahajan
  2007-12-20 21:33           ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2007-12-20 20:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 20 Dec 2007, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Thu, 20 Dec 2007, Mojca Miklavec wrote:
>>
>>> On Dec 20, 2007 11:31 AM, Hans Hagen wrote:
>>>> Erik Stempel wrote:
>>>>> Dear Mr. Hagen,
>>>>>
>>>>> I have a problem with using PPCHTEX with LaTeX (MikTeX 2.6).
>>>>> After reporting this problem at GoogleGroups I get a message to report
>>>>> the problem directly to you.
>>>>>
>>>>> The problem is, that only the including of \usepackage{m-pictex,
>>>>> m-ch-de} makes six errors (pdflatex).
>>>>> The minimal example:
>>>>>
>>>>> \documentclass{scrartcl}
>>>>> \usepackage{m-ch-de}
>>>>> \begin{document}
>>>>> Test
>>>>> \end{document}
>>>> use the latest greatest context zips
>>> I do, but it does't help. I get exactly the same error:
>>
>> I am confused. Consider the following file:
>>
>> \unexpanded\def\test{Test}
>> \test
>> \bye
>>
>> Run it through ConTeXt, and it compiles fine. Run it through pdftex (plain
>> format) and it gives:
>
> \unexpanded is a primitive in etex, introduced when context already had
> an \unexpanded macro; the same is true for \protected
>
> \normalunexpanded gives you the primitive
>
> when loaded in latex, ppchtex should restore the meaning of \unexpanded
> after loading but i cannot test that here

There is a bug in ppchtex.noc. Line 39 says

\let\unexpanded\normalunexpanded

However, on line 181 you load ppchtex. ppchtex assumes that \unexpanded 
is the context macro, not the etex primitive. The easy work around is to 
move the \let\unexpanded\normalunexpanded line to the end of the 
ppchtex.noc. This works fine on my machine.

To the OP: locate ppchtex.noc by kpsewhich ppchtex.noc and copy that file 
to your current directory. Cut line 39 (\let\unexpanded\normalunexpanded) 
and paste it after line 213 (just before the last line). After this change 
the minimal example that you posted works correctly. See if your actual 
tex file now compiles.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problems with using PPCHTEX in LaTeX
  2007-12-20 20:01         ` Aditya Mahajan
@ 2007-12-20 21:33           ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2007-12-20 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:

> However, on line 181 you load ppchtex. ppchtex assumes that \unexpanded 
> is the context macro, not the etex primitive. The easy work around is to 
> move the \let\unexpanded\normalunexpanded line to the end of the 
> ppchtex.noc. This works fine on my machine.

ok, patched

(the problem with the original patch is that after adding it no one 
bothered to test it) .. thanks for looking into it

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-12-20 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 14:06 Problems with using PPCHTEX in LaTeX Erik Stempel
2007-12-20 10:31 ` Hans Hagen
2007-12-20 17:41   ` Mojca Miklavec
2007-12-20 18:09     ` Aditya Mahajan
2007-12-20 18:32       ` Hans Hagen
2007-12-20 20:01         ` Aditya Mahajan
2007-12-20 21:33           ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).