[NTG-context] Best approach for project with three-part headings and table of contents references?

2008-10-01 Thread Adrian Drury
I am trying to figure out how best to use ConTeXt for a project. Essentially
I want to format postings on a message board for printing in a book, and
provide multiple tables of contents for the postings (more information
further down, and questions at the bottom). I'm sure that everything I want
to do can be done with ConTeXt, but I'm a ConTeXt beginner, and it looks as
if there's a lot of complexity to do this.

Each post has a title, an author, a date, and the text of the post. I'd like
to arrange the information roughly like this:

   Title of the post
Author author  - Date date
--
Text of the post... text text text
text text text.

Then I'd like to create a table of contents that lists posting titles by
date, like this:
January 1, 2008
 Title title title  10
 Another title .. 11
January 2, 2008
 Yet another title . 12

Putting the author in there also might be nice, like this:
January 1, 2008
 Title title title (John Doe).. 10
 Another title (Jane Doe)... 11
January 2, 2008
 Yet another title (John Doe). 12

I'd also like to have a table of contents that lists posting titles by
author, like this
Jane Doe
 A title . 14
 Another title .45
John Doe
 Title title title  35
 Another title .40

My questions:

1) How complex is this (for a beginner) to do in ConTeXt? I am very
comfortable with Perl, so I thought I could write a Perl script to parse the
posts and generate such tables of contents, with lots of \reference, \at,
and \about commands. If this needs significant complexity to solve, I would
prefer to handle the complexity with Perl, and keep the ConTeXt simple, so I
can understand it.

2) Can I (ab)use the existing heading commands (\title, \subject,
\setuphead, etc) to arrange and reference the title, author, and date? If
so, can anyone provide a hint of how to do the headings and referencing?
Will the existing heading commands let me reference the title, author, and
date values for use in my table of contents? It looks as if I would have
to create my own command that formatted the heading information how I wanted
it, and set up the three references. I looked at Alternative mechanisms in
the cont-eni.pdf, but that didn't seem to describe this type of flexibility.

3) If I can use the existing heading commands (question 2), can I also use
the existing index and/or table of contents commands (\setuplist,
\placecontent, etc)? And like  question 2, can anyone provide a hint of how
to do it? It looked to me as if a lot of custom ConTeXt code would be
necessary, and that I would have to build my own table of contents entry by
entry.

Thank you very much,
Adrian
___
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] Batch files and texmf

2007-08-10 Thread Adrian Drury
I read the list in digest form - sorry my response won't be threaded in
properly!

How about this for your question, Idris? Pure DOS batch file stuff. I tested
it with notepad instead of Acrobat, but I assume it should be close to
working as shown here.


@ echo off

IF %1== GOTO NOARG

for /R C:\context %%n IN (.) DO IF EXIST %%n\%1 (
Echo Found %%n\%1
start Acrobat.lnk %%n\%1
GOTO END
)

:NOTFOUND
echo Couldn't find %1
GOTO END

:NOARG
echo Specify a file name to find

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


[NTG-context] Lettrine and \startnarrower question

2006-01-28 Thread Adrian Drury
Hello,Using \lettrine (version 2005.08.29) inside \startnarrower\stopnarrower gives results I didn't expect - see the example below. Part of the text seems to be shifted right by an additional left-indent amount. Is this correct and/or expected behavior? If it is, is there a workaround to shift it back?
\usemodule[lettrine]\starttext\input knuth\startnarrower\lettrine{T}{est} \input knuth\stopnarrower\stoptextThanks,Adrian Drury

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


Re: [NTG-context] Dropped caps, \startlines\stoplines, and indentation question

2006-01-28 Thread Adrian Drury
Radhelorn wrote:Adrian Drury wrote:
 Hello,
 I'm having trouble using dropped caps within \startlines\stoplines. I'm trying to typeset some poetry and I'm using \setuplines[space=yes]. I'd like to use dropped caps and have the indented lines be additionally indented by any space at the beginning
 of the lines. See the following example - the first part shows roughly the result I want (but with manual formatting/spacing), the second part shows the result of \DroppedCaps inside \startlines\stoplines, and the third
 part uses the lettrine module. The lettrine module comes close, but Nindent doesn't seem to affect the indented lines within \startlines\stoplines. \usemodule[lettrine] \def\MyDroppedCaps%
 { \DroppedCaps {} {Serif} {2\baselineskip} {2pt} {1\baselineskip} {2} } \setuplines[space=yes] \starttext \MyDroppedCaps S{\sc umer} is icumen in,\crlf

 \hbox to .6em{}Lhude sing cuccu!\crlf Groweth sed, and bloweth med,\crlf \hbox to .6em{}And springth the wude nu---\crlf \hbox to 3.3em{}Sing cuccu! \startlines \MyDroppedCaps S{\sc umer} is icumen in,
 Lhude sing cuccu! Groweth sed, and bloweth med, And springth the wude nu--- Sing cuccu! \stoplines \startlines \lettrine{S}{umer} is icumen in,
 Lhude sing cuccu! Groweth sed, and bloweth med, And springth the wude nu--- Sing cuccu! \stoplines \stoptext Any suggestions for how to do this? I'm a beginning ConTeXt user, so
 if there's a better/different way to do this, I'd be happy to hear it! Also, I read the list in digest form. For the benefit of people using threaded mail readers, is there a better way to reply to individual
 messages than replying to the digest message and editing the Subject line appropriately? Thanks very much, Adrian Drury ___

 ntg-context mailing list
 ntg-context@ntg.nl 

