Re: [NTG-context] margin of left/right floats

2018-04-04 Thread Henning Hraban Ramm
Am 2018-04-03 um 20:55 schrieb Hans Hagen :

> On 4/3/2018 6:56 PM, Henning Hraban Ramm wrote:
>> Hello again,
>> this should be a simple question, but I didn’t find anything (or probably 
>> didn’t look at the right places):
>> How can I setup/change the margin beside a float (image) that is placed left 
>> or right?
>\setupfloats[margin=3cm]

I thought there should be a setting like that, but it’s missing in 
http://wiki.contextgarden.net/Command/setupfloat
I’ll add it.

I didn’t check what left/rightmargindistance does, just anticipated it would be 
the distance from the margin of the textarea.

> 
>\placefigure[left]{}{}
> 
>\input ward \input ward
> 
>\definefloat[myleft]
> 
>\setupfloat
>  [myleft]
>  [default=left,
>   leftmargindistance=1cm]
> 
>\placefloat
>  [myleft]{}{}
> 
>\input ward \input ward
> 
>\setupfloat
>  [myleft]
>  [default=left,
>   margin=1cm,
>   leftmargindistance=1cm]
> 
>\placefloat
>  [myleft]{}{}
> 
>\input ward \input ward
> 
> 
> for historical reasons margin is only set global but I'll change that to 
> instance related too (so that the last example works without globally setting 
> margin)

Thank you very much!


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] margin of left/right floats

2018-04-04 Thread Hans Hagen

On 4/4/2018 10:10 AM, Henning Hraban Ramm wrote:

Am 2018-04-03 um 20:55 schrieb Hans Hagen :


On 4/3/2018 6:56 PM, Henning Hraban Ramm wrote:

Hello again,
this should be a simple question, but I didn’t find anything (or probably 
didn’t look at the right places):
How can I setup/change the margin beside a float (image) that is placed left or 
right?

\setupfloats[margin=3cm]


I thought there should be a setting like that, but it’s missing in 
http://wiki.contextgarden.net/Command/setupfloat
I’ll add it.

I didn’t check what left/rightmargindistance does, just anticipated it would be 
the distance from the margin of the textarea.


there's probably some info in details.pdf


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Henri Menke
Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

    /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get to
the document I need.  It would be great if there was something like

    mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc gnuplot"
would open the manual of the gnuplot module, etc.

See attached for my shitty prototype.

Cheers, Henri

if not modules then modules = { } end modules ['mtx-doc'] = {
version   = 1.001,
comment   = "companion to mtxrun.lua",
author= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license   = "see context related readme files"
}

-- If needed this one can be optimized for speed as well as use some existing
-- helpers. We can quit faster on max, and probably use lpeg instead of find.

local helpinfo = [[


 
  mtx-doc
  Documentation Utility
  0.1
 
 
  
   
list all matches instead of opening the first one
   
  
 
 
  
   Examples
   
mtxrun --script doc metafun
   
  
 

]]

local application = logs.application {
name = "mtx-doc",
banner   = "Documentation Utility 0.1",
helpinfo = helpinfo,
}

local report = application.report

local list = environment.arguments["list"] or false
local files = environment.files and #environment.files > 0 and environment.files

if files and files[1] then
   local matches = resolvers.findfiles([[*]] .. files[1] .. [[*.pdf]])

   if not list and matches[1] then
  os.execute([[xdg-open "]] .. matches[1] .. [["]])
   else
  for i,file in pairs(matches) do
 print(i,file)
  end
  io.write("Enter number of file to view, anything else to skip: ")
  local n = io.read("*n")
  if n then
 if matches[n] then
os.execute([[xdg-open "]] .. matches[n] .. [["]])
 else
error("The document with number " .. n .. " does not exist")
 end
  end
   end
else
application.help()
end
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Hans Hagen

On 4/5/2018 12:43 AM, Henri Menke wrote:

Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

     /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get to
