From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36345 Path: news.gmane.org!not-for-mail From: "luigi scarso" Newsgroups: gmane.comp.tex.context Subject: Re: Using context with cweave Date: Sat, 1 Sep 2007 03:00:04 +0200 Message-ID: References: <608bfe540708271838h5e567c6cm1aa92a20a4d24536@mail.gmail.com> <608bfe540708280520w6152e7d6x9171e60748a08269@mail.gmail.com> <608bfe540708310516u7678254cv3efd4e812a7f8d71@mail.gmail.com> <608bfe540708311017l4e6335c4qb91aaac5a4f51d60@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0599830978==" X-Trace: sea.gmane.org 1188608532 27148 80.91.229.12 (1 Sep 2007 01:02:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2007 01:02:12 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 01 03:02:10 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IRHNI-0007VN-Gi for gctc-ntg-context-518@m.gmane.org; Sat, 01 Sep 2007 03:02:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EB1F81FF94; Sat, 1 Sep 2007 03:02:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28316-04; Sat, 1 Sep 2007 03:02:06 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 39A7E20111; Sat, 1 Sep 2007 03:00:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0326B1FF94 for ; Sat, 1 Sep 2007 03:00:15 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28316-01-7 for ; Sat, 1 Sep 2007 03:00:05 +0200 (CEST) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by ronja.ntg.nl (Postfix) with ESMTP id 6FE7920112 for ; Sat, 1 Sep 2007 03:00:05 +0200 (CEST) Original-Received: by nf-out-0910.google.com with SMTP id e27so830169nfd for ; Fri, 31 Aug 2007 18:00:05 -0700 (PDT) Original-Received: by 10.78.183.8 with SMTP id g8mr1880002huf.1188608404697; Fri, 31 Aug 2007 18:00:04 -0700 (PDT) Original-Received: by 10.78.202.1 with HTTP; Fri, 31 Aug 2007 18:00:04 -0700 (PDT) In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36345 Archived-At: --===============0599830978== Content-Type: multipart/alternative; boundary="----=_Part_11171_4435809.1188608404621" ------=_Part_11171_4435809.1188608404621 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Anothers step: 1)... 2a) put this in test001b.tex \usemodule[cweb] \setupbodyfont [9pt] \setuppapersize [S6][S6] \setuplayout [backspace=72.5pt, leftmargin=50pt, leftmargindistance=12.5pt, rightmargin=0pt, rightedge=80pt, rightedgedistance=10pt, leftedge=0pt, width=430pt, topspace=10pt, header=0pt, footer=30pt, bottomdistance=10pt, bottom=15pt, height=410pt, style=\ss] \setupinteraction[state=start] \def\ignoreCWEBinput{\relax} \unprotect \def\fixtranslatednumber[#1--#2::#3]{% \@@filterpagepart[#1--#2--#3]} \protect \defCWEBmacro\contentsline#1#2#3#4#5% {\ifnum#2=0 \smallbreak \fi \line{\consetup{#2}#1 \rm \leaders\hbox to .5em{.\hfil}\hfil\ {\localcolortrue\goto{#3}[web:#3]}% below: \gotorealpage ? should be changed \hbox to3em{\localcolortrue\hss\gotorealpage{}{}{#5}{\fixtranslatednumber[#4]\presetgoto}}}} \starttext \title {Contents} \processCWEBcontents wc \page \title {Sections} \processCWEBsections wc \page \title {Sources} \processCWEBsource wc \page \title {Index} \processCWEBindex wc \page \stoptext 2b)put this in process.tex \usemodule[abr-01] \usemodule[mod-00] \usemodule[mod-02] \def\TypeThreeModule#1% {\readfile{#1.tex}{}{}% \WriteBatchFile} \def\WriteBatchFile {\doglobal\increment\ModuleNumber \immediate\write\BatchFile{texmfstart texexec --pdf --batch \FileName }} \starttext \TitelBlad{Documentation} \placemodulecontent \ModuleGroup{test001b}{test001b} \processmodule{test001b} {3} \placemoduleregister \ColofonBlad \stoptext 3) now you must set shell_escape=t and compile with $> texexec --pdf process Ok, now we have a "dirty" screen version (better than nothing, isn't it ?) -- luigi ---------------------------------------------------------------- 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 ------=_Part_11171_4435809.1188608404621 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

Anothers step:
1)...
2a) put this in test001b.tex
\usemodule[cweb]

\setupbodyfont
  [9pt]

\setuppapersize
  [S6][S6]

\setuplayout
  [backspace=72.5pt,
   leftmargin=50pt,
   leftmargindistance=12.5pt,
   rightmargin=0pt,
   rightedge=80pt,
   rightedgedistance=10pt,
   leftedge=0pt,
   width=430pt,
   topspace=10pt,
   header=0pt,
   footer=30pt,
   bottomdistance=10pt,
   bottom=15pt,
   height=410pt,
   style=\ss]
\setupinteraction[state=start]
\def\ignoreCWEBinput{\relax}
\unprotect
\def\fixtranslatednumber[#1--#2::#3]{%
\@@filterpagepart[#1--#2--#3]}
\protect
\defCWEBmacro\contentsline#1#2#3#4#5%
  {\ifnum#2=0
     \smallbreak
   \fi
   \line{\consetup{#2}#1
   \rm
   \leaders\hbox to .5em{.\hfil}\hfil\
   {\localcolortrue\goto{#3}[web:#3]}%  below: \gotorealpage ? should be changed
   \hbox to3em{\localcolortrue\hss\gotorealpage{}{}{#5}{\fixtranslatednumber[#4]\presetgoto}}}}

\starttext
\title {Contents} \processCWEBcontents wc \page
\title {Sections} \processCWEBsections wc \page
\title {Sources}  \processCWEBsource   wc \page
\title {Index}    \processCWEBindex    wc \page
\stoptext


2b)put this in process.tex
\usemodule[abr-01]
\usemodule[mod-00]
\usemodule[mod-02]

\def\TypeThreeModule#1%
  {\readfile{#1.tex}{}{}%
   \WriteBatchFile}
\def\WriteBatchFile
  {\doglobal\increment\ModuleNumber
   \immediate\write\BatchFile{texmfstart texexec --pdf --batch \FileName }}


\starttext
\TitelBlad{Documentation}
\placemodulecontent
\ModuleGroup{test001b}{test001b}
\processmodule{test001b} {3}
\placemoduleregister
\ColofonBlad
\stoptext

3) now you must set shell_escape=t and compile with
$> texexec --pdf  process

Ok, now we have a "dirty" screen version (better than nothing, isn't it ?)



--
luigi
----------------------------------------------------------------
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 ------=_Part_11171_4435809.1188608404621-- --===============0599830978== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0599830978==--