http://www.ntg.nl/mailman/listinfo/ntg-contextTry\startlines
\vbox{\lettrine{S}{umer} is icumen in,\crlf Lhude sing cuccu!}Groweth sed, and bloweth med,And springth the wude nu---Sing cuccu!\stoplines--Radhelorn 


[EMAIL PROTECTED]Thank you very much for your suggestion - it does most of what I want to do. I have a follow-up question if anybody would like to provide more help! Because lines in \startlines\stoplines with \setuplines[space=yes] can be indented by space characters, I want to set Nindent for the dropped cap to (N * width of space character), so lines can be indented by the exact same amount they would be with spaces in \startlines\stoplines.
Is there a way to calculate the width of some number of characters (or a string of characters) to use as a dimension parameter? For example, a macro that returns the width in points of 5 space characters in the current font? I figured hardcoding the width of a space as a percentage of an em might work, but would probably not be consistent across fonts. Is that true, or is it really that simple?
I'd also be happy with a way to preserve spaces in the text inside the vbox (and ignore any Nindent dimension calculation), because
then I could just add the appropriate number of spaces for indentation
after the \crlf, like this: \vbox{\lettrine{S}{umer} is icumen in,\crlf
2 spacesLhude sing cuccu!}, as I do in \startlines\stoplines.Thanks very much,Adrian Drury
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Dropped caps, \startlines\stoplines, and indentation question

2006-01-21 Thread Adrian Drury
Hello,

I'm having trouble using dropped caps within \startlines\stoplines.
I'm trying to typeset some poetry and I'm using
\setuplines[space=yes]. I'd like to use dropped caps and have the
indented lines be additionally indented by any space at the beginning
of the lines.

See the following example - the first part shows roughly the result I
want (but with manual formatting/spacing), the second part shows the
result of \DroppedCaps inside \startlines\stoplines, and the third
part uses the lettrine module. The lettrine module comes close, but
Nindent doesn't seem to affect the indented lines within
\startlines\stoplines.

\usemodule[lettrine]
\def\MyDroppedCaps%
{   \DroppedCaps
{} {Serif} {2\baselineskip} {2pt} {1\baselineskip} {2}
}
\setuplines[space=yes]

\starttext
\MyDroppedCaps S{\sc umer} is icumen in,\crlf
\hbox to .6em{}Lhude sing cuccu!\crlf
Groweth sed, and bloweth med,\crlf
\hbox to .6em{}And springth the wude nu---\crlf
\hbox to 3.3em{}Sing cuccu!

\startlines
\MyDroppedCaps S{\sc umer} is icumen in,
  Lhude sing cuccu!
Groweth sed, and bloweth med,
  And springth the wude nu---
  Sing cuccu!
\stoplines

\startlines
\lettrine{S}{umer} is icumen in,
  Lhude sing cuccu!
Groweth sed, and bloweth med,
  And springth the wude nu---
  Sing cuccu!
\stoplines
\stoptext

Any suggestions for how to do this? I'm a beginning ConTeXt user, so
if there's a better/different way to do this, I'd be happy to hear it!

Also, I read the list in digest form. For the benefit of people using
threaded mail readers, is there a better way to reply to individual
messages than replying to the digest message and editing the Subject
line appropriately?

Thanks very much,
Adrian Drury
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] kpathsea355.dll missing from 2005-11-16 mswintex.zip and mswincontext.zip

2005-11-23 Thread Adrian Drury
The mswintex.zip and mswincontext.zip files on www.pragma-ade.com,
dated 2005-11-16, are missing the kpathsea355.dll file from
root/tex/texmf-mswin/bin.

I discovered this while trying the URW Garamond installation
instructions in the wiki, and the texfont command failed running
vptovf.

The kpathsea355.dll file was in mswincontext.zip that I downloaded at
the beginning of September, so I copied it from there to my minimal
(re)installation (and successfully completed the URW Garamond
installation instructions).

For future reference, is this type of issue better tracked in the collector?

Regards,
Adrian Drury
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context