the document I need.  It would be great if there was something like

     mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc gnuplot"
would open the manual of the gnuplot module, etc.


this is one of these magic features that suddenly is available on your 
system


mtxrun --launch metafun*.pdf
mtxrun --launch cld-mkiv.pdf
mtxrun --all --launch "*-mkiv.pdf"

features like that have always been present in the context suite of 
programs (i bet even before texdoc) but it might be that i don't call 
the right thing on todays linux:


local launchers={
  windows="start %s",
  macosx="open %s",
  unix="$BROWSER %s &> /dev/null &",
}

there's also

mtxrun --edit kpse:cld-mkiv.tex

we can of course extend this feature with some listing but then i'd 
rather consult the descriptive files xml but i'm not sure if i 
distribute them yet



See attached for my shitty prototype.

Cheers, Henri



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Henri Menke
On Thu, 2018-04-05 at 01:18 +0200, Hans Hagen wrote:
> On 4/5/2018 12:43 AM, Henri Menke wrote:
> > 
> > Dear list,
> > 
> > I'm sure you aware of the very useful "texdoc" command line utility in TeX
> > live
> > which brings up the PDF documentation for packages.  ConTeXt standalone also
> > comes with documentation in
> > 
> >      /opt/context/tex/texmf-context/doc/context
> > 
> > However, I find it tedious to always search for the correct subfolder to get
> > to
> > the document I need.  It would be great if there was something like
> > 
> >      mtxrun --script doc metafun
> > 
> > which would open the MetaFun manual.  Similarly "mtxrun --script doc
> > gnuplot"
> > would open the manual of the gnuplot module, etc.
> this is one of these magic features that suddenly is available on your 
> system
> 
> mtxrun --launch metafun*.pdf
> mtxrun --launch cld-mkiv.pdf
> mtxrun --all --launch "*-mkiv.pdf"

Hm, that requires that I know enough about the name of the document.  A list
would be quite nice in the sense that I could just type "metafun" and then
select from "metafun-p.pdf" and "metafun-s.pdf" instead of opening both
documents.

> 
> features like that have always been present in the context suite of 
> programs (i bet even before texdoc) but it might be that i don't call 
> the right thing on todays linux:
> 
> local launchers={
>    windows="start %s",
>    macosx="open %s",
>    unix="$BROWSER %s &> /dev/null &",
> }

I'm quite sure it should be xdg-open (or $PDFVIEWER if it is set and the file is
PDF) on Linux.  For me $BROWSER is unset.
https://linux.die.net/man/1/xdg-open

$ mtxrun --launch metafun*.pdf
resolvers   | resolving | forcing filetype 'tex'
resolvers   | resolving | checking wildcard 'metafun*.pdf'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
mtxrun  | launching /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf
sh: 1: /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf: Permission denied

> there's also
> 
> mtxrun --edit kpse:cld-mkiv.tex
> 
> we can of course extend this feature with some listing but then i'd 
> rather consult the descriptive files xml but i'm not sure if i 
> distribute them yet
> 
> > 
> > See attached for my shitty prototype.
> > 
> > Cheers, Henri
> > 
> > 
> > 
> > 
> > ___
> > 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-conte
> > xt
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Hans Hagen

On 4/5/2018 1:28 AM, Henri Menke wrote:

On Thu, 2018-04-05 at 01:18 +0200, Hans Hagen wrote:

On 4/5/2018 12:43 AM, Henri Menke wrote:


Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX
live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

      /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get
to
the document I need.  It would be great if there was something like

      mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc
gnuplot"
would open the manual of the gnuplot module, etc.

this is one of these magic features that suddenly is available on your
system

mtxrun --launch metafun*.pdf
mtxrun --launch cld-mkiv.pdf
mtxrun --all --launch "*-mkiv.pdf"


Hm, that requires that I know enough about the name of the document.  A list
would be quite nice in the sense that I could just type "metafun" and then
select from "metafun-p.pdf" and "metafun-s.pdf" instead of opening both
documents.



