[NTG-context] External figures from other folders

2013-02-04 Thread H. Özoguz

Hi there,

for images I use:

\startplacefigure [title=desciption, reference=fig:demo, number=no]

\externalfigure[example][width=13cm]

\stopplacefigure


But how to reference to the image, if it is in another folger. Say my 
context mainfile is in ...\projekt and the images are in 
\projekt\images, then how to reference correctly directly to the images 
in the subfolder images?


Thanks
Huseyin

___
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] short downtime of the contextgarden server

2013-02-04 Thread Mojca Miklavec
Dear ConTeXters,

On Thu, Jan 31, 2013 at 11:25 PM, Mojca Miklavec wrote:

 During the weekend there will be a short downtime of the
 contextgarden.net server

The OS has been upgraded tonight. Please let me know if you spot any
unexpected/unnoticed side effects.

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] External figures from other folders

2013-02-04 Thread Marco Patzer
On 2013–02–04 H. Özoguz wrote:

 But how to reference to the image, if it is in another folger. Say
 my context mainfile is in ...\projekt and the images are in
 \projekt\images, then how to reference correctly directly to the
 images in the subfolder images?

\setupexternalfigures
  [directory=images]

Marco


signature.asc
Description: Digital 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] Sans Serif Math Font

2013-02-04 Thread Troy Henderson
Does the OTF version of the Lucida fonts have correct math sans serif?
If so, I may likely purchase them.

Troy
___
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] Title over the image

2013-02-04 Thread H. Özoguz

Using

\startplacefigure [title=blub, reference=fig:demo, number=no]

\externalfigure[example][width=11.2cm]

\stopplacefigure


how can I set the Title of the image over the image, instead of under 
the image (that is default) ?



Thanks
Huseyin


___
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] External figures from other folders

2013-02-04 Thread H. Özoguz

Works, Thanks 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] Title over the image

2013-02-04 Thread Wolfgang Schuster

Am 04.02.2013 um 14:24 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Using
 
 \startplacefigure [title=blub, reference=fig:demo, number=no]
 
 \externalfigure[example][width=11.2cm]
 
 \stopplacefigure
 
 
 how can I set the Title of the image over the image, instead of under the 
 image (that is default) ?

\setupcaption[figure][location=top]

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] Title over the image

2013-02-04 Thread Philipp Gesang
Hi Huseyin!

···date: 2013-02-04, Monday···from: H. Özoguz···

 Using
 
 \startplacefigure [title=blub, reference=fig:demo, number=no]
 
 \externalfigure[example][width=11.2cm]
 
 \stopplacefigure
 
 
 how can I set the Title of the image over the image, instead of
 under the image (that is default) ?

The title is actually the caption, so its placement is controlled
by “\setupcaption” [0]:

\setupcaption[figure][location=top]
\starttext
  \startplacefigure [title=blub, reference=fig:demo, number=no]
  \externalfigure[example][width=11.2cm]
  \stopplacefigure
\stoptext

[0] http://wiki.contextgarden.net/Command/setupcaption and
http://wiki.contextgarden.net/Command/setupcaptions

Regards
Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp5h5_T_pJjy.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] Title over the image

2013-02-04 Thread Marco Patzer
On 2013–02–04 H. Özoguz wrote:

\setupcaption
  [figure]
  [location=top]

\starttext
 \startplacefigure [title=blub, reference=fig:demo, number=no]
 
 \externalfigure[example][width=11.2cm]
 
 \stopplacefigure
\stoptext

Marco


signature.asc
Description: Digital 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] External figures from other folders

2013-02-04 Thread Mari Voipio
On Mon, Feb 4, 2013 at 2:03 PM, Marco Patzer home...@lavabit.com wrote:

 \setupexternalfigures
   [directory=images]

The images can also be elsewhere than in a subdirectory:

\setupexternalfigures[directory=../graphics]

You can also tell ConTeXt to look into multiple directories:

\setupexternalfigures[directory={images,drawings}]


The above can of course be combined as needed, one of my recent
ConTeXt files has

\setupexternalfigures[directory={../Classic,../Celtic}]



