Re: [NTG-context] crosswords puzzles

2019-07-02 Thread Henning Hraban Ramm

Zitat von DesdeChaves :


Dear sirs,

Is there a way to make crosswords  or word puzzles in context?
In my hippocampus I have a vague idea that this has already been tried, but
I can't find this code anymore.


My crossword puzzle editor https://croisee.fiee.net exports puzzles as  
ConTeXt tables.

Find a sample attached.

Greetlings, Hraban



Greetlings, Hraban
Grüßlinge, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD


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


Re: [NTG-context] CrossWords Puzzles with context

2019-06-23 Thread Martin Althoff
Thanks for sharing this! Great help for me as a teacher :)

On Sun, 2019-06-23 at 19:06 +0100, Jorge Manuel wrote:
> After some attempts to build crosswords puzzles with context, I found this 
> approach:
> 
> 

___
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] CrossWords Puzzles with context

2019-06-23 Thread Jorge Manuel
After some attempts to build crosswords puzzles with context, I found this 
approach:

1) Create the puzzle with  genxword
https://github.com/riverrun/genxword  

2) Edit the output table and change all {}  to  *

3) Save the table in a file (p.e. crosswords.txt) 

3) In context use this script (Revised By Wolfgang Schuster)

\startluacode
context.startmidaligned()
context.bTABLE( { rulethickness = ".25pt", width = ".8cm", height = 
".8cm", align = "{lohi, middle}" } )
for line in io.lines("crosswords.txt") do
for w in (line .. "|"):gmatch("([^|]*)|") do 
-- print (w)
if w == ' ' then
context.bTR()
elseif w == '.' then
context.eTR()
else
if w == '* ' then 
context.bTD( { frame = "off" } )
context.eTD()
else 
ww = string.match (w, "%d+")
print (ww)
if ww then
context.bTD( { foregroundstyle = "\\bfxx" } )
context("%s",ww)
context.eTD()
else
context.bTD()
 -- context("%s",w)
context.eTD()
end
end
end
end
end
context.eTABLE()
context.stopmidaligned()
\stopluacode


Files: 

crossword.txt file:

 |* |* |[2]T|* |* |* |* |* |* |* |* |* |* |* |* |* |.
 |[1]A|D|R|I|A|N|O|* |* |* |* |* |* |* |* |* |.
 |* |* |A|* |* |* |* |* |* |* |* |* |* |* |* |* |.
 |[6]H|* |J|* |* |* |[4]T|* |* |* |* |* |* |* |* |* |.
 |[3]I|T|A|L|I|C|A|* |* |* |* |* |* |* |* |* |.
 |S|* |N|* |* |* |R|* |* |* |* |* |* |* |* |* |.
 |P|* |O|* |* |* |G|* |[10]S|* |* |[7]P|* |* |* |* |.
 |A|* |* |* |[5]G|U|A|D|A|L|Q|U|I|[9]V|I|[8]R|.
 |L|* |* |* |* |* |R|* |N|* |* |B|* |E|* |O|.
 |I|* |* |* |* |* |Y|* |T|* |* |L|* |N|* |M|.
 |S|* |* |* |* |* |E|* |I|* |* |I|* |U|* |A|.
 |* |* |* |* |* |* |N|* |P|* |* |O|* |S|* |N|.
 |* |* |* |* |* |* |* |* |O|* |* |* |* |* |* |O|.
 |* |* |* |* |* |* |* |* |N|* |* |* |* |* |* |S|.
 |* |* |* |* |* |* |* |* |C|* |* |* |* |* |* |* |.
 |* |* |* |[11]A|N|F|I|T|E|A|T|R|O|* |* |* |.

Output






___
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] crosswords puzzles

2019-06-22 Thread Wolfgang Schuster

DesdeChaves schrieb am 22.06.2019 um 11:42:

Dear sirs,

Is there a way to make crosswords  or word puzzles in context?
In my hippocampus I have a vague idea that this has already been 
tried, but I can't find this code anymore.
AFAIK there are only packages for LaTeX to create crossword but you can 
use natural or extreme tables to create them. For the input Lua can be a 
better choice because you can put your words (or numbers) in a Lua table 
and use a loop to create a table for TeX.


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] crosswords puzzles

2019-06-22 Thread DesdeChaves
Dear sirs,

Is there a way to make crosswords  or word puzzles in context?
In my hippocampus I have a vague idea that this has already been tried, but
I can't find this code anymore.

Have a great day

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