features like that have always been present in the context suite of
programs (i bet even before texdoc) but it might be that i don't call
the right thing on todays linux:

local launchers={
    windows="start %s",
    macosx="open %s",
    unix="$BROWSER %s &> /dev/null &",
}


I'm quite sure it should be xdg-open (or $PDFVIEWER if it is set and the file is
PDF) on Linux.  For me $BROWSER is unset.
https://linux.die.net/man/1/xdg-open


can you check that in mtxrun?

btw, context itself provides --autopdf which is handy when you run from 
an editor



$ mtxrun --launch metafun*.pdf
resolvers   | resolving | forcing filetype 'tex'
resolvers   | resolving | checking wildcard 'metafun*.pdf'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
resolvers   | methods | resolving, method 'concatinators', how 'tag', tag
'file'
mtxrun  | launching /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf
sh: 1: /opt/context/tex/texmf-
context/doc/context/documents/general/manuals/metafun-p.pdf: Permission denied


there's also

mtxrun --edit kpse:cld-mkiv.tex

we can of course extend this feature with some listing but then i'd
rather consult the descriptive files xml but i'm not sure if i
distribute them yet

btw, there are all kind of gimmicks like

mtxrun --script grep doifelse /data/context/**.mkiv

which works with lua patterns and

mtxrun --script fcd --scan /data
mtxrun --script fcd mkiv

for fast directory switching (which i use a lot)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] texdoc in ConTeXt standalone

2018-04-04 Thread Hans Hagen

On 4/5/2018 1:28 AM, Henri Menke wrote:

On Thu, 2018-04-05 at 01:18 +0200, Hans Hagen wrote:

On 4/5/2018 12:43 AM, Henri Menke wrote:


Dear list,

I'm sure you aware of the very useful "texdoc" command line utility in TeX
live
which brings up the PDF documentation for packages.  ConTeXt standalone also
comes with documentation in

      /opt/context/tex/texmf-context/doc/context

However, I find it tedious to always search for the correct subfolder to get
to
the document I need.  It would be great if there was something like

      mtxrun --script doc metafun

which would open the MetaFun manual.  Similarly "mtxrun --script doc
gnuplot"
would open the manual of the gnuplot module, etc.

this is one of these magic features that suddenly is available on your
system

mtxrun --launch metafun*.pdf
mtxrun --launch cld-mkiv.pdf
mtxrun --all --launch "*-mkiv.pdf"


Hm, that requires that I know enough about the name of the document.  A list
would be quite nice in the sense that I could just type "metafun" and then
select from "metafun-p.pdf" and "metafun-s.pdf" instead of opening both
documents.


on my machine opening the lot is fast enough but anyway it's a trivial 
extension, so i've added --list


>mtxrun --launch --list *-mkiv.pdf
mtxrun  |   1:  charts-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   2:  cld-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   3:  colors-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   4:  epub-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   5:  fonts-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/fonts
mtxrun  |   6:  languages-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   7:  libraries-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   8:  lua-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |   9:  mag--mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  10:  mag-0002-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  11:  mag-0006-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  12:  mag-0007-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  13:  mag-0010-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  14:  mag-1101-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  15:  mag-1102-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  16:  mag-1103-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/magazines
mtxrun  |  17:  math-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  18:  rules-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  19:  spacing-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  20:  spreadsheets-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  21:  sql-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  22:  steps-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  23:  swiglib-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  24:  templates-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  25:  tools-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  26:  units-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  27:  workflows-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  28:  xml-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals
mtxrun  |  29:  xtables-mkiv.pdf 
c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals



[select number]

>> 4

mtxrun  | launching: 
c:/data/develop/tex-context/tex/texm

Re: [NTG-context] Circled text in metapost

2018-04-04 Thread Gerhard Kugler
One question:

How can I give the several half circle text lines the same origin
(that of the circles)?

Gerhard


-- 
Gerhard Kugler
Bensheim
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___