[NTG-context] Altering footnotes via \setupfootnotes

2017-03-24 Thread Lukas Prochazka
Hello,

are there keys to \setupfootnotes to:

- increase vertical space between two footnotes,
- enable indenting paragraphs in the scope of footnotes?

I tried some keys following wiki but with no success... Is there a way?

Thank you in advance.

Best regards,

Lukas

___
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] lua tables - how do you cope?

2016-07-30 Thread Lukas Prochazka
Hello Thomas,

here is my "dump()" I've been using for several years:


function dump(arg, opts) -- .seen, .pfx
  if type(opts) == "string" then print(opts); opts = nil
  elseif opts == true then print("-- (dump)"); opts = nil
  end

  local pfx = opts and opts.pfx
  local seen = opts and opts.seen or {}

  if type(arg) == "table" then
if pfx then pfx = pfx .. "]["
else
  pfx = "["
  --seen = {}
end

seen[arg] = tostring(arg) --true

local keys = {}

do
  -- Sort keys, if all are strings

  local strs_only = true

  for k in pairs(arg) do
if strs_only and type(k) ~= "string" then strs_only = false end

keys[#keys + 1] = k
  end

  if strs_only then table.sort(keys) end
end

for _, key in ipairs(keys) do
  local val = arg[key]

  io.write(pfx .. tostring(key) .. "] = " .. tostring(val) .. "\t(" .. 
type(val) .. ")")

  if type(val) == "table" then
if seen[val] then print(" (seen)")
else
  print()

  dump(val, {pfx = pfx .. tostring(key), seen = seen}) --pfx .. 
tostring(key), seen)
end
  else
print()
  end
end
  else
print(arg)
  end
end


Try:


a = {c = 1, b = 2}; a.a = a

dump(a)
dump(a, "This is 'a'.")


Improvements or parametrization of visualizing style would be possible, of 
course... 

Best regards,

Lukas


- Original Message -
From: Schmitz Thomas A. [mailto:thomas.schm...@uni-bonn.de]
To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl]
Sent: Sat, 30 Jul 2016 23:01:29 +0100
Subject: Re: [NTG-context] lua tables - how do you cope?


> Thank you, but this is not what I’m looking for. I know how to sort a table, 
> and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and 
> disorganized). I have to construct deeply nested tables and sometimes lose 
> track of what is at what level of my table, so I was wondering if there was 
> an easy way of visualizing a nested table. On the web, you can find a number 
> of (mostly abandoned) projects; the one at 
> http://siffiejoe.github.io/lua-microscope/ says: "Many Lua programmers have 
> written their own pretty-printer or data dumper and some even use it for 
> (de-)serializing Lua data structures.” So I was wondering if any of the Lua 
> users here on the list has something they want to share.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Synchronize ERROR: unknown node type 12

2015-12-19 Thread Lukas Prochazka
 Hello,

I'm getting many error messages:

"
Synchronize ERROR: unknown node type 12
"

with the latest beta:

"
mtx-context | warning: synctex is enabled
...
This is LuaTeX, Version beta-0.87.0 (TeX Live 2016/W32TeX/dev)
"

and with the MWE:


\starttext
   \section{Principy}
\stoptext


- see the attached files.

The error messages are printed only to the stdout and not to the compilation 
log file.

Anyway, a valid .pdf file is successfully produced, so it seems "Synchronize 
ERROR" is rather warning.

What's going on?

Note that I'm running test with synctex enabled - the message might be related 
to synctex.

Best regards,

Lukas

