[NTG-context] Problem with context --extra=select

2024-09-21 Thread Michael Guravage
Greetings,

Regardless of the selection criteria, the select tool selects only the
first page. This feature works in my ConTeXt versions from 2024.05.17 and
2024.08.13. I'm running the latest version, i.e. 2024.09.17.

context --extra=select --selection=11:16 forexample.pdf

I've attached the output in a log file if anyone's interested.

Any suggestions?

-- 
With kind regards,

Michael Guravage


<http://literatesolutions.com>
context --extra=select --selection=11:12 forexample.pdf
mtx-context | processing extra: 
/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex

resolvers   | formats | executing runner 'run luametatex format': 
/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="mtx-context-select" 
--socket --shell-escape 
--fmt=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 /opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex 
--c:currentrun=1 --c:extra="select" --c:files="forexample.pdf" 
--c:fulljobname="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex"
 
--c:input="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex"
 --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:result="context-extra" 
--c:selection="11:12" --c:texmfbinpath="/opt/lmtx/tex/texmf-linux-64/bin"
open source > level 1, order 1, name 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
system  >
system  > ConTeXt  ver: 2024.09.17 13:15 LMTX  fmt: 2024.9.18  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 2, order 2, name 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select', input 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex', 
result 'context-extra'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name 'mtx-context-common.tex'
close source> level 2, order 3, name 'mtx-context-common.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
select  > forexample.pdf
graphics> compactors > registered: preset : default | demo | merge | 
tikz | yes
graphics> compactors > using: preset : default
pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
close source> level 1, order 3, name 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
backend > xmp > using file 
'/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable: 
'/home/michael/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
mkiv lua stats  > resource resolver: loadtime 0.004 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 15 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 525 modules (0.150 sec), 106 tables 
(0.008 sec), 631 chunks (0.158 sec)
mkiv lua stats  > traced context: maxstack: 1790, freed: 0, unreachable: 1790
mkiv lua stats  > cleaned up reserved nodes: 74 nodes, 8 lists of 438
mkiv lua stats  > node memory usage: 18 attribute, 2 glue, 132 gluespec, 1 
hlist, 1 kern, 655 mathspec, 3 penalty, 5 specification, 2 temp
mkiv lua stats  > node list callback tasks: 16 unique task lists, 9 instances 
(re)created, 76 calls
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: file: 204, saved: 297, direct: 9, function: 712, 
value: 436, message: 0, bytecode: 631, late 0, total: 2289 (0 per page)
mkiv lua stats  > randomizer: initialized with value 0.1779564263647
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 3 files: latinmodernmath-companion.otf, 
latinmodern-math.otf, lmroman10-regular.otf
mkiv lua stats  > font engine: otf 3.144, afm 1.541, tfm 1.000, 13 instances, 8 
shared in backend, 4 common vectors, 4 c

[NTG-context] Spacing within combinations

2024-06-22 Thread Michael Guravage
Greetings,

The attached MWE combines 12 images in  a 3 by 4 grid; with horizontal and
vertical spacing set by setupcombinations.

I have two questions. First, can someone please tell me why the vertical
spacing is not applied between the first and second and third and fourth
rows?  Second, why, If I try, e.g.c 15 images, does  ConTeXt complain of a
missing left brace. More generally, my mwe failed with an odd number of
images, but succeeded with an even number.

Thanks.

With kind regards,

Michael




\useMPlibrary [dum]
\setuppagenumbering[state=]
\setupcaptions[number=no]

\starttext
  \startluacode
context.setupblank({"10mm"})
context.setupcombinations({distance="10mm", after=context.blank()})
context.startplacefigure({title = ""})
  context.startcombination({nx=3, ny=4})
for i=1, 12 do
 context.startcontent()
   context.externalfigure({dummy},{width = "3cm"})
 context.stopcontent()
end
  context.stopcombination()
context.stopplacefigure()
  \stopluacode
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Michael Guravage
Bruce,

Yes, I remember encountering this problem. The two files you need are:
sun-MP.tex and moons-MP.tex. I don't recall where I found them so I've
attached them below. Drop them into their respective pocketdiary
directories Solar and Moonphase and run mtxrun --generate.

Your suggestion of the Day key was the first thing I tried myself.
Unfortunately, it has no effect.

Thanks for thinking along.

With kind regards,

Michael



On Sat, Jun 15, 2024 at 10:51 PM Bruce Horrocks  wrote:

>
>
> > On 15 Jun 2024, at 17:55, Michael Guravage <
> gurav...@literatesolutions.com> wrote:
> >
> > Hi,
> >
> > I am trying to use the Pocket Diary module to create a photo calendar as
> described in the Calendar Examples. The examples work fine. By default
> weeks begin on Monday. Does anyone know how to specify that weeks begin on
> Sunday? I have searched through all the setvariable assignments, but
> nothing seems applicable.
> >
> > I have attached an example file so you needn't retrieve all the
> examples. Any help would be appreciated.
>
> Your example didn't work for me - I didn't have PocketDiary installed and
> then after installing it I got an error about Moons.tex. Life's too short
> to faff trying to fix it so this suggestion is untested.
>
> The variables setting allows a Day= value so try experimenting with
>
> \setvariables
>   [PocketDiary]
>   [Year=2025,
>Day=7]
>
> as the default value is 1 which I assume is Monday.
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
% Metafun
% filename: moons.tex
% Boede 2021

% \setupbodyfont[plex,ss,14pt]

\defineMPinstance
	[Moon]
	[metafun]
  []
	
\startMPinclusions[]{Moon}
	numeric w,h;
	path p[];
	pair ip[];
	
	w = OverlayWidth;
	h = OverlayHeight;
	
	p[1] := fullcircle scaled h;
	p[2] := p[1] shifted (0.2 w,0);
	
	ip[1] := p[1] intersectionpoint p[2];
	ip[2] := reverse p[1] intersectionpoint p[2];

	p[3] := p[1] cutbefore ip[1] cutafter ip[2];	
	p[4] := p[2] cutbefore ip[1] cutafter ip[2];
	
  drawoptions (withpen pencircle scaled 2pt);
	
\stopMPinclusions

\startuniqueMPgraphic{Moon::Waning_moon}
  draw  p[3] ;
	draw  p[4] ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Growing_moon}
  draw  p[3] ;
	draw  p[4] ;
	currentpicture := (currentpicture reflectedabout (ip[1],ip[2]));
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Fullmoon}
	draw p[1];
\stopuniqueMPgraphic

\startuniqueMPgraphic{Moon::Newmoon}
	fill p[1] withcolor 0.625 white;
	draw p[1];
\stopuniqueMPgraphic


\defineoverlay[waningmoon][\useMPgraphic{Moon::Waning_moon}]
\defineoverlay[growingmoon][\useMPgraphic{Moon::Growing_moon}]
\defineoverlay[newmoon][\useMPgraphic{Moon::Newmoon}]
\defineoverlay[fullmoon][\useMPgraphic{Moon::Fullmoon}]

\defineframed
	[Moon]
	[height=\bodyfontsize,
	 width=\bodyfontsize,
 	 frame=off]


% \starttext
% Results with \type{framed}
%
% \blank
%
%  Heute ist abnehmender Mond	{\Moon[background=waningmoon]{\strut}}
%
%  Heute ist Vollmond \Moon[background=fullmoon]{}
%
%  Heute haben wir Neumond \Moon[background=newmoon]{}
%
%  Und heute haben wir zunehmenden Mond \Moon[background=growingmoon]{}
%
% \stoptext% Metafun
% filename: moons.tex
% Boede 2021

% \setupbodyfont[plex,ss,14pt]

\defineMPinstance
	[Sun]
	[metafun]
  []
	
\startMPinclusions[]{Sun}
	numeric w,h;
	path p[];
	pair ip[];
	
	w = OverlayWidth;
	h = OverlayHeight;
	
	p[1]  := fullcircle scaled h;
	p[100] := tcircle scaled 0.5h; %h
	p[2] := tcircle scaled 0.6h;  %1.2h;
	p[3] := tcircle scaled 0.75h; %1.6h;
	p[4] := tcircle scaled h; %2h;
	p[5] := (0,0)--point 1 of p[4] ;
	p[6] := p[5] cutbefore point .3 of p[5];
	p[7] := p[6] rotatedaround (center p[1],18);
	 
  ip[1] :=  p[2] intersectionpoint p[7];
  ip[2] :=  p[3] intersectionpoint p[7];
	
  p[10] := ip[1]--ip[2];

	ip[3] :=  ip[1];
	ip[4] :=  point 1 of p[7];

	p[11] := ip[3]--ip[4];
	
  drawoptions (withpen pencircle scaled 0.25pt withcolor red);
	
