Re: [NTG-context] Font for MetaPost graphics

2012-05-04 Thread Mojca Miklavec
On Thu, May 3, 2012 at 3:13 AM, Marco wrote:

 The text in Metapost adapts to the text set in ConTeXt. But the font
 setup should *only* be set for MetaPost, not regular text.

 Does that mean, that MPenvironment is deprecated and does not work
 at all?

Please don't rely on my answer since I haven't been following the
development as closely as I used to in past.

But my guess is that the argument goes into the opposite way. I past
(and still in MKII) one *had to* set up fonts twice - once for the
main document and once for MetaPost since MetaPost did its own
processing of labels and MetaPost didn't see the ConTeXt font setups.
So it was difficult to convince MetaPost to use the same font.

Now (as Aditya explained) metapost automatically inherits font setups
from the main document and it might be that nobody ever thought of /
requested / needed to have a special setup for using different font
for MetaPost labels.

I can think of many workarounds to this, but I agree that there is a
valid reason why
\startMPenvironment
(or some other command) should be able to change the font inside
metapost labels only.

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] Font for MetaPost graphics

2012-05-04 Thread Aditya Mahajan

On Fri, 4 May 2012, Mojca Miklavec wrote:


I can think of many workarounds to this, but I agree that there is a
valid reason why
   \startMPenvironment
(or some other command) should be able to change the font inside
metapost labels only.


A better alternative would to define

\setupMPtext
   [
style=...,
color=...,
setups=...,
   ]

that can be used to set the style for metapost text.

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
___


[NTG-context] Wiki - results differ?

2012-05-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

Wiki and a file processed on a local computer give different results -

- please compare http://wiki.contextgarden.net/Command/doif...;

and the example attached:


\starttext
  \ctxlua{test = true}

  Test is \ctxlua{commands.testcase(test)}{True}{False}.

  \ctxlua{test = false}

  Test is \ctxlua{commands.testcase(test)}{True}{False}.
\stoptext


The result should be:


Test is True.
Test is False.


which works fine on my computer.

But wiki shows (wrongly):


Test is TrueFalse.
Test is TrueFalse.


although the same code is used in the example:


context source=yes text=Gives:
\starttext
  \ctxlua{test = true}

  Test is \ctxlua{commands.testcase(test)}{True}{False}.

  \ctxlua{test = false}

  Test is \ctxlua{commands.testcase(test)}{True}{False}.
\stoptext
/context


Any idea why both results differ?

And how to make wiki show the good result?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t.log
Description: Binary data


t.mkiv
Description: Binary data


t.pdf
Description: Adobe PDF 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] Wiki - results differ?

2012-05-04 Thread Taco Hoekwater

On 05/04/2012 11:55 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Any idea why both results differ?


the context tag on the wiki normally runs context mkii.


And how to make wiki show the good result?


I fixed the page.

Best wishes,
Taco
___
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] Non-Printing PDFs with ConTeXt

2012-05-04 Thread Malte Stien
Hi all,

Is there a way I can get ConTeXt to produce PDFs that are not-printable? Just 
as a background to my question: This is not about copyright. Rather, I am using 
ConTeXt to produce quality process documents. The quality management system 
requires that all quality process documents be controlled, that is one must 
prevent folks from printing copies of their own that then keep floating around 
the place and cannot be retracted when a new version of the quality process 
document is issued.

Hence, I am aiming for a paper-less scenario where everyone reads the documents 
on screen. Therefore, I would like to make printing impossible, or at least 
hard. The only one who should be able to print the document is the Document 
Manager; maybe the documents could be encrypted (PDF supports that, I believe), 
such that the Document Manager can print them knowing the password.

So far, I have only seen Word and Acrobat Distiller being able to do this. Is 
there a way I can setup ConTeXt to do this? Or are there some command line 
tools, that can do that after the PDF has been produced?

Any hints would be great.
Thank you,
Malte.

___
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] Non-Printing PDFs with ConTeXt

