Re: [NTG-context] fixing indentation of xtable inside item

2021-11-22 Thread fv leung via ntg-context
add

\dontleavehmode

before the table

Andres Conrado Montoya via ntg-context  於 2021年11月23日
週二 上午7:58寫道:

> Considering the following MWE, I would like to know how I can get
> the table inside the item to be aligned with the item. It seems the
> tabel takes the width right, but it gets pushed to the left, disregarding
> the item's indentation.
>
> I think I read about this behaviour somewhere, but I have spent 4 hours
> looking for it in the manuals and I can't find it. :(
>
> Any help would be appreciated.
>
> %-startwme
> \starttext
> \startitemize
> \item
>   Determine la {\sc an} de cada objetivo del microscopio, con los ángulos
> de la tabla y teniendo en cuenta lo siguiente: $n_{\text{aire}} = 1$ y
> $n_{\text{aceite de inmersión}} = 1.515$:
>   \blank
>   \startxtable[align=middle,option=stretch]
>   \startxtablebody[body]
>   \startxrow
>   \startxcell Objetivo 4x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=5.8$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \startxrow
>   \startxcell Objetivo 10x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=14.5$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \startxrow
>   \startxcell Objetivo 40x \stopxcell
>   \startxcell $n=1$ \stopxcell
>   \startxcell $\alpha=40.5$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \stopxtablebody
>   \startxtablefoot[foot]
>   \startxrow
>   \startxcell Objetivo 100x \stopxcell
>   \startxcell $n=1.515$ \stopxcell
>   \startxcell $\alpha=55.6$ \stopxcell
>   \startxcell {\sc an}$=$ \stopxcell
>   \stopxrow
>   \stopxtablefoot
>   \stopxtable
>
> \stopitemize
> \stoptext
> %-startwme
>
>
> --
> Andrés Conrado Montoya
> Andi Kú
> andresconr...@gmail.com
> http://sesentaycuatro.com
> http://messier87.com
> http://chiquitico.org
> 
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
> 
>
> “You develop an instant global consciousness, a people orientation, an
> intense dissatisfaction with the state of the world, and a compulsion to do
> something about it. From out there on the moon, international politics look
> so petty. You want to grab a politician by the scruff of the neck and drag
> him a quarter of a million miles out and say, ‘Look at that, you son of a
> bitch.’” — Apollo 14 astronaut Edgar Mitchell
>
> ___
> 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] fixing indentation of xtable inside item

2021-11-22 Thread Andres Conrado Montoya via ntg-context
Considering the following MWE, I would like to know how I can get the table
inside the item to be aligned with the item. It seems the tabel takes the
width right, but it gets pushed to the left, disregarding the item's
indentation.

I think I read about this behaviour somewhere, but I have spent 4 hours
looking for it in the manuals and I can't find it. :(

Any help would be appreciated.

%-startwme
\starttext
\startitemize
\item
  Determine la {\sc an} de cada objetivo del microscopio, con los ángulos
de la tabla y teniendo en cuenta lo siguiente: $n_{\text{aire}} = 1$ y
$n_{\text{aceite de inmersión}} = 1.515$:
  \blank
  \startxtable[align=middle,option=stretch]
  \startxtablebody[body]
  \startxrow
  \startxcell Objetivo 4x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=5.8$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \startxrow
  \startxcell Objetivo 10x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=14.5$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \startxrow
  \startxcell Objetivo 40x \stopxcell
  \startxcell $n=1$ \stopxcell
  \startxcell $\alpha=40.5$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \stopxtablebody
  \startxtablefoot[foot]
  \startxrow
  \startxcell Objetivo 100x \stopxcell
  \startxcell $n=1.515$ \stopxcell
  \startxcell $\alpha=55.6$ \stopxcell
  \startxcell {\sc an}$=$ \stopxcell
  \stopxrow
  \stopxtablefoot
  \stopxtable

\stopitemize
\stoptext
%-startwme


-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread musa furber via ntg-context
On Mon, Nov 22, 2021 at 6:28 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
> > I am relatively new to ConTeXt and have encountered something that does
> > not work as I expected it to based on various documentation and examples.
> >
> > My book design requires the front matter to contain an abridged table of
> > contents just for chapters, and a detailed table of contents in the back
> > matter.
> >
> > Everything worked fine -- including the PDF bookmarks and table of
> > contents -- until I started using \writetolist to manually inject
> > additional sections and subsections into their respective lists. The
> > manually injected entries do show up (as I expected), but their
> > corresponding PDF bookmarks get repeated (not what I expected).
> you can probably best use
>
> \startsection[title={...},list={...},bookmark={...}]
> ...
> \stopsection
>

