[NTG-context] inside and outside margins (vs. 'left' and 'right' margins)

2011-04-09 Thread James Fisher
I want to define 'inside' and 'outside' margins (i.e. left and right pages
are symmetrical, not the same).  Reading the document 'co-pagedesign.pdf',
ConTeXt talks about 'left' and 'right' margins (and other measurements).  At
first I thought this must be either a 'representative' left or right page
(the diagram on page 3 doesn't say which), but experimenting suggests that
there really is no concept of left and right pages here (despite the
incredible detail that the document goes into on arranging pages etc which
must understand this).

In short this is a basic requirement.  How do I solve it?


James
___
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] inside and outside margins (vs. 'left' and 'right' margins)

2011-04-09 Thread James Fisher
Hi Otared,


Thanks.  Two problems here:

- the \inoutermargin and \ininnermargin commands add text to the margins.  I
can set it to no text, but I don't see why they would be necessary to define
inner and outer margin size.
- the location=doublesided looks like what I was looking for, but it doesn't
affect anything! (Nor does duplex.) Every page still has the same margins
irrespective of whether they're even or odd.

James

On Sat, Apr 9, 2011 at 9:34 PM, Otared Kavian ota...@gmail.com wrote:

 Hi James,

 You can use
\inoutermargin{some marginal note}
 and
\ininnermargin{some marginal note}
 Then when you use
\setuplayout[location=doublesided]
 at the beginning of your file, the above two commands should give you what
 you seem to be wanting.

 Best regards: OK

 On 9 avr. 2011, at 22:26, James Fisher wrote:

  I want to define 'inside' and 'outside' margins (i.e. left and right
 pages are symmetrical, not the same).  Reading the document
 'co-pagedesign.pdf', ConTeXt talks about 'left' and 'right' margins (and
 other measurements).  At first I thought this must be either a
 'representative' left or right page (the diagram on page 3 doesn't say
 which), but experimenting suggests that there really is no concept of left
 and right pages here (despite the incredible detail that the document goes
 into on arranging pages etc which must understand this).
 
  In short this is a basic requirement.  How do I solve it?
 
 
  James
 
 ___
  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
 
 ___



 ___
 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

 ___

___
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] inside and outside margins (vs. 'left' and 'right' margins)

2011-04-09 Thread James Fisher
On Sat, Apr 9, 2011 at 10:11 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Sat, 9 Apr 2011, Henning Hraban Ramm wrote:


 Am 2011-04-09 um 22:26 schrieb James Fisher:

  I want to define 'inside' and 'outside' margins (i.e. left and right
 pages are symmetrical, not the same).  Reading the document
 'co-pagedesign.pdf', ConTeXt talks about 'left' and 'right' margins (and
 other measurements). At first I thought this must be either a
 'representative' left or right page (the diagram on page 3 doesn't say
 which), but experimenting suggests that there really is no concept of left
 and right pages here (despite the incredible detail that the document goes
 into on arranging pages etc which must understand this).

 In short this is a basic requirement.  How do I solve it?


 As stated on http://wiki.contextgarden.net/Layout :
 You define always a right page; if you use a double page layout 'right'
 and 'left' values are mirrored on a left page.


 A concerete example:

 \setuplayout
[backspace=5cm,
 cutspace=2cm,
 leftmargin=4cm,
 rightmargin=1cm,
 width=middle]

 \setuppagenumbering[alternative=doublesided]

 \showframe

 \starttext
 \dorecurse{8}{Page \recurselevel \page}
 \stoptext


Aha, so this works -- thanks Aditya.  Although it seems strange that this is
hidden under 'page numbering' which (I would say) is nothing to do with page
margins!

James
___
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] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
On Thu, Mar 4, 2010 at 7:10 AM, luigi scarso luigi.sca...@gmail.com wrote:

 On Thu, Mar 4, 2010 at 3:35 AM, James Fisher jameshfis...@gmail.com
 wrote:

  - In my humble opinion, TeXies need to get out of the habit of
  'self-documenting' TeX using TeX itself.  TeX is not some replacement for
  all markup, it's for producing beautiful books (OK, and some
 presentations);
 I think that self-documenting in TeX is 20year olds now --- it
 started with Latex209 ,I believe.



 So, thoughts?
 Yes from http://sphinx.pocoo.org/
 Sphinx is a tool that makes it easy to create intelligent and
 beautiful documentation
 but I believe that ConTeXt is better

 * Output formats: HTML (including Windows HTML Help) and LaTeX,
 for printable PDF versions
 Are you suggesting to use LaTeX to document ConTeXt source ?


lol; I thought this might come up.  I have a couple of replies to that:

(1) First and most important: I'm not suggesting that we use TeX to document
things at all.  I'm suggesting that ConTeXt documentation should be
accessible to newcomers in the same format as 99% of all other projects:
good old HTML.  On the web (which you are), HTML is king.  TeX and PDFs are
no replacement for the interconnected power of the web.  When I want a quick
piece of information in 10 seconds, I do not want to consult a
hand-collected folder of PDFs, or google for it and wait the age for a PDF
to load.  That kind of feeling, I guess, is the reason that the
contextgarden wiki exists.  But nor is Mediawiki is really not the most
appropriate way to document a project.  Wikis are messy and unstructured.
They don't lend themselves well to the hierarchical kind of structure
appropriate for representing a codebase.  So I'm suggesting that ConTeXt be
documented using a typical established documentation system.

(2) The docutils codebase (which manages reStructuredText) is modularized
extremely well.  Output formats can be written with a minimum of effort.
The docutils document tree looks a lot like XML, and as such making ConTeXt
output possible is just doing the standard XML-to-TeX conversion.  I have in
fact, while using ConTeXt, been writing a crude docutils ConTeXt writer
(though quite a way to go).



 About model of development: one developer is not so strange afterall .

 In other situations maybe this is not adequate, in this situation
 actually it's the best choice
 (where for my experience actually goes
 from   10year ago until now).

 For example mkii is frozen while mkiv is at 50%, if we consider that
 luatex 0.50 is at 50%, and luatex 1.0 will be 100%:
 btw mkiv is really usable, not in some fuzzy alpha state (frozen is
 not a bad word : tex is frozen from ~1990, pdftex is cold, ie
 changes a little, luatex is hot)


I'm not sure what your point is here.  That user contribution leads to
'featuritis'?  I totally understand that being 'frozen' is not a bad thing;
it effectively means 'having reached a state of perfection for the defined
task' -- I don't think this has a connection with having one developer.
More developers == faster rate of approach to the limit of perfection.



 This model doesn't imply that you cannot contribute to the code base
 but only that all contributions need to be  validate (and possible
 rejected) and integrate by developer,.
 You can also contribute with third part modules, but they are not in
 base code and in case of conflicts code base wins.


Sure thing -- revision control doesn't hinder that at all.  If Hans doesn't
want to merge someone else's changes to his (authoritative) copy of the
repo, then he doesn't have to.  DVCS != chaos.


 There is no need for a public dcvs : for mkiv there is always one beta
 version, the last one.
 Errors will be fixed in next beta. This imply that you must be
 prepared to patch your macros/stylesheets
 to match with last version


This sounds circular to me: there's always one beta version *because*
there's no revision control.


 Patrick thinks
 that a public git is a good idea and me too, but
 one can always manage his personal dcvs --- which is a good idea to
 understand code evolution on a particularly subject
 (I believe the Arthur has an historical archive )


Sure, I do it for my pithy projects.  All that I've learned is that I could
even less do without it if my projects were large, like ConTeXt.


 For comparison, luatex  project is developed in traditional manner:
 svn, bug tracker,  manual (in context mkii ): the code base is in C
 with target CWEB .


Mm, well, I kinda have the same opinions towards luatex documentation.


 You can think at luatex as low-level layer which development  is
 driven by mkiv, a very high level layer,
 which development is influenced by luatex itself (a sort of negative
 feedback see http://  I understand that
 concern,en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Control_theory
 )


Again not sure what your point is -- LuaTeX and MKIV influence each other,
so ..



 As I said
 the language

Re: [NTG-context] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
Hi Aditya,

On Thu, Mar 4, 2010 at 4:06 AM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 4 Mar 2010, James Fisher wrote:

  Right, to show I'm not just empty words, I've just spent ~90 minutes
 preparing the beginnings of some decent documentation.  Presenting
 http://github.com/eegg/ConTeXt-doc : basically, I've:


 Interesting.


  (2) converted it all to reStructuredText using html2rest.py (
 http://bitbucket.org/djerdo/musette/src/tip/musette/html/html2rest.py)


 The values in texwebshow are generated from xml files
 http://source.contextgarden.net/tex/context/interface/cont-en.xml


Well now, that's interesting.  May I ask where that XML itself comes from?
Is it hand-maintained by Hans/Taco/Patrick?



  - There's a hella lot of documentation to do here.  Most of the pages in
 texshow are just placeholders.  There's also massive capabilities in
 something like Sphinx to organize the code documentation with sensible
 commentaries.


 Someone will still need to *write* the details. That has been the biggest
 bane of ConTeXt documentation. Almost all documentation is written by Hans
 and Taco and currently they want to focus on development and advanced
 documentation, and not converting all documentation to an organized html.


Of course.  So before people offer to write documentation, the barriers to
it being written have to be lowered.  No sane person wants to (read: *I*
don't want to) hand-maintain one massive XML file.



  - In my humble opinion, TeXies need to get out of the habit of
 'self-documenting' TeX using TeX itself.  TeX is not some replacement for
 all markup, it's for producing beautiful books (OK, and some
 presentations);
 in any case, this habit smacks of introversion.


 In this case it is not a question of markup, but of the output format, and
 whether the source and the documentation are in sync or not. Basically,
 context sources are documented as

 %D documentation ...

 \tex code

 %D documentation

 \tex code

 In principle, we can replace the markup in the documentation to xml or an
 ascii markup. It is easy enough to extract the %D lines and post-process
 them by any tool that you like. The biggest advantage of using a pdf output
 is that we can show the output of code snippets. For example,

 \startbuffer
 some tex code
 \stopbuffer

 \typebuffer

 gives

 \getbuffer

 thereby ensuring that the documentation is showing the correct behavior. To
 do this in html requires additional context run, converting the output to
 png, and displaying the png (this is how the wiki treats  context ...
 /context tags).


That is also something to think about.  But I don't think it's really a
serious problem -- the Mediawiki context works well enough.  In terms of
user-friendliness I would say it works better than in a massive PDF -- I
would rather consult an image on the web.

It wouldn't be too hard to alter Sphinx (as a for example; I suggest Sphinx
so we can talk concretely) so that all TeX-markupped code is shown
side-by-side as [ syntax-highlighted code | ConTeXt output as PNG ].  (This
would be an improvement on the wiki implementation where the TeX code is
duplicated in the source.)



  - Why on earth is there a git repository that is just slave storage?  That
 uses about 1% of its capabilities; it seems a terrible waste.


 Because ConTeXt has only 1 main developer :-)