One more trick: ConTeXt will first look for a pic in current
directory, then proceed to check out the others defined by
\setupexternalfigures.
When I worked with a master file and its translations where some
figures had translated text and others didn't, I dumped the translated
pics in the same directory with my translated tex file, while all the
untouched graphics could be found at the root. So when I compiled e.g.
the Swedish tex file, it would first look for graphics in its own
directory 'swedish', and only if a graphic could not be found, it
followed the paths set by \setupexternalfigures. That is, ConTeXt
doesn't get confused by having several graphics with the same name in
the same tree because it stops looking after the first hit.
I figured this out almost by accident and it turned out to be one of
the smartest workflow choices I've made during my 10 years of
ConTeXting. I could swear I've seen the info on a wiki page, but can't
find that now... Anyway, this is always useful to check out, it
contains a few more nifty trick:
http://wiki.contextgarden.net/Command/setupexternalfigures



Mari
___
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] block with different formatting per line?

2013-02-04 Thread Ingo Hohmann

On 02/03/2013 04:56 AM, Rogers, Michael K wrote:

On Feb 1, 2013, at 6:16 PM, Ingo Hohmann cont...@ingohohmann.de wrote:


Hi,

is it possible to define a block, where lines are automatically formatted 
differently?
For example:
first line in caps,
second in bold,
others normal.

Is this possible? And how?

If you mean input lines, then yes.  But if you mean output lines, then I don't 
know.  It seems a well-defined task, but a hard task judging by how the 
line-breaking algorithm is described by Knuth.  I'll leave that question to 
experts.

Here's a way to process the input lines.  If there's a counter that counts the 
line number, there would be another way; but I couldn't find out that there was 
a counter.  There may be better ways anyway.

\define\FirstLine{\let\myLine\SecondLine\sc}
\define\SecondLine{\let\myLine\OtherLine\bf}
\define\OtherLine{\tf}
\definelines[doMyLines][command=\myLine]
\def\startMyLines{\let\myLine\FirstLine\startdoMyLines}
\def\stopMyLines{\stopdoMyLines}

Yes, that's exactly what I meant, and you even answered my next 
question, too.


Thank you!


Ingo
___
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] External figures from other folders

2013-02-04 Thread Alain Delmotte

Hi,

Le 4/02/2013 15:39, Mari Voipio a écrit :


One more trick: ConTeXt will first look for a pic in current
directory, then proceed to check out the others defined by
\setupexternalfigures.
When I worked with a master file and its translations where some
figures had translated text and others didn't, I dumped the translated
pics in the same directory with my translated tex file, while all the
untouched graphics could be found at the root. So when I compiled e.g.
the Swedish tex file, it would first look for graphics in its own
directory 'swedish', and only if a graphic could not be found, it
followed the paths set by \setupexternalfigures.


You were compiling the Swedish tex file from the Swedish 
directory or from the master directory (where the master 
file was)?
In other words: the compilation of the Swedish text was 
called from?? the master file? or the Swedish tex file itself?


Alain


___
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] External figures from other folders

2013-02-04 Thread Mari Voipio
On Mon, Feb 4, 2013 at 5:30 PM, Alain Delmotte espera...@swing.be wrote:
 When I worked with a master file and its translations where some
 figures had translated text and others didn't, I dumped the translated
 pics in the same directory with my translated tex file, while all the
 untouched graphics could be found at the root. So when I compiled e.g.
 the Swedish tex file, it would first look for graphics in its own
 directory 'swedish', and only if a graphic could not be found, it
 followed the paths set by \setupexternalfigures.


 You were compiling the Swedish tex file from the Swedish directory or from
 the master directory (where the master file was)?
 In other words: the compilation of the Swedish text was called from?? the
 master file? or the Swedish tex file itself?

Background: at that point of time I couldn't figure out about project
structures. And I drew my flow charts in CorelDraw, hadn't taught
myself that, either. :-)

NB. This is a bit simplified example of how things went, the real
thing contains more directories and subdirectories, but those are not
important to explain my idea.


What I had is a directory structure like this

PR-23
 PR-23/swedish
 PR-23/portuguese
 PR-23/spanish
 PR-23/german

It all started with a single-language project, language subdirectories
got added over time when translations turned out to be of essence.
[PR-23 is the name of the product for which the document is written.]

