Re: [NTG-context] Emacs + latest beta

2018-08-26 Thread Vladimir Lomov
Hello,
** Fabrice Couvreur [2018-08-25 01:23:28 +0200]:

> Hi Vladimir,
> I use ConTeXt Full following this question asked on the forum
> https://mailman.ntg.nl/pipermail/ntg-context/2017/089501.html
> Then, if I compile with ConTeXt, the problem is not solved and the file
> vladimir.log is empty !

I don't know what trigger this error, in my configuration (even in
minimal one, see below) the sample document is typeset just fine.

> This is the buffer vladimir.output with emacs
> 
>  8<
> --
> Running `ConTeXt' on `vladimir' with
> ``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context vladimir''
> resolvers   | trees | analyzing 'home:texmf'
> mtx-context | warning: no (local) file './vladimir', proceeding
> mtx-context | run 1: luatex
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> --jobname="vladimir"
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> --no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
> --c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"
> 
> This is LuaTeX, Version 1.08.0 (TeX Live 2018)
>  system commands enabled.
> 
> resolvers   > trees > analyzing 'home:texmf'
> open source > level 1, order 1, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
> system  >
> system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
> int: english/english
> system  >
> system  > 'cont-new.mkiv' loaded
> open source > level 2, order 2, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> system  > beware: some patches loaded from cont-new.mkiv
> close source> level 2, order 2, name
> '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
> system  > files > jobname 'vladimir', input './vladimir', result
> 'vladimir'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
> system  > synctex functionality is enabled, expect 5-10 pct runtime
> overhead!
> fonts   > preloading latin modern fonts (second stage)
> fonts   > 'fallback modern-designsize rm 12pt' is loaded
> structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
> metapost> initializing instance 'metafun:1' using format 'metafun'
> and method 'default'
> metapost> loading 'metafun' as
> '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
> using method 'default'
> metapost> initializing number mode 'scaled'
> 
> lua error   > lua error on line 10 in file /home/aragorn/vladimir.tex:
> 
> ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
> call a nil value (global 'getid')
> stack traceback:
> ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
> upvalue 'getexpansion'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
> local 'boxtomp'
> ...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
> (...tail calls...)
> 
>  1
>  2 \setupsynctex[state=start]
>  3
>  4 \startusableMPgraphic{NumberHead}
>  5   draw outlinetext.f
>  6   ("\bf\namedheadnumber{chapter}")
>  7   (withcolor "red")
>  8   ysized 50pt ;
>  9 \stopusableMPgraphic
> 10 >>
> 11 \unexpanded\def\processMPheadnumber#1%
> 12   {\useMPgraphic{NumberHead}}
> 13
> 14 \setuphead%
> 15 [chapter]%
> 16 [command=\HeadTitle,%
> 17  headstyle=\ss,%
> 18  numbercommand=\processMPheadnumber]
> 19
> 20 \unexpanded\def\HeadTitle#1#2%
> 

I didn't see nothing suspicios, only the message with lua error, I
didn't see it in terminal and in Emacs.

Last try, could you make a backup of your ~/.emacs file and use attached
one to test your system (Emacs+AUCTeX). Just
1. make a copy of your original ~/.emacs;
2. change it's context to the provided one;
3. start new Emacs session;
4. open a test file and
5. do C-c C-c on it. Be sure that you choose the "ConTeXt" target.

Besides that check the *Messages* buffer, may be you find something
unusual there.

[...]

---
WBR, Vladimir Lomov

-- 
Ship it.
(setenv "TEXMFCNF" nil)
(setenv "TEXMFCACHE" (getenv "X_CACHE_DIR"))
(setenv "TEXROOT" "/usr/local/opt/context/tex")
(setenv "OSFONTDIR" 

Re: [NTG-context] Emacs + latest beta

2018-08-26 Thread Vladimir Lomov
Hello,
** Hans Hagen [2018-08-24 16:39:54 +0200]:

> On 8/24/2018 3:48 PM, Vladimir Lomov wrote:
> 
>> I don't know why you get "damaged" pdf file (in fact how do you know
>> that file is damaged?) but "TEXMFCNF" is special variable that I uses to
>> tweak TeX Live configuration for my latex workflow but context
>> (standalone and from TL) refuses to work if this variable is set (in
>> terminal I do 'unset' while in Emacs I set its value to 'nil' because
>> this is identical to "unset" it). The "TEXROOT" variable I found in
>> update script, I'm not sure if context requires it to work but IMHO, it
>> is harmless. And the last variable "TEXMFCACHE" I use to force context
>> to use ~/.cache for "luatex-cache" directory and not "pollute" my home
>> directory (without it the "luatex-cache" directory will be created in
>> $HOME directory).
> 
> context does listen to some of these variables but all lookups are done
> independent of kpse,