Again I smell circular reasoning :) ... I suppose at this point I want to
ask Hans personally: is cutting everyone else out from the workflow a design
decision?



 Aditya



p.s.; I've been updating documentation of 'Enumerations' in the git repo --
I've chosen to develop a little patch of code as an example of what
documentation code be across the board.



Best,



James



 ___
 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

 ___

___
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] setbreakpoints

2010-03-04 Thread James Fisher
*tumbleweed*

On Wed, Mar 3, 2010 at 11:09 PM, Vyatcheslav Yatskovsky 
yatskov...@gmail.com wrote:

 Hi Wolfgang,

 To be serious, what  \setbreakpoints[] do? I want to wikify this command.

 Vyatcheslav

 ___
 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

 ___

___
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] suggestions for context documentation

2010-03-04 Thread James Fisher
Hi Peter,


Thanks for your thoughts.  I have wondered previously (in other projects)
about the legitimacy of a distinction between manuals and command
references.  With a lot of effort, it can work -- but to make it work,
duplication is inevitable.  Manuals simply have to make references to
commands, and I suspect that a 'comprehensive' user-friendly user manual is
nothing but a comprehensive command reference, with the commands organised
in a human way, with interspersed commentary, suggestions for use, and
examples of usage.

I'm in complete agreement, though, that however this is done, a VCS is
necessary.  (I'm plugging git as my favourite, but it's just the principle
I'm arguing for here.)


James


On Thu, Mar 4, 2010 at 2:41 PM, Peter Münster pmli...@free.fr wrote:

 Hello,

 These suggestions are a bit a reply to the thoughts of James Fisher.

 It would be nice, to have once in the future at least 2 up to date context
 documentations:

 - a context user manual
 For me, it's the merge of all scattered articles and manuals. Each chapter
 treats a particular subject, such as columns or footnotes.
 It seems, that Taco is working on such a manual.

 - a context command reference manual
 This is just the xml-database used by texshow. Each command should be
 described in detail with every possible options.
 On the one hand, texshow uses this database, on the other hand a well
 structured command reference can be generated as pdf-file.

 Filling in all the details in both projects is a lot of work, so perhaps it
 would be a good idea, to set up a system, that makes it easy for users to
 contribute to these projects (patches) and easy for Taco and Hans to
 acknowledge or reject those patches.

 This system would be nothing else as some vcs (git or svn for example)
 with some commit-hooks, that manage the acknowledgement by Hans and Taco
 (and perhaps others).

 The tex-files of the user-manual are already under version control, and the
 xml-database is only the cont-en.xml file, that would need to be put under
 version control too.

 So, perhaps with not too much effort, users can be easily invited to
 contribute to the documentation projects and the quality can be assured
 through the acknowledgements of the developers.

 Cheers, Peter

 --
 Contact information: http://pmrb.free.fr/contact/



 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
On Thu, Mar 4, 2010 at 5:11 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 4 Mar 2010, James Fisher wrote:

  On Thu, Mar 4, 2010 at 4:06 AM, Aditya Mahajan adit...@umich.edu wrote:

  On Thu, 4 Mar 2010, James Fisher wrote:

  (2) converted it all to reStructuredText using html2rest.py (

 http://bitbucket.org/djerdo/musette/src/tip/musette/html/html2rest.py)


 The values in texwebshow are generated from xml files
 http://source.contextgarden.net/tex/context/interface/cont-en.xml


  Well now, that's interesting.  May I ask where that XML itself comes
 from?
 Is it hand-maintained by Hans/Taco/Patrick?


 It is hand maintained. Ideally, whenever someone suggests an enhancement,
 they should also send an update for the interface files.


Ouch.



   - In my humble opinion, TeXies need to get out of the habit of

 'self-documenting' TeX using TeX itself.  TeX is not some replacement
 for
 all markup, it's for producing beautiful books (OK, and some
 presentations);
 in any case, this habit smacks of introversion.


 In this case it is not a question of markup, but of the output format,
 and
 whether the source and the documentation are in sync or not. Basically,
 context sources are documented as

 %D documentation ...

 \tex code

 %D documentation

 \tex code

 In principle, we can replace the markup in the documentation to xml or an
 ascii markup. It is easy enough to extract the %D lines and post-process
 them by any tool that you like. The biggest advantage of using a pdf
 output
 is that we can show the output of code snippets. For example,

 \startbuffer
 some tex code
 \stopbuffer

 \typebuffer

 gives

 \getbuffer

 thereby ensuring that the documentation is showing the correct behavior.
 To
 do this in html requires additional context run, converting the output to
 png, and displaying the png (this is how the wiki treats  context ...
 /context tags).


  That is also something to think about.  But I don't think it's really a
 serious problem -- the Mediawiki context works well enough.  In terms of
 user-friendliness I would say it works better than in a massive PDF -- I
 would rather consult an image on the web.


 I personally prefer a massive PDF to a massive HTML with lots of images.
 With pdf you can also *search* the output. A perfect solution will be to
 generate both outputs from a single source, but that means a custom made
 solution.


I'll put the PDF vs. HTML argument to rest :) ... suffice to say that I
thoroughly agree a semantic single-source solution with multiple outputs is
highly desirable.  I've just two pieces of guidance on the roads not to go
down:

(1) XML isn't a great solution because, while it's purely semantic,
extensible, easily parseable, and all the rest of it, it is *horrible* to
look at and maintain
(2) TeX isn't a great solution because of its curious property that it is
only really parseable by TeX itself ... none of the tex-to-whatever
attempts that I've seen are a viable option IMO.



  It wouldn't be too hard to alter Sphinx (as a for example; I suggest
 Sphinx
 so we can talk concretely) so that all TeX-markupped code is shown
 side-by-side as [ syntax-highlighted code | ConTeXt output as PNG ].
  (This
 would be an improvement on the wiki implementation where the TeX code is
 duplicated in the source.)


 This is what wiki does. context source=yes shows both the source and
 the output side by side. This was a later edition, so there is still code
 that duplicates the source in  texcode and context


Duly noted.  I guess I've just happened to only see the latter.


 Aditya


 ___
 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

 ___

___
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] Differences in smart quotes MKII - MKIV

2010-03-04 Thread James Fisher
Hi,


(Forgetting our documentation philosophy session for a minute,)

I'm experiencing issues in MKIV with smart quotes.  Specifically, opening
quotes.  Compare the output of `texexec dash-test' and `context quote-test'
on the following:

\starttext
`Yes, but --- '

`--- this is an interruption! Get down on the floor!'