Thank you, Hans. This pointer is exactly what I needed.
___
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] update lmtx

2021-11-22 Thread Hans Hagen via ntg-context

Hi,

We're still working on the math so updated lfg files buit not many other 
things apart from a few fixes.


In the process I ran into another area where ms eems to take the lead:

https://devblogs.microsoft.com/math-in-office/unicode-math-braille-sequences/

and although it aims at msword I gave that a go for context so we now 
have a "braille-basic" module (style) that we (can) use (and run as 
demo) for playing with math spacing because we basically have a 
monospace font. If there is any interest in braille as alternative 
output we can extend that. I'm pretty sure that we need to adapt some 
(general spacing related) presets to this situation.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Problem with \head inside \itemize

2021-11-22 Thread Hans Hagen via ntg-context

On 11/22/2021 2:30 PM, Taco Hoekwater via ntg-context wrote:




On 22 Nov 2021, at 14:15, Jean-Philippe Rey via ntg-context 
 wrote:

Dear list,

The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 
LMTX
but produces an error with the current LMTX version (at least since ConTeXt  
ver: 2021.09.26 17:00 LMTX).
Adding an explicit \par at the end of the \head line allows the example to work.


It seems like the newest LMTX versions don’t handle implicit \par (empty lines) 
as argument
delimiter any more, the argument has to be terminated by the explicit string 
“\par", just
like any other argument delimiter.

This is definitely a change, but I would vote for that change to stay. ;)

there is some experimental stuff involved

\starttext

default: \the\autoparagraphmode \blank

% 0x1 text | 0x2 macro | 0x4 go-on

\autoparagraphmode0 \def\foo#1\par{[#1]} 0: \foo test\par test\par
\autoparagraphmode1 \def\foo#1\par{[#1]} 1: \foo test\par test\par
\autoparagraphmode2 \def\foo#1\par{[#1]} 2: \foo test\par test\par
\autoparagraphmode4 \def\foo#1\par{[#1]} 4: \foo test\par test\par

\starttext

but inceed i'd like to get rid of par delimited commands (afaiks we have 
only two left) and \starthead .. \stophead is the way to go


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Problem with \head inside \itemize

2021-11-22 Thread Taco Hoekwater via ntg-context


> On 22 Nov 2021, at 14:15, Jean-Philippe Rey via ntg-context 
>  wrote:
> 
> Dear list,
> 
> The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 
> LMTX
> but produces an error with the current LMTX version (at least since ConTeXt  
> ver: 2021.09.26 17:00 LMTX).
> Adding an explicit \par at the end of the \head line allows the example to 
> work.

It seems like the newest LMTX versions don’t handle implicit \par (empty lines) 
as argument 
delimiter any more, the argument has to be terminated by the explicit string 
“\par", just 
like any other argument delimiter. 

This is definitely a change, but I would vote for that change to stay. ;)

Best wishes,
Taco

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Problem with \head inside \itemize

2021-11-22 Thread Jean-Philippe Rey via ntg-context
Dear list,

The following code worked perfectly well with ConTeXt  ver: 2021.01.05 10:45 
LMTX
but produces an error with the current LMTX version (at least since ConTeXt  
ver: 2021.09.26 17:00 LMTX).
Adding an explicit \par at the end of the \head line allows the example to work.

Best regards,
JP

Here is the minimal failing example :

===
\starttext
\startitemize
\head Title

text
\stopitemize
\stoptext
===

and the corresponding log output :

===
resolvers   | formats | executing runner 'run luametatex format': 
/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin/luametatex
 --jobname="./mfe-head.tex" 
--fmt=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./mfe-head.tex" --c:input="./mfe-head.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-osx-64/bin"
system  > 
system  > ConTeXt  ver: 2021.11.19 09:31 LMTX  fmt: 2021.11.22  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/jprey/Applications/ConTeXt/Current/osx-64/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 
'/Users/jprey/Applications/ConTeXt/Current/osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './mfe-head', input './mfe-head.tex', result 
'./mfe-head'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './mfe-head.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
tex error   > tex error on line 8 in file ./mfe-head.tex: The file ended 
when scanning an argument.

