Re: [NTG-context] PDF viewer poll

2019-10-21 Thread Marcin Borkowski

On 2019-10-19, at 12:21, Henning Hraban Ramm  wrote:

>> Am 2019-10-15 um 08:17 schrieb Marcin Borkowski :
>>>> Basically javascript can be limited to (1) setting annotation properties, 
>>>> like toggling layers or button renditions, and (2) some simple 
>>>> calculations (for forms). Constructing pdf runtime using javascript is 
>>>> pretty braindead (use html instead then).
>>>
>>> D’accord.
>>
>> Of course you are aware that limiting a powerful language is not an easy
>> task?
>
> I am. But JS in PDF is completely different from PDF in browsers anyway (no 
> DOM!), so they don’t need a complete interpreter and could have limited PDF 
> scripting to a few commands, in JS syntax or anything else.

Fair enough, although I don't have an association JS <-> browser
ingrained so much - for me, JS is a general purpose language which
happens to be embedded in browsers, but also many other places.  Most of
my JS code runs either on a server (backend code) or in a development
environment (various, let's call it, DevOps-ish scripts).  Only now and
then I write JS for browsers, and then it is often crippled JS, full of
things like "var" (because old browsers etc.)

>>>> It is one of the puzzling areas to me: no problem in browsers and 
>>>> elsewhere but not in open source pdf viewers. It's not the most complex 
>>>> stuff so it probably indicates that no one cares much about these features.
>>>
>>> I wouldn’t say "no problem", because JS causes security problems everywhere.
>>
>> It's not JS that causes problems.  Any other (powerful enough) language
>> not specifically designed with browser environment in mind could be
>> problematic here.  I guess that having Perl, Python or Ruby instead of
>> JS would create a similar set of problems.  (Lua might be an exception
>> due to its design and a possibility to whitelist functions for eval,
>> AFAIR.)
>
> Of course any programming language is a security risk. More so if it runs in 
> an ubiquitous program like a browser. And since they created JavaScript for 
> that, JS causes problems.
>
> When I read "Java runs on millions of devices" I don’t feel that’s good 
> advertising, but it remembers me that each of those devices is at risk.

I like this approach:-).  There is also that old joke than "every time
you install Java it gets moved from another device to yours", since the
installer has been saying that "3 billion devices run Java" for almost
two decades now.

>> Just 2 cents from a JS programmer who actually thinks that JS is not the
>> worst Lisp dialect out there.
>
> I didn’t say JS is bad. For me it’s a necessary evil.
> I don’t think my beloved Python would be a better choice for client scripts.

Python is a worse Lisp dialect than JS, but still nice.  (Disclaimer:
i have only written less than 1000 lines of Python in my life.)

> Maybe Lua is, but every scriptable program is a risk.
> LuaTeX and write18 _are_ dangerous.
> It would be very easy to spread malicious TeX code, since everyone uses CTAN 
> (LaTeX) packages without checking them first.
> But it wouldn’t come far, I guess, for it needs a while for a package to 
> become known and in wide use, and that still means only in a subset of the 
> (La)TeX community, where there are enough expert hackers who would find this 
> malicious code.

Assuming that they would search for it.  I'm less of an optimist here.

> And you can count the people on one hand who would be able to publish a 
> malicious ConTeXt module… Malicious code snippets in our wiki or ML also 
> wouldn’t come far.

That's interesting.  It would be enough to have a "plain TeX virus",
probably.  I guess the main reason malicious ConTeXt code does not exist
(assuming this is the case!) is that it is not economically viable - the
ConTeXt community is too small.

>
> There was PDF malware (using JS or media stuff). There also was PostScript 
> malware in its time. The latter didn’t make a lot of sense, except it could 
> destroy RIP hardware. The RIP technician at the newspaper where I worked told 
> me stories, e.g. there was an evil EPS (some faulty customer logo, no 
> deliberate malware) that caused the deletion of important parts of the RIP 
> software. At my time there was a PS ghost: somehow a page got installed on 
> one of the printers and got printed at odd times. Reboot didn’t help, we 
> never found the cause.

That's absolutely fascinating!

Best,

--
Marcin Borkowski
http://mbork.pl
___
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] PDF viewer poll

2019-10-15 Thread Marcin Borkowski

On 2019-10-15, at 06:42, Henning Hraban Ramm  wrote:

>> Basically javascript can be limited to (1) setting annotation properties, 
>> like toggling layers or button renditions, and (2) some simple calculations 
>> (for forms). Constructing pdf runtime using javascript is pretty braindead 
>> (use html instead then).
>
> D’accord.

Of course you are aware that limiting a powerful language is not an easy
task?

>> It is one of the puzzling areas to me: no problem in browsers and elsewhere 
>> but not in open source pdf viewers. It's not the most complex stuff so it 
>> probably indicates that no one cares much about these features.
>
> I wouldn’t say "no problem", because JS causes security problems everywhere.

It's not JS that causes problems.  Any other (powerful enough) language
not specifically designed with browser environment in mind could be
problematic here.  I guess that having Perl, Python or Ruby instead of
JS would create a similar set of problems.  (Lua might be an exception
due to its design and a possibility to whitelist functions for eval,
AFAIR.)

Just 2 cents from a JS programmer who actually thinks that JS is not the
worst Lisp dialect out there.

Best,

--
Marcin Borkowski
http://mbork.pl
___
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] PDF viewer poll

2019-10-15 Thread Marcin Borkowski
Hi,

I don't use ConTeXt anymore, but I still get the emails from the list,
and I quickly skimmed throught this thread to see if someone writes
about my pdf-viewer of choice - pdf-tools
(https://github.com/politza/pdf-tools).

On 2019-10-13, at 12:43, Henning Hraban Ramm  wrote:

> Hi, I’d like to update my list of (usable!) PDF viewers.
> Which one do you use? (Current version?)

pdf-tools (version 20190701.202)

> What are its pros and cons?

cons:
- no "continuous display"/"double page" modes

pros:
- searchable (also with regexen), also grep-like (i.e., display all
lines containing some regex and jump to them easily)
- annotations/comments are viewable (and jumpable to) w/o using the
mouse
- fast
- runs within Emacs (not sure if this is a "pro" for everyone...)

> Is it free (open source, freeware)?

yes (GPL3)

> Does it work on Win/Lin/Mac?

GNU/Linux, maybe Mac

> Does it have a localized interface? (I don’t care, but I work with
> people who don’t understand a lot of English.)

No.

> Can it handle comments, attachments?

Yes.

> Can it handle forms with or without JavaScript?

AFAIK, no.

> Does it support SyncTeX? (Who uses that anyway?)

Yes, and I do all the time!

> Does it update changed PDFs on its own (or does it even block
> overwriting)?

I guess it can be configured to do so (like Emacs in general)

> Which other features are essential for your choice?

As I said - I don't have to leave Emacs.  Also, incremental or grep-like
searching with literal text or regexen are killer features.

Best,

--
Marcin Borkowski
http://mbork.pl
___
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] Which math font for LinLibertine family?

2019-05-16 Thread Marcin Borkowski

On 2019-05-15, at 08:40, Tomas Hala  wrote:

> On the file type-imp-libertine.mkiv there is a (disabled) line joining math
> from times family. Is the times math the best for LinLibertine or
> would you recommend me something else (from the design point of view)?

https://tex.stackexchange.com/q/47139/5626

Hth,

-- 
Marcin Borkowski
http://mbork.pl
___
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] preparing math exams

2019-04-24 Thread Marcin Borkowski

On 2019-04-23, at 17:57, Fabrice L  wrote:

> Metapost (Metafun) is your best friend here. You can insert directly in

Also, TikZ, which is more LaTeX-centric, but works with ConTeXt, too (at
least it did when I last tried ConTeXt a few years ago).

Hth,

-- 
Marcin Borkowski
http://mbork.pl
___
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] WYSIWYM editor on top of ConTeXt / Lout

2017-12-06 Thread Marcin Borkowski

On 2017-12-06, at 22:03, Jan Tosovsky <j.tosov...@email.cz> wrote:

> On 2017-12-06 Marcin Borkowski wrote:
>> On 2017-12-06, at 00:01, Jan Tosovsky <j.tosov...@email.cz> wrote:
>>> On 2017-12-02 Jonas Baggett wrote:
>>>>
>>>> This is a blog post I recently published:
>>>> https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-context-lout
>>>> It is about some ideas I have for a WYSIWYM editor like LyX, but it
>>>> would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
>>>> and to give a much better user experience.
>>>
>>> Visual editing of complex structures is hard to implement. For XML based
>>> publishing there is just single serious tool!
>>> https://www.oxygenxml.com/xml_author/docbook_editor_structured_editing.html
>> 
>> Strange nobody mentioned Org-mode!
>> 
>> Also, this:
>> https://emacs.cafe/emacs/guest-post/2017/06/26/hierarchy.html (works
>> with JSON OOTB, but most probably could be used to edit XML).
>
> I meant visual editing (WYSIWYM), see e.g. 
> https://www.youtube.com/watch?v=-3z2sYEaLHM 

Doesn't Emacs with Org-mode or hierarchy do just that?

-- 
Marcin Borkowski
___
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] WYSIWYM editor on top of ConTeXt / Lout

2017-12-06 Thread Marcin Borkowski

On 2017-12-06, at 00:01, Jan Tosovsky <j.tosov...@email.cz> wrote:

> On 2017-12-02 Jonas Baggett wrote:
>> 
>> This is a blog post I recently published:
>> https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-
>> context-lout.
>> It is about some ideas I have for a WYSIWYM editor like LyX, but it
>> would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
>> and to give a much better user experience.
>
> Visual editing of complex structures is hard to implement. For XML based 
> publishing there is just single serious tool!
> https://www.oxygenxml.com/xml_author/docbook_editor_structured_editing.html

Strange nobody mentioned Org-mode!

Also, this:
https://emacs.cafe/emacs/guest-post/2017/06/26/hierarchy.html (works
with JSON OOTB, but most probably could be used to edit XML).

> Desktop is IMHO declining so I'd personally prefer a web app, which could be 
> then packed even for desktop via https://electronjs.org/

Desktop declining???  That's terrifying, since 99% of web apps suck a lot!

> For visual editing an advanced rich text editor is a must. This one is really 
> promising https://github.com/ianstormtaylor/slate as it can read/write custom 
> scheme. Btw, it is used in https://github.com/GitbookIO/gitbook project. 
> Mentioning Gitbook, it could also be a source of inspiration.

Again, Emacs (perhaps with Org-mode).

Best,

-- 
Marcin Borkowski
___
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] Deprecated $…$ for inline math?

2016-02-18 Thread Marcin Borkowski

On 2016-02-18, at 10:22, Hans Hagen <pra...@wxs.nl> wrote:

> this brings up the question: would users (here) start using real math 
> unicode input if we had a monospace math font?

FWIW, you can have Emacs automatically display ∫ in place of \int
etc. in your file (and this is no real substitution, just for viewing).

Also, Emacs has the "TeX input method", where typing the four keys \, i,
n, t yields ∫ (a Unicode symbol) etc.  (It works also for inputting
properUnicode accented letters, which is very cool and useful.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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
___

Re: [NTG-context] ConTeXt vs Beamer

2016-01-26 Thread Marcin Borkowski

On 2016-01-26, at 08:34, Jan U. Hasecke <juh+ntg-cont...@mailbox.org> wrote:

> Am 25.01.2016 um 21:11 schrieb Saša Janiška:
>> How does ConTeXt compare for the purpose vs LaTeX/Beamer?
>
> For the sake of completeness, have a look at Pandoc, which produces
> presentations from simple markdown sources in various formats including
> beamer and some nice looking html based presentations.
>
> http://pandoc.org/README.html
>
> juh

Also, Org-mode, which has markup similar to Markdown (but better), and
can export to a variety of formats (including Beamer and e.g. reveal.js;
unfortunately, there's no ConTeXt support, but adding it is a questions
of a few hours of simple Emacs Lisp hacking).

I heard reports of Vim-ers switching to Emacs because of Org.  Turn to
the dark side, we have cookies!!!  Bwahahaha!

(Side note: despite jokes, I have a high respect for Vim.  Its UI is
plain genius, even if I do not like it personally.  The idea of "text
objects" and operations on them is really great.  I even use hjkl for
movement when coding in Elisp, using abo-abo's "lispy" package.  The
main advantage of Emacs over Vim is not the UI, but the hackability.
Also, E & V have different basic assumptions: Vim is much closer to the
Unix philosophy, while Emacs does a similar thing, but not on the OS
level, but within itself.  IOW, Vim is built on top of Unix, and Emacs
largely "replaces" it.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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
___

Re: [NTG-context] ConTeXt vs Beamer

2016-01-25 Thread Marcin Borkowski

On 2016-01-25, at 21:55, Alan BRASLAU <alan.bras...@cea.fr> wrote:

> Beamer presentations look like ... beamer presentations.

Or like presentations given from The One Editor:

http://mbork.pl/download/Slides_about_LaTeX_editing.pdf

;-)

> For something simple using ConTeXt, you might want to look at the
> simpleslides module. That could be a starting point.

I used ConTeXt once for a presentation, and then came back to Beamer.
Not necessarily because it's better, but I know it quite well, so
I could prepare my slides faster.  (Also, Emacs support for LaTeX and/or
Beamer is better than for ConTeXt.)

So I don't have a lot of experience with ConTeXt, but I'll risk an
opinion: if you're fine with a simple presentation without much
learning, or more learning for a sophisticated presentation, consider
ConTeXt.  If you don't mind a bit boring look (which some consider an
advantage) and/or you want just to copy a template from the docs (even
for a bit more sophisticated stuff), try Beamer.