The interjection was quite {\em unexpected} ---
  indeed, `shocking'.
\stoptext


And the following with double quotes:


\starttext
``Yes, but --- ''

``--- this is an interruption! Get down on the floor!''

The interjection was quite {\em unexpected} ---
  indeed, ``shocking''.
\stoptext


In both cases, MKIV treats the opening grave character (is that the name?
backtick?) literally rather than as an opening smart quote.



James
___
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] bib module, inproceedings mkii/mkiv incompatibility

2010-03-04 Thread James Fisher
I confirm the above -- with the exception that mkiv does show the year, just
after the authors.

On Thu, Mar 4, 2010 at 5:55 PM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:

 Hello Taco,

 the following example (I need to admit that I'm not sure how to
 properly cite inproceedings) returns a different result in mkii and
 mkiv. My citation (the fields I use) is probably a bit wrong, but the
 results should be the same in my opinion. (Only mkii shows the year,
 in mkiv there's an extra space; the month is not shown anywhere,
 pubname is only shown  in mkii although it's probably not needed
 anyway since it's already the title (= booktitle in bibtex?) that
 takes that role. It's also not really clear to me why I need to use
 author and not artauthor, but well ...)


 It may be sensible to have some reference about which fields are
 sensible for what type of publication also among the ConTeXt manuals.

 From some unofficial BibTeX reference
 (http://www.kfunigraz.ac.at/~binder/texhelp/bibtx-14.htmlhttp://www.kfunigraz.ac.at/%7Ebinder/texhelp/bibtx-14.html
 ):

 Format:
 @INPROCEEDINGS{citation_key,
required_fields [, optional_fields] }

 Required fields: author, title, booktitle, year
 Optional fields: editor, pages, organization, publisher, address,
 month, note, key

 \usemodule
[bib]
 \setuppublications
[alternative=num,
 criterium=all,
 sorttype=cite]

 \startpublication
[k=3Ddosimetry,
 t=inproceedings,
 a=Kormoll,
 s=,
 u=]
\arttitle{3D In-vivo Dosimetry for Photon Radiotherapy Based on Pair
 Production}
\title{IEEE Nuclear Science Symposium Medical Imaging Conference
 Record}
\author[]{Thomas}[T.]{}{Kormoll}
\author[]{Daniela}[D.]{}{Kunath}
\author[]{Wolfgang}[W.]{}{Enghardt}
\volume{}
\issue{}
\city{Orlando, Florida}
\pubyear{2009}
\pubname{IEEE Nuclear Science Symposium Conference Record}
\month{October}
\day{25-31}
\pages{2969-2975}
\doi{}
\abstract{}
 \stoppublication

 \starttext

 \cite[3Ddosimetry]

 \placepublications

 \stoptext

 Thanks,
Mojca

 ___
 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

 ___

___
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] Differences in smart quotes MKII - MKIV

2010-03-04 Thread James Fisher
Apologies, that must have slipped through my shoddy search.

Upon consideration I prefer the \quote and \quotation method.  Trusty old
semantic markup. :)

On Thu, Mar 4, 2010 at 6:07 PM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:

 On Thu, Mar 4, 2010 at 18:58, James Fisher wrote:
 
  ``Yes, but --- ''
 
  In both cases, MKIV treats the opening grave character (is that the name?
  backtick?) literally rather than as an opening smart quote.

 That's on purpose (there are some threads on the mailing list that
 explain it). You may modify the behaviour if you want (without asking
 how to do it), but it's best to use the proper quotes or
 \quotation{...}.

 Mojca

 See:
 [NTG-context] using `` '' the output is wrong.
 http://archive.contextgarden.net/message/20100118.123457.5dc7162a.en.html

 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
Hi Luigi,

On Thu, Mar 4, 2010 at 6:42 PM, luigi scarso luigi.sca...@gmail.com wrote:

 On Thu, Mar 4, 2010 at 3:25 PM, James Fisher jameshfis...@gmail.com
 wrote:
  lol; I thought this might come up.  I have a couple of replies to that:
 
  (1) First and most important: I'm not suggesting that we use TeX to
 document
  things at all.  I'm suggesting that ConTeXt documentation should be
  accessible to newcomers in the same format as 99% of all other projects:
  good old HTML.
 Today HTML is still crude for a typographer but things can change with
 WOFF.
 You still can't show the potential of ConTeXt  with HTML, because main
 output is pdf .


I completely understand that typographically, HTML is crude -- if it wasn't,
I probably wouldn't be here at all; I'd write in HTML and print to PDF from
a browser. But I think that's misunderstanding what 'the potential of
ConTeXt' is.  ConTeXt was not created to produce documentation for ConTeXt.
People are not foolish enough to think, if project X doesn't write its
documentation in X, there can't be much else it can do.  You don't write
Teach Yourself French in the French language.

(Also: WOFF will only help inasmuch as we can force quality typefaces on
people (no improvements in e.g. line-breaking algorithms, microtypography,
and what have you).  But that's off the issue.)


 On the web (which you are), HTML is king.
 On a printing house( which I'm) , PDF is the king.


Ok, I said I'd put the HTML/PDF thing to rest, but I'll try and get my
thoughts across again:
I found ConTeXt via the web.  Almost every single other software project
I've ever found, I've found via the web.  I did not find ConTeXt via a
printing house (perhaps others do; I'm getting the impression I'm a bit of
an outlier in this community).  HTML is typographically crude, but, and this
is important, *informationally*, HTML (and the web and friends) is far from
crude.  The web is not a vast flat collection of PDFs.  It's the
unchallenged superglue of the web, which is where I feel that the community
should properly lie.  Now, it's quite possible that other people disagree
with me here, and that I'm factually wrong -- for example if the ConTeXt
community predominantly lies in the 'real-world', with gatherings, seminars,
with handed-out printed leaflets and manuals, with overhead slide
presentations -- in *that* case, then yes, PDF is king.


 TeX and PDFs are
  no replacement for the interconnected power of the web.  When I want a
 quick
  piece of information in 10 seconds, I do not want to consult a
  hand-collected folder of PDFs, or google for it and wait the age for a
 PDF
  to load.
 I grep the code.
 It works even offline and in less than 1 second.


Yes. But the web works (albeit only while online, but who is ever offline?)
in less than a second too, and the web is far more than a 'World Wide
Grep'.  It's an unimaginably vast cross-referenced semantically aware net
with search engines of huge processing power.  Executing `grep
interpretation of grave character *' unfortunately does not give quite the
same result.


  That kind of feeling, I guess, is the reason that the
  contextgarden wiki exists.  But nor is Mediawiki is really not the most
  appropriate way to document a project.  Wikis are messy and unstructured.
  They don't lend themselves well to the hierarchical kind of structure
  appropriate for representing a codebase.  So I'm suggesting that ConTeXt
 be
  documented using a typical established documentation system.
 I disagree.
 minimals should be self-cointained.
 a documentation system not done in  Context can introduce a useless
 dependency.

 Anyway
 even if there is already
 http://foundry.supelec.fr/gf/project/modules/scmsvn/
 (which is only usefula as testbed, not for documentation)

 or if we will have something like cseq one day
 (see
 http://www.tug.org/utilities/plain/cseq.html, possible made in
 automatic fashion from code base)


This looks lovely.



 or a wiki book
 (see
 http://en.wikibooks.org/wiki/LaTeX
 apropos of Mediawiki is really not the most
 appropriate way to document a project )

 it will be not enough --- a good starting point, of course.


 In the end, one needs to understand the language, his semantic and
 study the code.
 With TeXBook, a couple of manuals from pragma (cont-en, metafun) and
 the code you are ok
 (well also ~1000 pages of pdf specs. are not bad and also  some book
 about fonts ...).


Mmm, yes, you've made quite a lot of demands there on the curious programmer
having stumbled across ConTeXt ...


 Others are articles, and they are ok too.
 TeX is a macro language. There are almost ~1000 macros , and maybe
 ~500 macros in ConTeXt.
 Even if we are able to documents them in some manner, understanding
 them and their relations
 is a matter of study the code.


I don't think so.  The just study the code approach shows an awfully
austere, reductionist philosophy.  Humans understand things from the top
down.  It's the computers that work

Re: [NTG-context] suggestions for context documentation

2010-03-04 Thread James Fisher
A bit of a diversion here, but two questions about the plethora of PDF docs:

* Where are the TeX sources of all these manuals kept?
* What are the licenses on all these various things?  In particular the
Pragma documents.  Would I be *allowed*, if I so wanted, to embark on a
collated version of all of this -- i.e., are derivative works allowed?

James

On Thu, Mar 4, 2010 at 9:40 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 4 Mar 2010, Michael Saunders wrote:

  The important thing is:  is there _ever_ going to be a manual?   I


 You mean like the beginner's manual

 http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf

 and the user manual

 http://www.pragma-ade.com/general/manuals/cont-eni.pdf


  want to try Context, but I've been putting it off for years because
 it's not really practical without documentation.


 Things that have changed in MKIV
 http://www.pragma-ade.com/general/manuals/mk.pdf

 Integrating metafun graphics
 http://www.pragma-ade.com/general/manuals/metafun-s.pdf

 On typography
 http://www.pragma-ade.com/general/manuals/style.pdf

 XML
 http://pragma-ade.com/general/manuals/xml-mkiv.pdf

 amongst 46 others by Pragma

 http://pragma-ade.com/show-man-1.htm
 http://wiki.contextgarden.net/This_Way

 and other user written documents

 http://wiki.contextgarden.net/MyWay

 and then there is the wiki.

 I agree that some of these are outdated, some are not complete, but
 documentation does exist. What is missing in the documentation that
 prevented you from even starting using ConTeXt for *years*.

 Aditya


 ___
 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

 ___

___
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] columns and whitespace

2010-03-04 Thread James Fisher
There was a thread about columns and whitespace ~ 2 weeks ago, but I wasn't
a subscriber then.  I've just come across it independently myself.  I'm not
sure what conclusion was come to.  From a few tests, I'd characterize the
problem code in \startcolumns as: if whitespace has been set to more than
none, set whitespace to 'line'.

Try it by uncommenting various lines:


%\setupwhitespace[none]
%\setupwhitespace[small]

\starttext

\startcolumns[n=2]
%\setupwhitespace[small]
\input knuth
\stopcolumns

\stoptext


Do people agree with that characterization; has the bug been found; what's
being done about it?  I don't want to have to re-setup whitespace every time
I go to columns.



James
___
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] suggestions for context documentation