-- 
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038 call PdfClose.bat D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test\Test.pdf

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>if exist CtxStab (if defined 
CtxBeta (call :CtxBeta )  else (if /I LKZD-2013 == LkZd-2013 (set 
BASE=d:\ConTeXt )  else (set BASE=c:\ConTeXt ) ) )  else (call :CtxBeta ) 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>echo == Ctx BETA == 
== Ctx BETA ==

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>set BASE=d:\Ctx-Beta 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>rem set BASE=c:\Ctx-Beta 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>exit /b 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>set 
PATH=d:\Ctx-Beta\tex\texmf-mswin\bin;C:\Program Files (x86)\NVIDIA 
Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows 
Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows 
Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS 
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
 Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program 
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files 
(x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files 
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files 
(x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL 
SDK\2.0\bin\x64;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program 
Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files (x86)\Windows 
Live\Shared;C:\Program Files (x86)\Lua\5.1;C:\Program Files 
(x86)\Lua\5.1\clibs;C:\Program Files (x86)\Microsoft SQL 
Server\90\Tools\binn\;C:\Program Files\Microsoft SQL 
Server\110\Tools\Binn\;D:\Lukas/Bat;D:\Lukas/../Programs.Con 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>set 
LUAINPUTS=;D:\Lukas\Lua\52\?.lua;D:\Lukas\Lua\52\3rdParty\?.lua;D:\Lukas\Lua\?.lua;D:\Lukas\Lua\3rdParty\?.lua;D:\Lukas\Common\Statics\?.lua;?.lua;D:\Lukas\Lua\Geom
 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>set 
LUAINPUTS=;D:\Lukas\Lua\52\?.lua;D:\Lukas\Lua\52\3rdParty\?.lua;D:\Lukas\Lua\?.lua;D:\Lukas\Lua\3rdParty\?.lua;D:\Lukas\Common\Statics\?.lua;?.lua;D:\Lukas\Lua\Geom
 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>set 
LUAINPUTS=;D:\Lukas\Lua\52\;D:\Lukas\Lua\52\3rdParty\;D:\Lukas\Lua\;D:\Lukas\Lua\3rdParty\;D:\Lukas\Common\Statics\;;D:\Lukas\Lua\Geom
 

D:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Geom.Smo\Test>exit /b 

mtx-context | warning: synctex is enabled
mtx-context | run 1: luatex 
--fmt="d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
 --interaction="nonstopmode" --jobname="Test" 
--lua="d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
 --no-parse-first-line --synctex=1 --c:currentrun=1 
--c:directives="system.synctex=1" 
--c:fulljobname="D:\\Lukas\\Jobs\\D3-Sk\\SO_237-20.RDS\\Geom.Smo\\Test\\Test.mkiv"
 --c:halt-on-error 
--c:input="D:\\Lukas\\Jobs\\D3-Sk\\SO_237-20.RDS\\Geom.Smo\\Test\\Test.mkiv" 
--c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode 
--c:path="D:\\Lukas\\ConTeXt\\Styles" --c:synctex "cont-yes.mkiv"
This is LuaTeX, Version beta-0.87.0 (TeX Live 2016/W32TeX/dev) 
 system commands enabled.

system  > synctex functionality is enabled (1)!

system  > callbacks > not registering frozen 'find_format_file'
open source > 1 > 1 > 
d:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2015.12.17 15:57 MKIV beta  fmt: 2015.12.18  int: english/english

system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
d:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv
close source> 2 > 2 > 
d:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv

system  > jobfiles > using path: D:\\Lukas\\ConTeXt\\Styles
system  > files > jobname 'Test', input 
'D:\\Lukas\\Jobs\\D3-Sk\\SO_237-20.RDS\\Geom.Smo\\Test\\Test.mkiv', result 
'Test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > 

[NTG-context] Problem interacting \definehead and \placecontent

2010-11-17 Thread Lukas Prochazka
Hello,

I need to duplicate the \subsection command. The code is:

---
\definehead[SSEC][subsection]
\setuphead
  [SSEC]
  [after={ --- }]

\starttext
  \placecontent
  \hairline

  \section{A}
aaa

\SSEC{B}
  bbb

\subsection{C}
  ccc
\stoptext
---

It's OK that use of \subsection and/or \SSEC command increases the subsection 
counter (i.e. I get 1.1 and 1.2).

But there is a problem - the 1.1 B item doesn't appear in the TOC. Why? And 
how to get it in there?

Thank you in advance.

Best regards,

Lukas

t-Head.mkiv
Description: Binary data


t-Head.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] How to center a table horizontally ?

2010-11-17 Thread Lukas Prochazka
Hello all,

this must be a really basic question, but I cannot find out the answer.

I'm creating a table, but I cannot center it horizontally:

---
\starttext
  \startalignment[center]
\dontleavehmode

\starttable[|c|]
  \NC CCC \NC\NR
\stoptable
  \stopalignment
\stoptext
---

The code I used above works e.g. with pictures, so even if I'm using the 
\dontleavehmode trick, the table is still flushed left (see the attachments).

So is there a way how to center tables created by \starttable and 
\starttabulate horizontally?

Thank you in advance.

Best regards,

Lukas

t-CenTab.mkiv
Description: Binary data


t-CenTab.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
___