\stopMPinclusions

\startreusableMPgraphic{Sun::Sunrise}
  drawoptions (withpen pencircle scaled 0.25pt withcolor red);
  draw p[100];
	for i = 36 step 36 until 154  :
	  draw p[10] rotatedaround (center p[1],i-18);
	endfor;
	for i = 18 step 36 until 180  :
	  draw p[11] rotatedaround (center p[1],i-18);
 endfor;
 drawarrow ((0,0)--(0,h)) shifted (0,-0.05h);
\stopreusableMPgraphic

[NTG-context] Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Michael Guravage
Hi,

I am trying to use the Pocket Diary
 module to create a photo
calendar as described in the Calendar Examples
. The examples work fine.
By default weeks begin on Monday. Does anyone know how to specify that
weeks begin on Sunday? I have searched through all the setvariable
assignments, but nothing seems applicable.

I have attached an example file so you needn't retrieve all the examples.
Any help would be appreciated.

-- 
With kind regards,

Michael



\usemodule[pocketdiary]

%D Choose and setup the font to be used
\setupbodyfont[ibmplex,ss,12pt]

% Supported languages: EN,DE,NL,FR,IT,ES
\mainlanguage[nl]

% Switch off the page numbering
\setuppagenumbering[location=]

% Setup the paper size
\setuppapersize[A4,portrait][A4,portrait]

% Adjust the layout of the page
\setuplayout
  [topspace=20mm,
  backspace=8.6mm,
  header=0pt,
  footer=0pt,
  height=middle,
  width=middle]

% Setup the path where to find the calendar pictures
\setupexternalfigures [directory={., ./graphics, ../graphics, ./MyPhotoDirectory}]
\setupexternalfigures [location={local,global,default}]

\def\testimage {cow} % dolly.png
% Give pictures symbolic names for using in a loop
\useexternalfigure [1] [\testimage]
\useexternalfigure [2] [\testimage]
\useexternalfigure [3] [\testimage]
\useexternalfigure [4] [\testimage]
\useexternalfigure [5] [\testimage]
\useexternalfigure [6] [\testimage]
\useexternalfigure [7] [\testimage]
\useexternalfigure [8] [\testimage]
\useexternalfigure [9] [\testimage]
\useexternalfigure [10] [\testimage]
\useexternalfigure [11] [\testimage]
\useexternalfigure [12] [\testimage]
\useexternalfigure [13] [\testimage]

% Setup the variables for the Pocket diary, only year is used for the calculations.
\setvariables
  [PocketDiary]
  [Year=2025]

% Let the header and the footer be empty:
\setupheadertexts[][]
\setupfootertexts[][]

% Add some label texts for the international interfaces:
\setuplabeltext[en][fotocal={Photo Calendar}]
\setuplabeltext[nl][fotocal=Fotokalender]
\setuplabeltext[de][fotocal=Fotokalender]
\setuplabeltext[fr][fotocal={Calendrier photo}]
\setuplabeltext[it][fotocal={Calendario fotografico}]
\setuplabeltext[es][fotocal={Calendario fotográfico}]

%D Let lua is perform the magic:
\startluacode
  local report = logs.reporter("Photo calendar")

  function thirddata.calendar.Photo_calendar_page(y)

report("Working in function: calendar.Foto_calendar_page")

local year = y
--local path = file.dirname("./Fotokalender-fotos/")
for i = 1,12 do

  local monthname = string.lower(os.date("%B",
os.time{year=year,month=i,day=1}))

  context.startplacefigure({number="",title=""})
 context.externalfigure({i}, {width = "0.8\\textwidth"})
  context.stopplacefigure()
  context.strut()
  context("\\vfill")
  context.startalign({"middle"})
context("\\bfa")
context.labeltext(monthname)
context("~")
context(year)
  context.stopalign()
  context.blank()

  thirddata.diary.monthtableH(i,year)

  context.page()
end
  end
\stopluacode


% Setup of the month table
\startsetups table:month
   \setupTABLE[c]
  [each]
  [width=\dimexpr\textwidth/7,
   frame=on,
   style=\tfa]
   \setupTABLE[r][each][height=1.8\lineheight,align={center,lohi}]
   \setupTABLE[c][7][foregroundcolor=red]
\stopsetups