Also, you might want to switch to a decent text editor.  ;-P

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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
___

Re: [NTG-context] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Marcin Borkowski

On 2015-02-01, at 22:06, Jörg Weger joerg73@googlemail.com wrote:

 Is the character count “wc --char textfile” returns with or without 
 blank spaces? (Which is important for me.) “man wc” doesn’t talk about that.

 I had hoped there was a better way than to edit the result of 
 “pdftotext” in my text editor or in libreoffice writer (deleting 
 unnecessary carriage returns and spaces by searching for regular 
 expressions) which are able to do the count I need. In fact I had hoped 
 that ConTeXt was able to count the characters and spaces it renders to 
 PDF (is that theoretically possible?) …

I am pretty sure that you can make sed filter out blank characters.  So
then you can just chain pdftotext, sed and wc.

OTOH, here's a relevant question (and a simple answer) on SO.  (It seems
to count newlines, though.)

JFF, I've just coded this in Emacs Lisp:

--8---cut here---start-8---
;; Count non-blank characters in a buffer

(defun how-many-visible-chars ()
Count visible (i.e., other than spaces, tabs and newlines)
characters in the buffer.
  (interactive)
  (let ((count 0))
(save-excursion
  (goto-char (point-min))
  (while (not (eobp))
(unless (looking-at-p [ \t\n])
  (setq count (1+ count)))
(forward-char)))
(message %d visible characters count)))
--8---cut here---end---8---

It's terribly unoptimized, but I ran it on a 300+ kB file on my low-end
netbook and it ran in something like 2 seconds, so it's not that bad in
practice.  Also, it's not well-coded: it should e.g. return the number
instead of displaying the message when called non-interactively, it
might take active region into account etc. - but as a proof-of-concept,
it works surprisingly well (i.e., fast).

 Greetings Jörg

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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
___

Re: [NTG-context] context - docx ??

2015-01-14 Thread Marcin Borkowski

On 2015-01-14, at 18:55, Alan BRASLAU alan.bras...@cea.fr wrote:

 On Tue, 13 Jan 2015 22:34:21 +0100
 Marcin Borkowski mb...@wmi.amu.edu.pl wrote:

 While I /do/ understand you (it's the same with me, only that I'm more
 comfortable with LaTeX), have you considered Org-mode?  It's
 similar to markdown (though better IMHO), but it comes with great
 support in Emacs.  And you get export to odt for free.  (Also to
 LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt
 exporter should be fairly easy, and a simple exporter could be done in
 a few days - the framework for writing exporters to different formats
 is very well done.  Incidentally, there's also a Markdown exporter,
 so you could probably get to ConTeXt via markdown).

 Org-mode does not simply come with great support in Emacs, it is
 essentially an emacs module I believe.

Yes.  But Org is _also_ a file format, very similar to markdown (only
better).  You might write Org files in Vim and fire Emacs from the
command line to export them to HTML, for instance.  (Not that it would
be a particularly great idea, but definitely possible.)  So Org (the
format) has great support in Emacs Org-mode (an Emacs major mode).

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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
___

Re: [NTG-context] context - docx ??

2015-01-13 Thread Marcin Borkowski

On 2015-01-13, at 20:59, Idris Samawi Hamid ادريس سماوي حامد 
isha...@colostate.edu wrote:

 Dear gang,

 I'm currently writing a paper with very basic typographical needs:  
 blockquotes, emphasis, bibliography, perhaps a graphic or two. The  
 publisher wants the thing in Word, naturally. The last time I did  
 something like this I set up a markdown document and just exported it to  
 both docx and to context. For simple documents this is at least workable,  
 but I'd prefer to write in context, not markdown.

While I /do/ understand you (it's the same with me, only that I'm more
comfortable with LaTeX), have you considered Org-mode?  It's
similar to markdown (though better IMHO), but it comes with great
support in Emacs.  And you get export to odt for free.  (Also to
LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt
exporter should be fairly easy, and a simple exporter could be done in
a few days - the framework for writing exporters to different formats is
very well done.  Incidentally, there's also a Markdown exporter, so you
could probably get to ConTeXt via markdown).

 Best wishes
 Idris

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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 \placefloat?

2014-02-18 Thread Marcin Borkowski
Hi list,

I'd like to have a figure (by means of \placefigure) centered
horizontally.  Currently, I'm doing

  \placefigure[bottom,none,middle]{}{%
\hbox to\textwidth{\hfil\externalfigure[logo-2-t][height=1.5cm]\hfil}}

Is there a better way?  If yes, how to do this?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 put the same page a few times in the document

2014-02-16 Thread Marcin Borkowski
Hi list,

I am pretty sure I asked about it some time ago, but could not find
it.  How do I put the same page a few times in a document?  (Use case:
an A6 leaflet, printed 4 times on an A4 sheet.)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Frames instead of crop marks in arranging

2014-02-16 Thread Marcin Borkowski
Dnia 2014-02-16, o godz. 23:30:49
Wolfgang Schuster schuster.wolfg...@gmail.com napisał(a):

 \setupbackgrounds[page][frame=on]

Thanks a lot, works like a charm!  (Especially after adding also
framecolor=gray ;) .)

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to put the same page a few times in the document

2014-02-16 Thread Marcin Borkowski
Dnia 2014-02-16, o godz. 23:13:35
Wolfgang Schuster schuster.wolfg...@gmail.com napisał(a):

 
 Am 16.02.2014 um 23:09 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Hi list,
  
  I am pretty sure I asked about it some time ago, but could not find
  it.  How do I put the same page a few times in a document?  (Use
  case: an A6 leaflet, printed 4 times on an A4 sheet.)
 
 http://wiki.contextgarden.net/Imposition#XY_schema
 http://wiki.contextgarden.net/FileCard

Thanks!  I'm pretty sure though that there was some other way, without
\dorecurse.  Maybe I'm just wrong...

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A default editor for ConTeXt standalone?

2014-02-04 Thread Marcin Borkowski
Hi all,

just a thought.  Some time ago wise people decided to include TeXworks
into TeXlive, so that newbies installing TeXlive can get a
batteries-included package (not having to choose/install an editor).
Would it be (a) reasonable and (b) not too much time-consuming to do a
similar move with ConTeXt standalone?  I'm not saying it would have to
be TeXworks (or my beloved Emacs, for that matter;)).  I am aware that
this is an additional work to maintain etc., and I'm probably not
capable of doing it myself, but...

What do you think?

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A problem with itemize in columns - once again, now with an MWE

2014-01-17 Thread Marcin Borkowski
Hi all,

once again I have a problem with itemization in columns.  This time, I
finally managed to isolate the problem and prepare an MWE.  The
problem does not appear with Latin Modern fonts, but does with Pagella
(I didn't test other fonts).  It seems that the height of the square
root sign is too high.  \smash-ing helps, but I'd prefer not to have
to \smash things manually.  Can anything be done about this?  (Note:
I'm using the latest beta.  In some earlier versions, \smash-ing
didn't help, so it's not something of high priority for me now.  But
if it's something easy to fix, I'd be thankful.)


\setupbodyfont[pagella]
\starttext
\startitemize[columns,two,packed]% with packed, it's also wrong, but in 
another way
\item abc
\item $a^2$
\item xyz
\item $\frac12$
\item foo
\item bar
\item baz
\item $\sqrt{2}$% \smash-ing helps, but I'd prefer not to have to smash...
\item asdf
\item qwerty
\stopitemize
\stoptext


Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] A problem with itemize in columns - once again, now with an MWE

2014-01-17 Thread Marcin Borkowski
Dnia 2014-01-17, o godz. 16:19:48
Wolfgang Schuster schuster.wolfg...@gmail.com napisał(a):

 
 Am 17.01.2014 um 16:05 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Hi all,
  
  once again I have a problem with itemization in columns.  This
  time, I finally managed to isolate the problem and prepare an MWE.
  The problem does not appear with Latin Modern fonts, but does with
  Pagella (I didn't test other fonts).  It seems that the height of
  the square root sign is too high.  \smash-ing helps, but I'd prefer
  not to have to \smash things manually.  Can anything be done about
  this?  (Note: I'm using the latest beta.  In some earlier versions,
  \smash-ing didn't help, so it's not something of high priority for
  me now.  But if it's something easy to fix, I'd be thankful.)
 
 You can increase the linespacing in the itemize.
 
 \setupbodyfont[pagella]
 
 \startsetups[itemize:before]
   \blank
   \begingroup
   \setupinterlinespace[medium]
 \stopsetups
 
 \startsetups[itemize:after]
   \endgroup
   \blank
 \stopsetups
 
 \starttext
 
 \startitemize[columns,two,packed][before=\directsetup{itemize:before},after=\directsetup{itemize:after}]
 \item abc
 \item \math{a^2}
 \item xyz
 \item \math{\frac{1}{2}}
 \item foo
 \item bar
 \item baz
 \item \math{\sqrt{2}}
 \item asdf
 \item qwerty
 \stopitemize
 
 \stoptext

Thanks a lot!  It did help (but only partially, see below).  (I've also
put it into \setupitemize.)

One problem remains, however: it won't work with [joinedup].  (The same
problem as before seems to appear again.)

 Wolfgang

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] git or svn

2013-09-27 Thread Marcin Borkowski
Dnia 2013-09-27, o godz. 09:10:04
Lars Huttar lars_hut...@sil.org napisał(a):

 On 9/26/2013 9:10 PM, Aditya Mahajan wrote:
  Github seems to be the most popular DVCS hosting site at the moment.
  For manuals, I think that Github is particularly useful because you
  can click on edit and make the change. Github automatically creates
  a fork, a new branch, and pull request for you. So the technical
  barrier to participation is low.
 
 I would question the perception that the technical barrier to
 participation on Github is low. Not long ago I tried to submit a patch
 to a project on Github, improving documentation and adding features.
 It took several hours (distributed over a couple of weeks) to learn
 how to do all that was required. It was *not* automatic. It strongly
 discouraged me from making more contributions to that project.
 
 Maybe some major things have changed on Github since then. In any
 case, I have no doubt that once you know the system, and have the
 infrastructure set up, it's easy to participate. And I'm not saying
 that SVN makes it easy for non-SVN users to participate. All I'm
 saying is that for non-Git users, the technical barrier to
 participation was substantial, last time I tried it.
 
 Again, I'm not arguing against a move to Git. I would just like to
 contribute my recent experience toward a well-informed decision
 process.

Just my 3 cents.

I am not a heavy Git user (though I am quite accustomed to Mercurial
instead), and I agree that the entry point for Git is not very low.
However, it seems that nowadays, for a *new* user, learning to use SVN
is pointless (unless he joins a project where SVN is used etc.):
distributed VCSs seem to be just much better (and I heard that SVN has
its own problems, too).  So I would perceive this question as touching
a demography issue: younger people are more likely to know/use Git (and
not know SVN), older folk might know/use SVN.

Also, if this matters, Git has an excellent Emacs front-end, Magit.  I
don't know whether SVN has something similar.

 Lars

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Indenting in \setuplines

2013-06-06 Thread Marcin Borkowski
Dnia 2013-06-06, o godz. 09:49:27
Hans Hagen pra...@wxs.nl napisał(a):

 On 6/6/2013 12:36 AM, Marcin Borkowski wrote:
 
  Sorry to say that, but neither seems to work...
 
 it is hard to say what goes wrong if you only show the error message
 and no real code

Sorry for that, my fault.