And I suspect this causes strange behaviour of context in my case. I have

$ echo $TEXMFCNF
/home/vladimir/.texlive2018/texmf-config/web2c:

The last colon is kpse feature to use not only the first texmf.cnf
(https://www.tug.org/texinfohtml/kpathsea.html#Config-files) but all
others (I use personal texmf.cnf to adjust some TEXMF variables for my
latex workflow). With that TEXMFCNF context can't find its files (this
is for context from TeX Live:
 8< ---
mtxrun  | forcing cache reload
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/vladimir/.texlive2018/texmf-config/web2c:' from specification 
'/home/vladimir/.texlive2018/texmf-config/web2c:'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/home/vladimir/.texlive2018/texmf-config/web2c:' from specification 
'/home/vladimir/.texlive2018/texmf-config/web2c:'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-context.lua' using hash 
'lua::mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-contexts.lua' using hash 
'lua::mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-context.lua' using hash 
'lua::mtx-t-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-contexts.lua' using hash 
'lua::mtx-t-contexts.lua'
resolvers   | resolving | remembered file 'mtx-t-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'context.lua' using hash 
'lua::context.lua'
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
 8< ---

). I didn't try to figure out how to "fix" this, I simply unset that variable
when I use context (both standalone and from TeX Live).

> basically you only need to set the path or run context
> / mtxrun with a full path, often from an editor
> /mtxrun --script context 
>
> works ok

context script do exactly that.

> Hans

---
WBR, Vladimir Lomov

-- 
If you ever want to have a lot of fun, I recommend that you go off and program
an imbedded system.  The salient characteristic of an imbedded system is that
it cannot be allowed to get into a state from which only direct intervention
will suffice to remove it.  An imbedded system can't permanently trust
anything it hears from the outside world.  It must sniff around, adapt,
consider, sniff around, and adapt again.  I'm not talking about ordinary
modular programming carefulness here.  No.  Programming an imbedded system
calls for undiluted raging maniacal paranoia.  For example, our ethernet front
ends need to know what network number they are on so that they can address and
route PUPs properly.  How do you find out what your network number is?  Easy,
you ask a gateway.  Gateways are required by definition to know their correct
network numbers.  Once you've got your network number, you start using it and
before you can blink you've got it wired into fifteen different sockets spread
all over creation.  Now what happens when the panic-stricken operator realizes
he was running the wrong version of the gateway which was giving out the wrong
network number?  Never supposed to happen.  Tough.  Supposing that your
software discovers that the gateway is now giving out a different network
number than before, what's it supposed to do about it?  This 

[NTG-context] split long formula in two pages

2018-08-26 Thread Jeong Dal
Dear all,

Sometimes, I wrote a long formula using
 \startformula\startalign … \stopalign\stopformula.

In that case, if the remaining space in the current page is not enough to 
contain the formula, then it adds ‘page break’ and write the whole formula int 
the new page.

I have read a discussion to split long table in two pages. Is there a similar 
way for long formula?

Here is a minimal example.

\showframe
\starttext
\dorecurse{3}{\input knuth}

\startformula\startalign
\NC S_1 \NC = 1 = 1 + 0 \bigg( \frac{1}{2}\bigg),   
\NR
\NC S_2 \NC = 1 + \frac{1}{2} = 1 + 1\bigg( \frac{1}{2}\bigg),  \NR
\NC S_4 \NC = 1 + \frac{1}{2} + \bigg( \frac{1}{3} + \frac{1}{4} \bigg) \NR
\NC \NC >  1 + \frac{1}{2} + \bigg( \frac{1}{4} + \frac{1}{4} \bigg)  = 1+ 
2\bigg( \frac{1}{2}\bigg),\NR
\NC S_8 \NC = 1 + \frac{1}{2} + \bigg( \frac{1}{3} + \frac{1}{4} \bigg) + 
\bigg( \frac{1}{5} + \frac{1}{6} + \frac{1}{7} + \frac{1}{8} \bigg) \NR
\NC\NC >  1 + \frac{1}{2} + \bigg( \frac{1}{4} + \frac{1}{4} \bigg) + 
\bigg( \frac{1}{8} + \frac{1}{8} + \frac{1}{8} + \frac{1}{8} \bigg) = 1 + 
3\bigg( \frac{1}{2}\bigg)   \NR
\stopalign\stopformula

