Re: [NTG-context] Number formatting in \unit

2011-12-11 Thread Robin Kirkham
On 11 December 2011, Xenia yor...@googlemail.com wrote:

 Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au:
 All,
 
 I have put together some suggestions to extend the number formatting
 capability in \unit, particularly for scientific and engineering purposes,
 including basic support for tolerances and uncertainties.
 
 It is a bit long, so source is attached and a PDF is at
 
 http://dl.dropbox.com/u/36891398/units6.pdf
 
 Of course, this is just my opinion, so I welcome any feedback from the list.
 
 I like your suggestions. Especially the current handling of `e-23` etc.
 is not intuitive but rather confusing and does not meet the standard.
 
 I do not know if there is already a solution for automatically
 shortening the number of digits in the output, but that would be nice, too.
 
 Xenia

Yes, I thought about that, of course, but did not put it forward because to do 
it properly the correct numeric rounding/significant figures rules should be 
applied, and that I guess means the Lua code needs to interpret the number, 
rather than just treat it as a sequence of digits.

However if the Lua code did interpret the number into an internal format it 
would enable other things like normalisation to scientific or engineering form, 
etc. However the internal format would have to support arbitrarily long numbers 
and exponents ... Lua's built-in internal number format (a double precision 
float, I think) would not do, so there would be a bit of coding involved.

Robin

___
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] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-20 Thread Robin Kirkham
On 18/11/2011, at 10:00 PM, Pontus Lurcock p...@talvi.net wrote:

 On Fri 18 Nov 2011, Hans Hagen wrote:
 so, best is that those asking for it come up with a list of issues:
 which symbols need this option, is it language related or whatever,
 so that i can do them all at once. We can already have different
 mapping sets so spacing could be part of that.
 
 I don't personally have a need for units in the foreseeable future (I
 was just nitpicking with Robin about spacing) so feel free to ignore
 any of my suggestions, but I think the summary so far would be:
 
 1. Spacing for almost all SI units should be the same and doesn't
   need special cases.
 
 2. Geographical degrees/minutes/seconds should have no spaces.
 
 3. Spacing for degrees temperature varies according to different style 
   guides -- both before and after the ° -- so ideally it would be
   possible to set these independently of the rest of the units.
 
 For my own part I would add:
 
 4. SI unit abbreviations are mostly capital letters, and look (to me)
   strange with old-style figures. I have seen books which used 
   old-style figures for page numbers, years, etc. but switched to
   lining figures when a unit was involved; this is also what I did
   in my thesis. So I think it would be useful to allow an automatic
   switch to lining figures to be configured when typesetting a unit.
 
 Pont

I agree on points 1 and 2 (although it seems arcminute and arcsecond are
not implemented anyway). Point 3, yes, but I'm dubious about space after °
for the temperature units °C or °F as it breaks the rule about unit
ambiguity (° C is a degree-Coulomb -- although I can't image a physical
situation that would need such a unit). Point 4 is a bit beyond the scope
of the SI units scheme but sounds like a potential need.

Over the weekend I've discovered a couple more problems with \unit so I'll
make up some test cases and desired output and post it in a few days.

Robin___
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] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-17 Thread Robin Kirkham
Dear Hans,

Many thanks for implementing space=small in \setupunits. It works nicely for me.

However in the latest beta, Hertz is typeset as hz not Hz. It looks like the 
problem is line 154 of phys-dim.lua (it was typeset correctly a couple of days 
ago).

Also the symbol for lux (line 198) should be lx [2].

Degrees, minutes and seconds of arc (also degrees Celsius) are an exception and 
are not supposed to have any space between the digits and the degree symbol 
[1], so to be correct, I think Context should by default veto any space between 
digits and numbers, in these cases only.

BTW, NIST has a handy reference for anyone typesetting physical quantities [1], 
although the BIPM documentation is the canonical reference.

Robin

\starttext
\unit{1 Hz} (should be Hz)\par
\unit{180 deg} (should be no space)\par
\stoptext

[1] http://www.bipm.org/en/si/si_brochure/chapter5/5-3-2.html
[2] http://physics.nist.gov/cuu/Units/