Now comes the fun part: I *copied* my code from my version of
spac-hor.mkiv to the document, and it started to work then!  Strange.
I attach a MWE.  Hans, is it possible to add something like that to
spac-hor.mkiv?  (This code is not very nice, there's some duplication,
but it's simple and works;).)

 cut here 
\unprotect
\installindentingmethod{oddpairs}{\c_spac_indentation_toggle_state\plusthree}
\installindentingmethod{evenpairs}{\c_spac_indentation_toggle_state\plusfour}

\newcount \c_spac_par_modulo_four

\def\spac_indentation_evenpairs_toggle
  {%
   \advance \c_spac_par_modulo_four \plusone
   \ifnum \c_spac_par_modulo_four=4
 \c_spac_par_modulo_four=0
   \fi
   \ifcase \c_spac_par_modulo_four
   \global\indentationtrue
 \or
   \global\indentationfalse  \spac_indentation_remove
 \or
   \global\indentationfalse  \spac_indentation_remove
 \or
   \global\indentationtrue
   \fi 
  }

\def\spac_indentation_oddpairs_toggle
  {%
   \advance \c_spac_par_modulo_four \plusone
   \ifnum \c_spac_par_modulo_four=4
 \c_spac_par_modulo_four=0
   \fi
   \ifcase \c_spac_par_modulo_four
   \global\indentationfalse  \spac_indentation_remove
 \or
   \global\indentationtrue
 \or
   \global\indentationtrue
 \or
   \global\indentationfalse  \spac_indentation_remove
   \fi 
  }

\def\spac_indentation_check_toggle
  {\ifcase\c_spac_indentation_toggle_state
 % nothing
   \or% odd
 \spac_indentation_no_toggle
   \or% even
 \spac_indentation_do_toggle
   \or% oddpairs
 \global\let\checkindentation\spac_indentation_oddpairs_toggle
   \or% evenpairs
 \global\let\checkindentation\spac_indentation_evenpairs_toggle
   \fi}

\protect

\setupindenting[yes,1em]
\starttext

\startlines[indenting=evenpairs]
Lorem ipsum
dolor sit amet,
consectetuer adipiscing elit.
Ut purus elit,
vestibulum ut,
placerat ac, adipiscing vitae, felis.
Curabitur dictum gravida mauris.
Nam arcu libero, nonummy eget,
consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque.
\stoplines

\stoptext
 cut here 

 Hans

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Indenting in \setuplines

2013-06-05 Thread Marcin Borkowski
Dnia 2013-06-03, o godz. 15:20:45
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Hi,
 
 I'd like to have my \startlines ... \stoplines indented in the
 following way: the first two lines unindented, the next two indented,
 and so on.  Basically, this means that I'd like the pattern to be
 based on (mod 4) arithmetic and not (mod 2).  Is it possible?  If
 yes, how?

OK, so I thought I can handle this... but not:(.

I found the relevant definitions in spac-hor.mkiv and tried to add a
line saying

\installindentingmethod
\v!evenpairs{\c_spac_indentation_toggle_state\plusfour}

But after context --make I got an Undefined control sequence.  Here's
an excerpt from the log information:

! Undefined control sequence.

system   tex  error on line 108 in
file 
/home/marcin/context-2013-05-22-19-28/tex/texmf-context/tex/context/base/spac-hor.mkiv:
Undefined control sequence ...

 98 
 99 \installindentingmethod \v!yes
 {\parindent\d_spac_indentation_par\relax} % not \indent ! 100
 \installindentingmethod
 \v!always{\parindent\d_spac_indentation_par\relax} % not \indent ! 101
 102 \installindentingmethod \v!never
 {\parindent\zeropoint\relax % no \indent !
 103
 \c_spac_indentation_toggle_state\zerocount} 104 105
 \installindentingmethod \v!odd
 {\c_spac_indentation_toggle_state\plusone} 106
 \installindentingmethod \v!even
 {\c_spac_indentation_toggle_state\plustwo} 107
 %\installindentingmethod \v!oddpairs
 {\c_spac_indentation_toggle_state\plusthree} 108 
 \installindentingmethod \v!evenpairs
 {\c_spac_indentation_toggle_state\plusfour} 109 110
 \installindentingmethod \v!normal{\ifx\normalindentation\empty\else
 111
 \let\v_spac_indentation_current\normalindentation
 112 \simplesetupindenting
 113   \fi} 114 115
 \installindentingmethod \v!reset
 {\settrue\c_spac_indentation_indent_first
 116   \parindent\zeropoint
 117
 \c_spac_indentation_toggle_state\zerocount} 118 

argument \??indentingmethod \v!evenpairs 

\setvalue #1?-\expandafter \def \csname #1
  \endcsname 
\installindentingmethod ...{\??indentingmethod #1}
  {#2}
l.108 ...{\c_spac_indentation_toggle_state\plusfour}
  
What am I doing wrong?

 TIA,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Indenting in \setuplines

2013-06-05 Thread Marcin Borkowski
Dnia 2013-06-06, o godz. 00:22:04
Hans Hagen pra...@wxs.nl napisał(a):

 On 6/5/2013 11:06 PM, Marcin Borkowski wrote:
  Dnia 2013-06-03, o godz. 15:20:45
  Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):
 
  Hi,
 
  I'd like to have my \startlines ... \stoplines indented in the
  following way: the first two lines unindented, the next two
  indented, and so on.  Basically, this means that I'd like the
  pattern to be based on (mod 4) arithmetic and not (mod 2).  Is it
  possible?  If yes, how?
 
  OK, so I thought I can handle this... but not:(.
 
  I found the relevant definitions in spac-hor.mkiv and tried to add a
  line saying
 
  \installindentingmethod
  \v!evenpairs{\c_spac_indentation_toggle_state\plusfour}
 
 % there is no \v!evenpairs
 
 \unprotect
 
 % english interface only:
 
 \installindentingmethod
{evenpairs}
{\c_spac_indentation_toggle_state\plusfour}
 
 % or maybe:
 
 \installindentingmethod
\v!quadruple
{\c_spac_indentation_toggle_state\plusfour}
 
 % as \v!quadruple is a known keyword
 
 \protect

Sorry to say that, but neither seems to work...

! Missing number, treated as zero.

to be read again 
   q
\v_spac_indentation_current -q
   uadruple
\4unknown #1#2#3#4#5-#2=#1
\relax 
\spac_indentation_apply_step_one ...on_setup_size 
  \fi 
\next1 #1,-\spac_indentation_apply_step_one {#1}
 \syst_helpers_do_process_co...
\syst_helpers_do_process_comma_list ...rgument #1,
  ]\relax \global
\advance \... ...
l.36 \startlines[indenting=quadruple]
 
? 

What do I do?  (And what do I do if I really want evenpairs,
especially that I'd like to have oddpairs, too, so quadruple is not
really a good keyword for me?)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Indenting in \setuplines

2013-06-03 Thread Marcin Borkowski
Hi,

I'd like to have my \startlines ... \stoplines indented in the
following way: the first two lines unindented, the next two indented,
and so on.  Basically, this means that I'd like the pattern to be based
on (mod 4) arithmetic and not (mod 2).  Is it possible?  If yes, how?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Two questions about registers

2013-06-02 Thread Marcin Borkowski
Hi list,

I have two questions regarding registers.

1. How to change the title of the register (placed by
\completeregister) and its numbering style?  (Assume that e.g. I want
it to be an unnumbered section and not a numbered chapter.)

2. I'd like my register not to have the headers with subsequent letters
of the alphabet.  I did [indicator=no] in \setupregister, but still got
the *vertical spacing* between gropus of entries beginning with the same
letter. Then, I did also [before={}], but then the space between entry
groups is actually *smaller* than the usual interline space (confirmed
by doing \showgrid).  What should I do to prevent this from happening?

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Two questions about registers

2013-06-02 Thread Marcin Borkowski
Dnia 2013-06-02, o godz. 19:46:52
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Hi list,
 
 I have two questions regarding registers.
 
 1. How to change the title of the register (placed by
 \completeregister) and its numbering style?  (Assume that e.g. I want
 it to be an unnumbered section and not a numbered chapter.)

OK, I've just found out about \setupheadtext[register={...}], but the
rest of my problems are still unsolved for me.

 2. I'd like my register not to have the headers with subsequent
 letters of the alphabet.  I did [indicator=no] in \setupregister, but
 still got the *vertical spacing* between gropus of entries beginning
 with the same letter. Then, I did also [before={}], but then the
 space between entry groups is actually *smaller* than the usual
 interline space (confirmed by doing \showgrid).  What should I do to
 prevent this from happening?
 
 Regards,
 



-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Two questions about registers

2013-06-02 Thread Marcin Borkowski
Dnia 2013-06-02, o godz. 19:51:54
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Dnia 2013-06-02, o godz. 19:46:52
 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):
 
  Hi list,
  
  I have two questions regarding registers.
  
  1. How to change the title of the register (placed by
  \completeregister) and its numbering style?  (Assume that e.g. I
  want it to be an unnumbered section and not a numbered chapter.)
 
 OK, I've just found out about \setupheadtext[register={...}], but the
 rest of my problems are still unsolved for me.
 
  2. I'd like my register not to have the headers with subsequent
  letters of the alphabet.  I did [indicator=no] in \setupregister,
  but still got the *vertical spacing* between gropus of entries
  beginning with the same letter. Then, I did also [before={}], but
  then the space between entry groups is actually *smaller* than the
  usual interline space (confirmed by doing \showgrid).  What should
  I do to prevent this from happening?

Me again: seems it was an ID10T error, the problem was insufficient
magnification in the pdf viewer.  Solution wikified under Registers.

The problem with head style of the title of the register is still
unsolved, though not critical - I can use \placeregister and supply the
title myself.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Two questions about registers

2013-06-02 Thread Marcin Borkowski
Dnia 2013-06-02, o godz. 20:46:12
Wolfgang Schuster schuster.wolfg...@gmail.com napisał(a):

 
 Am 02.06.2013 um 19:46 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Hi list,
  
  I have two questions regarding registers.
  
  1. How to change the title of the register (placed by
  \completeregister) and its numbering style?  (Assume that e.g. I
  want it to be an unnumbered section and not a numbered chapter.)
 
 When you use one of the \complete… (content, synonyms etc.) commands
 context uses either \chapter or \title to place the heading for the
 register, in addition it creates a reference to the register which
 has the name of the register, e.g. “content” or “index”.

Just curiosity: when \chapter and when \title?

 In cases where this heading type isn’t sufficient you can use \title
 (or any other heading) in combination with \place…, the disadvantage
 of this method is that you loose the multilingual labels (not really
 a problem) but you can access the texts with \headtext{…},
 e.g. \headtext{content} or \headtext{index}

By multilingual labels, you mean the texts like Index, Contents
etc., right?

  2. I'd like my register not to have the headers with subsequent
  letters of the alphabet.  I did [indicator=no] in \setupregister,
  but still got the *vertical spacing* between gropus of entries
  beginning with the same letter. Then, I did also [before={}], but
  then the space between entry groups is actually *smaller* than the
  usual interline space (confirmed by doing \showgrid).  What should
  I do to prevent this from happening?
 
 Can you provide a example for this?

See my other email.  Tl;dr: I was wrong, everything is fine.

 Wolfgang

Thanks,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 place page numbers in the margin, at the bottom of the text area?

2013-06-02 Thread Marcin Borkowski
Hi everybody,

I'd like to position page numbers in the margin, at the bottom, but
*not* in the footer; instead, I want them to be aligned so that their
baseline coincides with the baseline of the last line on the page.

Is it possible, and if yes, how?

Regards,

-- 
Marcin Borkowski
room B3-46, phone no +48 61 829 5375
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] \setupalign[flushleft] doesn't like ~

2013-05-25 Thread Marcin Borkowski
Dnia 2013-04-26, o godz. 10:26:35
Hans Hagen pra...@wxs.nl napisał(a):

 On 4/26/2013 2:26 AM, Marcin Borkowski wrote:
  Dnia 2013-04-26, o godz. 01:45:37
  Hans Hagen pra...@wxs.nl napisał(a):
 
  On 4/26/2013 1:09 AM, Marcin Borkowski wrote:
  With \setupalign[flushleft], nonbreakable spaces get larger than
  they should.  I'm afraid it's a bug.
 
  Best,
 
  An MWE:
 
  more info needed .. as this looks similar:
  [...]
 
  In both cases I get:
 
  3.912pt+1.956pt-1.304pt
  3.912pt
 
  but in the latter one, the space produced by ~ is noticeably
  wider.
 
 maybe you mean (non)frenchspacing
 
 \usemodule[ipsum]
 
 \showframe
 
 \starttext
 
 \setupalign[flushleft] \setupspacing[fixed]  \ipsum \par
 \setupalign[flushleft] \setupspacing[packed] \ipsum \par
 \setupalign[flushleft] \setupspacing[broad]  \ipsum \par
 
 \stoptext
 
 (defaults are language dependent)

Sorry for my delay - I was quite busy, now I got back to this.

It's not the question of \(non)frenchspacing.

This is indeed strange: I compiled this (with the newest ConTeXt):

%%%
\starttext

Lorem ipsum dolor sit~amet, consectetur adipiscing elit. Donec euismod
mattis pellentesque. Duis ut ullamcorper sem. Sed varius neque quis
lacus hendrerit dapibus. Ut non elit eu nibh dignissim feugiat. Quisque
elementum lacinia pretium. Aliquam vel tellus in~ipsum lacinia
sagittis. Morbi vitae justo ante, sit~amet vulputate sem. Vivamus
faucibus ante vel dolor aliquet placerat. Ut pulvinar tellus sit~amet
augue congue dapibus. Donec justo odio, dignissim id rhoncus eget,
tristique at justo. Morbi quis libero id nisl malesuada aliquam non non
libero. Proin tristique ultricies ipsum, vel facilisis odio luctus
quis. Nullam tellus leo, posuere in~eleifend quis, lobortis eu sem.
In~hac habitasse platea dictumst. Suspendisse non quam a~ante mollis
dignissim. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos himenaeos.

  \the\fontinterwordspace  \font
+\the\fontinterwordstretch\font
-\the\fontinterwordshrink \font

\setbox\scratchbox\hbox{sit amet}\copy\scratchbox \the\wd\scratchbox\par
\setbox\scratchbox\hbox{sit~amet}\copy\scratchbox \the\wd\scratchbox

\setupalign[flushleft]

Lorem ipsum dolor sit~amet, consectetur adipiscing elit. Donec euismod
mattis pellentesque. Duis ut ullamcorper sem. Sed varius neque quis
lacus hendrerit dapibus. Ut non elit eu nibh dignissim feugiat. Quisque
elementum lacinia pretium. Aliquam vel tellus in~ipsum lacinia
sagittis. Morbi vitae justo ante, sit~amet vulputate sem. Vivamus
faucibus ante vel dolor aliquet placerat. Ut pulvinar tellus sit~amet
augue congue dapibus. Donec justo odio, dignissim id rhoncus eget,
tristique at justo. Morbi quis libero id nisl malesuada aliquam non non
libero. Proin tristique ultricies ipsum, vel facilisis odio luctus
quis. Nullam tellus leo, posuere in~eleifend quis, lobortis eu sem.
In~hac habitasse platea dictumst. Suspendisse non quam a~ante mollis
dignissim. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos himenaeos.

  \the\fontinterwordspace  \font
+\the\fontinterwordstretch\font
-\the\fontinterwordshrink \font

\setbox\scratchbox\hbox{sit amet}\copy\scratchbox \the\wd\scratchbox\par
\setbox\scratchbox\hbox{sit~amet}\copy\scratchbox \the\wd\scratchbox

\stoptext
%%%

and the numbers (widths) shown don't exhibit any discrepancies, but in
the pdf, the spaces are significantly wider (both in Evince and Adobe
Reader).  OTOH, the \copy commands don't show any differences between
spaces and ties.

Now I'm confused - but something is still wrong.

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] \setupitezmize[joinedup,nowhite] not working