2010-03-04 Thread James Fisher
Good news on both counts, then.  (Is there a reason that the source and
license of the documents aren't included in the docs themselves?)

On Thu, Mar 4, 2010 at 11:05 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 4 Mar 2010, James Fisher wrote:

  A bit of a diversion here, but two questions about the plethora of PDF
 docs:

 * Where are the TeX sources of all these manuals kept?


 svn://ctx.pragma-ade.nl/manuals (seems to be down at the moment)

 browsable at

 http://context.aanhet.net/svn/

 This information is also available on the wiki (
 http://wiki.contextgarden.net/Official_ConTeXt_Documentation)


  * What are the licenses on all these various things?  In particular the
 Pragma documents.  Would I be *allowed*, if I so wanted, to embark on a
 collated version of all of this -- i.e., are derivative works allowed?


 The program code (i.e. anything not under the /doc subtree) is distributed
 under the GNU GPL; the documentation is provided under Creative Commons
 Attribution NonCommercial ShareAlike license.

 So, derivative work is allowed, provided you do not sell your work.

 The new user manaul
 http://foundry.supelec.fr/gf/project/contextman/scmsvn/?action=browsepath=%2Fcontext-reference%2F
 is a attempt to be a collected version of all the documents, and it is
 under GNU Free Documentation License, so if you copy from there, your result
 should have the same license.


 Aditya

 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
(Can I leave all of this for a bit?  I'll reply tomorrow, I think, but
first...)

I'd like to go back to the very first post about problems with flush right.
The \setbreakpoints command works to an extent, but I'm still experiencing
issues where, when a hyphenated string has been broken, the first half of it
still sticks out.  I unfortunately can't show you the example, and it's hard
to reproduce.  But can anyone answer: does the TeX line-breaking algorithm
retain the possibility of lines overrunning the defined boundary, if the
algorithm decides that the alternatives are more ugly?

James

On Thu, Mar 4, 2010 at 8:47 PM, luigi scarso luigi.sca...@gmail.com wrote:

 On Thu, Mar 4, 2010 at 8:44 PM, James Fisher jameshfis...@gmail.com
 wrote:
 ConTeXt was not created to produce documentation for ConTeXt.
 This is not  the point.
 The point is that code documentation  of ConTeXt can be made with ConTeXt .
 see for example http://foundry.supelec.fr/gf/project/modules/scmsvn
 We don't need Sphinx or similar, but
 of course Hans can decide to use it.

   HTML is typographically crude, but, and this
  is important, *informationally*, HTML (and the web and friends) is far
 from
  crude.
 true and your job is good.

  Mmm, yes, you've made quite a lot of demands there on the curious
 programmer
  having stumbled across ConTeXt ...
 None is saying that it's easy. And, really,  it's not easy.

  I don't think so.  The just study the code approach shows an awfully
  austere, reductionist philosophy.
 True but  I have not said this.
 TeX comes with TeXBook (high-mid-low level manual )
 and Tex-The program- (the code)
 It's the same here, more or less.

  Humans understand things from the top
  down.  It's the computers that work from the bottom up.
 Humans understand things in bottom-up, top-down , try-and-error and
 probably other ways
 that  we can understand enough to formalize.
 Working with TeX is a mix of bottom-up, top-down try-and-error and fortune.

 
  I think you're thinking of 'forking' as something dangerous (yeah, the
 word
  sounds painful), as something that will fragment the community, as
 something
  that destroys the concept of 'authority'.  It's really not.  Where you
 get
  forking you get merging at roughly the same rate.
 No, not dangerous. Actually useless . And yes, actually community and
 authority
 are important in this context.
 Why is so hard to understand ?

  Why are they the only contributors?
 See Aditya.
 Apart from translations, Taco and Hans are the only persons that
 actually are able to produce a
 minimal, complete and exhaustive  documentation.

 --
 luigi

 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-04 Thread James Fisher
Perfecto.

On Thu, Mar 4, 2010 at 11:36 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 4 Mar 2010, James Fisher wrote:

  I'd like to go back to the very first post about problems with flush
 right.
 The \setbreakpoints command works to an extent, but I'm still experiencing
 issues where, when a hyphenated string has been broken, the first half of
 it
 still sticks out.  I unfortunately can't show you the example, and it's
 hard
 to reproduce.  But can anyone answer: does the TeX line-breaking algorithm
 retain the possibility of lines overrunning the defined boundary, if the
 algorithm decides that the alternatives are more ugly?


 Yes.

 Try \setuptolerance[tolerant] or \setuptolerance[verytolerant].

 Aditya


 ___
 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

 ___

___
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] suggestions for context documentation

2010-03-04 Thread James Fisher
...the book about Hasselt. That actually made me laugh out loud.  What a
loser I am.

Ok, goodnight now. :)

On Fri, Mar 5, 2010 at 2:10 AM, Michael Saunders odrad...@gmail.com wrote:

  You mean like the beginner's manual
 
  http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf
 
  and the user manual
 
  http://www.pragma-ade.com/general/manuals/cont-eni.pdf
 
 ...
 
  amongst 46 others by Pragma


 No, not like those.  I mean like a real manual.  I read the book
 about Hasselt---a few examples without explanations.
 I've looked at most of the fifty or so documents over which
 this virtual manual is supposed to be spread.  They are about
 as informative.  Most of these documents seem to be 5--12
 years old.  The wiki is even more patchy.  The idea that a
 computer manual is something that exists implicitly in the
 discussions of a mailing list is a new idea to me.

 You can't be serious about mk.pdf being a manual.  Even it
 admits, This document is not so much a users manual as a
 history of the development.  Little after that point is intelligible.

 Compared with the clear, abundant documentation of the
 LaTeX world, Context seems like a secret that a small club is
 trying to keep.  It's not even clear from the manuals that
 development is ongoing, much less that there is some advantage
 in using it.

 So, will there ever be a manual to MK IV?  In how many years?

 ___
 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

 ___

___
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] suggestions for context documentation

2010-03-04 Thread James Fisher
Just to clarify, I pretty much agree with everything you say.

On Fri, Mar 5, 2010 at 2:22 AM, James Fisher jameshfis...@gmail.com wrote:

 ...the book about Hasselt. That actually made me laugh out loud.  What a
 loser I am.

 Ok, goodnight now. :)


 On Fri, Mar 5, 2010 at 2:10 AM, Michael Saunders odrad...@gmail.comwrote:

  You mean like the beginner's manual
 
  http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf
 
  and the user manual
 
  http://www.pragma-ade.com/general/manuals/cont-eni.pdf
 
 ...
 
  amongst 46 others by Pragma


 No, not like those.  I mean like a real manual.  I read the book
 about Hasselt---a few examples without explanations.
 I've looked at most of the fifty or so documents over which
 this virtual manual is supposed to be spread.  They are about
 as informative.  Most of these documents seem to be 5--12
 years old.  The wiki is even more patchy.  The idea that a
 computer manual is something that exists implicitly in the
 discussions of a mailing list is a new idea to me.

 You can't be serious about mk.pdf being a manual.  Even it
 admits, This document is not so much a users manual as a
 history of the development.  Little after that point is intelligible.

 Compared with the clear, abundant documentation of the
 LaTeX world, Context seems like a secret that a small club is
 trying to keep.  It's not even clear from the manuals that
 development is ongoing, much less that there is some advantage
 in using it.

 So, will there ever be a manual to MK IV?  In how many years?

 ___
 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

 ___



___
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] Super- and sub-script in text mode, or, fonts in math mode

2010-03-03 Thread James Fisher
Hi Wolfgang,



Thanks, that gets me closer (though \highlow and \lowhigh result in
undefined control sequence here).

However, the superscripted text is not reduced in size at all.  This seems
to be XeTeX-specific, as using PDFTeX works fine.  The same issue arises
using \small{} in XeTeX, whether standing alone or in combination with
\high{}.

Some light could be shed on this by observing that *all* text produced by
XeTeX, when in comparison with PDFTeX, looks like has gone through \small.
I suppose this is possible as I note that \small can't be applied
recursively (i.e. \small{\small{x}} == \small{x} ).

Thoughts?



James


On Tue, Mar 2, 2010 at 10:02 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 Am 02.03.10 22:58, schrieb James Fisher:

  Hi,


 A minor problem: I'm trying to place superscripted text in the text body
 -- things like '2^nd March'.  I can't see anything like 2{\sup nd}, so my
 only known solution at the moment is math mode: $2^{nd}$.  Despite this not
 being 'math', I don't really have an aversion to it.  However, there's a
 problem with it: the superscripted text appears in italic Computer Modern.
  I'm using Gentium Book Basic as my body font, using XeTeX.  The Gentium
 typeface is used perfectly everywhere, including the '2' in '2^nd', with the
 exception of the superscripted text.

 So what solutions are to hand?  Is there either (1) super/sub commands in
 text mode, or (2) a way of fixing this in math mode?

 (Also, would this be a problem with ConTeXt or with XeTeX?)

 a\high{x}b\low{x}c\highlow{x}{y}d\lowhigh{x}{y}

 Wolfgang


 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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] Occasional words sticking out from flush-right

2010-03-03 Thread James Fisher
Hi,


I'm experiencing an issue where, when the width of a block of text is small,
the occasional word sticks out from the otherwise flush right.  I've
previously seen an example of this in an image on the contextgarden wiki,
but now can't find it.  To reproduce what I mean, compile this with Mark IV:

\mainlanguage[en]
\usetypescript[palatino]
\setupbodyfont[palatino,11pt]

\setuppapersize[A4][A4]

\setuphead[title][header=empty]

\starttext
\title{Personal statement}

\startcolumns[n=2]
This heavily-hyphenated
jauntily-formatted
flush-left
flush-right
justified-text
paragraph set in
a two-column layout and
subtly-quirky-but-never-offensive
Palatino shouldn't produce
out-of-flush
sticking-out-like-a-sore-thumb
words from the
flush-right.
\stopcolumns
\stoptext


In this example, the string 'sticking-out-like-a-sore-thumb' sticks out to
approx 3mm from the right edge of the paper.  In this situation, I would
much prefer that that string is hyphenated, using one of the hyphens already
in the string.

Based on one other test (in which my text was far less hyphenated than the
above), it seems that the hyphenation algorithm refuses to hyphenate strings
of words that are already hyphenated.  Is this true?  If so, is it
deliberate?  And how do I turn it off?  (And do other people agree with me
that it's awfully ugly?)



Best


James Fisher
___
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] Super- and sub-script in text mode, or, fonts in math mode

2010-03-03 Thread James Fisher
That's better.  Also, for the record, I've been working with Mark IV today,
and LuaTeX doesn't seem to have XeTeX's problem with \small.

On Wed, Mar 3, 2010 at 2:07 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 Am 03.03.10 13:04, schrieb James Fisher:

  Hi Wolfgang,

 Thanks, that gets me closer (though \highlow and \lowhigh result in
 undefined control sequence here).

 \hilo and \lohi


 Wolfgang


 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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] Occasional words sticking out from flush-right

2010-03-03 Thread James Fisher
Certainly works -- thanks Wolfgang.

Stymies me how people on this mailing list know this stuff -- even a Google
search for setbreakpoints, assuming I knew the command in advance, returns
nada.


James

On Wed, Mar 3, 2010 at 7:36 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 Am 03.03.10 20:19, schrieb James Fisher:

  Hi,


 I'm experiencing an issue where, when the width of a block of text is
 small, the occasional word sticks out from the otherwise flush right.  I've
 previously seen an example of this in an image on the contextgarden wiki,
 but now can't find it.  To reproduce what I mean, compile this with Mark IV:

 \mainlanguage[en]
 \usetypescript[palatino]
 \setupbodyfont[palatino,11pt]

 In this case you don't need \usetypescript.

  \setuppapersize[A4][A4]

 \setuphead[title][header=empty]

 \starttext
 \title{Personal statement}

 \startcolumns[n=2]
 This heavily-hyphenated
 jauntily-formatted
 flush-left
 flush-right
 justified-text
 paragraph set in
 a two-column layout and
 subtly-quirky-but-never-offensive
 Palatino shouldn't produce
 out-of-flush
 sticking-out-like-a-sore-thumb
 words from the
 flush-right.
 \stopcolumns
 \stoptext


 In this example, the string 'sticking-out-like-a-sore-thumb' sticks out to
 approx 3mm from the right edge of the paper.  In this situation, I would
 much prefer that that string is hyphenated, using one of the hyphens already
 in the string.

 Based on one other test (in which my text was far less hyphenated than the
 above), it seems that the hyphenation algorithm refuses to hyphenate strings
 of words that are already hyphenated.  Is this true?  If so, is it
 deliberate?  And how do I turn it off?  (And do other people agree with me
 that it's awfully ugly?)

 Add \setbreakpoints[compound] to your file.

 Wolfgang



 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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] Using XeTeX results in: ! Undefined control sequence. \PDFversion -1.\the \pdfminorversion

