ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: A couple more...
@ 2000-07-29 23:42 David Arnold
  0 siblings, 0 replies; 4+ messages in thread
From: David Arnold @ 2000-07-29 23:42 UTC (permalink / raw)
  Cc: ntg-context

Hans,

I have two modes, "letter" and "screen," which are in envrionment1.tex. The
file context-matrices uses envrionment1.tex. So, I gave this coupling thing
a try. In my "letter" mode, I put

\coupledocument
 [alternative]
 [context-matrices-s]
 [section,subsection]
 [Matrices in Matlab]

\setuphead
 [section,subsection]
 [file=alternative]
\stopmode

and compiled with

texexec --pdf --mode=letter --suffix="-p" context-matrices

Then, in my "screen" mode, I put

\coupledocument
 [alternative]
 [context-matrices-p]
 [section,subsection]
 [Matrices in Matlab]

\setuphead
 [section,subsection]
 [file=alternative]

and compiled with

texexec --pdf --mode=screen --suffix="-s" context-matrices

This results in two files: context-matrices-p and context-matrices-s.
Clicking on a section or subsection header in context-matrices-s.pdf takes
me right to the same position in the file context-matrices-p.pdf. However,
the reverse does not work. Clicking on a section or subsection header in
context-matrices-p.pdf always takes me to the title page in
context-matrices-s.pdf.

Any suggestions?

Finally, while we are on this topic, I'd like to use the same environment
for many different activities, with names like matrices, vectors, etc. Will
I have to set up this coupling in each individual document, or is there a
way that I can do it in my envrionment file that will work with all my files?

>There is a far more advanced method. 
>
>Say that you have a screen version and a paper one. You can crosslink them.
>In the screen version you say: 
>
>\coupledocument
>  [alternative]
>  [doc-let]
>  [chapter,section,subsection]
>  [The Alternative Version]
>
>\setuphead
>  [chapter,section,subsection]
>  [file=alternative]
>
>and the paper version you use [doc-scr] instead, given that you have both
>those files. Run them a couple of times and you will notice that you can
>click on titles and go from screen to paper annd vise versa. 
>
>In a similar fashion, you can automatically print subranges, say chapters
>only, without the need to fill in pages in the print screen.
>
>Say: 
>
>\setupsubpagenumbering
>  [way=bychapter,
>   state=start]
>
>\useJSscripts[fil]
>
>Now you can make a button:  
>  
>\goto{Print Chapter}[PrintSubPages]
>
>and voila, another small secret uncovered. 

-
David Arnold
College of the Redwoods
Mathematics Department
7351 Tompkins Hill Road
Eureka, CA 95501
(707) 476-4222

My Home Page
http://online.redwoods.cc.ca.us/instruct/darnold/index.htm

Ordinary Differential Equations Using Matlab
http://www.prenhall.com/books/esm_0130113816.html


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

* Re: A couple more...
       [not found] ` <3.0.5.32.20000729163905.007db870@mail.northcoast.com>
@ 2000-07-31  8:26   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2000-07-31  8:26 UTC (permalink / raw)
  Cc: ntg-context

Hi David, 

>Any suggestions?

You need an extra run. The refs are only known afterwards, so 

run p run s run p

Also, you need to turn interaction on in both docs. 

>Finally, while we are on this topic, I'd like to use the same environment
>for many different activities, with names like matrices, vectors, etc. Will
>I have to set up this coupling in each individual document, or is there a
>way that I can do it in my envrionment file that will work with all my files?

No, but you may try: 

[\jobname-s]

and 

[\jobname-p]

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: A couple more...
  2000-07-28  8:00 David Arnold
@ 2000-07-28 17:57 ` Hans Hagen
       [not found] ` <3.0.5.32.20000729163905.007db870@mail.northcoast.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2000-07-28 17:57 UTC (permalink / raw)
  Cc: ntg-context

At 01:00 AM 7/28/00 -0700, David Arnold wrote:
>All,
>
>I can use Exchange to disable printing of the screen document. But I would
>like to have a button in the screen document menu entitled "print."
>However, it would not print the screen document. Rather, it would print the
>document created with my "letter" mode (call it doc.print.pdf). How can I
>create such a button in the menu of my screen document? Is there a way to
>default it? For example, when the "print" button is pushed, the document
>filename is read (say it's doc.pdf) and then the file doc.print.pdf is
>printed. Possible?

There is a far more advanced method. 

Say that you have a screen version and a paper one. You can crosslink them.
In the screen version you say: 

\coupledocument
  [alternative]
  [doc-let]
  [chapter,section,subsection]
  [The Alternative Version]

\setuphead
  [chapter,section,subsection]
  [file=alternative]

and the paper version you use [doc-scr] instead, given that you have both
those files. Run them a couple of times and you will notice that you can
click on titles and go from screen to paper annd vise versa. 

In a similar fashion, you can automatically print subranges, say chapters
only, without the need to fill in pages in the print screen.

Say: 

\setupsubpagenumbering
  [way=bychapter,
   state=start]

\useJSscripts[fil]

Now you can make a button:  

\goto{Print Chapter}[PrintSubPages]

and voila, another small secret uncovered. 

Hans  
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* A couple more...
@ 2000-07-28  8:00 David Arnold
  2000-07-28 17:57 ` Hans Hagen
       [not found] ` <3.0.5.32.20000729163905.007db870@mail.northcoast.com>
  0 siblings, 2 replies; 4+ messages in thread
From: David Arnold @ 2000-07-28  8:00 UTC (permalink / raw)
  Cc: ntg-context

All,

I can use Exchange to disable printing of the screen document. But I would
like to have a button in the screen document menu entitled "print."
However, it would not print the screen document. Rather, it would print the
document created with my "letter" mode (call it doc.print.pdf). How can I
create such a button in the menu of my screen document? Is there a way to
default it? For example, when the "print" button is pushed, the document
filename is read (say it's doc.pdf) and then the file doc.print.pdf is
printed. Possible?

-
David Arnold
College of the Redwoods
Mathematics Department
7351 Tompkins Hill Road
Eureka, CA 95501
(707) 476-4222

My Home Page
http://online.redwoods.cc.ca.us/instruct/darnold/index.htm

Ordinary Differential Equations Using Matlab
http://www.prenhall.com/books/esm_0130113816.html


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

end of thread, other threads:[~2000-07-31  8:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-29 23:42 A couple more David Arnold
  -- strict thread matches above, loose matches on Subject: below --
2000-07-28  8:00 David Arnold
2000-07-28 17:57 ` Hans Hagen
     [not found] ` <3.0.5.32.20000729163905.007db870@mail.northcoast.com>
2000-07-31  8:26   ` 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).