2013-04-25 Thread Marcin Borkowski
Hi list,

the following MWE shows that I can't get rid of vertical space above
subitemizations.  What should I do?

Best,
Marcin


\setupitemize[1][n][style=bold]
\setupitemize[2][a,joinedup,nowhite][stopper=)]

\starttext
\startitemize
\item First
  \startitemize
  \item Subfirst first
  \item Subfirst second
  \item Subfirst third
  \stopitemize
\item Second
\item Third
  \startitemize
  \item Subthird first
  \item Subthird second
  \stopitemize
\stopitemize

\stoptext


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] \setupitezmize[joinedup,nowhite] not working

2013-04-25 Thread Marcin Borkowski
Dnia 2013-04-25, o godz. 17:48:46
Aditya Mahajan adit...@umich.edu napisał(a):

 On Thu, 25 Apr 2013, Marcin Borkowski wrote:
 
  Hi list,
 
  the following MWE shows that I can't get rid of vertical space above
  subitemizations.  What should I do?
 
 (Untested):
 
 \setupitemize[1][paragraph]

Nope.  It kills vertical spacing between (1st level) items, which I do
not want.

 In my styles, I use:
 
 https://github.com/adityam/context-slides-example/commit/f237cf9e918146d8d02a914bde09b1066a4b848e

I'd like not to resort to such hacks...

 Aditya

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] \setupalign[flushleft] doesn't like ~

2013-04-25 Thread Marcin Borkowski
With \setupalign[flushleft], nonbreakable spaces get larger than they
should.  I'm afraid it's a bug.

Best,

An MWE:

\setupalign[flushleft]

\starttext
 Lorem ipsum dolor sit~amet, consectetur adipiscing elit. Donec euismod
mattis pellentesque. Duis ut ullamcorper sem. Sed varius neque quis
lacus hendrerit dapibus. Ut non elit eu nibh dignissim feugiat. Quisque
elementum lacinia pretium. Aliquam vel tellus in~ipsum lacinia
sagittis. Morbi vitae justo ante, sit~amet vulputate sem. Vivamus
faucibus ante vel dolor aliquet placerat. Ut pulvinar tellus sit~amet
augue congue dapibus. Donec justo odio, dignissim id rhoncus eget,
tristique at justo. Morbi quis libero id nisl malesuada aliquam non non
libero. Proin tristique ultricies ipsum, vel facilisis odio luctus
quis. Nullam tellus leo, posuere in~eleifend quis, lobortis eu sem.
In~hac habitasse platea dictumst. Suspendisse non quam a~ante mollis
dignissim. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos himenaeos. \stoptext


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] \setupalign[flushleft] doesn't like ~

2013-04-25 Thread Marcin Borkowski
Dnia 2013-04-26, o godz. 01:45:37
Hans Hagen pra...@wxs.nl napisał(a):

 On 4/26/2013 1:09 AM, Marcin Borkowski wrote:
  With \setupalign[flushleft], nonbreakable spaces get larger than
  they should.  I'm afraid it's a bug.
 
  Best,
 
  An MWE:
 
 more info needed .. as this looks similar:
 [...]

In both cases I get:

3.912pt+1.956pt-1.304pt
3.912pt

but in the latter one, the space produced by ~ is noticeably wider.

I'm running
ConTeXt  ver: 2013.04.11 22:48 MKIV beta  fmt: 2013.4.12
int: english/english

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Too many word-breaks in consecutive lines

2013-04-12 Thread Marcin Borkowski
Dnia 2013-04-12, o godz. 12:20:20
Thomas A. Schmitz thomas.schm...@uni-bonn.de napisał(a):

 On 04/12/2013 11:13 AM, Wolfgang Schuster wrote:
  You can add \setupalign[stretch] to your document which increases
  the space between words, it is only a small value and helps in some
  cases.
 
 I could have sworn there was a way to set the maximum number of 
 consecutive lines which can be hyphenated, but all I find now is 
 \doublehyphendemerits, which is just for two consecutive lines (which 
 may be a bit too drastic for German texts).

Better not swear;).

From Frank Mittelbach's paper (see
http://latex-community.org/know-how/latex/55-latex-general/475-e-tex#line-breaking):

Issue: Managing consecutive hyphens in a general way

In TeX it is possible to discourage two consecutive hyphens, but there
is no way to prohibit or strongly discourage three or more.
Technically, this would mean a slight extension of the current
algorithm by keeping track of the number of hyphens in a row. None of
today's engines supports that concept.

 Thomas

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] sozi presentations

2013-04-09 Thread Marcin Borkowski
Dnia 2013-04-09, o godz. 16:14:43
Romain Diss romain.d...@yahoo.fr napisał(a):

 Hi,
 
 Le mardi 09 avril 2013, Thomas A. Schmitz a écrit :
  this is a very far shot, but just maybe... I have been looking at
  prezi (http://prezi.com/). There's lots of aspects there that don't
  appeal to
 (...)
 
 I just wanted to mention a free (GPL) alternative to prezi : sozi 
 (http://sozi.baierouge.fr/wiki/doku.php). It works with as inkscape
 plugin.

For the sake of completeness: there's also impress.js
(http://bartaz.github.io/impress.js/#/bored).

 
 All the best
 

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Different Horizontal Lines with Tabulate

2013-03-29 Thread Marcin Borkowski
Dnia 2013-03-29, o godz. 20:49:36
Malte Stien ma...@stien.de napisał(a):

 Are any of the above possible with tabulate? I could not find
 anything to achieve any of those. I am quite used to tabulate as my
 table framework, so I would prefer to use that. If that's not
 possible however, I'd be happy to use something else.
 
 Any pointers would be much appreciated.

Apart from the excellent (as usual) Wolfgang's answer, I have to say
that I switched to \bTABLE ... \eTABLE and (if necessary) a Lua loop.
Search the archives for a thread started by me about hiding columns in
a table, for example.

 Thank you,
 Malte.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] new manual

2013-03-27 Thread Marcin Borkowski
Dnia 2013-03-27, o godz. 13:38:50
Hans Hagen pra...@wxs.nl napisał(a):

 Hi,
 
 I uploaded a work-in-progress manual:
 
 http://www.pragma-ade.com/general/manuals/fonts-mkiv.pdf

I have to say that I am *very* impressed.

1. Aesthetically, this seems to be the most beautiful of ConTeXt
manuals.

2. I've only read half a page, but the style also seems to be very nice
- the introduction was just great.

3. From the number of pages and the table of contents I assume that
I'll be able to learn a lot about fonts from this - and that's great!

Now the file has been sent to my Kindle, and the only thing I'm afraid
of is the reading experience on 6...  Hans, I know that you don't like
(today's) ebook readers, but what about preparing a version with larger
fonts/smaller margins for us Kindle users?  Given the typographical
quality of most Kindle ebooks, you may assume that when we read on
a Kindle, we don't care too much about aesthetics (which, btw, is
incomprehensible for me: the technology to typeset text automatically
in an (at least) decent way (including hyphenation) has been around for
some 30 years, and yet they didn't manage to do it right...), so you
might just change a few things in \setuplayout etc. and throw it into
the net...

 Hans

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] A thinner hrule for headers

2013-03-24 Thread Marcin Borkowski
Dnia 2013-03-24, o godz. 13:32:28
Thomas Kreuzer thomas.kreu...@rwth-aachen.de napisał(a):

 Hello everyone,
 
 I'd like to know if it is possible to get a thinner hrule in headers
 (mkiv).
 
 Right now I am using
 
 \setupheader[after=\hrule]

If this \hrule is TeX's primitive \hrule, then you can (maybe) type
[after={\hrule height 0.4pt\relax}] for the default (and change the
height for other dimensions).

That said, this is a low-level hack and not very ConTeXt-y (even if it
works, which I don't know.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] upto current

2013-03-21 Thread Marcin Borkowski
Dnia 2013-03-21, o godz. 11:32:01
Alan BRASLAU alan.bras...@cea.fr napisał(a):

 On Thu, 21 Mar 2013 11:19:24 +0100
 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote:
 
  Marcin wasn't talking about organizing the wiki page, but about
  writing up-to-date and complete manuals (in PDF) which is nearly
  impossible with the speed that Hans keeps developing ConTeXt ;).
 
 Unless we find funding somewhere to assign someone sufficiently
 competent to work full-time for Hans just to write and maintain
 documentation.
 
 This is not a bad idea if only we could get it sponsored...

I have an impression that I heard about something similar to GSoC, but
for writing docs...

Also, it might not need a full-time job, even if you want to keep up
with Hans' speed.  And even a good free book on, say, a snapshot of
ConTeXt from some point in time (later than official manuals) would be
useful.

 Alan

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] upto current

2013-03-20 Thread Marcin Borkowski
Dnia 2013-03-20, o godz. 09:12:21
Keith J. Schultz keithjschu...@web.de napisał(a):

 Hi Hans, All,
 
 
 The biggest crux in using ConTeXt is its documentation.
 True, things have gotten a lot better in the past year!
 
 Yet, there is no ONE definitive place to get comprehensive
 and EASY to find documentation. 
 
   1) Garden is really not that easy to navigate
   2) Garden is loaded with a mixture of mkii and mkiv
 and it is not always clear if the page one is on is for
   mkii or mkiv or quite outdated.
 
   3) PRAGMA does have up to date manuals.
   4) These manuals are quite unfinished in many parts,
  as are all many of the older manuals.

  Very frustrating
 
   5) The newer manuals should be part of the standalone.
  ( I hate going online to look for a manual when it
should be installed already)
 
   6) Reference manuals are fine for the advanced user, but for
   the beginner or intermediate they are not much help.
 Especially, if if one does not understand TeX, or
 Typesetting, and one really does not need to use all those options.
 
 My suggestion would be to have garden have a manuals download
 area where one can get the up to date manuals from Pragma and
 where one can discern how old the others are. It should be also, easy
 to find.
 
 regards
   Keith.   

That is quite true, though not that easy.  In essence, I think someone
would have to be paid for tracking the mailing list and updating
manuals.  AFAIK, Sietse does a great job updating the wiki, but the
wiki is not necessarily the easiest thing to go to for newbies (as you
have noticed).

It is quite obvious for me that Pragma won't fund such an enterprise
(not that I'm claiming it should - of course not!).  I think the only
body which might do it is either TUG, either some other UG - but then, I
guess they are already funding LaTeX3 (which is kind of a competitor -
albeit friendly - to ConTeXt), either font projects (TeX Gyre!), which
are quite beneficial to the ConTeXt ecosystem, too.

And there are books - but then, you have to pay for them (which also
seems right, since it is quite an undertaking to write a book,
especially about a moving target like ConTeXt...)

So basically: unless there is some significant funding, I'm rather a
skeptic.

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] etexshow and generation of cont-en.xlm (cont-XX.xml)?

2013-03-20 Thread Marcin Borkowski
Dnia 2013-03-20, o godz. 12:22:55
Jonathan Barchi barc...@gmail.com napisał(a):

 BNF grammar descriptions, but some reading suggests that this can't
 be done for *TeX.

Don't listen to that.  While it's technically true, (a) most users don't
redefine catcodes or internal macros anyway (and imho there are fewer
reasons to do such hacking in ConTeXt than in LaTeX) and (b) for the
sake of syntax highlighting/parsing by external tools, you have to
assume some sanity anyway (so that you don't have to reimplement full
TeX instead of writing some parser).

That said, I know little about regular languages, BNF notations
etc. (with the exception of some _practical_ experience with regexen),
so I'm not sure about what I've written above.  But I would guess that
if you make some (reasonable) assumptions about catcodes and command
syntax, writing a BNF style grammar for (at least some part of)
ConTeXt might be pretty doable.

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] To update or not to update - that is the question...

2013-03-17 Thread Marcin Borkowski
Dnia 2013-03-02, o godz. 11:29:09
Hans Hagen pra...@wxs.nl napisał(a):

 On 3/2/2013 1:11 AM, Marcin Borkowski wrote:
  2. Upgrade and insert some manual pagebreaks so that pages 21-22
  (which I'm currently working on) contain the same problems as they
  used to. Pro: easy fix.  Con: very dirty trick, and what if someone
  asks me about some old problems, because he lost his copy?
 
 Why don't you use version numbers and store pdf files? After all,
 it's quite normal that educational materials get updated. Also, use 
 references to numbers instead of pages.

Well, it's a bit complicated.  Assume that I have problems for classes
1-3, they end on page 5.  Then I'd like to prepare problems for class
4, they should start half the page 5 etc.

Still, the course is almost over, so basically the problem
disappeared;).  Thanks for the answer anyway!

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] To update or not to update - that is the question...

