[NTG-context] Spacebefore and spaceafter a Float

2018-05-28 Thread John Grasty
Hi,

I am trying to adjust the space between my tables and the body text. Below is a 
minimal example. My problem is that I can seem to get the before= or after= to 
do anything no matter what command I enter. I have also tried spacebefore= and 
spaceafter=

Any idea what I'm doing wrong?

Sincerely,
John Grasty








\setupfloat[table][before={\blank[2*big]}]


\setupxtable[frame=off]
\setupxtable[head][topframe=on,bottomframe=on]
\setupxtable[body][]
\setupxtable[foot][bottomframe=on]


\starttext

\input douglas

\startplacetable[title={Cost Overview}]
\startxtable
\startxtablehead[head]
\startxrow
\startxcell[align=right]  \stopxcell
\startxcell[align=right] (\$) \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[align=right] Lodging \stopxcell
\startxcell[align=right] 150 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Fee \stopxcell
\startxcell[align=right] 160 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Meals \stopxcell
\startxcell[align=right] 100 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Van \stopxcell
\startxcell[align=right] 175 \stopxcell
\stopxrow
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell[align=right] Other Outings \stopxcell
\startxcell[align=right] 40 \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable

\input douglas

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

[NTG-context] Designsize

2018-05-26 Thread John Grasty
Hello List,

Quick question. I have been going through the archives, and I want to make sure 
I understand this correctly. I want to use the Adobe font Arno Pro. It comes 
with design sizes (and also has that information in the otf files as shown with 
otfinfo -z arnopro-subhead.otf for example). To use this font though with the 
design sizes, do I need to write a goodies file that explains this to ConTeXt?

Thanks,
John
___
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] goto reference

2018-04-19 Thread John Grasty
Hello all,

Adobe seems to indicate (at least with Adobe Reader/Acrobat) that this isn't 
possible:

"If you use URLs containing local hard drive addresses (c:\folder\), you cannot 
link to page numbers or set destinations."

[https://helpx.adobe.com/acrobat/kb/link-html-pdf-page-acrobat.html]

Sorry to not be of more help,
John Grasty

> On 19 Apr 2018, at 09:37, Hans van der Meer <havdm...@ziggo.nl> wrote:
> 
> The goto to the internet as given by Wolfgang works here too, but other 
> configurations do not. Please ascertain my observations from the test given 
> below. You should replace the absolute path by your own, of course. Three 
> cases are programmed:
> (1) Wolfgang’s
> (2) full path ftp:// access opens file but at last page opened
> (3) local path does not open and brings up an Alert
> Run from TeXShop and also directly in Preview and Adobe Reader with the same 
> results.
> 
> Thanks in advance.
> 
> dr. Hans van der Meer
> 
> 
> \starttext
> \currentdate-\currenttime\quad\ConTeXt-version=\contextversion\blank
> Testing directly from \ConTeXt:\blank
> \setupinteraction[state=start,color=blue,style=italic]
> \goto{Beginners manual called with http:// opens in browser as 
> expected}[url(http://pragma-ade.com/general/manuals/mp-cb-en.pdf\letterhash 
> page=50)]\blank
> file test.pdf sits in the current directory.\blank
> \goto{click test.pdf page10 with ftp:///Users/... (full path given) opens at 
> last page opened not at page 10 in Apple's 
> Preview}[url(file:///Users/hansm/TeX/Test-tex/gotopdf/test.pdf\letterhash 
> page=10)]{\quad\bf Put your own path here!}\blank
> \goto{click test.pdf page10 with ftp://test.pdf (local path)) does not 
> open}[url(file://test.pdf\letterhash page=10)]\blank
> \stoptext
> 
> 
>> On 19 Apr 2018, at 02:07, Otared Kavian <ota...@gmail.com> wrote:
>> 
>> Hi,
>> 
>> On my Mac, running MacOS High Sierra 10.13.5 Beta, the example given by 
>> Wolfgang works fine: clicking on the link created by ConTeXt, from within 
>> TeXShop, Safari opens that document on the desired page, that is the 
>> physical page 58.
>> 
>> Best regards: OK
>> 
>>> On 18 Apr 2018, at 23:04, Hans van der Meer <havdm...@ziggo.nl> wrote:
>>> 
>>> Thanks. But this seems not to work on my Macintosh. Not in Preview, not in 
>>> Adobe Reader. 
>>> Typesetting resulted in valid-url.pdf#page=55 but the document opens at the 
>>> last page remebered by the application. Are there other Macintosh users who 
>>> can confirm this is not working on those machines or should I do something 
>>> else?
>>> 
>>> dr. Hans van der Meer
>>> 
>>> 
>>>> On 18 Apr 2018, at 21:58, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
>>>> wrote:
>>>> 
>>>> For documents on the web you can add #page= to the url.
>>>> 
>>>> \setupinteraction[state=start]
>>>> 
>>>> \starttext
>>>> \goto{Beginners 
>>>> manual}[url(http://pragma-ade.com/general/manuals/mp-cb-en.pdf\letterhash 
>>>> page=58)]
>>>> \stoptext
>>>> 
>>>> Wolfgang
>>>>> Hans van der Meer 18. April 2018 um 21:12
>>>>> I have the following question about referencing.
>>>>> 
>>>>> With \goto{typeset_the_text}[url(file://a_file_location_to_goto.pdf)] I 
>>>>> can open a pdf from inside the document that has been typeset. It would, 
>>>>> however, be nice if I could further specify on which page of the pdf to 
>>>>> open. Is this possible? Or is this a wish not to be fulfilled?
>>>>> 
>>>>> dr. 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://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

Re: [NTG-context] Fwd: Adding a parameter to a module

2018-03-23 Thread John Grasty
Hans,

Thanks so much for the help. I'm finally beginning to wrap my head around all 
this. One (hopefully quick) question below:

> On 22 Mar 2018, at 18:00, Hans Hagen <j.ha...@xs4all.nl> wrote:
> 
> \roottitleparameter{foo}
> 
> \titleparameter{foo}


What is there difference between these two \roottitleparameter{foo} and 
\titleparameter{foo}? I searched through the source, but I'm still getting 
acquainted with TeX and ConTeXt. :-D 

Sincerely,
John Grasty

___
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] Adding a parameter to a module

2018-03-20 Thread John Grasty
Hello list,

One more question. Since I could not figure the problem with the wiki article 
for a title, I have turned my attention to modify the t-title module for my 
needs. If I want to add let's say a publication location, how would I go about 
that?

I have copied and renamed t-title.mkvi to p-mymodule.mkvi. I have changed the 
formatting to suit my needs, but I can't not figure out how to add parameters. 
What is the connection to the t-title.xml interface file?

I don't need it done for me, but I do need just a bit of help getting going in 
the right direction. :-D

Thanks so much for the help and the great software!

John Grasty
___
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] Title example from the Wiki is broken

2018-03-19 Thread John Grasty
Hello,

I trying to use the "In ConTeXt: A more advanced solution" example from the 
wiki [http://wiki.contextgarden.net/Document_Titles] to learn how modules and 
the like work in ConTeXt. I saved the module as p-titlepage.mkvi, because I 
could not get my module to load instead of the included third party one.

So my questions are:

1. Is there a way to load my module with the name title ahead of the supplied 
one? I saved it to /texmf-project/tex/context/shared and 
/texmf-local

2. Any idea what the error is in the wiki (or my use of it)?

Thanks,
John

Here was the error:

tex error   > tex error on line 46 in file 
/Users/jgrasty/context/tex/texmf-local/p-titlepage.mkvi: ! Argument of \17>>2 
has an extra }

 
\par 
 
}
\showassignerror ...\showmessage \m!check 1{#1,#2}
  \waitonfatalerror 
\syst_helpers_process_comma_item ...mpty \_e_o_p_ 
  \doubleexpandafter \syst_h...
\syst_helpers_get_parameters ...ss_comma_item #1,]
  ,\_e_o_p_ 
 ...l \minusone \else \dodosetuptitle [\v!content ]
  [\c!title ]
...
l.46\c!color=]


36\blank[2*\v!medium]
37\doattributes{\??dt\c!date}\c!style\c!color\@@dtcontentdate
38\blank[3*\v!medium]
39\stopalignment}
40 
41 
42 
43 \setuptitle
44   [\c!title]
45   [\c!style=\tfd,
46 >> \c!color=]





___
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] Custom sorting of "pseudo-language" in a register