To illustrate the system with graphics, let's say that the main
directory PR-23 contained a flowchart called flow_troubles.pdf and a
wiring picture wrg-366.pdf.
Wiring drawings are never translated, so every manual version uses the
same graphic.
On the other hand, the flow chart needs to be translated for every
language version. I did that by copying the English original (Corel
Draw graphic) into the language folder, then translating, saving and
exporting as pdf in that (sub)directory. The result is that both e.g.
the subdirectory swedish and the main directory PR-23 would contain a
graphic called flow_troubles.pdf, but the one in the subfolder would
be in Swedish.

Then, if I needed a Swedish manual, I needed to go into subfolder
Swedish and compile the main .tex file there. At the beginning of that
file I had the command \setupexternalfigures[directory=../]. When the
compilation came to wrg-366.pdf, the graphic could not be found in the
same directory, so ConTeXt went one step up as instructed and picked
up the wiring drawing there. Later when compilation would get as far
to flow_troubles.pdf, ConTeXt would look in the working directory
'swedish', find it there and pick up that one and *stop looking for
that graphic*. Ergo, because the Swedish one could be found first, the
existence of the English version in the search path is not a problem.


This way I didn't need to change the names of my graphics nor my code.
It was also handy when translations arrived in batches; I translated
the graphics one by one and could always compile a proper looking
document, first with all graphics in English, then some in the target
language, finally fully translated - and still, if a new version of
the wiring drawing turned up, I only had to update the master
directory and then remember to compile the translations to get the
changes in.



One more thing to remember is that I really do product manuals and
they are always in fluctuation - there's no final version of the
manual until the production of that particular model has ceased. Thus
years have taught me to avoid duplicate information to utmost, because
the more places to update because of a minor change, the more likely
it is to forget at least one of them. Been there, done that...
[When I switched to ConTeXt, each manual version was a separate MS
Word document. To update a wiring drawing, I had to open each version,
import the drawing to replace the old one, then save and close. And
hope for the best, switching figures in Word wasn't always that
straight forward, ConTeXt is definitely more predictable.]


Mari
___
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] Sans Serif Math Font

2013-02-04 Thread Hans Hagen

On 2/4/2013 1:05 PM, Troy Henderson wrote:

Does the OTF version of the Lucida fonts have correct math sans
serif?  If so, I may likely purchase them.


there is no such thing as sans math ... there are sans alphabets but 
then you still can have issues with symbols ... to some extend \ss in 
math mode will remap onto sans shapes


if you really want a sans math font hvmath is probably a candidate (as 
is informal)


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] External figures from other folders

2013-02-04 Thread Alain Delmotte

Thanks for the detailed explanation, Mari.

Regards,

Alain

Le 4/02/2013 17:07, Mari Voipio a écrit :

On Mon, Feb 4, 2013 at 5:30 PM, Alain Delmotte espera...@swing.be wrote:

When I worked with a master file and its translations where some
figures had translated text and others didn't, I dumped the translated
pics in the same directory with my translated tex file, while all the
untouched graphics could be found at the root. So when I compiled e.g.
the Swedish tex file, it would first look for graphics in its own
directory 'swedish', and only if a graphic could not be found, it
followed the paths set by \setupexternalfigures.



You were compiling the Swedish tex file from the Swedish directory or from
the master directory (where the master file was)?
In other words: the compilation of the Swedish text was called from?? the
master file? or the Swedish tex file itself?


Background: at that point of time I couldn't figure out about project
structures. And I drew my flow charts in CorelDraw, hadn't taught
myself that, either. :-)

NB. This is a bit simplified example of how things went, the real
thing contains more directories and subdirectories, but those are not
important to explain my idea.


What I had is a directory structure like this

PR-23
  PR-23/swedish
  PR-23/portuguese
  PR-23/spanish
  PR-23/german

It all started with a single-language project, language subdirectories
got added over time when translations turned out to be of essence.
[PR-23 is the name of the product for which the document is written.]

To illustrate the system with graphics, let's say that the main
directory PR-23 contained a flowchart called flow_troubles.pdf and a
wiring picture wrg-366.pdf.
Wiring drawings are never translated, so every manual version uses the
same graphic.
On the other hand, the flow chart needs to be translated for every
language version. I did that by copying the English original (Corel
Draw graphic) into the language folder, then translating, saving and
exporting as pdf in that (sub)directory. The result is that both e.g.
the subdirectory swedish and the main directory PR-23 would contain a
graphic called flow_troubles.pdf, but the one in the subfolder would
be in Swedish.