2013-03-17 Thread Marcin Borkowski
Dnia 2013-03-02, o godz. 12:04:50
Marco Patzer home...@lavabit.com napisał(a):

 On 2013–03–02 Marcin Borkowski wrote:
 
  Is it possible to find the official ConTeXt repo somewhere,
 
 There is no official repo. But you can use
 
   git://gitorious.org/context/context.git
 
 Marco

Thanks!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to disable hyphenation?

2013-03-08 Thread Marcin Borkowski
Dnia 2013-03-07, o godz. 18:25:42
Aditya Mahajan adit...@umich.edu napisał(a):

 On Thu, 7 Mar 2013, Marcin Borkowski wrote:
 
  Hi,
 
  I'd like to typeset some text flush left and *completely* without
  hyphenation.  What do I do?  (For now, I wrote \hyphenpenalty=1,
  but this is obviously not very ConTeXt-way.)
 
 \setupalign[nothypenated]
 
 or inside an environment that accepts the align key
 
 ... align=nothyphenated
 
 It may be a good idea to either increase the tolerance, or set the
 text to be flush left as well.

Thanks!  Of course, I have [flushleft] also.

And it's a shame: I wanted to add it to the wiki...  but it's already
there, only difficult to find.  (At least I didn't succeed.)  Maybe it
would be a good idea to add a page about hyphenation in general?

 Aditya
 

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 disable hyphenation?

2013-03-07 Thread Marcin Borkowski
Hi,

I'd like to typeset some text flush left and *completely* without
hyphenation.  What do I do?  (For now, I wrote \hyphenpenalty=1,
but this is obviously not very ConTeXt-way.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] To update or not to update - that is the question...

2013-03-01 Thread Marcin Borkowski
Hi all,

I have an issue with \overrightarrow being positioned under its
argument.  I've read on the list that this is now fixed, but...  I
can't upgrade!  This is because I'm preparing a document in an
incremental way, that is, I'm preparing course materials (problem
sets) for the next class each week and giving them away to students.
If I upgrade, the pagebreaks change (probably due to some tweaking Hans
added to multicolumn itemgroups a few months ago).  So what would you
suggest? I can see at least three solutions, none of which is ideal for
me.

1. Manually backport the fix to my ConTeXt.  Pro: ideal solution (at
least for now).  Con: no idea how to do it - I don't know how to
access ConTeXt repository (if it's at all possible for a non-developer).

2. Upgrade and insert some manual pagebreaks so that pages 21-22 (which
I'm currently working on) contain the same problems as they used to.
Pro: easy fix.  Con: very dirty trick, and what if someone asks me
about some old problems, because he lost his copy?

3. Just use \vec instead of \overrightarrow.  Pro: very easy, no dirty
hacks.  Con: ugly looking (see: \vec{AB}).

Any ideas?  Is it possible to find the official ConTeXt repo somewhere,
or if not, maybe someone could send me the diff of the commit which
fixed that (this post:
http://article.gmane.org/gmane.comp.tex.context/79011 suggests that it
is the 2012.10.30 21:13 commit)?

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] \startplacefigure breaking paragraph flow

2013-02-10 Thread Marcin Borkowski
Hi all,

when I issue a \startplacefigure, it breaks the flow of the paragraph.
Normally, it is not a problem (I can use 2*hang anyway), but I have a
one-paragraph enumeration (made by \defineenumeration), and if I give
the figure at its beginning, the label is on a line by its own; the
problem is, I want the enumeration typeset by a block, and that's why I
don't want to give the figure *before* the block.  Here's a MWE:

\defineenumeration[question][
  text={\llap{$\blacktriangleright$~}Question},
  right={.},
  before={\blank[small]},
  after={},
  distance=0.5em,
  alternative=serried,
  width=fit,
]

\defineblock[question]
\defineblock[answer]

\keepblocks[question]
\hideblocks[answer]

\setupblock[question][before=\startquestion,after=\stopquestion]
\setupblock[answer][before=\startanswer,after=\stopanswer]
\def\noanswer{\incrementnumber[answer]}

\starttext
\beginquestion
  This looks good. \input knuth
\endquestion

\beginquestion
  \startplacefigure[location={none,right,2*hang}]
\framed{\tfd My figure}
  \stopplacefigure
  This looks bad. \input knuth
\endquestion
\stoptext

Any suggestions?

-- 
Marcin Borkowski
room B3-46, phone no +48 61 829 5375
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Degree sign

2012-11-23 Thread Marcin Borkowski
Hi all,

is there a canonical way to obtain a degree sign?  I'd best like it
to work in both text and math mode, and not use UTF-8 but some TeX-y
\command (like \degree or so).

Best

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Degree sign

2012-11-23 Thread Marcin Borkowski
Dnia 2012-11-23, o godz. 15:22:14
Mojca Miklavec mojca.miklavec.li...@gmail.com napisał(a):

 On Fri, Nov 23, 2012 at 3:17 PM, Marcin Borkowski wrote:
  Hi all,
 
  is there a canonical way to obtain a degree sign?  I'd best like
  it to work in both text and math mode, and not use UTF-8 but some
  TeX-y \command (like \degree or so).
 
 \textdegree (see char-def.lua for example)

Thanks!

You might want to put this here:
http://tex.stackexchange.com/questions/22086/macro-for-degree-symbol to
keep up with Aditya's tradition of providing ConTeXt answers to LaTeX
questions;).

 Mojca

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Degree sign

2012-11-23 Thread Marcin Borkowski
Dnia 2012-11-23, o godz. 15:43:56
Mojca Miklavec mojca.miklavec.li...@gmail.com napisał(a):

 On Fri, Nov 23, 2012 at 3:35 PM, Marcin Borkowski wrote:
  Dnia 2012-11-23, o godz. 15:22:14 Mojca Miklavec napisał(a):
  On Fri, Nov 23, 2012 at 3:17 PM, Marcin Borkowski wrote:
   Hi all,
  
   is there a canonical way to obtain a degree sign?  I'd best
   like it to work in both text and math mode, and not use UTF-8
   but some TeX-y \command (like \degree or so).
 
  \textdegree (see char-def.lua for example)
 
  Thanks!
 
  You might want to put this here:
  http://tex.stackexchange.com/questions/22086/macro-for-degree-symbol
  to keep up with Aditya's tradition of providing ConTeXt answers to
  LaTeX questions;).
 
 With something like:
 If you switch to ConTeXt, \textdegree will work in both text and
 math mode.
 ? ;) ;) ;)

Well... kinda... yes. ;P

You might want to look here for inspiration:

http://tex.stackexchange.com/users/323/aditya?tab=answers

(Clarification: joking aside, I guess that Aditya's habit of giving
ConTeXt answers to LaTeX questions on TeX.SE is really great, since
it allows to spread the word about ConTeXt, and also may help ConTeXt
users.)

 Mojca

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] ConTeXt: Page numbering in words for spanish

2012-11-23 Thread Marcin Borkowski
Dnia 2012-11-22, o godz. 11:55:17
Mojca Miklavec mojca.miklavec.li...@gmail.com napisał(a):

 On Thu, Nov 22, 2012 at 1:03 AM, Acidrums4 wrote:
 
  * 100 before 'millón' -- should that be 'cien millón', or 'ciento
  millón'? - It should be 'cien millones'. 'Millones', plural for
  'Millón'. Maybe it should be a variable for plurals for millions
  (the only plural used for numbers in spanish).
 
 Singular and plural don't always suffice.
 
 1M: en milijon
 2M: dva milijona
 3/4M: [tri|štiri] milijone
 5M: pet milijonov

Similarly for Polish (which is no surprise), so a more general mechanism
might be a good idea.

1M: (jeden) milion
2/3/4M: dwa/trzy/cztery miliony
5/6/7/8/9M: pięć/sześć/siedem/osiem/dziewięć milionów

32M: trzydzieści dwa miliony
57M: pięćdziesiąt siedem milionów

And similarly for thousands.

 Mojca

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A problem with units

2012-11-23 Thread Marcin Borkowski
Hi all,

being quite happy with things like \unit{10 km/h}, once I did \unit{45
min}, only to get 45 m in the resulting file.  I suspect that \unit
does not know about minutes; is there any way to teach it;)?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Hiding columns in m-database TABLE

2012-11-22 Thread Marcin Borkowski
Hi all,

I'd like to process a csv file (with the database module) in order to
typeset a (nice) TABLE. However, I have a few columns I'd like to
omit.  I can (of course) hand-edit the csv file; but is there a way to
do it automatically?  Something like

\setupTABLE[column][3,4,5][kill]

I did [empty=yes,width=0pt] in place of [kill], and it worked, but it
seems like a hack (and I don't know whether it does actually process
the cells I'm omitting - which in my case wouldn't bother me, but might
be an additional layer of inelegance;)).  And better ideas?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Hiding columns in m-database TABLE

2012-11-22 Thread Marcin Borkowski
Dnia 2012-11-22, o godz. 13:26:52
Mojca Miklavec mojca.miklavec.li...@gmail.com napisał(a):

 On Thu, Nov 22, 2012 at 12:57 PM, Marcin Borkowski wrote:
  le) in order to
  typeset a (nice) TABLE. However, I have a few columns I'd like to
  omit.  I can (of course) hand-edit the csv file; but is there a way
  to do it automatically?  Something like
 
  \setupTABLE[column][3,4,5][kill]
 
  I did [empty=yes,width=0pt] in place of [kill], and it worked, but
  it seems like a hack (and I don't know whether it does actually
  process the cells I'm omitting - which in my case wouldn't bother
  me, but might be an additional layer of inelegance;)).  And better
  ideas?
 
 If you have up to 9 columns, you could use
 
 \def\ProcessingLine#1#2#3#4#5#6#7{%
 \bTR\bTD#1\eTD\bTD#2\eTD\bTD#6\eTD\bTD#7\eTD}
 
 and then [command=\ProcessingLine]

Well, something like 20 columns (on A4 landscape). ;)

It turns out that my method somehow doesn't work well without setting
also height=0pt; then it's fine, but I'm still wondering about a
cleaner way.

 Mojca

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] \startitemize[columns] once again...

2012-11-16 Thread Marcin Borkowski
Dnia 2012-11-14, o godz. 11:38:48
Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de napisał(a):

 ···date: 2012-11-14, Wednesday···from: Marcin Borkowski···
 
  Dnia 2012-11-10, o godz. 03:23:11
  Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):
  
   This minimal example behaves in a strange way:
   
   \starttext
 Some text
 \startitemize[columns,two,joinedup]
 \item abc% $\frac{x^2-x+3}{x^2+x-3}$;
 \item xyz% $\frac{x^5-3}{x^3+x-2}$.
 \stopitemize
   \stoptext
   
   If we remove the percentage signs in the items, an additional
   vertical skip appears.  Is it a feature or a bug?
  
  Hi, could anybody look into it?  I tried also \smash-ing the
  formulae - with no luck.
 
 Hi Marcin, appears like the vertical spacing is extended when
 content of the item exceeds the line height. The behavior is not
 restricted to math mode, though I can’t say if there is an
 official way to prevent or customize it. If you are desperate to
 get around it, maybe put the content in a box of fixed height.
 
 ·· demo ·
 \defineframed[crampy][height=\ht\strutbox,frame=off]
 \starttext
   before
   \thinrule
   \startitemize[columns,two,joinedup]
   \item abc \mathematics{\frac{x^2-x+3}{x^2+x-3}};
   \item xyz \mathematics{\frac{x^5-3}{x^3+x-2}}.
   \stopitemize
   \thinrule
   after
 
   before
   \thinrule
   \startitemize[columns,two,joinedup]
   \item abc \crampy[frame=on]{\mathematics{\frac{x^2-x+3}{x^2+x-3}}};
   \item xyz \crampy[frame=on]{\mathematics{\frac{x^5-3}{x^3+x-2}}}.
   \stopitemize
   \thinrule
   after
 
   before
   \thinrule
   \startitemize[columns,two,joinedup]
   \item abc \crampy{\mathematics{\frac{x^2-x+3}{x^2+x-3}}};
   \item xyz \crampy{\mathematics{\frac{x^5-3}{x^3+x-2}}}.
   \stopitemize
   \thinrule
   after
 \stoptext
 ·
 
 Hth, Philipp

Yes it does, thanks!  (It helps in some other strange cases, too.)
What is especially interesting, is that \strut\smash{...} didn't help.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Epub woes

2012-11-15 Thread Marcin Borkowski
Dnia 2012-11-15, o godz. 13:58:29
Bill Meahan subscribed_li...@meahan.net napisał(a):

 I tried to generate an epub document using ConTeXt following the
 recipe on the wiki. Didn't work. So, I tried running the
 export-example.tex file that comes with the distribution, unmodified.
 Same bad results.
 
  Cover is not generated
  TOC is not generated (though it is noted this might be the state
 of the export)
  Sectioning doesn't happen.
  Paragraphing doesn't happen.
  The resultant epub file cannot even be opened with FBReader.
 
 Importing the epub into Sigil shows one big blob of text, with only
 the between word spacing that's present in the source file. The
 \quotation{} markup did get turned into quotation marks, chapter
 numbers were generated and the rest of the markup was stripped out.
 
 Same behavior with both the TeXLive 2012 version of ConTeXt and a
 quite recent beta.
 
 Up-to-date Ubuntu 12.04
 
 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50
 UTC 2012 i686 i686 i386 GNU/Linux
 
 What am I doing wrong?
 