2018-03-16 Thread John Grasty
Hello all,

I’m just getting acquainted with ConTeXt, and I am finding it so much more 
suitable for my work and needs. Thanks for the great software. Here’s my 
situation. I write in Slovene and in English, and I need to make numerous 
references to biblical passages. I want to create an index of these citations, 
but I want them in the order they appear in the Bible rather than alphabetical 
order. Henri Menke provided a perfectly workable solution on TeX 
StackExchange[^1], but because this is a multi-year project, I wanted to find a 
bit more permanent solution. I discovered I can use Lua LPEG to parse and 
normalize my citations so they are referenced in a uniform style.

My problem comes in the register sorting. Hans, I saw where in the paste you 
have recommended a “pseudo-language” to implement a custom sort in such a 
situation. I have almost figured out how to accomplish this. (See the MWE 
below.) I have no problem with single word sections (Genesis, Exodus, etc.). I 
can turn off indicators, do the custom sort (see below), and I get the intended 
result. If I have a multiple word title (Evangelij po Janezu), that technique 
doesn’t work. The replacement for more than one word (or if a number is 
involved, like 1John) doesn’t seem to work. I have no doubt there is a good 
reason; I’m just a newbie!

It seems my options are to:

1. Figure out how to do a replacement for a phrase or a book with a number in 
its name. Then this technique seems to work ok.
2. Or to add an entries and figure out some way to not print the first level in 
the index. So the indicator will be the book name, and underneath the chapter 
and verses will be listed with out the book name being repeated.


Are there any ideas to point me in the right direction?

Thanks so much for your help,
John Grasty



[1]: 
https://tex.stackexchange.com/questions/418575/custom-ordering-for-a-index-register-in-context/

- - - -

\startluacode

local utfchar, utfbyte  = utf.char, utf.byte
local sorters   = sorters
local definitions   = sorters.definitions
local replacementoffset = sorters.constants.replacementoffset
local variables = interfaces.variables

local gen  = utfchar(replacementoffset + 1), utfchar(replacementoffset + 11)
local exo = utfchar(replacementoffset + 2), utfchar(replacementoffset + 220)
local jn = utfchar(replacementoffset + 4), utfchar(replacementoffset + 27)


sorters.definitions['bbt'] = {
replacements = {
{ "Geneza", gen },
{ "Eksodus", exo }, 
{ "Janez", jn },
},

orders = {
gen, exo, jn
}
}
\stopluacode

\mainlanguage[sl]

\defineregister[booksort]
\setupregister[booksort]
 [language=bbt,
  n=1,
  indicator=yes,
  ]
  

\starttext

\booksort{Janez+5.2}One
\booksort{Eksodus+2}Two
\booksort{Geneza+45}Three

\page

\placeregister[booksort][language=bbt]

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