___
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] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-17 Thread Robin Kirkham
On 18/11/2011, at 1:05 PM, I wrote:

 Degrees, minutes and seconds of arc (also degrees Celsius) are an exception 
 and are not supposed to have any space between the digits and the degree 
 symbol [1], so to be correct, I think Context should by default veto any 
 space between digits and numbers, in these cases only.

Correction, I should have written (but not degrees Celsius), apologies.

Robin
___
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] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-17 Thread Robin Kirkham
On 18/11/2011, Pontus Lurcock p...@talvi.net wrote:

 Degrees, minutes and seconds of arc (also degrees Celsius) are an
 exception and are not supposed to have any space between the 
 digits and the degree symbol [1], so to be correct, I think 
 Context should by default veto any space between digits and 
 numbers, in these cases only.
 
 Correction, I should have written (but not degrees Celsius),
 apologies.
 
 Conventions for setting the degrees of temperature symbol vary; see
 http://en.wikipedia.org/wiki/Degree_symbol#Typography and references
 therein. In most professionally published works that I've seen, there
 is no space between the number and the °, or between the ° and the C.

Pont, 

I agree they vary, and no space before the °C is quite common (and frequently 
my own practice too). However in setting default behaviour for Context I am 
inclined to favour conforming to international standards, where they exist (but 
a \setupunits override it probably called for).

Robin___
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] Bibliographic Databases

2008-04-20 Thread Robin Kirkham
On 20 April 2008, George N. White III [EMAIL PROTECTED] wrote:

 On Thu, Apr 17, 2008 at 11:19 AM, Robin Kirkham  
 [EMAIL PROTECTED] wrote:

  I want to set up a shared bibliographic reference database for my
  research group, [...]

 I can tell you a few things that don't work!  In our lab we have both
 TeX and Word users.  Many of them had been using a DOS package
 called papyrus, using a special markup that could be translated
 to tex (.bbl) files.  Nothing we found was really satisfactory, so
 we bought EndNote, which could import from papyrus via refer
 format and can export to almost bibtex.  One problem is that
 EndNote uses unicode, so we end up with è, etc. that must
 be translated for some user's versions of bibtex.  The database
 now has a nearly infinite variety of different quote marks:
 `a`, 'a', ``a'', a, etc. depending on how the entry was made
 (many are pasted from online or pdf sources).

 EndNote is really designed for individual users, although sold
 in bulk.  If 2 people open the same database on a shared
 drive they end up with a corrupt database.

 In my view, a bibliographic database needs to store each
 reference in the source or original format, whether bibtex,
 refer, or one of the newer forms, and provide translators
 and version tracking, so each file can have forks for different
 uses (e.g., ascii vs unicode char. sets) and edits can be
 preserved for the next user.  In practice, people just dump
 selected refs to a bib file, make the .bbl file, and fix problems
 there, so fixes rarely make it back to the master database.
 If they did, we would still have accents and quote marks
 being switched back and forth depending on who last used
 the entry.


