Re: [NTG-context] Get rid of LuaTeX warning on duplicate destination identifier

2013-08-29 Thread Hans Hagen

On 8/29/2013 4:06 AM, Aditya Mahajan wrote:

Hi,

I am trying to pick up on an old thread of creating an overview page
[1]. Basically, the idea is to create an overvew slide at the end of a
presentation that shows the first page of different sections in a
presentation. Based on Wolfgang's answer in that old thread, I save the
relevant pages in a box, and then display them again at the end of the
presentation.

This works, except that I get a series of warnings:

l.86 \placeoverviewpage
  LuaTeX warning (ext4): destination with the same
identifier (name{aut:10}) has been already used, duplicate ignored

How do I get rid of these?


Tricky. The problem is that you flush a box (copy) so the message comes 
from deep inside the backend (for good reason) and so we cannot 
intercept it as hey user, you use the same dest twice simply because 
it's a copy and not re-rendered.


There are two solutions:

(1) strip the box before copying (i can make a helper for that - later 
as i have to go now): destinations, references, writes-to-lists etc


(2) you copy the old file before processing and use that one

 \def\placeoverviewpage
   {\startstandardmakeup[\c!align=\v!middle]
   \getfiguredimensions[temp.pdf]%

\dorecurse{\noffigurepages}{\externalfigure[temp.pdf][\c!page=##1,\c!width=\overviewwidth]\relax\space}
\stopstandardmakeup}


I am afraid that I cannot create a small example illustrating this
warning, so I am attaching the complete test file.

[1]: http://thread.gmane.org/gmane.comp.tex.context/72556/focus=72571


[2] It has always been a wish of mine to have it as option in the engine 
(pdfetex) but in luatex it's not that hard to do it myself now (i 
already have a stripper so I can extend that one a bit).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [***SPAM***] Continuous preview

2013-08-29 Thread john Culleton
On Tue, 27 Aug 2013 15:21:38 -0400 (EDT)
Aditya Mahajan adit...@umich.edu wrote:

 On Tue, 27 Aug 2013, H. Özoguz wrote:
 
  For LaTex there exists a tool, named latexmk, which allows a
  preview continuous mode, that is to update the compiled pdf
  automatically. It is really very helpful!
 
  Because it is open-source: It is possible to addapt this tool for
  context, too? Maybe one of the programmers have time for this ... :)
 
 I use the perl program `atchange`[1] for continous preview. For
 simple documents, you can just run
 
 atchange filename.tex context --batch filename
 
 For more complicated documents (depending on multiple files and
 figures), you can create a automate file (see [1] for description)
 and run
 
 atchange automate
 
 [1]: http://schneider.ncifcrf.gov/atchange.html
 
 Aditya

If you use the editor texworks you can maintain two side by side
windows, one for editing and one for viewing.

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] zero-width joiners etc

2013-08-29 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Does anyone here remember how to toggle Unicode control characters like  
the zero-width joiners, non-joiners etc? For example, some fonts map the  
control character to a symbol but we usually don't want that symbol  
showing up in normal text output. I know there is (used to be?) a switch  
in MkIV for toggling this but can't find it.


(BTW: I miss the searchable mail archives on the ConTeXt Garden...)

Thanks and Best Wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [***SPAM***] Continuous preview

2013-08-29 Thread Aditya Mahajan

On Wed, 28 Aug 2013, H. Özoguz wrote:


I use the perl program `atchange`[1] for continous preview. For simple
documents, you can just run

 atchange filename.tex context --batch filename


Thanks Aditja. Because I have no experience with Pearl: What to do with this 
text-file of your link? Should I just copy it as text-file in the same 
folder, where the contex files are stored in, or do I have to install any 
pearl-interpreter first? Some instructions to get this working here would be 
nice :)


Well, latexmk is also a perl script, so if you can run latexmk, you 
probably have perl installed. On a unix-like system, you can just download 
the script, copy it somewhere in your $PATH, make it executable (chmod +x 
filename), and just run `atchange filenme ...`.


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Get rid of LuaTeX warning on duplicate destination identifier

