Re: [NTG-context] Django: using ConTeXT mkiv to output PDF

2018-01-28 Thread kaddour kardio
i think i am one step closer to my goal.
alla i have is to combine:
1- What Hans taught me about working on file (and not simply stdout) python
has already a module *tempfile.NamedTemporaryFile()* ,
2- Your snippet to run ConTeXT inside the temporary folder *cd &&
contextjit --purgeall --path="%d" --arguments=filename=%d/%e.pdf*
*--result="%e-2UP.pdf" /home/ousia/A5-to-A4_landscape-booklet.tex*

*​*To be adapted for a working example​ ( tomorrow i have a night shift so
probably tuesday i will work on again).

Thank you everybody!
___
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 an environment

2018-01-28 Thread Fabrice Couvreur
Hello,
How to make the first item on the baseline of the numbering as in the first
exercise ?
Thanks.
Fabrice

\defineframed
  [ACFRAME]
  [frame=off,
   boffset=0pt,
   width=fit,
   align=flushleft,
   location=low,
   background=color,
   backgroundcolor=MyColorA]

\defineframed
  [EXFRAME]
  [frame=off,
   offset=0pt,
   location=low,
   width=\struttotal,
   background=color,
   backgroundcolor=black,
   foregroundcolor=white,
   forgroundstyle=bold]

\defineprocessor[ACPROCESSOR][command=\EXFRAME]
\defineconversionset[ACCONVERSION][][ACPROCESSOR->n]

\defineenumeration
  [ex]
  [text=,
   width=fit,
   numberconversionset=ACCONVERSION,
   alternative=serried,
   number=yes]

\starttext
\startex
\input ward
\stopex
\startex
  \startitemize[n]
  \item One
  \item Two
  \item Three
  \stopitemize
\stopex
\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] Django: using ConTeXT mkiv to output PDF

2018-01-28 Thread Pablo Rodriguez
On 01/26/2018 07:41 PM, kaddour kardio wrote:
> [...]
> i tried this without success :(
> the only workaround u've found for now is to render a tex file and
> copile it manually.

I don’t know how to invoke ConTeXt using Django, but to create booklets
with my favourite text editor (Geany, https://geany.org/).

While --result could handle path in it, my command to create booklets was:

contextjit --purgeall --path="%d" --arguments=filename=%e.pdf
--result=/home/ousia/"%e-2UP.pdf" /home/ousia/A5-to-A4_landscape-booklet.tex

"%d" and %e" stand for directory and file name without extension.

After --path was introduced (or it was mandatory to use it, since
--result cannot handle path in it), my command reads:

cd && contextjit --purgeall --path="%d" --arguments=filename=%d/%e.pdf
--result="%e-2UP.pdf" /home/ousia/A5-to-A4_landscape-booklet.tex

I wonder whether my previous comment might help you to improve your
ConTeXt in Django.

Best wishes,

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] about \placeindex: uppercase initial and lowercase initial, two languages

2018-01-28 Thread Pablo Rodriguez
On 01/28/2018 03:16 PM, Jeong Dal wrote:
> Hi, 
> 
> To place the index at the end of the book, I put \placeindex before 
> \stopproduct.
> It is compiled well.
> But, for the better output, I have two questions about the index.
> 
> 1. In the output, it distinguished uppercase and lowercase initial.
> [...] 
> Is there a way to make index combining the lowercase and the uppercase 
> together as follows?
> 
> s
> set
> simple statements
> …
> Squeeze theorem

Hi Jeong,

"method={zm, zc}" is your friend here:

\setupregister[method={zm, zc}]
\starttext
\startTEXpage[offset=2em]
\index{Squeeze theorem}
\index{simple statements}
\index{set}
\index{sweat}
\placeindex
\stopTEXpage
\stoptext

> 2. The index shows the English letters first and the Koren letters follows. 
> Although it is OK that English words are shown first, is there a way
> to make Korean words are shown first since the main language is Korean?

I wonder whether two different indices would make sense here.

I guess register order is related to the position in any charset you
take. The ASCII characters come before any other range you select (not
only CJK, but Greek or Cyrillic).

Just in case it helps,

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
___

[NTG-context] about \placeindex: uppercase initial and lowercase initial, two languages

2018-01-28 Thread Jeong Dal
Hi, 

To place the index at the end of the book, I put \placeindex before 
\stopproduct.
It is compiled well.
But, for the better output, I have two questions about the index.

1. In the output, it distinguished uppercase and lowercase initial.
For example,

S
Squeeze theorem

s
set
simple statements
…

Is there a way to make index combining the lowercase and the uppercase together 
as follows?

s
set
simple statements
…
Squeeze theorem

2. The index shows the English letters first and the Koren letters follows. 
Although it is OK that English words are shown first, is there a way to make 
Korean words are shown first since the main language is Korean?

Since I just use “\placeindex”, I don’t give a Minimal sample.

Thank you.

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
___