Then, if I needed a Swedish manual, I needed to go into subfolder
Swedish and compile the main .tex file there. At the beginning of that
file I had the command \setupexternalfigures[directory=../]. When the
compilation came to wrg-366.pdf, the graphic could not be found in the
same directory, so ConTeXt went one step up as instructed and picked
up the wiring drawing there. Later when compilation would get as far
to flow_troubles.pdf, ConTeXt would look in the working directory
'swedish', find it there and pick up that one and *stop looking for
that graphic*. Ergo, because the Swedish one could be found first, the
existence of the English version in the search path is not a problem.


This way I didn't need to change the names of my graphics nor my code.
It was also handy when translations arrived in batches; I translated
the graphics one by one and could always compile a proper looking
document, first with all graphics in English, then some in the target
language, finally fully translated - and still, if a new version of
the wiring drawing turned up, I only had to update the master
directory and then remember to compile the translations to get the
changes in.



One more thing to remember is that I really do product manuals and
they are always in fluctuation - there's no final version of the
manual until the production of that particular model has ceased. Thus
years have taught me to avoid duplicate information to utmost, because
the more places to update because of a minor change, the more likely
it is to forget at least one of them. Been there, done that...
[When I switched to ConTeXt, each manual version was a separate MS
Word document. To update a wiring drawing, I had to open each version,
import the drawing to replace the old one, then save and close. And
hope for the best, switching figures in Word wasn't always that
straight forward, ConTeXt is definitely more predictable.]


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

Re: [NTG-context] Sans Serif Math Font

2013-02-04 Thread Troy Henderson

 if you really want a sans math font hvmath is probably a candidate (as is
 informal)


Are you talking about this?

http://www.micropress-inc.com/fonts/hvmath/hvmain.htm

If I were to purchase the OTF version of this font, would I be able (fairly
easily) in ConTeXt to typeset my entire document (text and math) using the
sans serif Helvetica font?  Is that something that would have to have a
great amount of work done in ConTeXt to setup, or is it ready to go since
it's in OTF format?

Troy
___
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] Getting the content of source lines in a \startlines \stoplines env?

2013-02-04 Thread Ingo Hohmann

Hi,

in another thread I got an answer to the question, how to format lines 
in an environment automatically.
Is there a way to get the content of source lines? For example, to save 
the line content into a variable?



Thank you in advance,

Ingo


___
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] Getting the content of source lines in a \startlines \stoplines env?

2013-02-04 Thread Wolfgang Schuster

Am 04.02.2013 um 18:11 schrieb Ingo Hohmann cont...@ingohohmann.de:

 Hi,
 
 in another thread I got an answer to the question, how to format lines in an 
 environment automatically.
 Is there a way to get the content of source lines? For example, to save the 
 line content into a variable?


You can save the content in a buffer and process the content with Lua.

\startluacode

userdata  = userdata  or { }
userdata.linescontent = userdata.linescontent or { }

local linescontent = userdata.linescontent

function linescontent.process()
local lines = string.splitlines(buffers.getcontent(linescontent))
context.startlines()
for i=1,#lines do
local l = lines[i]
if i == 1 then
context({\\bf %s},l)
context(true)
elseif i == 2 then
context({\\tt %s},l)
context(true)
else
context(%s,l)
context(true)
end
end
context.stoplines()
end

\stopluacode

\def\startlinescontent
  {\grabbufferdata[linescontent][startlinescontent][stoplinescontent]}

\def\stoplinescontent
  {\ctxlua{userdata.linescontent.process()}}

\starttext

\startlinescontent
One
Two
Three
Four
Five
Six
\stoplinescontent

\stoptext

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] Getting the content of source lines in a \startlines \stoplines env?

2013-02-04 Thread Aditya Mahajan

On Mon, 4 Feb 2013, Wolfgang Schuster wrote:


context({\\bf %s},l)
context(true)


What does context(true) do?

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] Getting the content of source lines in a \startlines \stoplines env?

2013-02-04 Thread luigi scarso
On Mon, Feb 4, 2013 at 7:05 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Mon, 4 Feb 2013, Wolfgang Schuster wrote:

 context({\\bf %s},l)
 context(true)


 What does context(true) do?

 Aditya



Newline tokens are
injected by passing true to the context command:

see cld-mkiv.pdf

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


[NTG-context] What is changed?

2013-02-04 Thread H. van der Meer
The following worked without a hitch:

\def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
\def\formatDuration#1{\ctxlua{
local s = string.gsub(#1,\%D,)
local d = tostring(hvdm.time:match(s))
tex.print(string.sub(d,1,2) ~= 0: and d or string.sub(d,3))
}}
\def\FormatDuration#1{\IsNilReturn{\formatDuration{#1}}}
Called by something like \FormatDuration{11929} (meaning: 1 hour 19 minutes 29 
seconds)

Now I get an error in
ConTeXt  ver: 2013.01.27 21:24 MKIV  fmt: 2013.1.28  int: english/english
! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\%'.
\formatDuration ...0: and d or string.sub(d,3)) }  
   
\IsNilReturn #1-\edef \tmp {#1
   }\doifelse {\tmp }{nil}{\color [red]{ERROR}}{...

Whereas in a previous Context all went well:
ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.2.4  int: english/english

What did change? Why? And how to repair?

Hans van der Meer



___
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] What is changed?

2013-02-04 Thread Aditya Mahajan

On Mon, 4 Feb 2013, H. van der Meer wrote:


The following worked without a hitch:

\def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
\def\formatDuration#1{\ctxlua{
local s = string.gsub(#1,\%D,)
local d = tostring(hvdm.time:match(s))
tex.print(string.sub(d,1,2) ~= 0: and d or string.sub(d,3))
}}
\def\FormatDuration#1{\IsNilReturn{\formatDuration{#1}}}
Called by something like \FormatDuration{11929} (meaning: 1 hour 19 minutes 29 
seconds)

Now I get an error in
ConTeXt  ver: 2013.01.27 21:24 MKIV  fmt: 2013.1.28  int: english/english
! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\%'.
\formatDuration ...0: and d or string.sub(d,3)) }
\IsNilReturn #1-\edef \tmp {#1
  }\doifelse {\tmp }{nil}{\color [red]{ERROR}}{...

Whereas in a previous Context all went well:
ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.2.4  int: english/english

What did change? Why? And how to repair?


I noticed something similar a few days ago. IIRC, using \letterpercent 
still works (untested).


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] local picture not found anymore

2013-02-04 Thread H. van der Meer
Having a file picture.jpg worked fine. Now it results in inclusion of The 
picture package by Heiko Oberdiek. Suddenly file searching doesn't start with 
the current directory anymore but somewhere in the /tex-chain.

Were the significant changes here? Something to do with Luatex? I didn't follow 
the developments for the last few months, so I may have missed an important 
change.

Hans van der Meer



___
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] What is changed?

2013-02-04 Thread Meer H. van der

On 4 feb. 2013, at 19:13, Aditya Mahajan adit...@umich.edu
 wrote:

 On Mon, 4 Feb 2013, H. van der Meer wrote:
 
 The following worked without a hitch:
 
 \def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
 \def\formatDuration#1{\ctxlua{
  local s = string.gsub(#1,\%D,)
  local d = tostring(hvdm.time:match(s))
  tex.print(string.sub(d,1,2) ~= 0: and d or string.sub(d,3))
  }}
 \def\FormatDuration#1{\IsNilReturn{\formatDuration{#1}}}
 Called by something like \FormatDuration{11929} (meaning: 1 hour 19 minutes 
 29 seconds)
 
 Now I get an error in
 ConTeXt  ver: 2013.01.27 21:24 MKIV  fmt: 2013.1.28  int: english/english
 ! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\%'.
 \formatDuration ...0: and d or string.sub(d,3)) }
 \IsNilReturn #1-\edef \tmp {#1
  }\doifelse {\tmp }{nil}{\color [red]{ERROR}}{...
 
 Whereas in a previous Context all went well:
 ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.2.4  int: english/english
 
 What did change? Why? And how to repair?
 
 I noticed something similar a few days ago. IIRC, using \letterpercent still 
 works (untested).
 
 Aditya

No, that is not the solution. Maybe because the % has to function in a Lua gsub 
as match pattern.

I tried dropping the backslash, not \%D but using %D. Then the error is:
! LuaTeX error [string \directlua ]:1: ')' expected near '0'.
\formatDuration ...0: and d or string.sub(d,3)) }  
   