\stoptext


Thank you for reading.

Best regards,

Dalyoung
___
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] closesymbol on same line as displayed formula

2018-08-26 Thread Jeong Dal

Hi, 

I am sorry to bring up old topic “Re: closesymbol on same line as displayed 
formula” again.
(ntg-context Digest, Vol 153, Issue 40)
Is there any progress after that?
It seems to me that there is no more discussions about it.

The same thing happens after the itemization as in the following MWE.

Thank you for reading.

Best regards,

Dalyoung


\defineenumeration[proof][text=Proof.]

\setupenumeration[proof]
[number=no,
closesymbol=\mathematics{\square},
closecommand=\ifmmode\eqno\else\wordright\fi]

  
\starttext
\startproof
This is a simple proof.
\stopproof

\startproof
This is another simple proof that ends with a formula
\startformula
1+1=2.
\stopformula
\stopproof
\startproof
\startitemize[n]
\item first line.
\item second line
\stopitemize
\stopproof

\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] Some questions about an extreme table

2018-08-26 Thread Fabrice Couvreur
Hello,
Thank you for your suggestions.
Fabrice

Le dim. 26 août 2018 à 15:19, Aditya Mahajan  a écrit :

> On Sun, 26 Aug 2018, Wolfgang Schuster wrote:
>
> > The normal alignment of figures is with the bottom of the figure on the
> > baseline.
> >
> > You can control the vertical alignment with a few box commands but what
> you
> > should use depends on the context, in tables I would use 2 while in
> running
> > text 3 can be better. Which alignment you’re using is your choice.
> >
> >
> > \useMPlibrary[dum]
> >
> > \defineexternalfigure[dummy][width=4cm,height=3cm]
> >
> > \setuplayout[grid=yes]
> >
> > \showgrid
> >
> > \starttext
> >
> > Default: \externalfigure[dummy]
> >
> > %1: \bottomrightbox{\externalfigure[dummy]}\quad
> > 1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
> > 2: \tbox{\externalfigure[dummy]}\quad
> > 3: \bbox{\externalfigure[dummy]}
> >
> > \stoptext
>
> Another option is to use the `location` key for `\externalfigure`:
>
>
> \useMPlibrary[dum]
> \defineexternalfigure[dummy][width=4cm,height=3cm]
> \setuplayout[grid=yes]
>
> \showgrid
>
> \starttext
>
> Default: \externalfigure[dummy]
>
> 1: \externalfigure[dummy][location=top]\quad
> 2: \tbox{\externalfigure[dummy]}
>
> \stoptext
>
>
> Aditya___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://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] question about German hyphenation

2018-08-26 Thread Ulrike Fischer
Am Sun, 26 Aug 2018 17:26:45 +0200 schrieb Pablo Rodriguez:

> Dear list,
> 
> I have the following sample:
> 
> \starttext
> \de\hyphenatedword{Rindfleisch}
> \de\hyphenatedword{Rindfleischetikettierung}
> \stoptext
> 
> I’m not a native speaker, but I think that "Rindfleisch-etikettierung"
> is right in German. (And I think that "Rindflei-schetikettierung" is wrong.)
> 

Yes it is wrong. Correct hyphenation points are 

Rind-fleisch-e-ti-ket-tie-rung 

> Are the hyphenation patterns wrong in the cases above, or am I missing
> something?

That's difficult to do right with patterns, in latex it is isn't
correct either. The problem is that two words have been combined.
(Rindfleisch and Etikettierung). 

-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/

___
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] index with more than one column?

2018-08-26 Thread Wolfgang Schuster

Try it without the columns environment in your document, i.e.

\startchapter[title=\mytitle{Register}]
\placeregister[index]
\stopchapter


Hans van der Meer schrieb am 26.08.18 um 17:48:

Could the following setup I used be the culprit?

\setupregister[index][pagestyle=slanted,textstyle=small,alternative=A]


On 26 Aug 2018, at 17:43, Wolfgang Schuster 
> wrote:


The real question is why do you get an index without two columns.

\starttext