http://archive.contextgarden.net/message/20120809.130943.604f5b22.en.html

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] \startitemize[columns] once again...

2012-11-14 Thread Marcin Borkowski
Dnia 2012-11-10, o godz. 03:23:11
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 This minimal example behaves in a strange way:
 
 \starttext
   Some text
   \startitemize[columns,two,joinedup]
   \item abc% $\frac{x^2-x+3}{x^2+x-3}$;
   \item xyz% $\frac{x^5-3}{x^3+x-2}$.
   \stopitemize
 \stoptext
 
 If we remove the percentage signs in the items, an additional vertical
 skip appears.  Is it a feature or a bug?

Hi, could anybody look into it?  I tried also \smash-ing the formulae -
with no luck.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] \startitemize[columns] once again...

2012-11-09 Thread Marcin Borkowski
This minimal example behaves in a strange way:

\starttext
  Some text
  \startitemize[columns,two,joinedup]
  \item abc% $\frac{x^2-x+3}{x^2+x-3}$;
  \item xyz% $\frac{x^5-3}{x^3+x-2}$.
  \stopitemize
\stoptext

If we remove the percentage signs in the items, an additional vertical
skip appears.  Is it a feature or a bug?

(Also, I encountered a *very* weird error where in some cases a whole
page disappears in the pdf; I could not distil it into a minimal
example, but I'll try and I'll post it here.  I have a very vague
suspicion that \startitemize[columns] is again the culprit.)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Is it possible to arrange pages so that they fall alternating on two sides of the sheet?

2012-11-06 Thread Marcin Borkowski
Hi all,

I have something like this:

\definepapersize[thin][width=210mm,height=74.25mm]
\setuppapersize[thin][A4]
\setuppaper[nx=1,ny=4]
\setuplayout[topspace=1.5cm,backspace=1.5cm,
  header=0mm,footer=0mm,
  width=middle,height=middle]
\setuparranging[XY]

I'd like to have pages 1, 3, 5, 7 on one side of the A4 sheet, and 2,
4, 6, 8 on the other one.  In other words, there should be two
(A4-sized) pages in the pdf.  (My use case is a short quiz for my wife's
students - she wants to save paper;).)

Bonus points for making pages 5-8 *identical* to pages 1-4, so that:

on pages 1-2 (top of the A4 sheet, both sides) there is one problem set;
on pages 3-4 (just below the previous one) there is another;
on pages 5-6 (yet below) the first problem set is repeated;
on pages 7-8 (bottom) the second one gets repeated again.

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] A problem with autopunctuation

2012-11-04 Thread Marcin Borkowski
Dnia 2012-11-04, o godz. 11:04:52
Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):

 
 Am 03.11.2012 um 21:15 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Dnia 2012-11-03, o godz. 14:04:30
  Andres Conrado ela...@chiquitico.org napisał(a):
  
  In dont't really know why you think it should render differently.
  Everything TeX is supposed to ignore white spaces in math, AFAIK.
  
  Yep, but that's no TeX!  Take a look at math-ini.mkiv, lines 873nn.
 
 And what do you think the example will tell us?
 
 \starttext
 \enablemathpunctuation
 $(1,2) (1, 2) (1{,}2) \hbox{foo, not bar}$
 \stoptext
 
 Wolfgang

Well, I *would* expect (1,2) to produce no space after the comma, and
(1, 2) to produce a thin space.  But I may be wrong; in any case, they
seem to do exactly the same, which doesn't make much sense to me.
Also, I wrote about this some time ago on TeX.SE
(http://tex.stackexchange.com/questions/52524/autopunctuation-not-working-properly),
and Aditya suggested posting here - which I (finally) did.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] A problem with autopunctuation

2012-11-04 Thread Marcin Borkowski
Dnia 2012-11-04, o godz. 16:38:53
Aditya Mahajan adit...@umich.edu napisał(a):

 On Sun, 4 Nov 2012, Wolfgang Schuster wrote:
 
 
  Am 03.11.2012 um 01:45 schrieb Marcin Borkowski
  mb...@wmi.amu.edu.pl:
 
  If I get it correctly, the following two formulae should render
  differently - and they don't.  What is going on?
 
  \setupmathematics[autopunctuation=yes]
 
  \starttext
 
  $(2,5)$ versus $(2, 5)$
 
  \stoptext
 
  Spaces in math mode are ignored because the spacing is controlled
  by different rules.
 
  \starttext
 
  \m{1.2}\par
  \m{1. 2}\par
  \m{1 .2}\par
  \m{1 . 2}\par
 
  \blank
 
  \m{1,2}
 
  \blank
 
  \setupmathematics[autopunctuation=yes]\m{1,2}
 
  \stoptext
 
 I always thought that autopunctuation was targetted towards the
 European tradition of using comma as a decimal separator. That
 behavior can be achieved by changing a comma to be an ord from a
 punctuation. However, changing the comma to an ord has the
 drawback that you have to explicitly add spaces when comma is needed
 as a punctuation, for example in  sets:
 
 \m{A = \{a,\, b,\, c\}}
 
 Autopunctuation is supposed to get around this: if comma is followed
 by a non-space, the comma should behave like an ord; if it is
 followed by a space, it should behave like a punctuation. Clearly
 that is not happening.

+1

This was exactly what I was expecting.  (In LaTeX, there's even a
package, called icomma AFAIR, which does more or less this.)  As I
often write mathematical texts in Polish, such a feature would be
*very* useful for me.  I could use \digits or \unit, but this has its
drawbacks, too.

 Aditya

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] A problem with autopunctuation

2012-11-03 Thread Marcin Borkowski
Dnia 2012-11-03, o godz. 14:04:30
Andres Conrado ela...@chiquitico.org napisał(a):

 In dont't really know why you think it should render differently.
 Everything TeX is supposed to ignore white spaces in math, AFAIK.

Yep, but that's no TeX!  Take a look at math-ini.mkiv, lines 873nn.

 Best,
 
 Andrés Conrado Montoya
 El Andi
 andresconr...@gmail.com
 http://chiquitico.org

Best,

-- 
Marcin
___
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] Is http://source.contextgarden.net/ down? [EOM]

2012-11-03 Thread Marcin Borkowski


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Pretty-printing ConTeXt sources

2012-11-03 Thread Marcin Borkowski
Hi all,

I asked the very same question some time ago, but back then got an
MkII (texexec-based) answer.  So: how do I typeset ConTeXt MkIV sources?
Is the procedure different for .tex, .mkiv, .mkvi, .lua files?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A problem with autopunctuation

2012-11-02 Thread Marcin Borkowski
If I get it correctly, the following two formulae should render
differently - and they don't.  What is going on?

\setupmathematics[autopunctuation=yes]

\starttext

$(2,5)$ versus $(2, 5)$

\stoptext

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] How to set the whole document flush left?

2012-10-27 Thread Marcin Borkowski
Dnia 2012-10-27, o godz. 12:08:40
Hans Hagen pra...@wxs.nl napisał(a):

 On 26-10-2012 16:28, Marcin Borkowski wrote:
 
  So do I get it correctly that \setupalign[flushleft] affects
  *everything but itemizations*?  (If yes, my problem is more or less
  solved.)
 
 i'll make itemize honor the global setting unless a specific align is 
 set with itemize

Thanks a lot, Hans!  (And I think this is a change for the better!)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to set the whole document flush left?

2012-10-26 Thread Marcin Borkowski
Dnia 2012-10-26, o godz. 05:13:51
Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):

 
 Am 26.10.2012 um 00:12 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Hi,
  
  I'd like to have all my document set flush left.  I know how to set
  a \framed flush left, or \startalign ... \stopalign - but what about
  the whole?  (In my current case, the document is basically a
  (mid-aligned) title and then one big itemgroup, so I added
  [align={right,broad}] to the \startitemize - but what about the
  general case?  \raggedright did not work, at least for the
  itemization.)
 
 
 Where is the minimal example?
 
 
 \setupitemize[each][align=flushleft]
 
 \starttext \showgrid
 
 \input knuth
 
 \startitemize
 \startitem \input knuth \stopitem
 \stopitemize
 
 \stoptext

So do I get it correctly that \setupalign[flushleft] affects
*everything but itemizations*?  (If yes, my problem is more or less
solved.)

 Wolfgang

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A few questions about itemizations

2012-10-25 Thread Marcin Borkowski
Hi all,

this code:

\defineitemgroup[subitems]
\setupitemgroup[subitems][each][a,packed][left=(,stopper=)]

\starttext

\startitemize[n]
\startitem
  Lorem ipsum
  \startsubitems
\startitem
  dolor
\stopitem
\startitem
  sit
\stopitem
\startitem
  amet.
\stopitem
  \stopsubitems
\stopitem
\stopitemize

\stoptext


behaves differently if I change \startsubitems into
\startitemize[a,packed][left=(,stopper=)].  Namely, the vertical space
before (a) ... does not appear when using \startsubitems.  Why is that
so?

When I want to put the vertical space before the first subitem by means
of before={\blank[small]}, nothing happens.

Also, is \startitem ... \stopitem really better than \item ...?  (Apart
from the case when I use the [random] option.)

And finally: what is the difference between right=) and stopper=)?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 set the whole document flush left?

2012-10-25 Thread Marcin Borkowski
Hi,

I'd like to have all my document set flush left.  I know how to set
a \framed flush left, or \startalign ... \stopalign - but what about
the whole?  (In my current case, the document is basically a
(mid-aligned) title and then one big itemgroup, so I added
[align={right,broad}] to the \startitemize - but what about the general
case?  \raggedright did not work, at least for the itemization.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] A problem with \blank

2012-10-25 Thread Marcin Borkowski
Good evening,

I have something like this in my document:

\startalignment[middle]
  ...
\stopalignment

\startitemize
  ...
\stopitemize

and I want some (more) vertical space in between them.  Adding a
\blank[big] (and even a \blank[big,force]) didn't help.  Interestingly,
\leavevmode\blank[big] did.  What is going on?  What is the canonical
way to achieve what I want to have?

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Making math smaller

2012-10-25 Thread Marcin Borkowski
Hi again,

I promise this is my last question now - it's 1:00 AM here, I'm
starting to sleep;).  But how do I make my math smaller?
{\tfx\math{a^2+b^2=c^2}} won't work.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Making math smaller

2012-10-25 Thread Marcin Borkowski
Dnia 2012-10-26, o godz. 00:52:30
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Hi again,
 
 I promise this is my last question now - it's 1:00 AM here, I'm
 starting to sleep;).  But how do I make my math smaller?
 {\tfx\math{a^2+b^2=c^2}} won't work.

OK, one more;).  It turned out that \switchtobodyfont[small] did work.
So my question now becomes: why is that so?

 
 Best,
 

Even better;),

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to set the whole document flush left?

2012-10-25 Thread Marcin Borkowski
Dnia 2012-10-25, o godz. 15:50:49
Nicholas Ulle nau...@ucdavis.edu napisał(a):

 Hi,
 
 I suspect the command you're looking for is \setupalign[right]

Nope - it didn't work.  (Maybe it just does nothing for itemizations,
and my document was basically one big itemization?)

 Nick



-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to set the whole document flush left?

2012-10-25 Thread Marcin Borkowski
Dnia 2012-10-26, o godz. 00:56:41
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Dnia 2012-10-25, o godz. 15:50:49
 Nicholas Ulle nau...@ucdavis.edu napisał(a):
 
  Hi,
  
  I suspect the command you're looking for is \setupalign[right]
 
 Nope - it didn't work.  (Maybe it just does nothing for itemizations,
 and my document was basically one big itemization?)

OK, tested - I was right, it doesn't affect itemizations.  Isn't it a
bug?

  Nick

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] Vertical positioning of floats within itemize

2012-10-16 Thread Marcin Borkowski
Dnia 2012-10-16, o godz. 09:41:23
Hans Hagen pra...@wxs.nl napisał(a):

 On 16-10-2012 00:45, Marcin Borkowski wrote:
  It's me again!
 
  This doesn't quite work as expected (at least by me, that is;)):
 
  \starttext
 
  \startitemize
 \startitem
   \placefigure[right,high,none]{}{\framed[width=3cm,height=2cm]{!}}
   \input knuth
 \stopitem
  \stopitemize
 
  \stoptext
 
  (Namely, at the beginning of the \item there is something like a
  blank line.)
 
  If I move \placefigure before \startitem, it looks better, but this
  seems to be a nasty hack.  Do you have any idea how to achieve this
  effect in a more elegant way?
 
 tricky ... a place does some spacing before and after so that
 interferes with the item that places a bullet and expects text next
 
 it would also look kind of weird I guess, bullet - image - caption
 
 some kind of inline variant is needed then

Well, I meant the bullet and item text on the left and image on the
right.  Is it possible?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 put a \placefigure with no caption?

2012-10-15 Thread Marcin Borkowski
Hi there,

\placefigure[here]{none}{image} seems to actually typeset none as a
caption.  What do I do if I want no caption (not even the Figure 1
thing, in fact)?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] How to put a \placefigure with no caption?

2012-10-15 Thread Marcin Borkowski
Dnia 2012-10-15, o godz. 23:19:06
Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):

 
 Am 15.10.2012 um 23:16 schrieb Marcin Borkowski
 mb...@wmi.amu.edu.pl:
 
  Hi there,
  
  \placefigure[here]{none}{image} seems to actually typeset none
  as a caption.  What do I do if I want no caption (not even the
  Figure 1 thing, in fact)?
 
 \placefigure[none,…]{}{…}
 
 Wolfgang