\IsNilReturn #1-\edef \tmp {#1
   }\doifelse {\tmp }{nil}{\color [red]{ERROR}}{...

More ideas?


Hans van der Meer

___
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] local picture not found anymore

2013-02-04 Thread Meer H. van der
Found this one with a lucky guess.
The macro call \doiffile{picture} does find a usable picture file (I guess 
picture.pdf) in my tex-tree.
My conclusion would be that the search no longer starts in the current 
directory but does a global search first. That used to be different.
Why the change? My guess will be that Taco as Luatex's shepperd might shine 
some light here.

Hans van der Meer



On 4 feb. 2013, at 19:19, H. van der Meer h.vanderm...@uva.nl
 wrote:

 Having a file picture.jpg worked fine. Now it results in inclusion of The 
 picture package by Heiko Oberdiek. Suddenly file searching doesn't start 
 with the current directory anymore but somewhere in the /tex-chain.
 
 Were the significant changes here? Something to do with Luatex? I didn't 
 follow the developments for the last few months, so I may have missed an 
 important change.
 
 Hans van der Meer
 
 
 
 ___
 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] What is changed?

2013-02-04 Thread Wolfgang Schuster

Am 04.02.2013 um 19:26 schrieb Meer H. van der h.vanderm...@uva.nl:

 More ideas?

Move the Lua code to a luacode block or a external and use TeX only to access 
the function.

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] What is changed?

2013-02-04 Thread Wolfgang Schuster

Am 04.02.2013 um 20:12 schrieb Wolfgang Schuster wolfgang.schus...@gmail.com:

 
 Am 04.02.2013 um 19:26 schrieb Meer H. van der h.vanderm...@uva.nl:
 
 More ideas?
 
 Move the Lua code to a luacode block or a external and use TeX only to access 
 the function.

  
  file

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
___


[NTG-context] Inclusion of title module in ConTeXt

2013-02-04 Thread Marco Patzer
Hi Wolfgang et al.

what do you think about uploading your title module to the modules
repository?

Or maybe it can even make it's way into the core. It's just a few
lines, nonetheless it's very versatile and handy.

Marco


signature.asc
Description: Digital 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
___

[NTG-context] Indentation in TOC

2013-02-04 Thread Devendra Ghate

Hello,

I am trying to indent my section/subsection etc. progressively. I am 
using *numbercommand*
and added *hspace* before the numbers. But the section title is not 
moved to the right along with
the section number and overlaps with it. I tried adding *loffset=2cm* 
(since all the options of *\framed* are

valid for *setuplist*) also, but doesn't seem to have any effect.

Please point out the mistake.

Regards,
Devendra

*MWE*

\definehspace[myem][2em]
\def\secnum#1{\hspace[myem]#1}
\setuplist
  [section]
   [numbercommand={\secnum}]

\starttext
   \completecontent[alternative=c]
   \chapter{A}
   \section{B}
\stoptext

___
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] Indentation in TOC

2013-02-04 Thread Wolfgang Schuster

Am 04.02.2013 um 21:11 schrieb Devendra Ghate devendra.gh...@gmail.com:

 Hello,
 
 I am trying to indent my section/subsection etc. progressively. I am using 
 *numbercommand*
 and added *hspace* before the numbers. But the section title is not moved to 
 the right along with
 the section number and overlaps with it. I tried adding *loffset=2cm* (since 
 all the options of *\framed* are
 valid for *setuplist*) also, but doesn't seem to have any effect.
 
 Please point out the mistake.
 
 Regards,
 Devendra
 
 *MWE*
 
 \definehspace[myem][2em]
 \def\secnum#1{\hspace[myem]#1}
 \setuplist
  [section]
   [numbercommand={\secnum}]

\setuplist[…][margin=2em]

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] Indentation in TOC

2013-02-04 Thread Devendra Ghate


On 02/05/2013 01:47 AM, Wolfgang Schuster wrote:

Am 04.02.2013 um 21:11 schrieb Devendra Ghate devendra.gh...@gmail.com:


Hello,

I am trying to indent my section/subsection etc. progressively. I am using 
*numbercommand*
and added *hspace* before the numbers. But the section title is not moved to 
the right along with
the section number and overlaps with it. I tried adding *loffset=2cm* (since 
all the options of *\framed* are
valid for *setuplist*) also, but doesn't seem to have any effect.