\dorecurse{26}{\convertnumber{a}{#1}\expanded{\index{\convertnumber{a}{#1

\placeregister[index]%[n=3]

\stoptext



Hans van der Meer schrieb am 26.08.18 um 17:37:

How do I produce an index with more than one column?

This produces one column only:
\startchapter[title=\mytitle{Register}]
\startcolumns[n=2]
\placeregister[index]
\stopcolumns

Nor did \placeregister[index][n=2] or \placeindex[n=2], with or 
without the columns envirenment, produce the result wanted.
The \startsimplecolumns[n=2] environment did produce two columns, 
but then played havoc with the textheight.


dr. Hans van der Meer




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

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




met vriendelijke groet
dr. Hans van der Meer




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

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

Re: [NTG-context] index with more than one column?

2018-08-26 Thread Wolfgang Schuster

The real question is why do you get an index without two columns.

\starttext

\dorecurse{26}{\convertnumber{a}{#1}\expanded{\index{\convertnumber{a}{#1

\placeregister[index]%[n=3]

\stoptext



Hans van der Meer schrieb am 26.08.18 um 17:37:

How do I produce an index with more than one column?

This produces one column only:
\startchapter[title=\mytitle{Register}]
\startcolumns[n=2]
\placeregister[index]
\stopcolumns

Nor did \placeregister[index][n=2] or \placeindex[n=2], with or 
without the columns envirenment, produce the result wanted.
The \startsimplecolumns[n=2] environment did produce two columns, but 
then played havoc with the textheight.


dr. Hans van der Meer




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

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


___
If your question is of interest to others as well, please add an entry to 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] index with more than one column?

2018-08-26 Thread Hans van der Meer
How do I produce an index with more than one column?

This produces one column only:
\startchapter[title=\mytitle{Register}]
\startcolumns[n=2]
\placeregister[index]
\stopcolumns

Nor did \placeregister[index][n=2] or \placeindex[n=2], with or without the 
columns envirenment, produce the result wanted.
The \startsimplecolumns[n=2] environment did produce two columns, but then 
played havoc with the textheight.

dr. Hans van der Meer


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

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

[NTG-context] question about German hyphenation

2018-08-26 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\de\hyphenatedword{Rindfleisch}
\de\hyphenatedword{Rindfleischetikettierung}
\stoptext

I’m not a native speaker, but I think that "Rindfleisch-etikettierung"
is right in German. (And I think that "Rindflei-schetikettierung" is wrong.)

Are the hyphenation patterns wrong in the cases above, or am I missing
something?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] unwanted page break in contents

2018-08-26 Thread Jeong Dal
Dear Wolfgang,

> 
> \setuplist
>  [section]
>  [width=10mm,
>   style=,
>   textstyle=\ss,
>   after={\blank[preference]}]

It works perfectly.

Thank you so much.

Best regards,

Dalyoung

___
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] unwanted page break in contents

2018-08-26 Thread Wolfgang Schuster



Jeong Dal schrieb am 26.08.18 um 10:06:

Hi,

In the table of contents, there is a unwanted blank space after chapter 2.
There is a page break if the remaining space is not enough to cover the list of 
the next chapter.
For example, page break after ch 2. in the following example.

Is it possible to list them continuously?

Best regards,

Dalyoung


\starttext
\definepagebreak[emptyodd][yes,header, footer, odd]
\setuphead[chapter][page=emptyodd]

\setuphead[title][incrementnumber=list]
\setupcombinedlist[content][list={title,chapter,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textcommand={\ss\bf }]
\setuplist[section][width=10mm, style=,textcommand={\ss }]


\setuplist
  [section]
  [width=10mm,
   style=,
   textstyle=\ss,
   after={\blank[preference]}]

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
___

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Aditya Mahajan

On Sun, 26 Aug 2018, Wolfgang Schuster wrote:

The normal alignment of figures is with the bottom of the figure on the 
baseline.


You can control the vertical alignment with a few box commands but what you 
should use depends on the context, in tables I would use 2 while in running 
text 3 can be better. Which alignment you’re using is your choice.



\useMPlibrary[dum]

\defineexternalfigure[dummy][width=4cm,height=3cm]

\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

%1: \bottomrightbox{\externalfigure[dummy]}\quad
1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
2: \tbox{\externalfigure[dummy]}\quad
3: \bbox{\externalfigure[dummy]}

\stoptext


Another option is to use the `location` key for `\externalfigure`:


\useMPlibrary[dum]
\defineexternalfigure[dummy][width=4cm,height=3cm]
\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

1: \externalfigure[dummy][location=top]\quad
2: \tbox{\externalfigure[dummy]}

\stoptext

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

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

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Wolfgang Schuster
The normal alignment of figures is with the bottom of the figure on the 
baseline.


You can control the vertical alignment with a few box commands but what 
you should use depends on the context, in tables I would use 2 while in 
running text 3 can be better. Which alignment you’re using is your choice.



\useMPlibrary[dum]

\defineexternalfigure[dummy][width=4cm,height=3cm]

\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

%1: \bottomrightbox{\externalfigure[dummy]}\quad
1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
2: \tbox{\externalfigure[dummy]}\quad
3: \bbox{\externalfigure[dummy]}

\stoptext


Wolfgang



Fabrice Couvreur schrieb am 26.08.18 um 10:50:

Hi Wolfgang,
Thank you but is not it better that the top of the figure is on the 
baseline of the label ?

Fabrice

@Mikael I meant : is the macro robust ?

Le dim. 26 août 2018 à 09:58, Wolfgang Schuster 
> a écrit :


Number them by hand (or replace the descriptions I used with
enumerations).

The alignment of the graphics can be improved with the \tbox
command, which raises the argument by the height of a strut.


\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\setuplayout
  [topspace=10mm,
   header=10mm,
   footer=10mm,
   height=middle,
   backspace=20mm,
   width=middle]

\definedescription
  [Item]
  [width=1.5em,
   distance=none]

\starttext

\startxtable[bodyfont=10pt]
\startxrow
\startxcell[width=2cm]
Expression\\\m{B'(x)}
\stopxcell
\startxcell
\startItem{a.}\m{B'(x)=-x²+24x-117}\stopItem
\stopxcell
\startxcell
\startItem{b.}\m{B'(x)=-3x²+48x-117}\stopItem
\stopxcell
\startxcell
\startItem{c.}\m{B'(x)=-3x²+48x-317}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
\stopxcell
\startxcell
\startItem{d.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{e.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{f.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de\\variations\\de \m{B}
\stopxcell
\startxcell
\startItem{g.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{h.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{i.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang


Fabrice Couvreur schrieb am 26.08.18 um 01:49:

Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels
to be improved ?
Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
[topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
  

[NTG-context] unwanted page break in contents

2018-08-26 Thread Jeong Dal
Hi,

In the table of contents, there is a unwanted blank space after chapter 2.
There is a page break if the remaining space is not enough to cover the list of 
the next chapter.
For example, page break after ch 2. in the following example.

Is it possible to list them continuously?

Best regards,

Dalyoung


\starttext
\definepagebreak[emptyodd][yes,header, footer, odd]
\setuphead[chapter][page=emptyodd]

\setuphead[title][incrementnumber=list]
\setupcombinedlist[content][list={title,chapter,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textcommand={\ss\bf }]
\setuplist[section][width=10mm, style=,textcommand={\ss }]

\showframe
\startfrontmatter
\completecontent
\page[empty]
\stopfrontmatter

\startbodymatter
\dorecurse{9}
{\chapter{Ch \recurselevel}
\dorecurse{8}
{\section{Section \recurselevel}}
}   
\stopbodymatter
\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] Some questions about an extreme table

2018-08-26 Thread Wolfgang Schuster

Number them by hand (or replace the descriptions I used with enumerations).

The alignment of the graphics can be improved with the \tbox command, 
which raises the argument by the height of a strut.



\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\setuplayout
  [topspace=10mm,
   header=10mm,
   footer=10mm,
   height=middle,
   backspace=20mm,
   width=middle]

\definedescription
  [Item]
  [width=1.5em,
   distance=none]

\starttext

\startxtable[bodyfont=10pt]
\startxrow
\startxcell[width=2cm]
Expression\\\m{B'(x)}
\stopxcell
\startxcell
\startItem{a.}\m{B'(x)=-x²+24x-117}\stopItem
\stopxcell
\startxcell
\startItem{b.}\m{B'(x)=-3x²+48x-117}\stopItem
\stopxcell
\startxcell
\startItem{c.}\m{B'(x)=-3x²+48x-317}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
\stopxcell
\startxcell
\startItem{d.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{e.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{f.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de\\variations\\de \m{B}
\stopxcell
\startxcell
\startItem{g.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{h.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{i.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang


Fabrice Couvreur schrieb am 26.08.18 um 01:49:

Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels to be 
improved ?

Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
[topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ variations\\de \m{B}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\stopxtable

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