Thanks a lot!  Added a clarification to the wiki.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___

Re: [NTG-context] How to put a \placefigure with no caption?

2012-10-15 Thread Marcin Borkowski
Dnia 2012-10-15, o godz. 23:22:28
Marco Patzer home...@lavabit.com napisał(a):

 2012-10-15 Marcin Borkowski:
 
 Hi Marcin
 
  \placefigure[here]{none}{image} seems to actually typeset none
  as a caption.  What do I do if I want no caption (not even the
  Figure 1 thing, in fact)?
 
 \startplacefigure [location=none]
   \externalfigure [cow]
 \stopplacefigure

Interesting.  Is

\startplacefigure[location=...]
  ...
\stopplacefigure

equivalent to \placefigure[...]{}{...}?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 get bolder and larger item symbol?

2012-10-15 Thread Marcin Borkowski
I'd like to have the number (and dot) in an itemize in boldface and
larger (say, \bf\tfa).  What do I do?

\startitemize[n][symstyle=bold]

didn't work.  Why?

TIA

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Controlling vertical position of floats

2012-10-15 Thread Marcin Borkowski
Hi again,

\placefigure[right,option]{caption}{figure}

does different things with option being (a) empty, (b) high, (c) low.
Could anyone explain to me the exact meaning of these three
alternatives?  Also, is it possible to manually fine-tune the vertical
position, so that the figure seems optically aligned with the
surrounding text?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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] Vertical positioning of floats within itemize

2012-10-15 Thread Marcin Borkowski
It's me again!

This doesn't quite work as expected (at least by me, that is;)):

\starttext

\startitemize
  \startitem
\placefigure[right,high,none]{}{\framed[width=3cm,height=2cm]{!}}
\input knuth
  \stopitem
\stopitemize

\stoptext

(Namely, at the beginning of the \item there is something like a blank
line.)

If I move \placefigure before \startitem, it looks better, but this
seems to be a nasty hack.  Do you have any idea how to achieve this
effect in a more elegant way?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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
___


Re: [NTG-context] Problem with PocketDiary

2012-09-24 Thread Marcin Borkowski
Dnia 2012-09-23, o godz. 10:42:08
Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):

 It’s a bug in the pocketdiayry code when the \color command is used.
 
 This snippet from the code shows two problems.
 
   context.bTD({style=red})context(d) context(~)
 context.labeltext(n) context(~\\color[black]) context.labeltext(f)
 context.eTD()
 
 1. The color for the table cell is set with “style=red” but the
 correct setting is “color=red”. Even though it’s wrong the output is
 correct because context has a \red command which colors the content
 of the current group red.
 
 2. The \color command takes a argument, e.g.
 \color[colorname]{text} but here it’s used like a color switch
 (e.g. \red) which is active till the end of the group. Changing this
 will make the error message disappear.

Thanks a lot!

I changed the above line to

context.bTD({color=red})context(d) context(~) context.labeltext(n)
context(~\\color[black]{) context.labeltext(f) context(})
context.eTD()

and it seems to work.  May I ask for changing it in the official
source, too?

 
 Wolfgang
 

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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
___

Re: [NTG-context] Multi-paragraph quotations according to AP

2012-09-24 Thread Marcin Borkowski
Dnia 2012-09-24, o godz. 23:24:31
Sietse Brouwer sbbrou...@gmail.com napisał(a):

 If you have time, could you add a note explaining those keys to
 http://wiki.contextgarden.net/Command/setupdelimitedtext
 ? I'd be much obliged.

I ninja'd you!  (Know the power of procrastination;)!)

 Kind regards, and good luck with your work,
 Sietse

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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] Problem with PocketDiary

2012-09-22 Thread Marcin Borkowski
/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats   resource resolver - loadtime 0.102 seconds, 1
scans with scantime 0.008 seconds, 6 shared scans, 29 found files,
scanned paths: /home/marcin/texmf mkiv lua stats   stored bytecode
data  - 312 modules (0.710 sec), 66 tables (0.020 sec), 378 chunks
(0.730 sec) mkiv lua stats   cleaned up reserved nodes - 44 nodes, 12
lists of 442 mkiv lua stats   node memory usage - 12 hlist, 37
glue, 23 kern, 11 penalty, 22 unset, 9 glyph, 4 align_record, 1 span,
143 attribute, 39 glue_spec, 45 attribute_list, 8 temp, 1 align_stack,
1 if_stack, 1 local_par, 4 dir mkiv lua stats   node list callback
tasks  - 6 unique task lists, 5 instances (re)created, 177 calls mkiv
lua stats   used backend  - pdf (backend for directly
generating pdf output) mkiv lua stats   loaded tex modules- 1
requested, 1 found (*-pocketdiary), 0 missing mkiv lua stats   loaded
patterns   - en::2 nl::1 mkiv lua stats   jobdata
time  - nothing saved, 0.004 seconds loading mkiv lua
stats   callbacks - 983 direct, 2080 indirect, 3063
total mkiv lua stats   randomizer- resumed with value
0.078700544814905 mkiv lua stats   lxml preparation time - 0.000
seconds, 0 nodes, 3 lpath calls, 0 cached calls mkiv lua stats  
result saved in file  - 2012-09-22.pdf, compresslevel 3,
objectcompreslevel 3 mkiv lua stats   loaded fonts  - 12
files: lmmono10-regular.otf lmsans10-regular.otf
texgyrepagella-bold.otf texgyrepagella-bolditalic.otf
texgyrepagella-regular.otf pxex.tfm pxsy.tfm pxsya.tfm pxsyb.tfm
rpxmi.tfm rpxpplri.tfm rpxr.tfm mkiv lua stats   fonts load
time   - 1.060 seconds mkiv lua stats   running on
path   - /home/marcin/Dokumenty/marcin/rozne/pocketdiary mkiv
lua stats   job file properties   - jobname: 2012-09-22.tex,
input: 2012-09-22.tex, suffix: tex mkiv lua stats   luatex
banner - this is luatex, version beta-0.70.1-2012052416
(rev 4277) mkiv lua stats   control sequences - 36504 of 65536
+ 10 mkiv lua stats   current memory usage  - 25 MB (ctx: 26
MB) mkiv lua stats   runtime   - 4.719 seconds, 1
processed pages, 1 shipped pages, 0.212 pages/second
 end log file


-- 
Marcin Borkowski
http://mbork.pl
___
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] Can't generate an epub - what am I doing wrong?

2012-08-09 Thread Marcin Borkowski
Hello all,

my problem is as in the topic;).  The minimal example from the wiki
works fine, but this does not:


\setupbackend[export=yes,xhtml=yes]

\settaggedmetadata
  [title=My Document,
   author=A. U. Thor]

\starttext

\startchapter[title={First chapter}]
\input tufte  
\stopchapter

\startchapter[title={Second chapter}]
\input knuth
\stopchapter
\stoptext


The resulting epub file (after the mtxrun, of course) does not contain
any metadata; also, there is no chapter structure whatsoever.

What am I missing?

TIA,

-- 
Marcin Borkowski
http://mbork.pl


-- 
Marcin Borkowski
http://mbork.pl
___
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
___


Re: [NTG-context] Can't generate an epub - what am I doing wrong?

2012-08-09 Thread Marcin Borkowski
Dnia 2012-08-09, o godz. 14:33:36
Rogers, Michael K mrog...@emory.edu napisał(a):

 Hi,
 
 I don't seem to have an epub reader that can format the output.  (MS
 Word complain there was no xslt file,  But the xhtml file produced
 contains the metadata and the document structure.  Output pasted
 below.
 
 Michael

Agreed, but opening in fbreader showed blank screen, and in sigil I saw
the text but not divided into chapters.

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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] A strange problem, probably with \startitemize[columns]

2012-07-28 Thread Marcin Borkowski
Hello,

I am a bit afraid to gain a nickname the itemize-column guy, but it
seems that again there's a problem with this feature...  Unfortunately,
I did not manage to isolate the problem, so maybe it lies somewhere
completely else.  Anyway, sorry for spamming the list again with a
complete file of one of my documents (it's all Polish to most of you
anyway;)), but it compiles succesfully, but very strangely (it looks
like \vsize  \paperheight) on newest ConTeXt (it used to look just
fine about three weeks ago).

Any clues?

-- 
Marcin Borkowski
http://mbork.pl

% Ćwiczenia na Newtona o grach

\mainlanguage[pl]

\usetypescript[pagella]
\setupbodyfont[pagella]

\usemodule[tikz]
\usetikzlibrary[calc]
\let\origstarttikzpicture=\starttikzpicture
\let\origstoptikzpicture=\stoptikzpicture
\def\starttikzpicture{\hbox\bgroup\origstarttikzpicture}
\def\stoptikzpicture {\origstoptikzpicture\egroup}

\def\todo#1{{\em \kap{do dopisania}: #1}}

%\setupinteraction[state=start]

\enablemode[nauczyciel]
%\disablemode[nauczyciel]

\def\startteacher{\grabbufferdata[teacher][startteacher][stopteacher]}
\doifmodeelse{nauczyciel}{\def\stopteacher{\par{\switchtobodyfont[small]\getbuffer[teacher]\par}}}{\def\stopteacher{}}

\def\startanswer{\par\dostartbuffer[answer][startanswer][stopanswer]}
\doifmodeelse{nauczyciel}{\def\stopanswer{{\switchtobodyfont[small]\blank[small]{\sl Odpowiedź.} \getbuffer[answer]\par}}}{\def\stopanswer{}}

\def\putdotafter#1{#1.}
\setuphead[subject][style=bold,after={},alternative=text,distance=0.25em,textcommand=\putdotafter]
%\setuphead[section][numbercommand=\putdotafter]
\setuphead[chapter][sectionstopper=.,page=no]

\def\teacheronly#1{\doifmode{nauczyciel}{#1}}
\def\time#1{\doifmode{nauczyciel}{\removeunwantedspaces
\hskip 0pt plus 6em\penalty20\ \hskip 0pt plus -6em (#1~minut)}}

\defineitemgroup[exercises]
\setupitemgroup[exercises][1][n,broad,intro][left={\headnumber[chapter]},before={},inbetween={\blank[medium]}]

\def\ppauza{\unskip\kern.2em--\hskip.2em\ignorespaces}

\starttext

\noheaderandfooterlines
\startalignment[middle]
  \tfd Gry (materiały na ćwiczenia w~czwartek)
  \par\blank[big]
\stopalignment

\startnotmode[nauczyciel]
  \placefigure[bottom,none]{}{%
\hbox to \textwidth{
\externalfigure[logo-1-t][height=1.5cm]\hfil
\externalfigure[logo-2-t][height=1.5cm]\hfil
\externalfigure[logo-3-t][height=1.5cm]
  }}
\stopnotmode


\completecontent[alternative=a,pagestyle=slanted,distance=2pt]
\page

\startchapter[title={Gry macierzowe\time{15--20}}]

\startexercises
  \startitem
Jakie są strategie optymalne dla obu graczy w~grze o~poniższej
macierzy?
\startformula
  \startmathmatrix[n=2,left={\left(\,},right={\,\right)},align=right]
\NC 1 \NC 2 \NR
\NC 3 \NC 4 \NR
  \stopmathmatrix
\stopformula
\startteacher
  Macierz interpretujemy następująco: I~gracz wybiera wiersz,
  II~gracz wybiera kolumnę (obaj robią to równocześnie), po czym
  II~gracz wypłaca pierwszemu kwotę z~przecięcia wybranego wiersza
  i~kolumny (gra o~sumie zero: wygrana jednego gracza jest równa
  przegranej drugiego).
\stopteacher
\startanswer
  Pierwszy gracz, wybierając drugi wiersz, w~każdym wypadku
  wygrywa więcej, niż gdyby wybrał pierwszy; powinien więc wybrać
  drugi wiersz (dominujący).  Drugi gracz, wybierając pierwszą
  kolumnę, w~każdym przypadku traci mniej, niż gdyby wybrał drugą;
  powinien więc wybrać pierwszą (dominującą) kolumnę.
\stopanswer
  \stopitem
  \startitem
Rozważmy grę z~następującą macierzą:
\startformula
  \startmathmatrix[n=3,left={\left(\,},right={\,\right)},align=right]
\NC 4 \NC 1 \NC -1 \NR
\NC 0 \NC 1 \NC  6 \NR
\NC 3 \NC 2 \NC 5  \NR
  \stopmathmatrix
\stopformula
Jaka jest optymalna strategia dla każdego z~graczy?
\startanswer
  Żaden wiersz ani kolumna nie są dominujące, ale ponieważ
  \math{2} w~trzecim rzędzie i~drugiej kolumnie jest {\em
najmniejszą} wartością w~swoim rzędzie i~{\em największą}
  wartością w~swojej kolumnie, optymalną strategią dla I~gracza
  jest trzecia (wygra co najmniej~\math{2} niezależnie od
  strategii II~gracza), a~dla II~gracza druga (przegra co
  najwyżej~\math{2} niezależnie od strategii I~gracza).
\stopanswer
  \stopitem
  \startitem
Gra {\em parzyste czy nieparzyste} polega na tym, że dwóch graczy
wybiera (równocześnie) liczbę \math{1} lub~\math{2}.  Jeśli suma
wybranych liczb jest nieparzysta, wygrywa gracz~I; jeśli jest
parzysta, wygrywa gracz~II.  Gracz, który przegrał, oddaje
drugiemu kwotę równą sumie wybranych liczb.  Narysujcie macierz
tej gry.  Jaka jest optymalna strategia każdego z~graczy?  Czy gra
jest sprawiedliwa?
\startteacher
  To zadanie możemy opuścić lub omówić pobieżnie bez większej
  szkody.
\stopteacher

[NTG-context] A Lorem ipsum module?

2012-07-18 Thread Marcin Borkowski
Hi all,

in LaTeX, there is quite a useful package called lipsum, for
typesetting varioud amounts of Lorem ipsum stuff.  Is there anything
like that in ConTeXt?  (I know about \input knuth, \input tufte etc.,
but that is not exactly what I have in mind, especially when giving a
sample of some design to a customer;).)

