Re: [NTG-context] doublesided PDF - first and last page singlesided

2012-04-15 Thread Aditya Mahajan

On Mon, 16 Apr 2012, Thomas A. Schmitz wrote:

You should make an example yourself, I'm still guessing what it is you want 
to achieve. I'm not sure what a "pdf-version for the internet" is - pdf is 
not a web-based format?


My guess is that that OP wants to display the pdf the same way Acrobat 
reader displays a pdf in double-sided document in "two up" mode. For 
example, open any of the ConTeXt "This Way" magazines in two-up mode.


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] doublesided PDF - first and last page singlesided

2012-04-15 Thread Thomas A. Schmitz

On 04/16/2012 12:17 AM, Jan Heinen wrote:

I was lucky to get a fast answer - but with your code I don't get the
right result:

  -- start your code

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode
\starttext
First page
\startmode[booklet]
\null \page
\stopmode
etc.
\stoptext

Thomas

  -- stop

With your code I get:

1 2  first page of the pdf
3 4  second
5 6  third
7 8  fourth



But I want to get:

1 first page of the pdf (coverpage)
2 3  second
4 5  third
6 7  fourth
8 fifth (coverpage)


I know how to use with modes - but the answer must be an other.


No, I get the result you want with my code.

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode

\starttext

One

\page

\startmode[booklet]

\null \page

\stopmode

Two

\page

Three

\page

Four

\page

Five

\page

Six

\page

Seven

\page

Eight

\stoptext

You should make an example yourself, I'm still guessing what it is you 
want to achieve. I'm not sure what a "pdf-version for the internet" is - 
pdf is not a web-based format?


Thomas
___
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] doublesided PDF - first and last page singlesided

2012-04-15 Thread Aditya Mahajan

On Sun, 15 Apr 2012, Aditya Mahajan wrote:

If you don't mind creating another file to convert a given double sided pdf 
into the above format, you can use the following (pseudo code, untested, and 
might have typos)


You can also create a mtx-context-doublesided.lua script that takes the 
filename from command line and does all the processing at the lua level.


See mtx-context-*.lua in $TEXMF/tex/context/base/ for examples.

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] doublesided PDF - first and last page singlesided

2012-04-15 Thread Aditya Mahajan

On Mon, 16 Apr 2012, Jan Heinen wrote:

I was lucky to get a fast answer - but with your code I don't get the right 
result:


-- start your code

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode
\starttext
First page
\startmode[booklet]
\null \page
\stopmode
etc.
\stoptext

Thomas

-- stop

With your code I get:

1 2  first page of the pdf
3 4  second
5 6  third
7 8  fourth



But I want to get:

1 first page of the pdf (coverpage)
2 3  second
4 5  third
6 7  fourth
8 fifth (coverpage)


I know how to use with modes - but the answer must be an other.

Maybe I have to explain it more clearly:

on the first PDF-Page (A5) there should be only the cover-page (page 1)
   \setuppapersize[A5][A5]

\setuparranging[1SIDE]%<- I don't know how to write it - nothing was 
working



On the second PDF-Page there should be page 2 and page 3
   \setuppapersize[A5][A4,landscape]

\setuparranging[2SIDE]


It must be a problem lot's of people have when they make a book with ConTeXt
and want to make a second PDF-version for the Internet.


If you don't mind creating another file to convert a given double sided 
pdf into the above format, you can use the following (pseudo code, 
untested, and might have typos)


get number of pages in the pdf
   \getfiguredimensions[filename]
   \edef\NOfPages{\noffigurepages}

insert the first page
   \startTEXpage[height=(A5 height}, width=(A5 width)]
   \externalfigure[filename][page=1]
   \stopTEXpage

loop and insert all but the last page (you may have to test if the number 
of pages are odd or even and use \numexpr(\NOfPages - 1) to find the last 
but one page:


\dostepwiserecurse{2}{2}{\LastButOnePage}
 { \startTEXpage[height=(A5 height), width=(A4 height)]
   \expanded{\externalfigure[filename][page=\recurselevel]}%
   \expanded{\externalfigure[filename][page=\numexpr\recurselevel+1\relax]}%
   \stopTEXpage
 }

If the number of pages is even, insert last page.


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] doublesided PDF - first and last page singlesided

