Re: [NTG-context] Converting footnotes to endnotes

2021-06-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 03 Jun 2021 14:17:15 -0600, Wolfgang Schuster  
 wrote:



\setupnote
  [footnote]
  [location=none]


That did the trick; many thanks!

==
\setupnote
  [footnote]
  [location=none]

\starttext
\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsubject[title={},reference={}]
\placenotes [footnote]
\stopsubject
\stoptext
==

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Converting footnotes to endnotes

2021-06-03 Thread Wolfgang Schuster

Idris Samawi Hamid ادريس سماوي حامد schrieb am 03.06.2021 um 22:09:

Dear gang,

Generally, I do not use endnotes - see Robert Bringhurst's criticisms 
of endnotes in typography - but a publisher is demanding them. 
Converting footnotes to endnotes must be quite simple yet I'm missing it:


\setupnotation[footnote]
[way=bychapter]


Do you use chapters?


% \setupnote[footnote]
% [way=bychapter]


\setupnote
  [footnote]
  [location=none]

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
___


[NTG-context] Converting footnotes to endnotes

2021-06-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Generally, I do not use endnotes - see Robert Bringhurst's criticisms of  
endnotes in typography - but a publisher is demanding them. Converting  
footnotes to endnotes must be quite simple yet I'm missing it:


\setupnotation[footnote]
[way=bychapter]

% \setupnote[footnote]
% [way=bychapter]

\starttext
\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsubject[title={},reference={}]
\placenotes [footnote]
\stopsubject
\stoptext

What's the best way to convert the above to endnotes? Thank you in advance!

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Struggling with SQL!

2021-06-03 Thread Hans Hagen

On 6/3/2021 12:51 PM, Gerard Verhaag wrote:

Hi,

I'm trying to get MySQL data access working but can't solve the issues 
I'm encountering. Part of my code looks like:

it's probably better to use

  \usemodule[sql]

you also need to have the sql library in the tex binary tree

(see manual)

(in luatex/mkiv it's best to use the ffi variant that interfaces to the 
mysql library; in luametatex/lmtx it's a - by default - build in 
optional which loads the lib on demand; in all cases most happens in lua)


so, if it doesn't work, you have to explain your setup

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
___


[NTG-context] Struggling with SQL!

2021-06-03 Thread Gerard Verhaag
Hi,

I'm trying to get MySQL data access working but can't solve the issues I'm 
encountering. Part of my code looks like:

\startluacode
productsheet = productsheet or {}
function productsheet.sqldatabase(database,user,password)
   productsheet:sql(database,user,password)
end
function productsheet:sql(db,us,pw)
print("SQLDATABASE: database: " .. db)
print("SQLDATABASE: username: " .. us)
print("SQLDATABASE: password: " .. pw)
local sql = require("util-sql")
local presets = {database = db,username = us,password = pw,host= 
"localhost",port= 3306}
local template = [[SELECT `nom`, `name_alias` FROM `llx_societe` WHERE `nom` = 
'%nom%' ;]]
presets.id = "mysql"
local data, keys = utilities.sql.execute 
{presets=presets,template=template,variables={nom = "Life"}}
...


This generates the following issues:

sql > start loading method 'library'
lua error > lua error on line 153 in file 
/home/gverhaag/Stock/ProductSheet/productsheet_KG594.tex:
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: module 'luasql.mysql' 
not found:
no field package.preload['luasql.mysql']
no file '/usr/local/share/lua/5.2/luasql/mysql.lua'
no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'
no file './luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/luasql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql.so'
stack traceback:
[C]: in function 'requiem'
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: in function 

(...tail calls...)
...are/texmf/tex/context/base/mkiv/util-sql-imp-library.lua:74: in main chunk
[C]: in function 'requiem'
/usr/share/texmf/tex/context/base/mkiv/l-sandbox.lua:180: in function 

(...tail calls...)
/usr/share/texmf/tex/context/base/mkiv/util-sql.lua:114: in function '__index'
/usr/share/texmf/tex/context/base/mkiv/util-sql.lua:288: in function 'execute'
[ctxlua]:21: in function 'sql'
[ctxlua]:5: in function 'sqldatabase'
[ctxlua]:1: in main chunk


Must be something basic, I guess! I use the TexLive 2017 version of ConTeXt.

Any idea what I'm doing wrong here?
___
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] Modify ToUnicode with Goodies

2021-06-03 Thread Christoph Reller
Hi,

On Windows, we have the consola font. Consider the MWE:

\starttext
\definedfont[name:consola*default at 12 pt]
-
\stoptext

The output PDF is correctly generated with recent versions of ConTeXt LMTX.
The hyphen is, however, mapped to a soft hyphen
 by means of the ToUnicode table which
contains:
beginbfchar
<015E> <00AD>
endbfchar

Consequently, when copying the text from the PDF and pasting in an editor
or a console, the soft hyphen is pasted.

I would like to change the ToUnicode information to an ordinary hyphen-minus
:
beginbfchar
<015E> <002D>
endbfchar

I have tried with a goodies file, and an updated MWE:

--- 8< --
return {
   name = "consola",
   version = "1.00",
   comment = "",
   author = "",
   copyright = "",
   remapping = {
  tounicode = true,
  unicodes = {
 hyphen = 0x002D,
  },
   },
}
--- 8< --
\definefontfeature[consola][mode=base, goodies=consola, unicoding=yes]
\starttypescript[mono][consolas]
  \definefontsynonym[ConsolasRegular][file:consola][features=consola]
\stoptypescript
\starttypescript[mono][consolas]
  \definefontsynonym[Mono][ConsolasRegular]
\stoptypescript
\definetypeface[Body][tt][mono][consolas][default]
\setupbodyfont[Body, ss, 10pt]

\starttext
\tt -
\stoptext
--- 8< --

Unfortunately, this has no effect.

Please tell me how to correctly update ToUnicode information with a goodies
file.

Cheers,
Christoph
___
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
___