If not (as I suspect), what should I do to write such a module?  I
expect this shouldn't be too difficult, and I could learn a few things
(like using key-value syntax in ConTeXt, for instance); are there any
recommendations for people wanting to learn to write a (simple) module
for ConTeXt (other than the relevant wiki page)?  For example, which
existing modules might I want to take and read the source code of?

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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
___


Re: [NTG-context] two more bugs in latest

2012-07-10 Thread Marcin Borkowski
Dnia 2012-07-10, o godz. 09:57:08
Hans Hagen pra...@wxs.nl napisał(a):

 On 10-7-2012 08:27, Thomas A. Schmitz wrote:
 
  sorry for bringing the bad news all the time... There are two more
  bugs in the latest beta which I just stumbled upon:
  userpage=bysection does not work, pdf bookmarks are not produced.
  Example:
 
 in the process of cleaning up section code i forgot to pass some info 
 around so effectively we had no structure (and that it turn
 influences all those mechanisms)
 
 concerning 'bad news' ... it doesn't surprise me too much as much
 code is touched ... the good news is that only a few modules are left
 (some cleanup is needed in notes and the multi column mechanisms have
 to be done)

Wow, does it mean that \startitemize[columns] ... \stopitemize will
also be redone?  That would be fantastic, it's a feature I love but
can't get it to work (as I've written recently)!

 Hans

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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] Centering a figure vertically on a page

2012-07-03 Thread Marcin Borkowski
Hello,

the subject line basically covers my problem: I have a large (tikz)
figure, and I want to have it by itself on a page, centered both
horizontally and vertically.  How can I achieve this?  I already know
that \setuppagenumber[state=stop] is a good idea, and \midaligned{...}
gives me horizontal centering; what about vertical?  The problem is
that the figure is larger than the text area (and this doesn't bother
me, it's a game board and it may extend almost to the paper border),
so \vfill doesn't work (and \vss doesn't, either).

TIA

-- 
Marcin Borkowski
http://mbork.pl
___
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
___


Re: [NTG-context] Centering a figure vertically on a page

2012-07-03 Thread Marcin Borkowski
Dnia 2012-07-03, o godz. 13:30:22
Wolfgang Schuster schuster.wolfg...@gmail.com napisał(a):

 
 Am 03.07.2012 um 13:21 schrieb Marcin Borkowski:
 
  Hello,
  
  the subject line basically covers my problem: I have a large (tikz)
  figure, and I want to have it by itself on a page, centered both
  horizontally and vertically.  How can I achieve this?  I already
  know that \setuppagenumber[state=stop] is a good idea, and
  \midaligned{...} gives me horizontal centering; what about
  vertical?  The problem is that the figure is larger than the text
  area (and this doesn't bother me, it's a game board and it may
  extend almost to the paper border), so \vfill doesn't work (and
  \vss doesn't, either).
 
 \starttext
 %\noheaderandfooterlines
 \centerbox{\externalfigure[cow]}
 \stoptext
 
 Wolfgang

Thanks a lot, it works!

-- 
Marcin Borkowski
http://mbork.pl
___
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
___

Re: [NTG-context] itemize in two columns and pagebreaks

2012-06-30 Thread Marcin Borkowski
Dnia 2012-06-30, o godz. 07:05:36
Otared Kavian ota...@gmail.com napisał(a):

 Hi,
 
 The mechanisms of columns in itemize (which I think is the same as
 startcolumns) and in simplecolumns are indeed different, as Hans
 indicated once. The issue you encountered is indeed a bug as you
 point out: once (a few months ago) I had an analogous problem and
 Wolfgang S. suggested me to use simplecolumns to avoid the strange
 page breaks.

Oh, now I remember: I found that thread when searching through the
archives!

Hans, are there any chances of fixing this?  (Not necessarily within
hours/days, of course, maybe months, but not years;)?)

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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] Two questions about buffers

2012-06-30 Thread Marcin Borkowski
Hello,

I have two questions concerning buffers.

1. What is the difference between \grabbufferdata and \dostartbuffer?

2. I wanted to use buffers to define my own environment (as Wolfgang
suggested to me a few days ago).  However, there's a problem with
\baselineskip; here is an example:

\starttext

\def\startMyEnv{\dostartbuffer[MyEnv][startMyEnv][stopMyEnv]}
\def\stopMyEnv{{\tfxx\getbuffer[MyEnv]\par}}

\input tufte

\startMyEnv
  \input knuth
\stopMyEnv

\input tufte

\stoptext

Am I doing something wrong here?

TIA

-- 
Marcin Borkowski
http://mbork.pl
___
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] Problems with \completecontent

2012-06-30 Thread Marcin Borkowski
Hi,

I'd like to make the distance between the chapter number and the title
(and between the title and pagenumber with alternative=a) smaller.  How
to do that?  [distance=0.5em] didn't work.

Also, I'd like to have the pagenumbers slanted; I tried
[pagestyle=slanted], but it didn't work either.

Any ideas?

-- 
Marcin Borkowski
http://mbork.pl
___
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] itemize in two columns and pagebreaks

2012-06-29 Thread Marcin Borkowski
Hello,

I encountered a weird problem with

\startitemize[columns]

Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the
itemization.  I tried to distill the problem to a minimal example,
until now without success, but I'll post a ME if I'm able to reproduce
a problem in a small file.

Anybody encountered this, too?  Are there any solutions/workarounds
known?

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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
___


Re: [NTG-context] itemize in two columns and pagebreaks

2012-06-29 Thread Marcin Borkowski
Dnia 2012-06-29, o godz. 23:30:13
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Hello,
 
 I encountered a weird problem with
 
 \startitemize[columns]
 
 Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the
 itemization.  I tried to distill the problem to a minimal example,
 until now without success, but I'll post a ME if I'm able to reproduce
 a problem in a small file.

OK, so I didn't succeed in isolating this problem.  I attach the
complete file (it's in Polish, sorry;)).  The problem appears at page 3
in the resulting pdf (line 141 of the source file).

 Anybody encountered this, too?  Are there any solutions/workarounds
 known?

I naively tried putting \page[no] in various places around the
problematic line, but to no avail.  Also, while trying to isolate the
problem, for instance by removing things before the itemization, it
turned out that it's difficult to reproduce it: often, everything is
fine (at the beginning of the page as well as near the end).

Any ideas?

-- 
Marcin Borkowski
http://mbork.pl

% Ćwiczenia na Newtona o grach

\mainlanguage[pl]

\usetypescript[pagella]
\setupbodyfont[pagella]

\def\todo#1{{\em \kap{do dopisania}: #1}}

\enablemode[nauczyciel]

\def\startteacher{\grabbufferdata[teacher][startteacher][stopteacher]}
\doifmodeelse{nauczyciel}{\def\stopteacher{\getbuffer[teacher]}}{\def\stopteacher{}}

\def\startanswer{\grabbufferdata[answer][startanswer][stopanswer]}
\doifmodeelse{nauczyciel}{\def\stopanswer{\blank[small]{\sl Odpowiedź.} \getbuffer[answer]}}{\def\stopanswer{}}

\def\putdotafter#1{#1.}
\setuphead[subsubject][style=bold,after={},alternative=text,distance=0.25em,textcommand=\putdotafter]
\setuphead[section][numbercommand=\putdotafter]
\setuphead[chapter][numbercommand=\putdotafter,page=no]

\defineitemgroup[exercises]
\setupitemgroup[exercises][1][n][before={},inbetween={\blank[medium]}]

\def\ppauza{\unskip\kern.2em--\hskip.2em\ignorespaces}

\starttext

\startalignment[middle]
  \tfb Gry (materiały na ćwiczenia w~czwartek)
  \par\blank[big]
\stopalignment

\completecontent


\startchapter[title={Gry macierzowe}]

\startexercises
  \startitem
Jakie są strategie optymalne dla obu graczy w~grze o~poniższej
macierzy?
\startformula
  \startmathmatrix[n=2,left={\left(\,},right={\,\right)},align=right]
\NC 1 \NC 2 \NR
\NC 3 \NC 4 \NR
  \stopmathmatrix
\stopformula
\startanswer
  Pierwszy gracz, wybierając drugi wiersz, w~każdym wypadku
  wygrywa więcej, niż gdyby wybrał pierwszy; powinien więc wybrać
  drugi wiersz (dominujący).  Drugi gracz, wybierając pierwszą
  kolumnę, w~każdym przypadku traci mniej, niż gdyby wybrał drugą;
  powinien więc wybrać pierwszą (dominującą) kolumnę.
\stopanswer
  \stopitem
  \startitem
Rozważmy grę z~następującą macierzą:
\startformula
  \startmathmatrix[n=3,left={\left(\,},right={\,\right)},align=right]
\NC 4 \NC 1 \NC -1 \NR
\NC 0 \NC 1 \NC  6 \NR
\NC 3 \NC 2 \NC 5  \NR
  \stopmathmatrix
\stopformula
Jaka jest optymalna strategia dla każdego z~graczy?
\startanswer
  Żaden wiersz ani kolumna nie są dominujące, ale ponieważ
  \math{2} w~trzecim rzędzie i~drugiej kolumnie jest {\em
najmniejszą} wartością w~swoim rzędzie i~{\em największą}
  wartością w~swojej kolumnie, optymalną strategią dla I~gracza
  jest trzecia, a~dla II~gracza druga.
\stopanswer
  \stopitem
  \startitem
Gra {\em parzyste czy nieparzyste} polega na tym, że dwóch graczy
wybiera (równocześnie) liczbę \math{1} lub~\math{2}.  Jeśli suma
wybranych liczb jest nieparzysta, wygrywa gracz~I; jeśli jest
parzysta, wygrywa gracz~II.  Gracz, który przegrał, oddaje
drugiemu kwotę równą sumie wybranych liczb.  Narysuj macierz tej
gry.  Jaka jest optymalna strategia każdego z~graczy?  Czy gra
jest sprawiedliwa?
\startanswer
  Macierz:
  \startformula
\startmathmatrix[n=2,left={\left(\,},right={\,\right)},align=right]
\NC -2 \NC  3 \NR
\NC  3 \NC -4 \NR
\stopmathmatrix
  \stopformula
  Powyższa macierz nie ma strategii dominujących ani punktów
  siodłowych, trzeba więc zastosować inną metodę.

  Załóżmy, że gracz~I wybiera~\math{1}
  z~prawdopodobieństwem~\math{p} i~\math{2}
  z~prawdopodobieństwem~\math{1-p}.  Wyznaczymy~\math{p} tak, żeby
  gracz~I wygrywał przeciętnie {\em tyle samo}, obojętnie, co
  zrobi gracz~II.

  Jeśli gracz~II wybierze~\math{1}, przeciętna wygrana~I wynosi
  \math{-2p+3(1-p)}.  Jeśli II wybierze~\math{2}, przeciętna
  wygrana~I wynosi~\math{3p-4(1-p)}.  Aby wartości te były równe,
  musi być \math{p=\frac{7}{12}}.  Zatem gracz~I powinien
  wybrać~\math{1} z~prawdopodobieństwem \math{\frac{7}{12}},
  a~\math{2} z~prawdopodobieństwem~\math{\frac{5}{12}}.  Jego
  przeciętna wygrana

Re: [NTG-context] itemize in two columns and pagebreaks

2012-06-29 Thread Marcin Borkowski
Dnia 2012-06-30, o godz. 05:05:31
Otared Kavian ota...@gmail.com napisał(a):

 Hi Marcin,
 
 I tested your file and noticed the issue you are reporting. In your
 case you can use \startsimplecolumns to get rid of the page break
 (however there is a small problem with the distance between the text
 and the items): 

I knew that - but as you probably have noticed, the columns done by
\startsimplecolumns and by \startitemize[columns] do not align
correctly.  So this is rather a workaround than a solution.  (Well,
thanks anyway!)

Currently I changed the file a bit and the problem disappeared,
but still I'd like to know what's going on, since this tends to happen
from time to time.  (And this bug - because I guess it's a bug indeed -
has been around for quite a few years: I noticed it for the first time
something like 3 years ago...)

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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] A problem with modes

2012-06-26 Thread Marcin Borkowski
Hello,

this doesn't work for me:

\definestartstop[amode][before={\startmode[a]},
after={\stopmode}]

\starttext

All modes.
\startamode
  ``A'' mode.
\stopamode

\stoptext

Can I use \startmode with \definestartstop?  Or is there a better way
to do something like this?

TIA

-- 
Marcin Borkowski
http://mbork.pl
___
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
___


  1   2   3   4   >