Thanks George. EndNote is I believe the corporately-approved solution  
here, and similar disasters occur when people try and share its data  
files. For this reason I don't call these sorts of personal-level  
programs databases (any more than I'll call a .bib file a database).

The TeX folk don't fare much better. Multiple personal .bib files are  
common, often with duplicate references but different citation keys,  
leading to rather variable results depending on who run LaTeX/ConTeXt  
on the file. Inconsistency in data entry is also a problem, although  
for us, accents and quotes don't seem to too big a problem.  
(`Authorless', i.e., corporate author documents, like data sheets,  
seems to be more of an issue).

For this reason I'm looking for a proper SQL database solution like  
refdb or refbase (or maybe wikindx, thanks Andreas) with a web front- 
end that will hopefully enforce somewhat more consistent data entry,  
and maybe even auto-generate citation keys. Taco, your remarks  
regarding interchange formats are valuable (both refdb and refbase  
support MODS XML output).

Robin
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Bibliographic Databases

2008-04-17 Thread Robin Kirkham
Dear all,

I want to set up a shared bibliographic reference database for my  
research group, and I'm looking at software like refbase http:// 
refbase.sourceforge.net/ or refdb http://refdb.sourceforge.net/ to  
replace the somewhat random collection of personal BibTeX .bib files  
we have.

Does anyone have any experience or advice to offer in using such  
things, and hooking them up to ConTeXt?  Most of these systems will  
of course emit a .bib file which will obviously work, but will any  
emit the .bbl so I can forget about BibTeX?  Will luatex one day  
connect to a bib database and fetch the details of a cited  
reference?  Is there a ConTeXt approved way forward for this sort  
of thing?

Thanks in advance, Robin
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Module for svn info

2008-01-23 Thread Robin Kirkham

Hi Ernesto,
hi Robin,

thanks for your replies.

The thing I like most with your solution is that svnversion provides a
modify flag, so I can see whether all changes have been cheched in.  
Great.


A little drawback is that all files under the current path are used to
determine the version. If theres a file in the path which is not part
of the document changes to this file will also change the revision of
the document. But I think this can be easily prevented by placing
every document into an own directory.

What do you think of using:

\def\SVNVERSION{svnversion -n  svnversion.tex}

\ifeof18
\installprogram{\SVNVERSION}%
\else
\executesystemcommand{\SVNVERSION}%
\fi


That is nicer of course ... I just do it outside the document in a  
Makefile because I'm used to doing that sort of thing.


I imagine the only uncompromised way to extract an svn revision (or  
revision range) that covers the whole document accurately is to write  
a script that extracts the source file names from the previous  
logfile (or somewhere), individually determines their revision using  
svn status (to get modified status), and constructs an overall  
result. I guess some embedded Lua could do that pretty easily and  
portably. It would also catch files that are often outside the  
immediate document directory (in particular, bib files).



Ernesto Schirmacher schrieb:

If your sources are in svn, then they actually have the same svn-
 number, after a commit. But the numbers in the $Revision$ or
$Id$ tags of your working copies are not updated by svn commit.
However, if you do an svn update after the commit, it should
update the numbers.


This is not true. The complete name of $Rev§$ is
$LastChangedRevision$. It's the revision of the last change to this  
file.


Quite right, my apologies. An svn update does however alter the  
output of svnversion, for instance if it indicates a mixed revision  
(1234:3456), after an update it will be just 3456.


Best,

Robin___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Module for svn info

2008-01-21 Thread Robin Kirkham
Hi Markus,

If your sources are in svn, then they actually have the same svn- 
number, after a commit. But the numbers in the $Revision$ or $Id$ tags  
of your working copies are not updated by svn commit. However, if you  
do an svn update after the commit, it should update the numbers. So,  
you shouldn't need to work out the maximum value.

Here, we actually use the output of the svnversion command, save it  
automatically it in a file, and include it in the document. This way,  
the version number indicates if the document came from checked-in  
sources, modified sources, or mixed revisions. We don't have a module  
to do it, just a

 svnversion  svnversion.tex ; texexec document.tex

in the Makefile, and on the document front page somewhere

 \doiffileelse{svnversion.tex}{
Subversion revision
\ignorespaces \input svnversion\relax \removeunwantedspaces . 
\crlf
 }{}

Cheers,

Robin

 Hi Aditya,

 thanks for your reply. It's a good starting point.

 One thing is missing in this solution.

 Our documents are structured into several files.
 Every file has an svn-version. So I want to
 calculate the max version.

 Do you know a small example where a max value
 is calculated. I would try to integrate it into
 the other example.

 Kind regards,
 Markus
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] page numbering in words?

2007-04-16 Thread Robin Kirkham
Hi all,

There are still a few problems with \numstr when you get beyond the  
hundreds. Perhaps this is unlikely when it is a page number, but I  
was interested in using this macro for contracts, where an amount of  
money is often written out in words.

\input numstr.tex
\starttext
\numstr{-1}\par
\numstr{0}\par
\numstr{101}\par
\numstr{1001}\par
\numstr{101}\par
\numstr{1200021}
\stoptext

This produces output:

null
null
one hundred and one
one thousand one
one millionone
one million two hundred thousand twenty-one

which should be:

minus one
zero
one hundred and one
one thousand and one
one million and one
one million, two hundred thousand and twenty-one

In English, the tens/units (if not zero) should be preceded by and  
if the number exceeds 100 (so 101 is correct in the above output).  
This applies whether the tens/units is truly tens/units, or is a  
thousands or millions multiplier (12 = one hundred and twenty  
thousand).

The use of a comma after millions and sometimes thousands is helpful  
but not essential, and it only appears in certain cases. I'll have to  
think a bit more about a rule for that!

The use of a hyphen between tens and units (twenty-one) is not  
incorrect but is nowadays probably regarded as a little old-fashioned  
(but personally, I like it).

Best,

Robin

 Date: 2007-03-29 17:38 +1000
 To: mailing list for ConTeXt users
 Subject: Re: [NTG-context] page numbering in words?
 cormullion.at.remove.this.mac.com wrote:
  On 2007-03-28, at 16:49.0, Zhichu Chen wrote:
 
  I modified Wolfgang's macro as the attached file. But I'm really
  not a native American, so there must be some special rules that
  I've ignored. Wish you good luck.
 
  Yes - this works great now. Thank you for sorting out the TeX code,
  which is like no other language I know ;-). I've changed only one
  spelling (fourty - forty) and the rest looks perfect.

 It would be nice if someone (one of the module tutorial attendants :-)
 could wrap this command in a module for the contextgarden page.

 Cheers,
 Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt and vim spell check

2007-04-02 Thread Robin Kirkham
On 02/04/2007, at 10:42 AM, I wrote:

 I'm using vim 7.0.17. When I edit a ConTeXt source file, it does  
 the syntax highlighting correctly, but it won't do spelling error  
 highlighting.

 It works for other filetypes (including LaTeX).

 Is there something extra needed in .vimrc? I have

 filetype plugin indent on
 syntax enable
 set spell spelllang=en_au

I find that typing :syntax spell toplevel in to vim after you have  
opened your ConTeXt source file switches spell checking on. Putting  
this line in in your .vimrc does not. Putting it at the end of syntax/ 
context.vim (in the vim system directory) does, however.

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] ConTeXt and vim spell check

2007-04-01 Thread Robin Kirkham
Hi,

I'm using vim 7.0.17. When I edit a ConTeXt source file, it does the  
syntax highlighting correctly, but it won't do spelling error  
highlighting.

It works for other filetypes (including LaTeX).

Is there something extra needed in .vimrc? I have

 filetype plugin indent on
 syntax enable
 set spell spelllang=en_au

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Equivalent to \settowidth

2007-03-17 Thread Robin Kirkham
 From: Hans Hagen [EMAIL PROTECTED]
 Wolfgang Schuster wrote:
 2007/3/14, Robin Kirkham [EMAIL PROTECTED]:

 Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better  
 still
 some macro I can do things like

 \setupsomething[
  ...
  width={\widthof{\bf sometext\emspace}},
  ...]

 \def\setwidthof#1\to#2%
 {\bgroup
  \setbox\scratchbox\hbox{#1}%
  \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

Thanks Wolfgang, Chen and Hans for your responses. I used Hans'  
one ... it seems to work.

I'm actually trying to indent tables of contents by level. I want  
each indent to match the start of the heading text of the previous  
level, i.e.,

1  Chapter
1.1  Section
 1.1.1  Subsection
 1.1.2  Subsection
...
Title

in other words, the indent is not quite a fixed width per level.

The following complete example sort of does what I want (using Hans'  
\setwidthof) but it will fail when the section numbers have more  
digits than I have allowed for.
I have a feeling I should be using \setupcombinedlist[content] 
[distance=1em] or something, but that puts an em space in front of  
unnumbered chapters (titles) as well.

What I have done seems very ugly, surely there is a proper way?

Robin

% widthof macro from Hans
\def\setwidthof#1\to#2%
 {\bgroup
 \setbox\scratchbox\hbox{#1}%
 \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

\setupcombinedlist[content][
 alternative=c,
 aligntitle=yes]
\setuplist[chapter][
 alternative=b,
 style=bold]

% calculate widths of numbers
\setwidthof{\bf 9\emspace}\to\WDA
\setwidthof{9.9\emspace}\to\WDB
\setwidthof{9.9.9\emspace}\to\WDC
\setwidthof{9.9.9.9\emspace}\to\WDD

% calculate margins
\setwidthof{{\bf 9\emspace}}\to\MAB
\setwidthof{{\bf 9\emspace}9.9\emspace}\to\MAC
\setwidthof{{\bf 9\emspace}9.9\emspace 9.9.9\emspace}\to\MAD

\setuplist[chapter] [margin=0em,  width=\WDA]
\setuplist[section] [margin=\MAB, width=\WDB]
\setuplist[subsection]  [margin=\MAC, width=\WDC]
\setuplist[subsubsection]   [margin=\MAD, width=\WDD]


\starttext

\completecontent[criterium=all]
\page

\startfrontmatter
\chapter{Unnumbered Chapter}
\stopfrontmatter

\startbodymatter
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\subsubsection{Subsubsection}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\chapter{Chapter}
\stopbodymatter

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Equivalent to \settowidth

2007-03-14 Thread Robin Kirkham
Hi all,

Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still  
some macro I can do things like

\setupsomething[
  ...
  width={\widthof{\bf sometext\emspace}},
  ...]

Cheers,

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about context

2007-03-10 Thread Robin Kirkham
Hi Wolfgang,

Many thanks for you help. I solved this problem by simply

\setuplayout[%
 ... ,
 leftedge=20mm,
 rightedge=20mm]
\setupheader[after=\hrule]

It seems that if you give only one argument to \setupheader, it  
applies to the whole header, including the left and right edges. So,  
I just extend the edges off the page (or anywhere I need -- I don't  
use the edges for anything else).

I'll use your \vrule idea to control the line thickness, although the  
\hrule default is about right anyway.

Thanks,

Robin


 Moreover, how do you get a rule in the header that extends from the
 left of the left margin, right across to the right of the right
 margin (including the gaps in between)?

 On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:

 From: Oliver Buerschaper [EMAIL PROTECTED]
 Date: 6 March 2007 9:19:23 PM
 Subject: Re: [NTG-context] Some questions about context

 And another question (in other topic): how we can do lines at
 header and
 footer like fancyheaders in latex?

 For your headers try this:

 \setupheader
 [text]
 [after=\hrule]

 Hi Robin,

 I tried to make something working and came to the following three
 methods to draw a rule under the header at the whole pagewidth.

 If you use ConTeXts default layout with different margins you should
 use bigger values for the rulewidth than only pagewidth.

 \setuplayout[location=middle,cutspace=\backspace,width=middle]
 %\setuppapersize[A5][A4]
 %\showframe

 \startuseMPgraphic{headerrule}
 setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
 \headerheight); draw (0,0)--(\the\paperwidth,0);
 \stopuseMPgraphic

 \defineoverlay
   [headerrule]
   [\useMPgraphic{headerrule}]

 \defineoverlay
   [headerrule]
   [\vrule height\headerheight width0pt%
\vrule width\paperwidth height 0.4pt\relax]

 \defineoverlay
   [headerrule]
   [{\framed[width=\paperwidth,height=
 \headerheight,frame=off,bottomframe=on]{}}]

 \setupbackgrounds
   [header]
   [text]
   [background=headerrule]

 \starttext

 \input knuth

 \stoptext

 Wolfgang

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about context

2007-03-06 Thread Robin Kirkham
Hi all,

Moreover, how do you get a rule in the header that extends from the  
left of the left margin, right across to the right of the right  
margin (including the gaps in between)?

Cheers,

Robin

On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:

 From: Oliver Buerschaper [EMAIL PROTECTED]
 Date: 6 March 2007 9:19:23 PM
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Some questions about context

 And another question (in other topic): how we can do lines at  
 header and
 footer like fancyheaders in latex?

 For your headers try this:

 \setupheader
   [text]
   [after=\hrule]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] (repost) How to put float caption header in margin?

2007-02-28 Thread Robin Kirkham
Hi all,

I fear to re-post this request, but I've read (well, tried to read)  
page-flt.tex and I still am not certain what to do (or what to  
override) to do this. The command key of \setupcaptions is not  
useful, as it seems to pass the entire caption (including the header  
part) as a single argument:

How can I put the header part only of a float caption (i.e., the  
Figure 6 bit) in the left margin (so as to match \setupheads 
[alternative=inmargin]), but leaving the caption text part in the  
normal place?

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to put float caption header in margin?

2007-02-25 Thread Robin Kirkham
Hi all,

How can I put the header part only of a float caption (i.e., the  
Figure 6 bit) in the left margin (so as to match \setupheads 
[alternative=inmargin]), but leaving the caption text part in the  
normal place?

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bib module and prefix=+

2007-02-07 Thread Robin Kirkham
Hi Taco,

I tried this (in t-bib.tex and separately my test file) and I'm  
afraid it did not fix my problem (no change at all). Please let me  
know if there is anything else I should try.

Robin


 Author: Taco Hoekwater
 Date: 2007-02-07 19:14 +1100
 To: mailing list for ConTeXt users
 Subject: Re: [NTG-context] Bib module and prefix=+

 Dave wrote:
  Hi Robin,
 
  This sounds quite similar to the problem I posted yesterday where:
 
  \setuphead[chapter][ownnumber=yes]
 
  makes
 
  \placepublications[criterium=chapter]
 
  fail silently. Taco has taken a look at it and written me off the  
 list but
  there isn't a solution yet.

 I narrowed this down to my redefinition of the \dosetfilterlevel  
 macro.

 But I need that redefinition, because otherwise \cite in frontmatter
 and appendices (where the numbers are alphabetic or romannumerals)
 doesn't work.

 Can you both try to see if this version fixes the problems?
 (one new line)

 \unprotect
 \def\patcheddosetfilterlevel#1#2%
{\bgroup
 \let\@@shortsectionnumber\@@sectionvalue % NEW
 \ignoresectionconversion
 \edef\askedlevel{#1}%
 \edef\askedfilter{#2}%
 \ifx\askedlevel\v!current
   \dosetcurrentlevel\askedlevel
 \else\ifx\askedlevel\v!previous
   \dosetpreviouslevel\askedlevel
 \else\ifx\askedlevel\v!all
   \global\chardef\alltoclevels\plusone
 \else\ifx\askedlevel\v!text
   \global\chardef\alltoclevels\plusone
 \else
   \edef\byaskedlevel{\csname\??by\askedlevel\endcsname}%
   \ifx\byaskedlevel\v!text
 \dosettextlevel\askedlevel
   \else
 \dosetotherlevel\askedlevel
   \fi
 \fi\fi\fi\fi
 \ifx\askedfilter\empty \else
   \xdef\currentlevel{\currentlevel\sectionseparator\askedfilter}%
 \fi
 \egroup}
 \protect


 Best, Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Bib module and prefix=+

2007-02-06 Thread Robin Kirkham
Hi,

How can the bib module and \setuphead[chapter][prefix=+] be made to  
coexist?  The following example works, but if you uncomment the  
\setuphead, the citations are broken and the reference list vanishes:

\setupoutput[pdftex]

% uncomment this line and it breaks
%\setuphead[chapter][prefix=+]

\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database={xampl.bib}]
\setuppublications[refcommand=num]

% makes no real difference
%\setuppublicationlist[title=\chapter]

\version[temporary]

\starttext

\chapter[chapt]{A Chapter}

Some citations: \cite[article-full] \cite[inbook-full] \cite[manual- 
full].
This is chapter~\in[chapt].

\completepublications[criterium=all]

\stoptext


Any help much appreciated!

PS: The following old mailing list article appears to describe the  
same problem, but the symptoms are different (citations disappear,  
but reference list does not)

 http://archive.contextgarden.net/message/ 
20010516.173217.113e3787.en.html

Robin

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Default preference for float location

2007-01-22 Thread Robin Kirkham
Hi,

I'd like to set up floats (figures, tables, etc) so they float to the  
bottom of the page, by default (as if you always wrote \placefigure 
[bottom][...]{}{}). There does not seem to be an option to  
\setupfloats[] that will do this, or have I missed something?

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Long and short captions

2007-01-22 Thread Robin Kirkham
Hi again,

Is there a way in ConTeXt to have long and short versions of a  
figure caption, as one can in LaTeX? The long caption is placed  
with the figure, the short one for the list of figures.

Thanks,

Robin
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context