2013-08-29 Thread Hans Hagen

On 8/29/2013 10:15 AM, Hans Hagen wrote:

On 8/29/2013 4:06 AM, Aditya Mahajan wrote:

Hi,

I am trying to pick up on an old thread of creating an overview page
[1]. Basically, the idea is to create an overvew slide at the end of a
presentation that shows the first page of different sections in a
presentation. Based on Wolfgang's answer in that old thread, I save the
relevant pages in a box, and then display them again at the end of the
presentation.

This works, except that I get a series of warnings:

l.86 \placeoverviewpage
  LuaTeX warning (ext4): destination with the same
identifier (name{aut:10}) has been already used, duplicate ignored

How do I get rid of these?


Tricky. The problem is that you flush a box (copy) so the message comes
from deep inside the backend (for good reason) and so we cannot
intercept it as hey user, you use the same dest twice simply because
it's a copy and not re-rendered.

There are two solutions:

(1) strip the box before copying (i can make a helper for that - later
as i have to go now): destinations, references, writes-to-lists etc

(2) you copy the old file before processing and use that one

  \def\placeoverviewpage
{\startstandardmakeup[\c!align=\v!middle]
\getfiguredimensions[temp.pdf]%

\dorecurse{\noffigurepages}{\externalfigure[temp.pdf][\c!page=##1,\c!width=\overviewwidth]\relax\space}

 \stopstandardmakeup}


I am afraid that I cannot create a small example illustrating this
warning, so I am attaching the complete test file.

[1]: http://thread.gmane.org/gmane.comp.tex.context/72556/focus=72571


[2] It has always been a wish of mine to have it as option in the engine
(pdfetex) but in luatex it's not that hard to do it myself now (i
already have a stripper so I can extend that one a bit).


attached ... you can run the module for an example (you need a new beta)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
% experimental, based on an idea by Aditya, messed up by Hans.

\unprotect

\installnamespace{overview}

\installsimplecommandhandler \overview {overview}

\initializeboxstack{\overview}

\let\overviewsection\empty

\let\overview_previous_headnumber\!!minusone
\let\overview_current_headnumber \!!zerocount

\unexpanded\def\overview_save_page#1%
  {\ifx\overviewsection\empty
 \page_shipouts_normal{#1}%
   \else
 
\xdef\overview_current_headnumber{\somenamedheadnumber\overviewsection\c!current}%
 \setbox\nextbox\hbox{#1}%
 \ifx\overview_previous_headnumber\overview_current_headnumber \else
   \glet\overview_previous_headnumber\overview_current_headnumber
   \setbox\scratchbox\copy\nextbox
   \cleanupbox\scratchbox % remove nodes that should not be seen in the 
backend twice
   \writestatus{overview}{saving first page of 
\overviewsection\space\overview_current_headnumber}%
   \savebox{\overview}{\overview_current_headnumber}{\box\scratchbox}%
 \fi
 \page_shipouts_normal{\box\nextbox}%
   \fi}

\installshipoutmethod{overview}\overview_save_page

\definelistalternative
  [overview]
  [\c!renderingsetup=\??listrenderings:overview]

\setuplistalternative
  [overview]
  [\c!before=\dontleavehmode,
   \c!after=\space,
   \c!width=.4\textwidth] % or \listparameter\c!width

\startsetups[\??listrenderings:overview]
\doifboxelse{\overview}{\currentlistentrynumber}
   {\listalternativeparameter\c!before
\startcurrentlistentrywrapper
  \scale
[\c!width=\listalternativeparameter\c!width]
{\foundbox{\overview}{\currentlistentrynumber}}%
\stopcurrentlistentrywrapper
\listalternativeparameter\c!after}
   {}%
\stopsetups

\unexpanded\def\placeoverviewpage
  {\startstandardmakeup[\c!align=\v!middle]
  \placelist
[\overviewsection]
[\c!criterium=\v!all,
 \c!alternative=overview]
   \stopstandardmakeup}

\appendtoks
\ifx\overviewsection\empty
  \edef\overviewsection{\overviewparameter\c!level}%
  \ifx\overviewsection\empty
\setuppaper[\c!method=\v!normal]%
  \else
\setuppaper[\c!method=overview]%
  \fi
   \else
 \writestatus{overview}{level is already set to \overviewsection, ignoring 
\overviewparameter\c!level}%
   \fi
\to \everysetupoverview

\protect

\continueifinputfile{m-pageview.mkiv}

\usemodule[pageview]

\setupinteraction
  [state=start]

\setupoverview
  [level=section]

\setuppapersize
  [S4]

\starttext

\dorecurse{4}
  {\startsection[title={Section #1}]
  \dorecurse{3}{\input knuth \par}
\stopsection
  \page}

\placeoverviewpage

\stoptext

Re: [NTG-context] zero-width joiners etc

2013-08-29 Thread Hans Hagen

On 8/29/2013 8:25 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

Dear gang,

Does anyone here remember how to toggle Unicode control characters like
the zero-width joiners, non-joiners etc? For example, some fonts map the
control character to a symbol but we usually don't want that symbol
showing up in normal text output. I know there is (used to be?) a switch
in MkIV for toggling this but can't find it.

(BTW: I miss the searchable mail archives on the ConTeXt Garden...)


\setcharacterstripping[1]

(experimental code ... probably never used)

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] zero-width joiners etc

2013-08-29 Thread Idris Samawi Hamid ادريس سماوي حامد

On Thu, 29 Aug 2013 13:09:22 -0600, Hans Hagen pra...@wxs.nl wrote:


\setcharacterstripping[1]
 (experimental code ... probably never used)


It works and thanks!!

Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Re: Arabic poetry thread:

Hans has just implemented high-level support for hemistiches and caesuras  
(using here the technical names for the style of poetry structure used in  
Arabic and other classical literature).


http://en.wikipedia.org/wiki/Hemistich
http://en.wikipedia.org/wiki/Caesura

With the latest beta, run the attached file. The module m-hemistich.mkiv  
also has a demo inside.


For Arabic, note the tatweel across columns (only manual for now). The  
separator option with \hemistiches is probably more useful for Latin and  
Greek classical literature etc where the separator occurs on every line;  
the \hemistichescaesura option is probably more useful for Arabic where  
there are only occasional connectors across columns.


Could one of you kindly add a page with this info to the wiki? Much thanks  
and enjoy!


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

test-hemistiches.pdf
Description: Adobe PDF document


test-hemistiches.tex
Description: TeX document
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread J. R. Schmid
Idris,

that's awesome news - I would have never imagined for something like this
to happen so quickly. Unfortunately, I can't get it to run (probably my own
fault). So far I'd been working with TeXLive. Now to try this out, I
installed ConTeXt standalone and then issued first-setup.bat
--modules='m-hemistich' (tried 't-hemistich' as well, and yes, Windows -
shame on me). It still gives the error message resolvers  modules 
'hemistich' is not found, though. What am I missing?

Cheers,
  J.R.



On 29 August 2013 22:34, Idris Samawi Hamid ادريس سماوي حامد 
isha...@colostate.edu wrote:

 Dear gang,

 Re: Arabic poetry thread:

 Hans has just implemented high-level support for hemistiches and caesuras
 (using here the technical names for the style of poetry structure used in
 Arabic and other classical literature).

 http://en.wikipedia.org/wiki/**Hemistichhttp://en.wikipedia.org/wiki/Hemistich
 http://en.wikipedia.org/wiki/**Caesurahttp://en.wikipedia.org/wiki/Caesura

 With the latest beta, run the attached file. The module m-hemistich.mkiv
 also has a demo inside.

 For Arabic, note the tatweel across columns (only manual for now). The
 separator option with \hemistiches is probably more useful for Latin and
 Greek classical literature etc where the separator occurs on every line;
 the \hemistichescaesura option is probably more useful for Arabic where
 there are only occasional connectors across columns.

 Could one of you kindly add a page with this info to the wiki? Much thanks
 and enjoy!

 Best wishes
 Idris
 --
 Professor Idris Samawi Hamid
 Department of Philosophy
 Colorado State University
 Fort Collins, CO 80523

 ___
 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  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread Hans Hagen

On 8/30/2013 12:48 AM, J. R. Schmid wrote:

Idris,

that's awesome news - I would have never imagined for something like
this to happen so quickly. Unfortunately, I can't get it to run
(probably my own fault). So far I'd been working with TeXLive. Now to
try this out, I installed ConTeXt standalone and then issued
first-setup.bat --modules='m-hemistich' (tried 't-hemistich' as well,
and yes, Windows - shame on me). It still gives the error message
resolvers  modules  'hemistich' is not found, though. What am I missing?


it's an m- module

just try this:

context --global m-hemistich.mkiv

if that produces a file you should start your docs with

\usemodule[hemistich] % no m-

(using the command line to load modules is only needed for special cases)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread J. R. Schmid
There seems to be something more fundamental wrong with my setup.
When I do that, I get:

! I can't find file `m-hemistich.mkiv'.

Isn't first-setup.bat --modules='m-hemistich' supposed to install the
module?


On 30 August 2013 02:10, Hans Hagen pra...@wxs.nl wrote:

 On 8/30/2013 12:48 AM, J. R. Schmid wrote:

 Idris,

 that's awesome news - I would have never imagined for something like
 this to happen so quickly. Unfortunately, I can't get it to run
 (probably my own fault). So far I'd been working with TeXLive. Now to
 try this out, I installed ConTeXt standalone and then issued
 first-setup.bat --modules='m-hemistich' (tried 't-hemistich' as well,
 and yes, Windows - shame on me). It still gives the error message
 resolvers  modules  'hemistich' is not found, though. What am I
 missing?


 it's an m- module

 just try this:

 context --global m-hemistich.mkiv

 if that produces a file you should start your docs with

 \usemodule[hemistich] % no m-

 (using the command line to load modules is only needed for special cases)

 Hans

 --**--**-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 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 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : 
 http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 __**__**
 ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread Aditya Mahajan

On Fri, 30 Aug 2013, J. R. Schmid wrote:


There seems to be something more fundamental wrong with my setup.
When I do that, I get:

! I can't find file `m-hemistich.mkiv'.

Isn't first-setup.bat --modules='m-hemistich' supposed to install the
module?


From what I understand from Hans's message, m-hemistich is part of the 
ConTeXt distribution, so you just need to update your distribution to 
install it (i.e., just run first-setup.bat)


The --modules switch in first-setup is for third-party modules (those 
starting with t- )


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread J. R. Schmid

From what I understand from Hans's message, m-hemistich is part of the
ConTeXt distribution, so you just need to update your distribution to
install it (i.e., just run first-setup.bat)


That's what I understood from the ConTeXt Standalone wiki page, and also 
why I'm so confused about this - my Standalone installation is brand 
new, and I started it roughly 3 hours after Hans' post about the new 
module. I just ran first-setup.bat again, but it still doesn't find the 
module.


Is there a separate source/repository/etc. that needs to be specified?
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Arabic and Latin hemistiches

2013-08-29 Thread Idris Samawi Hamid ادريس سماوي حامد

On Thu, 29 Aug 2013 19:07:48 -0600, J. R. Schmid j...@weitnahbei.de wrote:

That's what I understood from the ConTeXt Standalone wiki page, and also  
why I'm so confused about this - my Standalone installation is brand  
new, and I started it roughly 3 hours after Hans' post about the new  
module. I just ran first-setup.bat again, but it still doesn't find the  
module.

 Is there a separate source/repository/etc. that needs to be specified?


Look here (where the beginning of the path may be different on your
machine/OS):

C:\ConTeXt\tex\texmf-context\tex\context\base

If m-hemistich.mkiv is there, you have updated the distribution. If not,
you have not updated the distribution.

Another way: Look at a log file from any run and look at the date to
verify that you have updated. Here's mine:

ConTeXt  ver: 2013.08.26 16:41

If you have an older date, you need to update.

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___