% Define the macro for calling lua
\define[1]\Photocalendarpages
  {\ctxlua{thirddata.calendar.Photo_calendar_page(#1)}}

% Setup the \TEX\ side of the document
\starttext

  % Add a title page
  \startstandardmakeup[page=yes,doublesided=yes]
\startplacefigure
  [location=middle,
   title=,
   number=]
  {\externalfigure[13][width=\paperwidth]}
\stopplacefigure
\midaligned{\bfc \labeltext{fotocal}~\getvariable{PocketDiary}{Year}}
  \stopstandardmakeup

  % Call the defined macro
  \Photocalendarpages{\getvariable{PocketDiary}{Year}}

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Document metadata after context --extra=select script

2024-03-10 Thread Michael Guravage
Greetings,

I set a document's title with the following code:

\expanded
  {\setupmetadata
[title={Document Title}]}

I then create a derivative document with a selection of pages using
ConTeXt's select script.

context --extra=select [options] list-of-files

The metadata title of this document is "mtx-context-select." While I can
use any number of utilities to manually tweak the title, is there a ConTeXt
way to preserve or assign metadata values when using these scripts?

-- 
With kind regards,

Michael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Hyperlinks cease working after page selection

2024-02-26 Thread Michael Guravage
Greetings,

The document in question compiles correctly. Its hyperlinks are correct and
work as expected. However, if I apply a page selection, the hyperlinks in
the resulting document, while correctly coloured, no longer work.

Any suggestions on how to correct or work around this would be greatly
appreciated.

\setupinteraction[state=start, color=darkblue]
\setupwhitespace [big]
\starttext
  Consult the \goto{\ConTeXt\ wiki}[url(https://wiki.contextgarden.net/)]
.\par
  \dorecurse{5}{\samplefile{lorem}\par}
\stoptext

Processed as follows:

context  mwe.tex
context --extra=select --selection=1 --result=foobar.pdf mwe.pdf


-- 
With kind regards,

Michael Guravage
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] imposition: getting to the last page of a booklet

2024-02-23 Thread Michael Guravage
Greetings,

I would like to use the nextquadruple and beforequadruple pagebreakhandlers
described at the bottom of the wiki's imposition page. However, the
examples complain of an error invoking the  \installpagebreakhandler
command.

The wiki page was last updated nearly four years ago. Is anyone using
updated versions of these?

-- 
With kind regards,

Michael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] XML processing, unwanted indentation/alignment

2024-02-15 Thread Michael Guravage
Greetings,

I'm typesetting an address book whose addresses are in XML. A typical entry
has this structure:

  


  
  
  

  

initials and birthday are required, first_name can be left blank and email,
mobile and maiden_name are optional.

I've written a macro (name) to compose the name, i.e. initials, first_name
(maiden_name), and another macro (nameemaillink) to make the name a link
associated with an email address.

% Derive an individual's name
\def\name#1%
  {\ifxmlattempty{#1}{first_name} {\xmlatt{#1}{initials}} \else
{\xmlatt{#1}{initials}, \xmlatt{#1}{first_name}} \fi
   \ifxmlattempty{#1}{maiden_name} {} \else {
\tfxx(\xmlatt{#1}{maiden_name})} \fi}

% Create a mailto:link that associates a individual's name with their email
address.
\def\nameemaillink#1%
  {\ifxmlattempty{#1}{email} {\name{#1}} \else {\goto{\name{#1}}
[url(mailto:\xmlatt{#1}{email})]} \fi}

I thought I was done when I noticed that a composed name with an empty
first name, with or without an email address, is slightly indented. In the
mwe Moe and Curly, without first names, are indented; while Shemp and
Michael aren't.

That the undesired indentation/alignment is dependent on the presence of a
first name is baffling.  After this long description, if someone would look
at the code and tell me where I've gone wrong I would be very grateful. The
interesting bits begin on lines 8 and 12 in xml.tex.

-- 
With kind regards,

Michael
% XML processing instructions

% Turn a phone number into a tel:link - without spaces
\def\phonelink#1%
  {\goto{#1} [url(tel:\cldcontext{string.nospaces("#1")})]}

% Derive an individual's name
\def\name#1%
  {\ifxmlattempty{#1}{first_name} {\xmlatt{#1}{initials}} \else {\xmlatt{#1}{initials}, \xmlatt{#1}{first_name}} \fi
   \ifxmlattempty{#1}{maiden_name} {} \else { \tfxx(\xmlatt{#1}{maiden_name})} \fi}

% Create a mailto:link that associates a individual's name with their email address.
\def\nameemaillink#1%
  {\ifxmlattempty{#1}{email} {\name{#1}} \else {\goto{\name{#1}} [url(mailto:\xmlatt{#1}{email})]} \fi}

% Make an individual's mobile phone number a tel:link.
\def\mobilelink#1%
  {\ifxmlattempty{#1}{mobile} {} \else {\phonelink{\xmlatt{#1}{mobile}}} \fi}

% Track these several elements.
\startxmlsetups xml:list:base
  \xmlsetsetup{#1}{addressBook|family|address|members|member}{xml:list:*}
\stopxmlsetups

\xmlregisterdocumentsetup{list}{xml:list:base}

% When we encounter the root  element merely flush the rest.
\startxmlsetups xml:list:addressBook
  \xmlflush{#1}
\stopxmlsetups

% Place each family in a frametext box
\startxmlsetups xml:list:family
  \startframedtext[width=\textwidth]
{\tfb \bf \xmlatt{#1}{surname}\ifxmlattempty{#1}{prefix}{}\else{, \xmlatt{#1}{prefix}}\fi}\blank
\xmlflush{#1}
  \stopframedtext
  \blank[big]
\stopxmlsetups

% Enumerate the address information
\startxmlsetups xml:list:address
  \xmlatt{#1}{street} \xmlatt{#1}{housenumber}\crlf
  \xmlatt{#1}{postcode} \xmlatt{#1}{city}\crlf
  \ifxmlattempty{#1}{telephone}{\vskip -1em}\else{\phonelink{\xmlatt{#1}{telephone}}}\fi
  %\vskip -1em
  \xmlflush{#1}
  \blank[big]
\stopxmlsetups

% The only purpose of the  element is to make a table of members.
\startxmlsetups xml:list:members
  \starttabulate[|l|l|l|]
\xmlflush{#1}
  \stoptabulate
\stopxmlsetups

% Each  gets his own table row.
\startxmlsetups xml:list:member
  \NC \nameemaillink{#1} \NC \xmlatt{#1}{birthday} \NC \mobilelink{#1} \NC\NR
\stopxmlsetups

% finis
\environment xml.tex % XML processing instructions

\setupframedtext[frame=off, width=\textwidth, align={flushleft,broad,nothyphenated}]
\setupinteraction[state=start, color=darkblue]

\starttext
  \xmlprocessfile{list}{mwe.xml}{}
\stoptext

% finis



   


  	
  		
  	
  

  





mwe.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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: removing whitespace

2024-02-13 Thread Michael Guravage
While reading the documentation I spotted something similar from which I
derived this solution:

\setupinteraction[state=start]
\def\squeeze#1%
  {
\goto{#1} [url(tel:\ctxlua{context(string.gsub("#1", " ", ""))})]
  }

\starttext
  Call \squeeze{01234 56789}
\stoptext

With kind regards,

Michael




On Tue, Feb 13, 2024 at 2:54 AM Michael Guravage <
gurav...@literatesolutions.com> wrote:

> In the example below I pass the macro a string with a space, but the space
> should not appear in the url.
>
> I've tried using \ctxlua to invoke string substitution, but without
> success. What is the proper way to remove this space, and to perform string
> manipulation more generally?
>
> \setupinteraction[state=start]
>
> \def\squeeze#1%
>   {\goto{#1}[url(tel:#1)]}
>
> \starttext
>   Call \squeeze{01234 56789}
> \stoptext
>
> --
> With kind regards,
>
> Michael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] removing whitespace

2024-02-12 Thread Michael Guravage
In the example below I pass the macro a string with a space, but the space
should not appear in the url.

I've tried using \ctxlua to invoke string substitution, but without
success. What is the proper way to remove this space, and to perform string
manipulation more generally?

\setupinteraction[state=start]

\def\squeeze#1%
  {\goto{#1}[url(tel:#1)]}

\starttext
  Call \squeeze{01234 56789}
\stoptext

-- 
With kind regards,

Michael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Testing whether an XML attribute exists

2023-10-17 Thread Michael Guravage
Hi,

I am typesetting a very simple address list whose source is written in
XML.  Typesetting choices need to be made dependent on the presence of
various attributes; consider the following  element.



If the prefix attribute exists I'l like the name to appear as, e.g. 'Boer,
den."  The several XML attribute testing functions in the XML manual appear
to discriminate on an attribute's value. I tried  \xmldoifnotatt in an
attempt to say, "TRUE if prefix does not match an empty string",  since I
am not interested in the attribute's value but only whether or not it
exists. The code below doesn't work. If someone who knows why it doesn't
work would enlighten my ignorance I would be most grateful. A brief
explanation and example of \xmldoifatt, \xmldoifnotatt, and \xmldoifelseatt
would be exceedingly helpful.

\startxmlsetups xml:list:family
  {\bf \xmlatt{#1}{surname} \xmldoifnotatt{#1, prefix, ''} {,
\xmlatt{#1}{prefix}}} \crlf
  \xmlflush{#1}
\stopxmlsetups

I have attached three files below: an XML address list, the ConTeXt source
file and the typeset result.

-- 
With kind regards,

Michael Guravage




  


  
  
  

  


  


  
  

  


\startxmlsetups xml:list:base
  \xmlsetsetup{#1}{addressBook|family|address|members|member}{xml:list:*}
\stopxmlsetups

\xmlregisterdocumentsetup{list}{xml:list:base}

\startxmlsetups xml:list:addressBook
  \title{Address List}
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:list:family
  %% {\bf \xmlatt{#1}{surname} \xmldoifnotatt{#1, prefix, ''} {, \xmlatt{#1}{prefix}}} \crlf
  {\bf \xmlatt{#1}{surname}}\crlf
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:list:address
  \xmlatt{#1}{street} \xmlatt{#1}{housenumber}\crlf
  \xmlatt{#1}{postcode}\crlf
  \xmlatt{#1}{city}\crlf
  \xmlatt{#1}{telephone}\crlf
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:list:members
  \starttabulate[|l|l|l|l|]
\xmlflush{#1}
  \stoptabulate
\stopxmlsetups


\startxmlsetups xml:list:member
 \NC \xmlatt{#1}{name} {\tfxx \xmlatt{#1}{maiden_name}} \NC \xmlatt{#1}{birthday} \NC \xmlatt{#1}{email} \NC \xmlatt{#1}{mobile} \NC\NR
\stopxmlsetups

\starttext
  \xmlprocessfile{list}{stooges.xml}{}
\stoptext


stooges.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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Tabulate \TH command not working in latest release

2023-01-04 Thread Michael Guravage via ntg-context
While typesetting a document containing a small tabulated table with the
latest release I noticed that the tabulate \TH command hadn't added any
vertical space between the rows. Here's a mwe.

\starttext
  \starttabulate[|l|l|]
\NC Γ \NC Gamma \NC\NR
\NC Θ \NC Theta \NC\NR
\TB[line]
\NC Φ \NC Phi \NC\NR
  \stoptabulate
\stoptext

---
Michael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
Thanks for the suggestion.

I've already tried columnsets. With or without grid=yes, with or without a
columnspan, using columnsets produces the following log even though the
table fits on one page.

pages   > flushing realpage 1, userpage 1, subpage 1
pages   > flushing realpage 2, userpage 2, subpage 2
pages   > flushing realpage 3, userpage 3, subpage 3
pages   > flushing realpage 4, userpage 4, subpage 4
pages   > flushing realpage 5, userpage 5, subpage 5
pages   > flushing realpage 6, userpage 6, subpage 6
pages   > flushing realpage 7, userpage 7, subpage 7
pages   > flushing realpage 8, userpage 8, subpage 8
pages   > flushing realpage 9, userpage 9, subpage 9
pages   > flushing realpage 10, userpage 10, subpage 10
pages   > flushing realpage 11, userpage 11, subpage 11
pages   > flushing realpage 12, userpage 12, subpage 12
pages   > flushing realpage 13, userpage 13, subpage 13
pages   > flushing realpage 14, userpage 14, subpage 14
pages   > flushing realpage 15, userpage 15, subpage 15
pages   > flushing realpage 16, userpage 16, subpage 16
pages   > flushing realpage 17, userpage 17, subpage 17
pages   > flushing realpage 18, userpage 18, subpage 18
pages   > flushing realpage 19, userpage 19, subpage 19
pages   > flushing realpage 20, userpage 20, subpage 20
pages   > flushing realpage 21, userpage 21, subpage 21
...

I stopped counting at 200,

Cheers,

Michael




On Thu, Jul 22, 2021 at 1:14 PM Henning Hraban Ramm  wrote:

> columnsets need \setuplayout[grid=yes] – did you check that?
>
> HR
>
> > Am 22.07.2021 um 12:42 schrieb Michael Guravage :
> >
> > No, I'm afraid not. I have been combining the various table and column
> environments, all without success - yet.
> >
> > Michael
> >
> >
> >
> > On Thu, Jul 22, 2021 at 12:01 PM Henning Hraban Ramm 
> wrote:
> > Hi Michael,
> >
> > you could try columnsets and use a columnsetspan for the text above the
> columns.
> >
> > I don’t know if tables work well within a columnset, though.
> >
> > Hraban
> >
> >
> > > Am 22.07.2021 um 11:52 schrieb Michael Guravage <
> gurav...@literatesolutions.com>:
> > >
> > > I have created a table and placed it inside a columns environment;
> which works as advertised. However, if I place any text before the column
> environment, the columns break. More clearly stated, only one column
> appears on the first table page; whereas two columns resume on subsequent
> pages. I have attached a mwe where you can use --mode=title to invoke the
> broken columns.
> > >
> > > Any advice on how to place text above the columns environment would be
> gratefully received.
> > >
> > > With kind regards,
> > >
> > > Michael
> > >
> > >
> ___
> > > 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 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 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] How to place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
No, I'm afraid not. I have been combining the various table and column
environments, all without success - yet.

Michael



On Thu, Jul 22, 2021 at 12:01 PM Henning Hraban Ramm  wrote:

> Hi Michael,
>
> you could try columnsets and use a columnsetspan for the text above the
> columns.
>
> I don’t know if tables work well within a columnset, though.
>
> Hraban
>
>
> > Am 22.07.2021 um 11:52 schrieb Michael Guravage <
> gurav...@literatesolutions.com>:
> >
> > I have created a table and placed it inside a columns environment; which
> works as advertised. However, if I place any text before the column
> environment, the columns break. More clearly stated, only one column
> appears on the first table page; whereas two columns resume on subsequent
> pages. I have attached a mwe where you can use --mode=title to invoke the
> broken columns.
> >
> > Any advice on how to place text above the columns environment would be
> gratefully received.
> >
> > With kind regards,
> >
> > Michael
> >
> >
> ___
> > 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
> 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 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] How to place text before a table inside a column environment

2021-07-22 Thread Michael Guravage
I have created a table and placed it inside a columns environment; which
works as advertised. However, if I place any text before the column
environment, the columns break. More clearly stated, only one column
appears on the first table page; whereas two columns resume on subsequent
pages. I have attached a mwe where you can use --mode=title to invoke the
broken columns.

Any advice on how to place text above the columns environment would be
gratefully received.

With kind regards,

Michael
\startsetups[tablesettings]
  \setupTABLE[c][1][style=\tfc, color=darkred, align=left]
  \setupTABLE[c][2][width=3cm, align=middle]
  \setupTABLE[c][each][frame=off]
\stopsetups

\switchtobodyfont[10pt]

\starttext
  \doifmode{title}{\title{Rooster}}

  \startcolumns[n=2]
\bTABLE[split=yes, setups=tablesettings]
\dorecurse{75}{\bTR \bTD 25 \eTD \bTD aug, wo \eTD \bTD Lecture \eTD \eTR}
\eTABLE
  \stopcolumns
\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
___


Re: [NTG-context] quotes potruding out in the left margin

2021-06-05 Thread Michael Guravage
If you were to add a start-stopquotation block to Wolfgang's example, you'd
see that the resulting paragraph has lost its narrowness. Is there a way to
allow quotes to protrude into the left margin while preserving the
narrowness of start-stopquotation blocks? My own solution is not to
\setupquotation[method=font] but to define a delimited text environment
whose method=font, and use it when a paragraph begins with a quotation.

I have attached my own mwe. You can toggle the \setquotation command with
--mode=font.

Does anyone have a more elegant, or better yet, a correct solution?

With kind regards,

Michael



On Sat, Jun 5, 2021 at 7:36 AM Sandra Snan 
wrote:

> Thank you both for your help. Additionally, I needed to make sure that
> \setupbodyfont comes after all this. But now I've finally got the
> margin-potruding quotations of my dreams.
>
>  writes:
>
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Wolfgang
> >> Schuster
> >> Gesendet: Freitag, 4. Juni 2021 10:08
> >> An: mailing list for ConTeXt users 
> >> Betreff: Re: [NTG-context] quotes potruding out in the left margin
> >>
> >> Sandra Snan schrieb am 04.06.2021 um 09:52:
> >> > Oh, the example you just posted doesn't work on live.contextgarden,
> >> > let alone on my installation. The quotation marks still don't potrude.
> >>
> >> I tested my example on the garden and got the expected output with the
> >> quotation marks in the margin (only partially but this is normal with
> the
> >> quality setting).
> >>
> >
> > I can confirm that this works. As Wolfgang notes protrusion is only
> partial with the default settings, but you can tweak it with
> \setupfontprotrusion (see below).
> > \setupfontprotrusion [quality] [left=2] is probably what you want since
> this puts the complete quotation mark into the margin.
> >
> > I don't know what the numbers mean. Maybe someone can add to this.
> >
> > Denis
> >
> > 
> > %\setupfontprotrusion [quality] [left=0] % no protrusion on the left
> margin
> > \setupfontprotrusion [quality] [left=1] % default
> > %\setupfontprotrusion [quality] [left=1.5] % more protrustion
> > %\setupfontprotrusion [quality] [left=2] % even more protrustion
> > %\setupfontprotrusion [quality] [left=2.5] % too much protrusion
> >
> > \definefontfeature
> >   [default]
> >   [default]
> >   [protrusion=quality,
> >expansion=quality]
> >
> > \setupquotation
> >   [method=font]
> >
> > \setupalign
> >   [hz,hanging]
> >
> > \showframe
> >   [text]
> >   [text]
> >
> > \starttext
> >
> > oh hi there
> >
> > “you are so”
> >
> > \quotation{you are so}
> >
> > here here
> >
> > \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
> >
> ___
>
> ___
> 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
>
> ___
>
\showgrid
\showframe[text][text]

\setupwhitespace[medium]
\setuplayout[grid=yes]

\definefontfeature
  [default]
  [default]
  [protrusion=quality,
   expansion=quality]
\setupalign[hz,hanging]

% Definition inherits, followed by setting up
\definedelimitedtext[parquote][quotation]
\setupdelimitedtext[parquote][method=font]
\def\parquotation#1{\startparquote{#1}\stopparquote}

% Provide protrusion for quotations.
\startmode[font]
  \setupquotation[method=font] % Toggle this line to see the effect.
\stopmode

\starttext
  \quotation{Love makes the world go round,}as an old proverb has it\ldots

  “Love makes the world go round,” as an old proverb has it\ldots

  \parquotation{Love makes the world go round,} as an old proverb has it\ldots

  \startquotation
\input tufte
  \stopquotation

\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
_

Re: [NTG-context] LMTX and my custom typescripts

2021-05-28 Thread Michael Guravage
A pox upon me for a clumsy lout!


On Fri, May 28, 2021 at 6:54 PM Thomas A. Schmitz <
thomas.schm...@uni-bonn.de> wrote:

>
> > On 28. May 2021, at 18:40, Michael Guravage <
> gurav...@literatesolutions.com> wrote:
> >
> > Any encouragement in how to resolve this would be much appreciated.
> >
>
> Hi Michael,
>
> Try renaming it to type-imp-DollyPro.tex (and then of course
> \usetypescriptfile[type-imp-DollyPro]), that should help. This changed a
> couple of months ago and was announced on the list, so shame on you for not
> following our discussions religiously…
>
> Best
>
> 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://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
___


[NTG-context] LMTX and my custom typescripts

2021-05-28 Thread Michael Guravage
Yesterday I installed a new LMTX instance *ex nihilo*. Unfortunately, the
new instance will not load my typescripts. My several commercial fonts and
the typescripts I wrote for them reside in the texmf-project tree, along
with a style file that loads them. I load the style file in my source files
with the \environment command.

The files in texmf-project are properly indexed. I know this, because the
style file's name appears in the log, because I can list the fonts with mtxrun
--script fonts --list --files --all --pattern=Dolly*, and because he style
file evokes \showframe and \showgrid; the result of which I see in the
typeset results.

Regardless of whether a typescript files, e.g. type-DollyPro.tex, is in the
texmf-tree or in the same directory as the ConTeXt source file, evoking
\usetypescriptfile[type-DollyPro] fails. The log says:

fonts   > typescripts > unknown library 'DollyPro'
fonts   > typescripts > unknown library 'DollyPro'

However, including the typescripts in the ConTeXt source file succeeds;
which would seem to imply that my typescript definitions are correct.

Using an old instance: LMTX LuaTeX 2.03 20191227 + ConTeXt MkIV 2019.12.27
19:26, loading the typescript via the style file works as expected.

I regret that my mwe remains academic, since you need the Dolly font to run
it.

Any encouragement in how to resolve this would be much appreciated.

Cheers,

Michael

% \starttypescript [serif] [DollyPro]
%   \definefontsynonym [Regular]   [file:DollyPro-Regular.otf]
%   \definefontsynonym [Bold]  [file:DollyPro-Bold.otf]
%   \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf]
%   \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf]
% \stoptypescript

% \starttypescript [serif] [DollyPro]
%   \setups[font:fallback:serif]
%   \definefontsynonym [Serif]   [Regular]   [features=default]
%   \definefontsynonym [SerifBold]   [Bold]  [features=default]
%   \definefontsynonym [SerifItalic] [Italic][features=default]
%   \definefontsynonym [SerifCaps]   [SmallCaps] [features=default]
% \stoptypescript

% \definefontfeature
%   [hz] [default]
%   [protrusion=quality, expansion=quality, mode=node, script=latn]

% \starttypescript[DollyPro]
%   \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz]
% \stoptypescript

\usetypescriptfile[type-DollyPro]
\setupbodyfont[DollyPro]

\starttext
  \input tufte
\stoptext% Regular

\starttypescript [serif] [DollyPro]
  \definefontsynonym [Regular]   [file:DollyPro-Regular.otf]
  \definefontsynonym [Bold]  [file:DollyPro-Bold.otf]
  \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf]
  \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf]
\stoptypescript

\starttypescript [serif] [DollyPro]
  \setups[font:fallback:serif]
  \definefontsynonym [Serif]   [Regular]   [features=default]
  \definefontsynonym [SerifBold]   [Bold]  [features=default]
  \definefontsynonym [SerifItalic] [Italic][features=default]
  \definefontsynonym [SerifCaps]   [SmallCaps] [features=default]
\stoptypescript

\definefontfeature
  [hz] [default]
  [protrusion=quality, expansion=quality, mode=node, script=latn]

\starttypescript[DollyPro]
  \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz]
\stoptypescript

% finis
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
system  > 
system  > ConTeXt  ver: 2021.05.27 14:15 LMTX  fmt: 2021.5.28  int: english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname 'mwe', input './mwe', result 'mwe'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './mwe.tex'
fonts   > typescripts > unknown library 'DollyPro'
fonts   > typescripts > unknown library 'DollyPro'
fonts   > preloading latin modern fonts (third stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 2, order 3, name 'tufte.tex'
close source> level 2, order 3, name 'tufte.tex'
backend > xmp > using file '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 1, order 3, name './mwe.tex'
system  > start used files
system  > text: mwe
system  > stop used files
system  > start used files
system  >1: filename=char-prv.lua filetype=tex format=tex foundname=/opt/_lmtx_/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/opt/_lmtx_/tex/texmf-context/tex/context/base/mkiv/char-prv

[NTG-context] Protruding quotation marks obviate narrowed quotations

2020-12-30 Thread Michael Guravage
Several months ago I posed the following question.

When I start a paragraph with a \quote or a \quotation the left quotemark
does not protrude, but when I use Unicode quotes it does. I would prefer to
use the commands. Any suggestions on how I can achieve proper left
protrusion without resorting to Unicode characters?

Wolfgang suggested the following lines of code; which worked perfically.

\setupquotation [method=font]
\setupquote [method=font]

Returning to this project after several months I observe that when I use a
\start- stopquotation environment, the quotation is not narrowed. The
\setupquotation command obviously affects both the \quotation command and
\start- stopquotation environment.

Is there an elegant way to apply the \setupquotation command and retain the
quotation indentation?

Cheers,
Michael

Here's a mwe.

\showframe
\showgrid
\setupwhitespace[medium]

% Setup hanging punctuation, less severe style
\definefontfeature
  [default]
  [default]
  [protrusion=punctuation,expansion=quality]
\setupalign[hz,hanging]

% Provide protrusion for quotations.
\setupquotation[method=font] % Toggle this line to see the effect.
\setupquote[method=font]

\starttext
  \startparagraph
\quotation[method=font]{Love makes the world go round,} as an old
proverb has it\ldots
  \stopparagraph
  \startquotation
\input tufte
  \stopquotation
\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] left protruding quotations

2020-05-14 Thread Michael Guravage
When I start a paragraph with a \quote or a \quotation the left quotemark
does not protrude, but when I use Unicode quotes it does. I would prefer to
use the commands. Any suggestions on how I can achieve proper left
protrusion without resorting to Unicode characters?

Cheers,

Michael
% Setup hanging punctuation, less severe style
\definefontfeature
  [default]
  [default]
  %%[protrusion=quality,expansion=quality]
  [protrusion=punctuation,expansion=quality]

\setupalign[hz,hanging]

% Setup white space between paragraphs
\setupwhitespace[medium]

% Choose a font
\setupbodyfont[pagella,11pt]
\setupbodyfontenvironment[default][em=italic]

\showframe

\starttext
  
  \input tufte

  \quotation{We thrive in information||thick worlds} because of our
  marvelous and everyday capacity to select, edit, single out,
  structure, highlight, group, pair, merge, harmonize, synthesize,
  focus, organize, condense, reduce, boil down, choose, categorize,
  catalog, classify, list, abstract, scan, look into, idealize,
  isolate, discriminate, distinguish, screen, pigeonhole, pick over,
  sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
  average, approximate, cluster, aggregate, outline, summarize,
  itemize, review, dip into, flip through, browse, glance into, leaf
  through, skim, refine, enumerate, glean, synopsize, winnow the wheat
  from the chaff and separate the sheep from the goats.

  “We thrive in information||thick worlds” because of our marvelous
  and everyday capacity to select, edit, single out, structure,
  highlight, group, pair, merge, harmonize, synthesize, focus,
  organize, condense, reduce, boil down, choose, categorize, catalog,
  classify, list, abstract, scan, look into, idealize, isolate,
  discriminate, distinguish, screen, pigeonhole, pick over, sort,
  integrate, blend, inspect, filter, lump, skip, smooth, chunk,
  average, approximate, cluster, aggregate, outline, summarize,
  itemize, review, dip into, flip through, browse, glance into, leaf
  through, skim, refine, enumerate, glean, synopsize, winnow the wheat
  from the chaff and separate the sheep from the goats.

\stoptext

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


Re: [NTG-context] \startquotation and citations

2020-03-26 Thread Michael Guravage
Thank you Wolfgang,

Now is there a way to persuade the quotation marks to protrude?

Cheers,

Michael



\startsetups[userdata:extendedquotation]
   \startnarrow[]
 “\getinlineuserdata”\userdataparameter{source}
   \stopnarrow
\stopsetups

\defineuserdataalternative
   [extendedquotation]
   [renderingsetup=userdata:extendedquotation]

\defineuserdata
   [extendedquotation]
   [alternative=extendedquotation,
before=\blank,
after=\blank]

\starttext

\input tufte \blank

\startquotation  %% Quotation marks protrude
  \input tufte
\stopquotation

\startuserdata[extendedquotation][source=\footnote{See Tufte …}]  %%
Quotation marks do not protrude
  \input tufte
\stopuserdata

\stoptext



On Thu, Mar 26, 2020 at 2:56 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Michael Guravage schrieb am 26.03.2020 um 14:29:
> > Greetings,
> >
> > I would like to add a citation to a block quotation. Wolfgang proposed a
> > solution
> > <https://www.mail-archive.com/ntg-context@ntg.nl/msg55956.html>back in
> > May 2011. With \star-stopquotation, the left quotation mark protrudes to
> > the left of the text. With Wolfgang's solution, the quotation marks are
> > aligned with the text. For consistency's sake, I need cited and
> > non-cited quotations to appear alike.
> >
> > A lot has changed in the last nine years. Is there a newer way to
> > achieve this behavior?
>
> You can use the userdata environment to create a custom environment with
> optional arguments.
>
> \startsetups[userdata:extendedquotation]
>\startnarrow[middle=4em]
>“\getinlineuserdata”\userdataparameter{source}
>\stopnarrow
> \stopsetups
>
> \defineuserdataalternative
>[extendedquotation]
>[renderingsetup=userdata:extendedquotation]
>
> \defineuserdata
>[extendedquotation]
>[alternative=extendedquotation,
> before=\blank,
> after=\blank]
>
> \starttext
>
> \input tufte
>
> \startuserdata[extendedquotation][source=\footnote{See Tufte …}]
> \input tufte
> \stopuserdata
>
> \input tufte
>
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


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


[NTG-context] \startquotation and citations

2020-03-26 Thread Michael Guravage
Greetings,

I would like to add a citation to a block quotation. Wolfgang proposed a
solution back
in May 2011. With \star-stopquotation, the left quotation mark protrudes to
the left of the text. With Wolfgang's solution, the quotation marks are
aligned with the text. For consistency's sake, I need cited and non-cited
quotations to appear alike.

A lot has changed in the last nine years. Is there a newer way to
achieve this behavior?

Cheers,

Michael
___
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] Loading units fails

2018-04-24 Thread Michael Guravage
Dear list members,

I do not know when this problem first appeared, I have not used the units
package for a while, but merely invoking the package with the latest beta
provokes an error.

MWE:

\usemodule[units]
  \starttext
help
  \stoptext

The attached log says there is a problem on line 42 of m-units.mkiv.

Any help would be appreciated.

-- 
With kind regards,

Michael Guravage
open source > level 1, order 1, name '/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2018.04.19 15:53 MKIV beta  fmt: 2018.4.24  int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
close source> level 2, order 2, name '/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'testing', input './testing', result 'testing'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/tmp/testing.tex'
modules > 'units' is loaded
open source > level 3, order 4, name '/opt/ConTeXt-alpha/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv'

tex error   > tex error on line 42 in file /opt/ConTeXt-alpha/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv: ! Undefined control sequence

 title: units
 1: use \string \Degrees \space \string \Celsius \space instead of 
\mult_messages_start_yes ...erfacemessages {#1}{#2
  }\egroup 
l.42 \stopmessages


32 %D an upward compatibility issue.
33 
34 \startmessages  dutch  library: units
35   title: eenheden
36   1: gebruik \string\Degrees\space\string\Celsius\space in plaats van \string\Celsius !
37 \stopmessages
38 
39 \startmessages  english  library: units
40   title: units
41   1: use \string\Degrees\space\string\Celsius\space instead of \string\Celsius !
42 >>  \stopmessages
43 
44 \startmessages  german  library: units
45   title: Einheiten
46   1: Verwende \string\Degrees\space\string\Celsius\space statt \string\Celsius !
47 \stopmessages
48 
49 \startmessages  italian  library: units
50   title: unita
51   1: usare \string\Degrees\space\string\Celsius\space invece di \string\Celsius !
52 \stopmessages


? x

system  > start used files

system  > text: testing

system  > stop used files


system  > start used files

system  >1: filename=char-prv.lua filetype=tex format=tex foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system  >2: filename=cont-yes.mkiv filetype=tex foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system  >3: filename=publ-imp-default.lua filetype=scripts foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system  >4: filename=cont-new.mkiv filetype=tex foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system  >5: filename=lang-exc.lua filetype=scripts foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system  >6: filename=lang-us.lua filetype=scripts foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system  >7: filename=/tmp/testing.tex foundname=/tmp/testing.tex fullname=/tmp/testing.tex usedmethod=direct
system  >8: filename=m-units.mkiv filetype=tex foundname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv fullname=/opt/ConTeXt-alpha/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv usedmethod=database

system  > stop used files


system  > start commandline options

system  > currentrun="1"
system  > fulljobname="./testing.tex"
system  > input="./testing.tex"
sy

[NTG-context] Repeating Headers for Tabulate not Working

2017-12-22 Thread Michael Guravage
Though this issue has appeared periodically over the years, this minimal
example still does not work. Compiled with ConTeXt version: 2017.12.20
10:48.

Any suggestions?

Cheers,

Michael


\starttext
\setuptabulate[split=yes,header=repeat]

\starttabulatehead
  \HL
  \NC {\bf format char} \NC {\bf meaning} \NC \AR
  \HL
\stoptabulatehead

\starttabulate[|r|l|]
\dorecurse{50}
{\NC c \NC centered  \NC \AR
\NC l \NC left aligned  \NC \AR
\NC r \NC right aligned \NC \AR}
\stoptabulate

\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] Repeating Headers for Tabulate not Working

2017-12-22 Thread Michael Guravage
Though this issue has appeared periodically over the years, this minimal
example still does not work. Compiled with ConTeXt version: 2017.12.20
10:48.

Any constructive suggestions?

\starttext
\setuptabulate[split=yes,header=repeat]

\starttabulatehead
  \HL
  \NC {\bf format char} \NC {\bf meaning} \NC \AR
  \HL
\stoptabulatehead

\starttabulate[|r|l|]
\dorecurse{50}
{\NC c \NC centered  \NC \AR
\NC l \NC left aligned  \NC \AR
\NC r \NC right aligned \NC \AR}
\stoptabulate

\stoptext

Cheers,

Michael
___
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] Modifying an existing letter style

2017-12-05 Thread Michael Guravage
I am typesetting a letter using Wolfgang's letter module. I have a
requirement that is not satisfied by any of the existing styles, namely
that the to-address, i.e. the address, and the from-address, i.e., the
header, need to start at the same height and be positioned next to one
another. I am using the modified style and am trying to adjust the layout
via he \setupletterstyle command without success.

I have look at the sources and have seen how the elements of the various
styles are stacked.  All styles use the default style, which
defines lefthead and righthead elements, but only the din styles and those
styles derived from them seem to use these elements.

Is there any way to acheive the required side-by-side layout short of
cobbling together my own style? Any helpful advice would be greatly
appreciated.
-- 
With kind regards,

Michael Guravage


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

[NTG-context] Tweaking an existing letter style

2017-12-05 Thread Michael Guravage
I am typesetting a letter using Wolfgang's letter module. I have a
requirement that deviates from any of the existing styles, namely that the
recipient, i.e. the address, and the sender, i.e., the header, need to
start left and right respectively and at the same height. I am using the
modified style and am trying to adjust the layout via he \setupletterstyle
command without success.

I have look at the sources and have seen how the elements of the various
styles are stacked, but I cannot discern how to achieve the side-by-side
arrangement I require.

If anyone can advise me how I can move these various layers about, I would
be very grateful.

Cheers,

Michael
___
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] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Michael Guravage
Greetings,

I would like to use a variable for the value of the list argument in, e.g.,
the \startsection command. If you compile my little example you will see
that the first 'literal' assignment works, while the second 'variable'
assignment does not. What am I missing here?

Cheers,

Michael


\starttext

  \placecontent

  \setvariables[TOC][list=Second Section]

  \startsection [title={First}, list={First Section}]
This is the first section.
  \stopsection

  \startsection [title={Second}, list={\getvariable{TOC}{list}}]
This is the \getvariable{TOC}{list}
  \stopsection

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

[NTG-context] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Michael Guravage
Greetings,

I would like to use a variable for the value of the list argument in, e.g.,
the \startsection command. If you compile my little example you will see
that the first 'literal' assignment works, while the second 'variable'
assignment does not. What am I missing here?

Cheers,

Michael


\starttext

  \placecontent

  \setvariables[TOC][list=Second Section]

  \startsection [title={First}, list={First Section}]
This is the first section.
  \stopsection

  \startsection [title={Second}, list={\getvariable{TOC}{list}}]
This is the \getvariable{TOC}{list}
  \stopsection

\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] Learning about Kerning

2015-09-15 Thread Michael Guravage
Hi,

The appearance of a gap before the letter T has nothing to do with kerning
per se, but with my use of smallcaps and kerning.

I solved my problem by defining a font feature and applying it with the
\setff command as described on the wiki.

\setuplayout[header=0pt, footer=0pt]
\setupstretched[width=6.25cm]

\definefontfeature[smallcapitals] [smcp=yes]

\starttext
  \setuphead[subject][style=\setff{smallcapitals},
textstyle={\kerncharacters[.40]}]
  \startsubject[title={Properties of Blood}]
  \stopsubject


\setuphead[subject][style=\setff{smallcapitals},deeptextcommand={\kerncharacters[.40]}]
  \startsubject[title={Properties of Blood}]
  \stopsubject


\setuphead[subject][style=\setff{smallcapitals},deeptextcommand={\stretched}]
  \startsubject[title={Properties of Blood}]
  \stopsubject

\stoptext



On Mon, Sep 14, 2015 at 5:33 PM, Michael Guravage 
wrote:

> Hi,
>
> I am trying to use kerning in subject titles. \kernchracters works pretty
> good, but as you can see in the attached example, there is a gap before the
> Ts in Properties, and again in Praefatio and Praefationis. The \stretched
> command yields similar results, vis-à-vis the gaps.
>
> If somebody can enlighten me how to properly use kerning in this
> situation, I'd be immeasurably grateful.
>
> Cheers,
>
> Michael
>
>
___
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] Learning about Kerning

2015-09-15 Thread Michael Guravage
Hi,

I am trying to use kerning in subject titles. \kernchracters works pretty
good, but as you can see in the attached example, there is a gap before the
Ts in Properties, and again in Praefatio and Praefationis. The \stretched
command yields similar results, vis-à-vis the gaps.

If somebody can enlighten me how to properly use kerning in this situation,
I'd be immeasurably grateful.

Cheers,

Michael


kerning.tex
Description: TeX document


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

[NTG-context] Resizing multi-line fill-in field

2014-07-01 Thread Michael Guravage
I am re-posting a previous question.

Is it possible to increase the height of a multi-line fill-in field when
the cumulative height of the lines typed into it exceeds the field's
initial height?

Here's an example where the field's initial height in 10em.

\usemodule[fields]
\setupinteraction[state=start]
\setupfield
  [TextSetup]
  [width=\textwidth, height=10em, background=screen, backgroundscreen=.97,
frame=off]
\definefield [Block] [text] [TextSetup] [] [What's on your mind?]

\starttext
  \field [Block] [type here]
\stoptext

I have a situation where the amount of text typed into various fields will
vary, but it is inappropriate to reserve a large block of space for each
field.

Any suggestions would be greatly appreciated.

-- 
With kind regards,

Michael Guravage
___
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] PDF Forms - expanding multi-line text fields

2014-06-17 Thread Michael Guravage
I am composing a document that contains pdf forms. Example code in "Widgets
Uncovered," shows how to specify the height and width of a multi-line text
field. Here is a small example:

\usemodule[fields]
\setupinteraction[state=start]
\setupfield [TextSetup]
[width=\textwidth,height=5em,background=screen,backgroundscreen=.97,frame=off]
\definefield [Block] [text] [TextSetup]
\starttext
   \field [Block]
\stoptext

In this example the height is 5em.  The field will scroll lines up when the
height of the lines typed exceeds the height of the field. Click outside
the field and the field displays the first n-lines that fit within its
height.

My question is, is it possible to tell the field to expand beyond its
initial field height to display all its lines?

A second less pressing question is, is it possible to tell lines to wrap
when they exceed the field width?


-- 
With kind regards,

Michael Guravage
___
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] Stepper code fails

2014-03-28 Thread Michael Guravage
The Stepper example on the wiki,
<http://wiki.contextgarden.net/Stepper>from which the following
snippet comes,

\usemodule[pre-60] % use the stepper
\setuppapersize[S6][S6]

\defineoverlay[invoke] [\overlaybutton{InvokeStepper}]
\setupbackgrounds[text] [background=invoke]
\setupinteraction[state=start,click=off]

\starttext
ex nihilo
\stoptext


fails here with the following error:

! LuaTeX error
...eXt-beta/tex/texmf-context/tex/context/base/lpdf-mis.lua:146: attempt to
call upvalue 'pdfaction' (a nil value)
stack traceback:
...eXt-beta/tex/texmf-context/tex/context/base/lpdf-mis.lua:146: in
function '?'
...eXt-beta/tex/texmf-context/tex/context/base/lpdf-ini.lua:700: in
function 'run'
...eXt-beta/tex/texmf-context/tex/context/base/lpdf-ini.lua:722: in
function 'finalizepage'
[string "\latelua "]:1: in main chunk.


Though I am using the latest beta, I do not think this problem caused by
changes in the latest release. I have attached the log file for those who
are interested. Any suggestions how to rectify this problem would be much
appreciated.

With kind regards,

Michael Guravage
(/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.03.27 20:04 MKIV beta  fmt: 2014.3.28  int: english/english

system  > 'cont-new.mkiv' loaded
(/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/cont-new.mkiv)
system  > files > jobname 'step', input './step', result 'step'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
(/tmp/step.tex
resolvers   > modules > 'pre-60' is loaded
(/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/s-pre-60.mkiv
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
(/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/java-imp-stp.mkiv)
interactions> javascripts > loaded: library 'stp'
metapost> library 'nav' is loaded (/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/meta-imp-nav.mkiv))
fonts   > preloading latin modern fonts (second stage)
(/ufs/guravage/opt/ConTeXt-beta/tex/texmf-project/tex/context/user/type-loc.tex)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
! LuaTeX error ...eXt-beta/tex/texmf-context/tex/context/base/lpdf-mis.lua:146: attempt to call upvalue 'pdfaction' (a nil value)
stack traceback:
	...eXt-beta/tex/texmf-context/tex/context/base/lpdf-mis.lua:146: in function '?'
	...eXt-beta/tex/texmf-context/tex/context/base/lpdf-ini.lua:700: in function 'run'
	...eXt-beta/tex/texmf-context/tex/context/base/lpdf-ini.lua:722: in function 'finalizepage'
	[string "\latelua "]:1: in main chunk.

tex error   > error on line 1 in file /tmp/step.tex: LuaTeX error 

 1 >>  \usemodule[pre-60] % use the stepper
 2 \setuppapersize[S6][S6]
 3 
 4 \defineoverlay[invoke] [\overlaybutton{InvokeStepper}]
 5 \setupbackgrounds[text] [background=invoke]
 6 \setupinteraction[state=start,click=off]
 7 
 8 \starttext
 9 
10 ex nihilo
11 


\page_shipouts_normal ...box \shipoutscratchbox }}
  \else \page_shipouts_ignor...
\page_boxes_shipout ... {\box \shipoutscratchbox }
  \fi \setnextrealpageno \th...
\page_otr_construct_and_shipout ...cted_page #1#2}
  \page_otr_flush_pending_co...
\page_sides_output_routine_nop ...de_float_output 
  \global \d_page_sides_vsiz...
\page_sides_output_routine ..._output_routine_nop 
  \fi 
\page_otr_triggered_output_routine ...and_routine 
  \fi 
...
l.12 \stoptext

? x

system  > structure > start used structure

used structure  > text: step

system  > structure > stop used structure


system  > files > start used files

used file   >1: filename=cont-yes.mkiv filetype=tex foundname=/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used file   >2: filename=cont-new.mkiv filetype=tex foundname=/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used file   >3: filename=lang-us.lua filetype=scripts foundname=/ufs/guravage/opt/ConTeXt-beta/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used file   >4: filename=/tmp/step.tex foundname=/tmp/step.tex usedmethod=direct
used file   >5: filename=s-pre-60.mkiv filetype=tex foundna

[NTG-context] typesetting verbatim code snippets in xml mkiv

2012-01-19 Thread Michael Guravage
In attempting to use Thomas's xml presentation style he presented at C5M, I
would like to add the ability to typeset verbatim code snippets. In the
xml:code setup example below, using commands like
\startlinenumbering-\stoplinenumbering work fine, but using
\starttyping-\stoptyping breaks. Can someone please enlighten me as to the
correct way to accomplish this sort of thing?


\startxmlsetups xml:codesetups
  \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{document|code}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:codesetups}

% document
\startxmlsetups xml:document
  \xmlflush{#1}
\stopxmlsetups

% xml code
\startxmlsetups xml:code
  \starttyping
\xmlflush{#1}
  \stoptyping
\stopxmlsetups





  
int x;
x = 42;
  



-- 
With kind regards,

Michael Guravage
___
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] endnotes, imposition and recurselevel

2012-01-19 Thread Michael Guravage
I am typesetting an article where the footnotes should be collected as
endnotes. I am also using imposition to arrange the article as a booklet.

When using the default location 'page', footnotes work as expected. But
when I change the location to 'text' and use \placefootnotes to produce the
endnotes, the compilation fails. Here is an example document that attempts
the same thing.  Note that the paragraph/footnote loop is performed nine
times. If you compile as is, i.e., no imposition, everything works as
expected. But add --mode=imposition to apply imposition and the compilation
fails.

Now decrease the number of iterations from nine to eight and the behaviour
is reversed. The imposition will succeed and the straight compile will
fail. Stranger yet, If you remove the subject structure, compiling with
eight iterations succeeds with or without imposition, and compiling with
nine iterations fails with or without imposition.  This all happens in the
ConTeXt from 2011.07.26. Switching to the ConTeXt from 2012.01.16
everything compiles, but the runs using imposition produce only blank pages.

Regardless of what I try, I cannot get endnotes and imposition to
cooperate. Any help would be greatly appreciated.

\showframe
\doifmode{imposition}
{\setuppapersize[A5,portrait][A4,landscape]
 \setuparranging[2UP,doublesided]}

\setupfootnotes[location={text,none}]

\starttext
  \startsubject[title=First]
\dorecurse{9}{\input tufte\footnote{The quick brown fox jumps over the
lazy dog.}\par}
  \stopsubject
  \startsubject[title=Second]
\placefootnotes
  \stopsubject
\stoptext

-- 
With kind regards,

Michael Guravage
___
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] Lettrine misbehaving in beta

2012-01-14 Thread Michael Guravage
Greetings,

If you run the following example with the current beta you will see that
the second and subsequent lines of the paragraph are pushed down below the
extent of the drop cap. This behavior appeared sometime after 2011.10.24.
Can anyone explain what is happening and suggest a solution?

\usemodule[lettrine]
\showgrid

\def\myhook {\definefontsynonym[LettrineFont][eusm10]}
\setuplettrine
  [Lines=5,
   FontHook={\red\myhook},
   Findent=0.2em,
   Nindent=0.2em,
   Oversize=1.0,
   Hang=0.15]

\setuplayout
  [grid=yes]

\starttext

  \lettrine{W}{e thrive} in information||thick worlds because of our
  marvelous and everyday capacity to select, edit, single out,
  structure, highlight, group, pair, merge, harmonize, synthesize,
  focus, organize, condense, reduce, boil down, choose, categorize,
  catalog, classify, list, abstract, scan, look into, idealize,
  isolate, discriminate, distinguish, screen, pigeonhole, pick over,
  sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
  average, approximate, cluster, aggregate, outline, summarize,
  itemize, review, dip into, flip through, browse, glance into, leaf
  through, skim, refine, enumerate, glean, synopsize, winnow the wheat
  from the chaff and separate the sheep from the goats.

\stoptext


With kind regards,

Michael Guravage
___
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] Lettrine and colors

2012-01-10 Thread Michael Guravage
Greetings,

It appears that specifying a FontHook in setuplettrine that inclues a color
simply breaks. This feature worked with ConTeXt from 2011.07.26, but breaks
in ConTeXt from 2012.01.09. Any suggestions how to resolve this would be
mightily appreciated.

Here is a minimal example:

\usemodule[lettrine]

\setuplettrine [FontHook={\color[red]}]

\starttext

  \lettrine{W}{e thrive} in information||thick worlds because of our
  marvelous and everyday capacity to select, edit, single out,
  structure, highlight, group, pair, merge, harmonize, synthesize,
  focus, organize, condense, reduce, boil down, choose, categorize,
  catalog, classify, list, abstract, scan, look into, idealize,
  isolate, discriminate, distinguish, screen, pigeonhole, pick over,
  sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
  average, approximate, cluster, aggregate, outline, summarize,
  itemize, review, dip into, flip through, browse, glance into, leaf
  through, skim, refine, enumerate, glean, synopsize, winnow the wheat
  from the chaff and separate the sheep from the goats.

\stoptext

-- 
With kind regards,

Michael Guravage
___
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] page number placement in multiline TOC entry

2011-11-07 Thread Michael Guravage
Greetings,

At the recent ConTeXt workshop someone mentioned that they had achieved
placing a pagenumber to the right of the first line of a multiline table of
contents entry. Can anyone describe how to acomplish this?

With kind regards,

Michael Guravage
___
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] StretchedBox broken in mkiv

2011-09-26 Thread Michael Guravage
Several years ago Hans cooked up a fix using \CapStretch that allowed me to
stretch words. That early version of \stretchedbox appeared in later ConTeXt
versions as \StretchedBox as described in strc-sec.mkii and strc-ren.mkiv.
This feature worked in the ConTeXt version dated 2011.07.26, but does not
work in my current ConTeXt version dated 2011.09.10. I have attached an
example file that works with mkii and with earlier mkiv versions, but not
with the current mkiv.

I am curious to know what has changed to break this functionality.
Initially, I thought it had to do with \setuphead's definition of
'deeptextcommand', but since there are no difference in the files
strc-sec-mkii and strc-ren.mkiv between these two releases, the reason must
lie elsewhere. If anyone can explain what has changed, an more importantly
how to reinstate it, I would be most grateful.

With kind regards,

Michael Guravage


stretchMe.tex
Description: TeX 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] Suppress numbering of figures

2005-03-17 Thread Michael Guravage
 
> All,
> 
> I have:
> 
> \placefigure
> [here][]
> {Mary Glenn}{\externalfigure[MaryGlenn3.jpg][width=0.5\makeupwidth]}
> 
> I'd like the figure to float with the caption, but I don't want the 
> Figure 1, Figure 2, etc. That is, I just want the caption under the 
> figure.
> 
> How can I modify to accomplish this?
> 

Hello David,

To obviate figure numbers use the setupcaptions command, e.g. 

\setupcaptions [number=no]

You can find a complete description of the command with texshow web on the 
ConTeXt wiki: , or on page 224 of the context 
manual.

Cheers,

Michael 

-
  Michael A. Guravage
Mijndensedijk 11a | 3632 NT Loenen aan de Vecht | The Netherlands
tel: +31 (0)294233682 | gsm: +31 (0)621431435
-


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] ConTeXt portal

2003-06-21 Thread Michael Guravage

Hello everyone,

I would like to announce the ConTeXt web portal. It's purpose is to facilitate 
the collection and publication of your ConTeXt best practices, tips, and 
recipes. The portal's URL is: www.pragma-ade.com:8080/context.

The welcome screen reiterates the purpose of the portal, and contains a link 
to a more detailed document entitled, "Introduction to the ConTeXt portal." 
Enjoy!

With kind regards,

Michael A. Guravage
-- 
Michael A. GuravageEmail: [EMAIL PROTECTED]
National Aerospace Laboratory  Phone: +31 (0)20 511 3695
P.O. Box 90502 Fax:   +31 (0)20 511 3210
1006 BM, Amsterdam,GSM:   +31 (0)62 143 1435
The NetherlandsURL:   




___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context