2012-04-15 Thread Jan Heinen
I was lucky to get a fast answer - but with your code I 
don't get the right result:


 -- start your code

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode
\starttext
First page
\startmode[booklet]
\null \page
\stopmode
etc.
\stoptext

Thomas

 -- stop

With your code I get:

1 2  first page of the pdf
3 4  second
5 6  third
7 8  fourth



But I want to get:

1 first page of the pdf (coverpage)
2 3  second
4 5  third
6 7  fourth
8 fifth (coverpage)


I know how to use with modes - but the answer must be an other.

Maybe I have to explain it more clearly:

on the first PDF-Page (A5) there should be only the 
cover-page (page 1)

\setuppapersize[A5][A5]

 \setuparranging[1SIDE]%<- I don't know how to write it - nothing was 
working


On the second PDF-Page there should be page 2 and page 3
\setuppapersize[A5][A4,landscape]

 \setuparranging[2SIDE]


It must be a problem lot's of people have when they make a 
book with ConTeXt

and want to make a second PDF-version for the Internet.


Regards
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt   
All information arround ConTeXt


http://wiki.contextgarden.net/Category:Commands  
Commands


!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist


___
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] How to process a project residing in another directory

2012-04-15 Thread Helge Blischke
I try to process a ConTeXt project residing in a directory different from the
current directory (where context is called), imagine e.g. a NFS mounted
directory on a different host.

I tried to point context to the project directory
by specifying it by the command line option
--path=absolute_path_to_the_directory
but that did not work.

Helge

___
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] lua EOL in xmlsetups

2012-04-15 Thread Wolfgang Schuster

Am 14.04.2012 um 20:15 schrieb Jano Kula:

> Hello to everybody,
> 
> why end of line is not accepted by \startluacode ... \stopluacode construct 
> in xmlsetups? Is there a better way?

That’s a feature of \startsetups etc. because you don’t have to worry about 
unwanted spaces when you write code, e.g. in this example there is no unwanted 
space even though I haven’t added a % after { (or a few other places)

\startsetups test

  \doifelse
{
  \somevariable
}
{
  \somevalue
}
{
  do this
}
{
  else do this
}

\stopsetups

In your case this feature shows a unwanted side effect because the line end 
after “do” is ignored and Lua gets “dotex.print”. To fix this you can either 
use \dostepwiserecurse where you can set a start/stop value for the loop of you 
add a space after “do”.

Wolfgang
___
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] doublesided PDF - first and last page singlesided

2012-04-15 Thread Thomas A. Schmitz

On 04/15/2012 10:01 AM, Jan Heinen wrote:

Hello, someone here on a sunday?

I want to have a PDF-screen-version of my booklet:
The book has 8 pages including the coverpages.

The result should look like this: (first and last page NOT doublesided)

1 first page of the pdf (coverpage)
2 3  second
4 5  third
6 7  fourth
8 fifth (coverpage)


With the following commands I get the wrong result:

\setuppapersize[A5][A4,landscape]% A5 wird auf A4 gedruckt
\setuparranging[2SIDE]

1 2  first page of the pdf
3 4  second
5 6  third
7 8  fourth


Have a nice weekend
Jannis