2010-03-03 Thread James Fisher
Somewhere in my twists and turns to get Mark IV working today, it appears
XeTeX has been broken.  Running `texexec --xtx' on any ConTeXt file results
in:

! Undefined control sequence.
\PDFversion -1.\the \pdfminorversion

All I've been able to find out is that these macros are something to do with
PDFTeX.  I really don't know where to turn now.

I'm running:

XeTeX 3.1415926-2.2-0.9995.2 (Web2C 7.5.6)
TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD
MTXrun | current version: 2010.03.02 12:34
___
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] Occasional words sticking out from flush-right

2010-03-03 Thread James Fisher
I suppose because

(1) The word 'breakpoint' didn't come to mind
(2) I'm used to consulting documentation rather than source code in the
first instance
(3) I've never worked in Turing tarpits before
(4) Grepping 'breakpoint' as suggested doesn't turn up anything obvious in
any case -- about 100 instances any of which could be a lead.

I'm getting the impression that there's no real-world distinction between
ConTeXt users and ConTeXt developers.


James

On Wed, Mar 3, 2010 at 8:44 PM, luigi scarso luigi.sca...@gmail.com wrote:

 On Wed, Mar 3, 2010 at 9:41 PM, James Fisher jameshfis...@gmail.com
 wrote:
  Certainly works -- thanks Wolfgang.
 
  Stymies me how people on this mailing list know this stuff -- even a
 Google
  search for setbreakpoints, assuming I knew the command in advance,
 returns
  nada.
 So why don't you grep in base/* ?

 --
 luigi

 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-03 Thread James Fisher
Well, it's reassuring that people can at least admit this is a closed
community.  (But aren't churches meant to evangelize?)


For using ConTEXt, no TEX-- programming skills and no technical background
are needed. (http://wiki.contextgarden.net/What_is_ConTeXt)
So why don't you grep in base/* ? (Luigi; I appreciate the advice but a
bit of a contradiction methinks)


Also, re there is only one  ConTeXt developer --- Hans Hagen:
I'd suggest a few reasons for this are:
(1) in order to develop on a project, you first need a the high-level
appreciation of the system that comes from documentation
(2) ConTeXt does not have any revision control system that I can see (the
only source code browser seem to be http://source.contextgarden.net/ which
looks entirely custom); all I can find is the SVN of the in-progress manual
(3) The low-level macro documentation at
http://texshow.contextgarden.net/is a start, but: (i) instead of a
custom system with basic editing, a modern
documentation system (I'm thinking of http://sphinx.pocoo.org/ used for the
*fantastic* documentation of the Python library) would be more productive,
and (ii) this documentation is completely non-structured, being just an
alphabetical list.

(This from the community that came up with literate programming?)

Also, just having one developer is not at all anything to celebrate, and no,
this model of development is not OK.  I wouldn't say it's a model for
development at all.  Other projects manage just fine without naming
conflicts. Admittedly this is with the amazingly obvious concept of
namespacing, which TeX doesn't have -- though I've just been reading an
article http://www.tug.org/TUGboat/Articles/tb27-0/neugebauer.pdf on
namespacing in http://www.extex.org/.


James

On Wed, Mar 3, 2010 at 9:53 PM, Arthur Reutenauer 
arthur.reutena...@normalesup.org wrote:

  (Arthur, what about your church of TeX?)

   I deny everything.

Arthur

 ___
 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

 ___

___
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] Occasional words sticking out from flush-right

2010-03-03 Thread James Fisher
Right, to show I'm not just empty words, I've just spent ~90 minutes
preparing the beginnings of some decent documentation.  Presenting
http://github.com/eegg/ConTeXt-doc : basically, I've:

(1) wget'ed all the English HTML from the texshow documentation
(2) converted it all to reStructuredText using html2rest.py (
http://bitbucket.org/djerdo/musette/src/tip/musette/html/html2rest.py)
(3) plugged the result into a fresh installation of the Sphinx documentation
system
(4) Pushed the whole thing to a new github repo (including generated HTML so
you can take a look without bothering to install Sphinx)

To note:

- Sphinx really is state-of-the-art.  I suggest you spend a few minutes
browsing http://docs.python.org/ to see what I think is 'good
documentation.'  It runs on reStructuredText, a powerful, purely semantic
and readable (almost invisible) markup.
- Revision control, people!  I strongly encourage everyone to fork and push
this repository.
- There's a hella lot of documentation to do here.  Most of the pages in
texshow are just placeholders.  There's also massive capabilities in
something like Sphinx to organize the code documentation with sensible
commentaries.
- In my humble opinion, TeXies need to get out of the habit of
'self-documenting' TeX using TeX itself.  TeX is not some replacement for
all markup, it's for producing beautiful books (OK, and some presentations);
in any case, this habit smacks of introversion.


To address previous points in this thread:

- Maybe I exaggerated a tad on how little documentation there is.
- Why on earth is there a git repository that is just slave storage?  That
uses about 1% of its capabilities; it seems a terrible waste.


So, thoughts?


James

On Thu, Mar 4, 2010 at 12:08 AM, Aditya Mahajan adit...@umich.edu wrote:

 On Wed, 3 Mar 2010, James Fisher wrote:

  Also, re there is only one  ConTeXt developer --- Hans Hagen:
 I'd suggest a few reasons for this are:
 (1) in order to develop on a project, you first need a the high-level
 appreciation of the system that comes from documentation


 MkII is fairly well documented. See
 http://wiki.contextgarden.net/Official_ConTeXt_Documentation

 MkIV is only documented at
 http://www.pragma-ade.com/general/manuals/mk.pdf. Part of the reason is
 that it is still changing.

 The documentation is not perfect, but is huge (more than 1000 pages last
 time I checked). Saying that ConTeXt is undocumented in not fair, IMO.


  (2) ConTeXt does not have any revision control system that I can see (the
 only source code browser seem to be http://source.contextgarden.net/which
 looks entirely custom); all I can find is the SVN of the in-progress
 manual


 git clone http://dl.contextgarden.net/distribution/git/

 Hans does not use a public version control system. The above repository is
 a daily snapshot of ConTeXt files.


  (3) The low-level macro documentation at
 http://texshow.contextgarden.net/is a start, but: (i) instead of a
 custom system with basic editing, a modern
 documentation system (I'm thinking of http://sphinx.pocoo.org/ used for
 the
 *fantastic* documentation of the Python library) would be more productive,
 and (ii) this documentation is completely non-structured, being just an
 alphabetical list.

 (This from the community that came up with literate programming?)


 The sources are fairly well documented. Just read the source files, or see
 http://foundry.supelec.fr/gf/project/modules/ for PDF output.

 The question of documentation has come up many times in the past. Everytime
 we conclude that we need a volunteer to do maintain the documentation, but
 so far no one has stepped forward (hint, hint).

 Aditya


 ___
 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

 ___

___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread James Fisher
That makes sense.

The main thing confusing me on contextgarden is:

   if cutspace == 0pt then
  cutspace = backspace
   end

Which I would guess is meant to allow you to just specify backspace if you
want symmetrical margins; but what if we want a 0pt cutspace?

A minor other thing confusing me is the terminology; mainly 'cut' and
'back'.  Are these ConTeXt-specific terms or are they found elsewhere?
'Back' would make more sense to me as 'binding' or 'spine', and the edge
referred to as 'cut' is referred to in
Wikipediahttp://en.wikipedia.org/wiki/Book#Book_manufacturing_in_the_modern_worldas
the 'fore-edge'.


James

On Tue, Mar 2, 2010 at 11:03 AM, Hans Hagen pra...@wxs.nl wrote:

 On 25-2-2010 21:17, James Fisher wrote:

 Hi Hans,


 Thanks for the reply -- and sorry for the rather grumpy way in which I
 posed
 the question.  The problem for me was this mysterious width=middle,
 height=middle -- this is fairly undocumented at
 http://wiki.contextgarden.net/Layout .  There is a mention of
 width=middle, but it's just followed by some code, most of which seems
 to
 be irrelevant (if cutspace == 0pt then cutspace = backspace; end), and
 there is no mention of height=middle.  I would be more than willing to
 document this myself, but what is it that width=middle actually *does*?
 And what does middle actually *mean* -- the middle of *what*?


 just the space between back- and cutspace

 (there's also fit, which takes edges into account as they play a role in
 interactive documents)

 Hans


 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
 -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] METAPOST's superellipse with superness0.5 does not give a superellipse

2010-03-02 Thread James Fisher
Thanks, Rory.  In hind-sight I guess my presumptions look pretty silly.  The
reason I'm making mistakes like this is that I can't find any introductory
text along the lines of 'TeX for programmers'; i.e. people coming from your
typical modern imperative languages, who will (after looking at TeX code and
concluding that it *is* a programming language) expect things like
variables, flow control, classes, and the kind of and syntax of library
documentation that comes with these languages.  Perhaps the texts I've seen
should have included some content taken from function vs.
macrohttp://www.google.co.uk/search?hl=ensource=hpq=macro%20vs%20functionmeta=aq=foq=discussions
elsewhere.

Best

James

On Mon, Mar 1, 2010 at 7:15 PM, Rory Molinari quo...@gmail.com wrote:

 For 2: I think Metafont makes more sense if you don't think of a macro
 as a function that does some work in its own context and returns a
 value, but as something that expands textually in place.  So there
 isn't any concept of return as there aren't separate stack frames to
 return from or to.

 So you could try something like this (completely untested, and I am a
 Metafont beginner.  This is from memory, so check the book for the
 right syntax, especially for the semicolons.)

 def myPath(args) =
  begingroup
save tr, tl, bl, br;
 pair tr, tl, bl, br;
 some equations involving tr, tl, bl, br, and the args;

a path expression;
  endgroup;
 enddef;

 path aPath;
 aPath := myPath(args);
 fill aPath;

 The construction

 begingroup
  statements;
  expression;
 endgroup;

 lets you do some work in statements, and then give an expression.
 The value of the group is the value of the expression.  The value
 isn't really returned; it just appears wherever a call to myPath
 appears.  Then the assignment to aPath is expanded by the interpreter
 as

 aPath := begingroup etc endgroup;

 Cheers,
 Rory

 On Mon, Mar 1, 2010 at 9:57 AM, James Fisher jameshfis...@gmail.com
 wrote:
  I've come up with a crude function that's doing more like what I want.  I
  have two problems with it:
 
  1. The most important: I need to differentiate the equations that
 generate a
  superellipse, in order to find the tangent at the defined vertices.  I
 have
  failed to do this and so use a crude arbitrary power function.
  2. Less important: what is the equivalent in METAFONT of the 'return'
  keyword?  I just want superellipse() to return the shape, rather than
 draw
  it.
 
  James
 
  def superellipse(expr r,t,l,b,s)=
pair tr, tl, bl, br;
tr = (s[xpart t,xpart r],s[ypart r,ypart t]);
tl = (s[xpart t,xpart l],s[ypart l,ypart t]);
bl = (s[xpart b,xpart l],s[ypart l,ypart b]);
br = (s[xpart b,xpart r],s[ypart r,ypart b]);
 
numeric theta;
 
 
if s  0.5:
  % Behave as in the normal superellipse function
  theta = 0;
else:
  % This is a crude mockup of the kind of function that is required
  % to generate shapes with s0.5 (apparently called astroids).
  % This satisfies:
  %
  %   s = 0.5,  theta = 0.5
  %   s = 0,theta = 90
  %
  % But to find the actual function,
  % we need to differentiate, at an endpoint,
  % the equation that would produce one quadrant of the shape.
 
  theta = 90 - (s*s*s*7.11378661);
fi
 
fill  r{dir(90+theta)} ... tr{t-r} ... {dir(180-theta)}t 
  t{dir(180+theta)} ... tl{l-t} ... {dir(270-theta)}l 
  l{dir(270+theta)} ... bl{b-l} ... {dir(-theta)}b 
  b{dir(theta)} ... br{r-b} ... {dir(90-theta)}r 
  cycle;
  enddef;
 
  beginfig(0);
superellipse(
  ( 100, 50  ),
  ( 50,  100 ),
  ( 0,   50  ),
  ( 50,  0   ),
  0.6
  );
  endfig;
 
  end;
 
 
  On Mon, Mar 1, 2010 at 4:20 PM, Rory Molinari quo...@gmail.com wrote:
 
  James's explanation appears to be right.
 
  On p 126 of the METAFONTbook Knuth says that the superness should be
  between 0.5 (when you get a diamond) and 1.0 (when you get a square).
 
  Exercise 14.6 asks the reader to Try superellimpse with superness
  values less than 0.5 or greater than 1.0; explain why you get weird
  shapes in such cases.  The answer is There are inflection points,
  because there are no bounding triangles for the '...' operations in
  the superellipse macro ... unless 0.5 \leq s \leq 1.
 
  Cheers,
  Rory
 
  On Mon, Mar 1, 2010 at 8:04 AM, James Fisher jameshfis...@gmail.com
  wrote:
   I should say that the vertices of the superellipse are calculated
   correctly.  The problem, it seems, is that for the vertices at right,
   top,
   left, and bottom, the angles of entry and exit need to be explicitly
   defined, rather than just relying on the '...' which coincidentally
   works
   for s=0.5.
  
   I should say at this point that I am no maths whiz.  But, sticking
 with
   the
   'right ... topright ... top' line, the angle calculation needs to
   satisfy,
   for the exit angle of the first vertex:
  
   For s=0, angle = 180 degrees (vector

[NTG-context] Super- and sub-script in text mode, or, fonts in math mode

2010-03-02 Thread James Fisher
Hi,


A minor problem: I'm trying to place superscripted text in the text body --
things like '2^nd March'.  I can't see anything like 2{\sup nd}, so my only
known solution at the moment is math mode: $2^{nd}$.  Despite this not being
'math', I don't really have an aversion to it.  However, there's a problem
with it: the superscripted text appears in italic Computer Modern.  I'm
using Gentium Book Basic as my body font, using XeTeX.  The Gentium typeface
is used perfectly everywhere, including the '2' in '2^nd', with the
exception of the superscripted text.

So what solutions are to hand?  Is there either (1) super/sub commands in
text mode, or (2) a way of fixing this in math mode?

(Also, would this be a problem with ConTeXt or with XeTeX?)


James Fisher
___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-03-02 Thread James Fisher
Fairy muff!


James

On Tue, Mar 2, 2010 at 9:42 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 Am 02.03.10 22:33, schrieb James Fisher:

  That makes sense.

 The main thing confusing me on contextgarden is:

   if cutspace == 0pt then
  cutspace = backspace
   end

 Which I would guess is meant to allow you to just specify backspace if you
 want symmetrical margins; but what if we want a 0pt cutspace?

 Then use absolute values for 'backspace' and 'width'.

 Wolfgang



 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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] METAPOST's superellipse with superness0.5 does not give a superellipse

2010-03-01 Thread James Fisher
Hi again,


Another METAPOST problem.  For the sake of curiosity, I've been looking at
and playing with the superellipse() function in plain METAPOST.  This is all
fine and dandy until I try values of 'superness' less than 0.5, in which
case it generates shapes that are seemingly not superellipses.  At s=0.5,
the function generates a diamond shape -- which, AFAIK, is correct.
However, s0.5, the points of the diamond immediately turn to curves.  (My
knowledge of superellipses here is just from
http://en.wikipedia.org/wiki/Superellipse -- try the image at
http://en.wikipedia.org/wiki/File:Lame_anima.gif to see how I expect the
shape to change with varying values of superness).

Some code follows -- perhaps someone could run it and tell me if, for
starters, they get the same as me.  (See
http://i49.tinypic.com/2ijqatl.jpgfor superellipse() with s=0.3).


Best,


James



% The following is a superellipse function at 
http://lists.foundry.supelec.fr/pipermail/metapost-commits/2008-June/000340.html
;
% I think it's the superellipse function in my copy of METAPOST; it at least
has the same behaviour.
% It seems to calculate the vertices correctly, but not the way they join
(try changing all ... to --).
%
%def superellipse(expr r,t,l,b,s)=
%  r ... (s[xpart t,xpart r],s[ypart r,ypart t]){t-r} ...
%  t ... (s[xpart t,xpart l],s[ypart l,ypart t]){l-t} ...
%  l ... (s[xpart b,xpart l],s[ypart l,ypart b]){b-l} ...
%  b ... (s[xpart b,xpart r],s[ypart r,ypart b]){r-b} ... cycle
%enddef;

def supertest expr s =
  superellipse(
( 100, 50  ),
( 50,  100 ),
( 0,   50  ),
( 50,  0   ),
s
);
enddef;

% These 0 supernesses are fine, I think ...

beginfig(0);
  draw supertest 2;
endfig;

beginfig(1);
  draw supertest 1.01;
endfig;

% The following, 0.5=superness=1,
% are from visual reference definitely right

beginfig(2);
  draw supertest 1;
endfig;

beginfig(3);
  draw supertest 0.99;
endfig;

beginfig(4);
  draw supertest 0.7;
endfig;

beginfig(5);
  draw supertest 0.51;
endfig;

beginfig(6);
  draw supertest 0.5;
endfig;

% Now, for 0.5,
% things get problematic --
% the points in the shape generated by s=0.5
% should stay 'pointy'

beginfig(7);
  draw supertest 0.49;
endfig;

beginfig(8);
  draw supertest 0.3;
endfig;

beginfig(9);
  draw supertest 0.01;
endfig;

beginfig(10);
  draw supertest 0;
endfig;

end;
___
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] METAPOST's superellipse with superness0.5 does not give a superellipse

2010-03-01 Thread James Fisher
I should say that the vertices of the superellipse are calculated
correctly.  The problem, it seems, is that for the vertices at right, top,
left, and bottom, the angles of entry and exit need to be explicitly
defined, rather than just relying on the '...' which coincidentally works
for s=0.5.

I should say at this point that I am no maths whiz.  But, sticking with the
'right ... topright ... top' line, the angle calculation needs to satisfy,
for the exit angle of the first vertex:

For s=0, angle = 180 degrees (vector to the left)
For s = 0.5, angle = 135 degrees (45 degrees to the top left, producing a
straight line to create the diamond shape)
For s0.5, angle = 90 degrees (vector vertically upwards)

Suffice to say that I don't know how to produce that elegantly.



James


On Mon, Mar 1, 2010 at 3:54 PM, James Fisher jameshfis...@gmail.com wrote:

 Hi again,


 Another METAPOST problem.  For the sake of curiosity, I've been looking at
 and playing with the superellipse() function in plain METAPOST.  This is all
 fine and dandy until I try values of 'superness' less than 0.5, in which
 case it generates shapes that are seemingly not superellipses.  At s=0.5,
 the function generates a diamond shape -- which, AFAIK, is correct.
 However, s0.5, the points of the diamond immediately turn to curves.  (My
 knowledge of superellipses here is just from
 http://en.wikipedia.org/wiki/Superellipse -- try the image at
 http://en.wikipedia.org/wiki/File:Lame_anima.gif to see how I expect the
 shape to change with varying values of superness).

 Some code follows -- perhaps someone could run it and tell me if, for
 starters, they get the same as me.  (See
 http://i49.tinypic.com/2ijqatl.jpg for superellipse() with s=0.3).


 Best,


 James



 % The following is a superellipse function at 
 http://lists.foundry.supelec.fr/pipermail/metapost-commits/2008-June/000340.html
 ;
 % I think it's the superellipse function in my copy of METAPOST; it at
 least has the same behaviour.
 % It seems to calculate the vertices correctly, but not the way they join
 (try changing all ... to --).
 %
 %def superellipse(expr r,t,l,b,s)=
 %  r ... (s[xpart t,xpart r],s[ypart r,ypart t]){t-r} ...
 %  t ... (s[xpart t,xpart l],s[ypart l,ypart t]){l-t} ...
 %  l ... (s[xpart b,xpart l],s[ypart l,ypart b]){b-l} ...
 %  b ... (s[xpart b,xpart r],s[ypart r,ypart b]){r-b} ... cycle
 %enddef;

 def supertest expr s =
   superellipse(
 ( 100, 50  ),
 ( 50,  100 ),
 ( 0,   50  ),
 ( 50,  0   ),
 s
 );
 enddef;

 % These 0 supernesses are fine, I think ...

 beginfig(0);
   draw supertest 2;
 endfig;

 beginfig(1);
   draw supertest 1.01;
 endfig;

 % The following, 0.5=superness=1,
 % are from visual reference definitely right

 beginfig(2);
   draw supertest 1;
 endfig;

 beginfig(3);
   draw supertest 0.99;
 endfig;

 beginfig(4);
   draw supertest 0.7;
 endfig;

 beginfig(5);
   draw supertest 0.51;
 endfig;

 beginfig(6);
   draw supertest 0.5;
 endfig;

 % Now, for 0.5,
 % things get problematic --
 % the points in the shape generated by s=0.5
 % should stay 'pointy'

 beginfig(7);
   draw supertest 0.49;
 endfig;

 beginfig(8);
   draw supertest 0.3;
 endfig;

 beginfig(9);
   draw supertest 0.01;
 endfig;

 beginfig(10);
   draw supertest 0;
 endfig;

 end;


___
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] METAPOST's superellipse with superness0.5 does not give a superellipse

2010-03-01 Thread James Fisher
I've come up with a crude function that's doing more like what I want.  I
have two problems with it:

1. The most important: I need to differentiate the equations that generate a
superellipse, in order to find the tangent at the defined vertices.  I have
failed to do this and so use a crude arbitrary power function.
2. Less important: what is the equivalent in METAFONT of the 'return'
keyword?  I just want superellipse() to return the shape, rather than draw
it.

James

def superellipse(expr r,t,l,b,s)=
  pair tr, tl, bl, br;
  tr = (s[xpart t,xpart r],s[ypart r,ypart t]);
  tl = (s[xpart t,xpart l],s[ypart l,ypart t]);
  bl = (s[xpart b,xpart l],s[ypart l,ypart b]);
  br = (s[xpart b,xpart r],s[ypart r,ypart b]);

  numeric theta;


  if s  0.5:
% Behave as in the normal superellipse function
theta = 0;
  else:
% This is a crude mockup of the kind of function that is required
% to generate shapes with s0.5 (apparently called astroids).
% This satisfies:
%
%   s = 0.5,  theta = 0.5
%   s = 0,theta = 90
%
% But to find the actual function,
% we need to differentiate, at an endpoint,
% the equation that would produce one quadrant of the shape.

theta = 90 - (s*s*s*7.11378661);
  fi

  fill  r{dir(90+theta)} ... tr{t-r} ... {dir(180-theta)}t 
t{dir(180+theta)} ... tl{l-t} ... {dir(270-theta)}l 
l{dir(270+theta)} ... bl{b-l} ... {dir(-theta)}b 
b{dir(theta)} ... br{r-b} ... {dir(90-theta)}r 
cycle;
enddef;

beginfig(0);
  superellipse(
( 100, 50  ),
( 50,  100 ),
( 0,   50  ),
( 50,  0   ),
0.6
);
endfig;

end;


On Mon, Mar 1, 2010 at 4:20 PM, Rory Molinari quo...@gmail.com wrote:

 James's explanation appears to be right.

 On p 126 of the METAFONTbook Knuth says that the superness should be
 between 0.5 (when you get a diamond) and 1.0 (when you get a square).

 Exercise 14.6 asks the reader to Try superellimpse with superness
 values less than 0.5 or greater than 1.0; explain why you get weird
 shapes in such cases.  The answer is There are inflection points,
 because there are no bounding triangles for the '...' operations in
 the superellipse macro ... unless 0.5 \leq s \leq 1.

 Cheers,
 Rory

 On Mon, Mar 1, 2010 at 8:04 AM, James Fisher jameshfis...@gmail.com
 wrote:
  I should say that the vertices of the superellipse are calculated
  correctly.  The problem, it seems, is that for the vertices at right,
 top,
  left, and bottom, the angles of entry and exit need to be explicitly
  defined, rather than just relying on the '...' which coincidentally works
  for s=0.5.
 
  I should say at this point that I am no maths whiz.  But, sticking with
 the
  'right ... topright ... top' line, the angle calculation needs to
 satisfy,
  for the exit angle of the first vertex:
 
  For s=0, angle = 180 degrees (vector to the left)
  For s = 0.5, angle = 135 degrees (45 degrees to the top left, producing a
  straight line to create the diamond shape)
  For s0.5, angle = 90 degrees (vector vertically upwards)
 
  Suffice to say that I don't know how to produce that elegantly.
 
 
 
  James
 
 
  On Mon, Mar 1, 2010 at 3:54 PM, James Fisher jameshfis...@gmail.com
 wrote:
 
  Hi again,
 
 
  Another METAPOST problem.  For the sake of curiosity, I've been looking
 at
  and playing with the superellipse() function in plain METAPOST.  This is
 all
  fine and dandy until I try values of 'superness' less than 0.5, in which
  case it generates shapes that are seemingly not superellipses.  At
 s=0.5,
  the function generates a diamond shape -- which, AFAIK, is correct.
  However, s0.5, the points of the diamond immediately turn to curves.
 (My
  knowledge of superellipses here is just from
  http://en.wikipedia.org/wiki/Superellipse -- try the image at
  http://en.wikipedia.org/wiki/File:Lame_anima.gif to see how I expect
 the
  shape to change with varying values of superness).
 
  Some code follows -- perhaps someone could run it and tell me if, for
  starters, they get the same as me.  (See
 http://i49.tinypic.com/2ijqatl.jpg
  for superellipse() with s=0.3).
 
 
  Best,
 
 
  James
 
 
 
  % The following is a superellipse function at
  
 http://lists.foundry.supelec.fr/pipermail/metapost-commits/2008-June/000340.html
 ;
  % I think it's the superellipse function in my copy of METAPOST; it at
  least has the same behaviour.
  % It seems to calculate the vertices correctly, but not the way they
 join
  (try changing all ... to --).
  %
  %def superellipse(expr r,t,l,b,s)=
  %  r ... (s[xpart t,xpart r],s[ypart r,ypart t]){t-r} ...
  %  t ... (s[xpart t,xpart l],s[ypart l,ypart t]){l-t} ...
  %  l ... (s[xpart b,xpart l],s[ypart l,ypart b]){b-l} ...
  %  b ... (s[xpart b,xpart r],s[ypart r,ypart b]){r-b} ... cycle
  %enddef;
 
  def supertest expr s =
superellipse(
  ( 100, 50  ),
  ( 50,  100 ),
  ( 0,   50  ),
  ( 50,  0   ),
  s
  );
  enddef;
 
  % These 0 supernesses are fine, I

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-27 Thread James Fisher
Ah, lovely!  Who knew there would be so many different solutions?  I'm
going to use Nicola's solution on this occasion, as it fits my thought
process best -- but thanks to Troy as your solutions showed me some
other things I didn't know.

All the best,

James

On Fri, Feb 26, 2010 at 9:42 PM, Nicola nvitacolo...@gmail.com wrote:
 In article
 771da05a1002251718l55669a0co770b5a78bed84...@mail.gmail.com,
  James Fisher jameshfis...@gmail.com wrote:

 This isn't specifically a ConTeXt question, but via it I've run into a
 seemingly simple problem in METAPOST that I just can't solve.  I'm
 trying to draw a parallelogram by specifying: (1) the length of sides
 parallel to the x-axis; (2) the total height of the figure; (3) one of
 the interior angles.

 Curiously enough, nobody has posted a solution that uses 'whatever', so
 here it is:

 z0 = origin;        % bottom left
 z1 = (5,0);         % bottom right
 y3 = y2 = 10;
 z3 = z0 + whatever*dir(87); % z3 is obtained by starting at z0 and
                            % moving along dir(87)
 z2-z1 = whatever*(z3-z0);   % The line z1--z2 is parallel to z0--z3

 That is, what you were trying to achieve:

 angle(z3-z0) = dir(87);

 can be written instead:

 z3 - z0 = whatever*dir(87);

 Nicola

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

___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-02-25 Thread James Fisher
Hi Hans,


Thanks for the reply -- and sorry for the rather grumpy way in which I posed
the question.  The problem for me was this mysterious width=middle,
height=middle -- this is fairly undocumented at
http://wiki.contextgarden.net/Layout .  There is a mention of
width=middle, but it's just followed by some code, most of which seems to
be irrelevant (if cutspace == 0pt then cutspace = backspace; end), and
there is no mention of height=middle.  I would be more than willing to
document this myself, but what is it that width=middle actually *does*?
And what does middle actually *mean* -- the middle of *what*?


James

On Thu, Feb 25, 2010 at 10:23 AM, Hans Hagen pra...@wxs.nl wrote:

 On 25-2-2010 5:39, James Fisher wrote:

 Hi all.


 I am trying to understand the terminology for the \definelayout and
 \setuplayout commands.
 Unfortunately the documentation at
 http://wiki.contextgarden.net/Layoutdoesn'thttp://wiki.contextgarden.net/Layoutdoesn%27tcorrespond
  to the actual

 output I get.
 Nor does the 'documentation' at http://getfo.org/context_xml/page3.html ,
 which the first page recommends.
 More, the two pages seem pretty contradictory.

 Consider my situation: I'm trying to set up an A4 page with the following
 margins (I use the term margin to mean the space from the edge of the
 physical paper to the edge of the body text area):

 top: 2.97cm
 bottom: 2.97cm
 left: 2.1cm
 right: 2.1cm

 For the moment, I don't care at all about header and footer space, nor
 notes
 in the margins; I'm just trying to get the above margins.
 However, with all conceivable combinations of commands at both of those
 pages, I've been unable to set anything like this up.

 Based on the getfo.org page, I should be able to set up these left and
 right
 margins with:


 \setuplayout
  [backspace=2.1cm,
  cutspace=2.1cm,
  width=middle,
  topspace=2.97cm,
  bottomspace=2.97cm,
  height=middle]

 \showframe

 \starttext

 \input tufte

 \stoptext


 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
 -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] TeX syntax -- a guide?

2010-02-25 Thread James Fisher
Hi,


After a few days working in do what the tutorials say mode, I now want to
understand TeX from a programmer's mindset.  I have not been able just by
practise to work out what the syntactic rules of TeX are, and I am hoping
that there is a sensible guide to this somewhere.  However, searches for
things like tex syntax draw a blank.  Some of the things I want to
understand, for example, are: (1) what is the distinction between square
brackets and curly brackets after a command?  (2) Why are there sometimes
lists of square-bracketed lists after a command, each with lists of seeming
arguments inside them?  (2) What exactly are the variables in a TeX file?
(I've seen variable-like things sometimes referred to just plainly,
sometimes with preceding backslashes as if they were commands/macros).  (4)
Why can't I end a square-bracketed section with a final square-bracket on a
line of its own, as I may do in other programming languages?  (5) How are
things like \subsection, \subsubsection, \subsubsubsection, ...
implemented?  I am used to languages in which there is only a finite set of
commands; why is the logic here not more like \section[level=1],
\section[level=2], ... ?  (6) Perhaps I'm misunderstanding things and all
this isn't actually the fundamental syntax of TeX but just adhoc syntax
defined by various macros doing different things -- is this the case; to
what degree can macros define syntax?

Obviously I don't expect answers to all these here, but can someone point me
to somewhere on the 'net that could answer them? The only other
possibilities I can see are buying an expensive copy of the TeXbook, etc.


Thanks all,


James Fisher
___
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] TeX syntax -- a guide?

2010-02-25 Thread James Fisher
Wonderful!  Those were good recommendations; I shall work through them.
Maybe I will buy the TeXbook eventually; however, I've just splashed out on
the METAFONTbook, so I'll give it a while.

On Thu, Feb 25, 2010 at 9:39 PM, Thomas A. Schmitz 
thomas.schm...@uni-bonn.de wrote:


 On Feb 25, 2010, at 9:39 PM, James Fisher wrote:

  Hi,
 
 
  After a few days working in do what the tutorials say mode, I now want
 to understand TeX from a programmer's mindset.  I have not been able just by
 practise to work out what the syntactic rules of TeX are, and I am hoping
 that there is a sensible guide to this somewhere.  However, searches for
 things like tex syntax draw a blank.  Some of the things I want to
 understand, for example, are: (1) what is the distinction between square
 brackets and curly brackets after a command?  (2) Why are there sometimes
 lists of square-bracketed lists after a command, each with lists of seeming
 arguments inside them?  (2) What exactly are the variables in a TeX file?
 (I've seen variable-like things sometimes referred to just plainly,
 sometimes with preceding backslashes as if they were commands/macros).  (4)
 Why can't I end a square-bracketed section with a final square-bracket on a
 line of its own, as I may do in other programming languages?  (5) How are
 things like \subsection, \sub
  subsection, \subsubsubsection, ... implemented?  I am used to languages in
 which there is only a finite set of commands; why is the logic here not more
 like \section[level=1], \section[level=2], ... ?  (6) Perhaps I'm
 misunderstanding things and all this isn't actually the fundamental syntax
 of TeX but just adhoc syntax defined by various macros doing different
 things -- is this the case; to what degree can macros define syntax?
 
  Obviously I don't expect answers to all these here, but can someone point
 me to somewhere on the 'net that could answer them? The only other
 possibilities I can see are buying an expensive copy of the TeXbook, etc.
 
 First, you're confusing two things: TeX syntax and ConTeXt syntax. Most of
 what you're asking here has to do with the way ConTeXt implements things.
 For starters, I would recommend
 http://wiki.contextgarden.net/Inside_ConTeXt, especially the overview
 about System Macros.

 But if you want to actually write your own macros (or simply understand the
 way ConTeXt works) you will indeed need some understanding of TeX.
 Complaining about the price of the TeXbook doesn't sit very well with most
 TeXies (most of us think the price is reasonable, we're using this
 incredibly software for free, and if you're really poor, you can always go
 to a library), but there's an absolutely wonderful book which you can
 download for free, TeX by topic,
 http://eijkhout.net/texbytopic/texbytopic.html Personally, I find it more
 accessible than the TeXbook.

 HTH

 Thomas



 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___

___
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] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
This isn't specifically a ConTeXt question, but via it I've run into a
seemingly simple problem in METAPOST that I just can't solve.  I'm
trying to draw a parallelogram by specifying: (1) the length of sides
parallel to the x-axis; (2) the total height of the figure; (3) one of
the interior angles.  This is how I'm trying to solve it:

-

% Draw a parallelogram, like so:
%
% z3z2
% +-+   ^
%/ /|
%   / / |
%  / /  |10 units
% /BL   /   |
%+-+v
%   z0 z1
%-
%5 units
%
%Interior angle BL = 87 degrees


beginfig(1);

  z0 = origin;% bottom left
  z1 = (5,0); % bottom right
  y2 = y3 = 10;   % shape is 10 units high
  x2 - x3 = x1 - x0;  % top edge is the same length as bottom edge

  % We've completely specified z0 and z1;
  % We know that the top edge is the same length and angle as the
bottom, but lies somewhere on y = 10;
  % all we have to do is specify one angle and we have a complete parallelogram.
  %
  % The following should work as it provides the following information:
  % the unit vector from z0 to z3 is at an angle 87 degrees
anticlockwise from (0,0) -- (1,0).

  angle(z3-z0) = dir(87);

endfig;
end;



This doesn't work; using the angle() function gives the error:

   Not implemented: angle(unknown pair).

Strictly speaking, yes, z3 has an unknown x-coordinate at that time in
execution.  But I am told that METAPOST is declarative, so I would
expect my line of code to mean: set the x-coordinate of z3 such that
angle(z3-z0) = dir(87).  AFAICS that provides all the needed
information to draw the shape.

So, is there another way I can do what I want without falling into
low-level trig?



Best,


James
___
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] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
Aha!  That certainly works.  I suspected I would have to fall back on
low-level trig :).  Many thanks!

On Fri, Feb 26, 2010 at 1:44 AM, Troy Henderson thend...@gmail.com wrote:
 James,

 I apologize, but the previous information that I gave you was wrong.
 Try this instead:

 z0 = origin;
 z1 = (5,0);
 BL:=87;
 r:=10/sind(BL);
 z3 = r*dir(BL);
 z2 = z3-z0+z1;

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

___
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] Margin terminology -- badly documented, undocumented, or misdocumented

2010-02-24 Thread James Fisher
Hi all.


I am trying to understand the terminology for the \definelayout and
\setuplayout commands.
Unfortunately the documentation at
http://wiki.contextgarden.net/Layoutdoesn't correspond to the actual
output I get.
Nor does the 'documentation' at http://getfo.org/context_xml/page3.html ,
which the first page recommends.
More, the two pages seem pretty contradictory.

Consider my situation: I'm trying to set up an A4 page with the following
margins (I use the term margin to mean the space from the edge of the
physical paper to the edge of the body text area):

top: 2.97cm
bottom: 2.97cm
left: 2.1cm
right: 2.1cm

For the moment, I don't care at all about header and footer space, nor notes
in the margins; I'm just trying to get the above margins.
However, with all conceivable combinations of commands at both of those
pages, I've been unable to set anything like this up.

Based on the getfo.org page, I should be able to set up these left and right
margins with:

backspace=2.1cm,
cutspace=2.1cm

But, looking at the result, and also with using \showlayout (which for some
reason, AFAICS, generates four identical pages at the beginning of the
document), this quite obviously doesn't do what getfo.org claims.

I have also tried setting everything to 0cm with the exception of any random
one of the measurements that go into making a margin, which I would set to
2.1cm.  No avail here, either.

Can someone give me the configuration I would need for the above required
margins?  Even better, can someone give me the definitive definitions of all
the terms used in http://wiki.contextgarden.net/Layout, algebraically rather
than as ambiguous tables of Remarks?  This would help a bunch.


Many thanks,


James Fisher
___
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] Changing typeface for non-body text, using XeTeX -- how?

2010-02-21 Thread James Fisher
Hi all,


I'm new to TeX, ConTeXt, and XeTeX.
I'm progressing fine except for in one area: even though I'm told I'm using
the best possible software for easy typeface use in TeX, I'm finding this
area (i.e., fonts) confusing and badly documented.
This is all the more surprising as what I want to do seems entirely
bog-standard: set some basic brand identity by using a body typeface and
heading typeface.
There's the \setupbodyfont command for, obviously, the body font -- but I
can't identify any equivalent command like \setupheadingfont.
I can see other commands for *ad hoc* use of other fonts, but I want to
stick with as much semantic markup as possible and apply style elsewhere.
Presumably this is possible!  Could someone explain to me how to do this?


Best wishes


James Fisher


(p.s. -- I'm coming from HTML+CSS-ish paradigms here, if that would help
someone explain to me how I should reorganise my mind.)
___
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
___