Title \par text \stopitemize \stoptext 

 
\stoptext

1 \starttext
2 \startitemize
3 \head Title
4 
5 text
6 \stopitemize
7 \stoptext
8 >>  
mtx-context | fatal error: return code: 256


-- 
Jean-Philippe Rey
jean-philippe@centralesupelec.fr
91192 Gif-sur-Yvette Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread Musa Furber via ntg-context
On 22 November 2021 at 18:28:44, Hans Hagen via ntg-context (
ntg-context@ntg.nl) wrote:

On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
> I am relatively new to ConTeXt and have encountered something that does
> not work as I expected it to based on various documentation and examples.
>
> My book design requires the front matter to contain an abridged table of
> contents just for chapters, and a detailed table of contents in the back
> matter.
>
> Everything worked fine -- including the PDF bookmarks and table of
> contents -- until I started using \writetolist to manually inject
> additional sections and subsections into their respective lists. The
> manually injected entries do show up (as I expected), but their
> corresponding PDF bookmarks get repeated (not what I expected).
you can probably best use

\startsection[title={...},list={...},bookmark={...}]
...
\stopsection


I do not think that is an option for me.

The book is bilingual, with Arabic and English. There are places where I
want the chapter, section, and subsection titles to be bilingual as well,
with English on the left and Arabic on the right. I accomplish this using
the following…


\defineparagraphs[BilingualTitle][n=3,before={\blank[2*line]},after=,]

\setupparagraphs[BilingualTitle][1][width=.4\textwidth]

\setupparagraphs[BilingualTitle][2][width=.12\textwidth]

\setupparagraphs[BilingualTitle][3][width=.4\textwidth]


\define[2]\BilingualChapter

   {\expanded{\writetolist[chapter]{}{#1}}

   \startBilingualTitle


 
\noindentation\setlatin{}\tfd\setupinterlinespace\feature[+][smallcaps]\word{#1}\feature[<]

   \nextBilingualTitle

   \hfill\nextBilingualTitle

   \noindentation\setarabic{}\tfd\setupinterlinespace{#2}

   \stopBilingualTitle

  }


…with variants for section, subsection, and subsection.


Regards,

Musa
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread Hans Hagen via ntg-context

On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
I am relatively new to ConTeXt and have encountered something that does 
not work as I expected it to based on various documentation and examples.


My book design requires the front matter to contain an abridged table of 
contents just for chapters, and a detailed table of contents in the back 
matter.


Everything worked fine -- including the PDF bookmarks and table of 
contents -- until I started using \writetolist to manually inject 
additional sections and subsections into their respective lists. The 
manually injected entries do show up (as I expected), but their 
corresponding PDF bookmarks get repeated (not what I expected).

you can probably best use

\startsection[title={...},list={...},bookmark={...}]
...
\stopsection

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread musa furber via ntg-context
I am relatively new to ConTeXt and have encountered something that does not
work as I expected it to based on various documentation and examples.

My book design requires the front matter to contain an abridged table of
contents just for chapters, and a detailed table of contents in the back
matter.

Everything worked fine -- including the PDF bookmarks and table of contents
-- until I started using \writetolist to manually inject additional
sections and subsections into their respective lists. The manually injected
entries do show up (as I expected), but their corresponding PDF bookmarks
get repeated (not what I expected).

Here is a M(not)WD:

###begin
\setupinteraction[state=start]
\placebookmarks[chapter, section][chapter, section]
\setupinteractionscreen[option=bookmark]

\starttext

  \startfrontmatter
\title{Contents}
\placelist[chapter]
  \stopfrontmatter

  \startbodymatter
\chapter{Chapter ONE}
\section{Section ONE}
\writetolist[section]{}{Section via writetolist ONE}
\chapter{Chapter TWO}
  \stopbodymatter

  \startbackmatter
\chapter{Detailed Table of Contents}
\placecontent[criterium=all]
  \stopbackmatter

\stoptext
###end

The repetitions go away when any one of the following is done:
-- commenting out the front/body/back commands
-- commenting out both contents at front and back
-- commenting out just back contents
-- commenting out the \writetolist

Have I misunderstood something?

Many thanks,
Musa
___
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
___