Willi is the resident imposition expert, but in his absence: I don't 
think this is a standard imposition scheme, hence ConTeXt doesn't have 
any predefined setup for it (I'm not quite sure I understand what it is 
you're trying to accomplish). So I think you will have to add the 
desired empty page manually.


On a wild guess: if you want different versions for print and for 
screen, you can use modes (that's what I do for some of my stuff). in 
pseudo-code:


\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode

\starttext

First page

\startmode[booklet]
\null \page
\stopmode

etc.

\stoptext

When you run with

context --mode=booklet --arrange

you'll get the desired booklet; otherwise you get a normal pdf.

Thomas
___
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] MLA Bibliography

2012-04-15 Thread Mojca Miklavec
On Sat, Apr 14, 2012 at 05:51, Jaroslav Hajtmar wrote:
> Hi Kip ...
> I had a similar problem with a bibliography. Supervisor of thesis wants to
> have a bibliography in a specific format (sorted AMS like) in which it can
> not produce the ConTeXt.
> Maybe this is just because I am a bit stupid and I could not correct the
> bibliography in ConTeXt and run something similar to what I wanted none of
> the conference met, so no one could help me. I finally after many hours of
> experiments on all bibliography resigned and I made myself a simple tool for
> typesetting bibliographies.

It requires some time and tedious work, but if you know exactly what
you want, changing the layout should not be too difficult. Here are
some fragments of code that I'm using (I wanted DOI to be printed out,
that's why I changed the way how article is printed):

\setuppublicationlayout[article]{%
   \insertartauthors{}{\unskip. }{\insertthekey{}{. }{}}%
   \insertarttitle{\bgroup }{\egroup. }{}%
   \insertjournal{\bgroup \it}{\egroup}
{\insertcrossref{In }{}{}}%
   \insertvolume
{, }
{\insertissue{(}{)}{}%
 \insertpages{:}{}{}%
 \insertpubyear{, }{}{}.}
{\insertpages{, pages }{}{}%
 \insertpubyear{, }{}{}.}%
   \insertnote{ }{.}{}%
   \insertdoi{ doi:}{.}{}%
   \insertcomment{}{.}{}%
}

% new fields and bibliography types:

\newbibfield[conference]
\newbibfield[cobissid]

\setuppublicationlayout[conference]{%
  \insertartauthors{}{\unskip. }{}%
  \insertarttitle{\bgroup }{\egroup. }{}%
  \insertconference{\bgroup \it}{\egroup\insertday{, }{.
}{}\insertmonth{}{\ }{}\insertpubyear{}{}{}. }{}%
  \insertcobissid{[COBISS.SI-ID\ }{]}{}%
}

\setuppublicationlayout[webpage]{%
  \inserttitle{\bgroup\it }{\egroup. }{}%
  \inserturl{}{}{}%
}

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


Re: [NTG-context] Rendering differences between PDF viewers

2012-04-15 Thread Hans Hagen

On 15-4-2012 08:00, Kip Warner wrote:

Hey list,

I've noticed an unfortunate visual difference in my document's colours
when rendered with Evince 2.32.0 where they come out as expected (or
even with Zathura) against Adobe Reader 9.5.7.

Rendered with Evince 2.32.0:
https://www.avaneya.com/temp/evince.png

Rendered with Adobe Reader 9.5.7:
https://www.avaneya.com/temp/reader.png

Note how the latter is overly saturated in the red. Does anyone have any
clues as to why this might happen and what I might do to make it appear
as intended in Adobe Reader? I wonder if this might have something to do
with different renderer's different gamma correction?

It's kind of funny that this could happen because I thought the whole
point of PDFs was that they were truly portable.


keep in mind that acrobat has monitor profiles, simulates paper and has 
different rendering code when transparencies are used


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] Rendering differences between PDF viewers

2012-04-15 Thread Mojca Miklavec
On Sun, Apr 15, 2012 at 08:00, Kip Warner wrote:
> Hey list,
>
> I've noticed an unfortunate visual difference in my document's colours
> when rendered with Evince 2.32.0 where they come out as expected (or
> even with Zathura) against Adobe Reader 9.5.7.
>
> Rendered with Evince 2.32.0:
> https://www.avaneya.com/temp/evince.png
>
> Rendered with Adobe Reader 9.5.7:
> https://www.avaneya.com/temp/reader.png
>
> Note how the latter is overly saturated in the red. Does anyone have any
> clues as to why this might happen

Bug in AR.

> and what I might do to make it appear as intended in Adobe Reader?

Convince Adobe to fix it or find a way to render that page without
prerequisites for the bug to show up.

I'm not sure about your particular case, but I have seen the problem
multiple times, most often when combined with transparency on the same
page.

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


[NTG-context] doublesided PDF - first and last page singlesided

2012-04-15 Thread Jan Heinen

Hello, someone here on a sunday?

I want to have a PDF-screen-version of my booklet:
The book has 8 pages including the coverpages.

The result should look like this: (first and last page NOT 
doublesided)


1 first page of the pdf (coverpage)
2 3  second
4 5  third
6 7  fourth
8 fifth (coverpage)


With the following commands I get the wrong result:

\setuppapersize[A5][A4,landscape]% A5 wird auf A4 gedruckt
\setuparranging[2SIDE]

1 2  first page of the pdf
3 4  second
5 6  third
7 8  fourth


Have a nice weekend
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt   
All information arround ConTeXt


http://wiki.contextgarden.net/Category:Commands  
Commands


!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist


___
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
___