2012-05-04 Thread Andreas Schneider
On Friday, May 4, 2012, at 12:37 Malte Stien wrote:
 Hi all,

 Is there a way I can get ConTeXt to produce PDFs that are
 not-printable? Just as a background to my question: This is not
 about copyright. Rather, I am using ConTeXt to produce quality
 process documents. The quality management system requires that all
 quality process documents be controlled, that is one must prevent
 folks from printing copies of their own that then keep floating
 around the place and cannot be retracted when a new version of the
 quality process document is issued.

 Hence, I am aiming for a paper-less scenario where everyone reads
 the documents on screen. Therefore, I would like to make printing
 impossible, or at least hard. The only one who should be able to
 print the document is the Document Manager; maybe the documents
 could be encrypted (PDF supports that, I believe), such that the
 Document Manager can print them knowing the password.

 So far, I have only seen Word and Acrobat Distiller being able to
 do this. Is there a way I can setup ConTeXt to do this? Or are there
 some command line tools, that can do that after the PDF has been produced?

 Any hints would be great.
 Thank you,
 Malte.

You can accomplish PDF encryption with pdftk (for example):
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

You  use that to restrict certain features (in your case printing) and
protect  that restriction with a password. The PDF itself can still be
read without password.

Of  course  the  PDF viewer has to honor that restriction. If the user
finds  a PDF viewer that doesn't give a  about these restrictions,
they  can  still  print it. But I think that doesn't really matter for
your scenario anyway. :-)

-- 
Best Regards,
Andreas

pgpezLkr1jjJE.pgp
Description: PGP signature
___
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] Non-Printing PDFs with ConTeXt

2012-05-04 Thread luigi scarso
On Fri, May 4, 2012 at 12:37 PM, Malte Stien ma...@stien.de wrote:
 Hi all,

 Is there a way I can get ConTeXt to produce PDFs that are not-printable? Just 
 as a background to my question: This is not about copyright. Rather, I am 
 using ConTeXt to produce quality process documents. The quality management 
 system requires that all quality process documents be controlled, that is 
 one must prevent folks from printing copies of their own that then keep 
 floating around the place and cannot be retracted when a new version of the 
 quality process document is issued.

 Hence, I am aiming for a paper-less scenario where everyone reads the 
 documents on screen. Therefore, I would like to make printing impossible, or 
 at least hard. The only one who should be able to print the document is the 
 Document Manager; maybe the documents could be encrypted (PDF supports that, 
 I believe), such that the Document Manager can print them knowing the 
 password.

 So far, I have only seen Word and Acrobat Distiller being able to do this. Is 
 there a way I can setup ConTeXt to do this? Or are there some command line 
 tools, that can do that after the PDF has been produced?

 Any hints would be great.

see also
http://qpdf.sourceforge.net/

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


Re: [NTG-context] Font for MetaPost graphics

2012-05-04 Thread Marco
On 2012-05-04 Aditya Mahajan adit...@umich.edu wrote:

 On Fri, 4 May 2012, Mojca Miklavec wrote:

  But my guess is that the  argument goes into the opposite way. I
  past (and still in MKII) one *had  to* set up fonts twice - once
  for the main  document and once for MetaPost  since MetaPost did
  its own processing of labels and MetaPost didn't see the ConTeXt
  font setups. So  it was difficult to convince  MetaPost to use
  the same font.

I agree, it's  a big step forward towards  usability and consistency
to have  MetaPost automatically inherit ConTeXts  settings. However,
it went out-of-control now.

 A better alternative would to define
 
 \setupMPtext
 [
  style=...,
  color=...,
  setups=...,
 ]
 
 that can be used to set the style for metapost text.

+1

Marco


___
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] Non-Printing PDFs with ConTeXt

2012-05-04 Thread Martin Schröder
2012/5/4 Malte Stien ma...@stien.de:
 Is there a way I can get ConTeXt to produce PDFs that are not-printable?

You want DRM. ConTeXt as such does not offer that; tools for DRM and PDF exist.

Best
   Martin
___
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] Non-Printing PDFs with ConTeXt

2012-05-04 Thread Mojca Miklavec
On Fri, May 4, 2012 at 1:35 PM, Martin Schröder wrote:
 2012/5/4 Malte Stien wrote:
 Is there a way I can get ConTeXt to produce PDFs that are not-printable?

 You want DRM. ConTeXt as such does not offer that; tools for DRM and PDF 
 exist.

This looks like a FAQ to me. I don't know much about those tools and
which ones are the best, but I think that we need a clear wiki page
(or something like that) shortly describing existing tools (maybe both
free and commercial) for post-processing documents together with their
pros  cons.

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
___