Please point out the mistake.

Regards,
Devendra

*MWE*

\definehspace[myem][2em]
\def\secnum#1{\hspace[myem]#1}
\setuplist
  [section]
   [numbercommand={\secnum}]

\setuplist[…][margin=2em]

Wolfgang

Thank you very much.

Devendra








___
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] Sans Serif Math Font

2013-02-04 Thread Hans Hagen

On 2/4/2013 6:06 PM, Troy Henderson wrote:

if you really want a sans math font hvmath is probably a candidate
(as is informal)


Are you talking about this?

http://www.micropress-inc.com/fonts/hvmath/hvmain.htm

If I were to purchase the OTF version of this font, would I be able
(fairly easily) in ConTeXt to typeset my entire document (text and math)
using the sans serif Helvetica font?  Is that something that would have
to have a great amount of work done in ConTeXt to setup, or is it ready
to go since it's in OTF format?


I wonder if it's otf but if the type1 uses standard tex encoding, it 
should work as virtual otf .. you then only need to make a file like 
tx-math.lfg as vectors are already built-in.


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] Inclusion of title module in ConTeXt

2013-02-04 Thread Marco Patzer
On 2013–02–04 Marco Patzer wrote:

 what do you think about uploading your title module to the modules
 repository?

An answer doesn't necessarily need words ;)

Thanks Wolfgang

Marco


signature.asc
Description: Digital 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] local picture not found anymore

2013-02-04 Thread Mojca Miklavec
On Mon, Feb 4, 2013 at 7:52 PM, Meer H. van der wrote:
 Found this one with a lucky guess.
 The macro call \doiffile{picture} does find a usable picture file (I guess
 picture.pdf) in my tex-tree.
 My conclusion would be that the search no longer starts in the current
 directory but does a global search first. That used to be different.
 Why the change?

I had a similar (yet unresolved) problem, see thread ConTeXt inputs
files from TEXMF/doc from October 2012:
http://thread.gmane.org/gmane.comp.tex.context/78692

I'm not sure if that was really a change, but it probably isn't
intentionally so. My wild guess is that pdf takes precedence over jpg
(ConTeXt would probably first test if picture.pdf is found and only if
that one wouldn't be, it would try picture.png or jpg). In any case
ConTeXt should not even search in doc folder for files to be included
as a picture. If those PDFs from doc folders would be excluded, most
such problems would go away, I believe. You probably included
/usr/local/texlive/2012/texmf-dist/doc/latex/oberdiek/picture.pdf?

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] local picture not found anymore

2013-02-04 Thread Aditya Mahajan

On Tue, 5 Feb 2013, Mojca Miklavec wrote:


On Mon, Feb 4, 2013 at 7:52 PM, Meer H. van der wrote:

Found this one with a lucky guess.
The macro call \doiffile{picture} does find a usable picture file (I guess
picture.pdf) in my tex-tree.
My conclusion would be that the search no longer starts in the current
directory but does a global search first. That used to be different.
Why the change?


I had a similar (yet unresolved) problem, see thread ConTeXt inputs
files from TEXMF/doc from October 2012:
   http://thread.gmane.org/gmane.comp.tex.context/78692

I'm not sure if that was really a change, but it probably isn't
intentionally so. My wild guess is that pdf takes precedence over jpg
(ConTeXt would probably first test if picture.pdf is found and only if
that one wouldn't be, it would try picture.png or jpg).


As I said in a recent post 
(http://article.gmane.org/gmane.comp.tex.context/80617/), I thought that 
\setupexternalfigures[location=local] would not search the texmf tree at 
all. But that is clearly not the case.



In any case
ConTeXt should not even search in doc folder for files to be included
as a picture. If those PDFs from doc folders would be excluded, most
such problems would go away, I believe. You probably included
/usr/local/texlive/2012/texmf-dist/doc/latex/oberdiek/picture.pdf?


It certainly does not search all files in the doc directory. On TL'12 
mtxrun does not find /usr/share/texmf/doc/dvipdfm/something.pdf, i.e.,


$ mtxrun something.pdf

does not return anything. But on minimals,

$ mtxrun simpleslides.pdf
/opt/context-minimals/texmf-modules/doc/context/third/simpleslides/simpleslides.pdf

which should not happen.

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
___