Re: [NTG-context] Multiple pleas for help (long)

2010-06-06 Thread Scott Steele

 Am 01.06.10 00:29, schrieb Scott Steele:

 If anyone has any insight on how to keep the footnotes from having

 their numbers in the margin and from having line-breaks after each

 one, that is the only issue from the original email that is still

 unsolved, I think.



 ———



 In Latex, \fancybreak was part of a package called, I believe,

 fancyheader or fancypage. It produced a break frequently seen in

 published prose (I'm currently reading {\em Bluebeard} where Kurt

 Vonnegut uses it liberally) with significant vertical space between

 two paragraphs and, centered both in that vertical space as well as

 horizontally, a number of well-spaced marks. There are usually 3

 marks, and they are frequently asterisks or traditional

 dingbats/fleurons. This sort of break is generally used when the

 author wishes to indicate a break more significant than a change in

 paragraph but short of an outright new chapter.



 \def\FancyBreak{\par\blank\hfill* * *\hfill\hfill\par\blank}

 \starttext

 \input tufte

 \FancyBreak

 \input tufte

 \stoptext



 I don't understand why I need the two consecutive \hfill's at the end

 for the marks to be centered, but the definition works well for me.


 \unprotect


 \def\fb{fb}


 \getparameters

[\fb]

[\c!spacebefore=,

\c!spaceafter=]


 \def\fancybreakparameter#1%



 {\csname\fb\ifcsname\fb\currentfancybreak#1\endcsname\currentfancybreak\fi#1\endcsname}


 \def\setupfancybreak

{\dodoubleempty\dosetupfancybreak}


 \def\dosetupfancybreak[#1][#2]%

{\ifsecondargument

\getparameters[\fb#1][#2]%

\else

\getparameters[\fb][#1]%

\fi}


 \def\definefancybreak

{\dodoubleempty\dodefinefancybreak}


 \def\dodefinefancybreak[#1][#2]%

{\ifsecondargument

\getparameters[\fb#1][#2]%

\fi

\setvalue{#1}{\dofancybreak{#1}}}


 \def\dofancybreak#1%

{\begingroup

\edef\currentfancybreak{#1}%

\everyvbox{\raggedcenter}%

\dowithnextbox

{\blank[\fancybreakparameter\c!spacebefore]%

\flushnextbox

\blank[\fancybreakparameter\c!spaceafter]%

\endgroup}

\normalvbox}


 \definefancybreak[fancybreak]


 \protect


 \starttext

\input knuth

\fancybreak{$* * *$}

\input ward

\stoptext


 Wolfgang



 ___




Thanks a lot for all of that! I'm having trouble getting it to run, though.
I tried copy/pasting it into the Context Live site but get

! Argument of \fancybreakparameter has an extra }.
inserted text
\par
to be read again
   }
\edefconvertedargument #1#2-\edef #1{#2}
 \edef #1{\detokenize \...@ea {#1}}
\docomplexdoblank ...convertedargument \ascii {#1}
  \ifcsname \??bo \??bo \asc...

\dodowithnextbox ...reakparameter \c!spacebefore ]
  \flushnextbox \blank [\fan...
l.52 \fancybreak{$* * *$}

?
! Emergency stop.
inserted text
\par
to be read again
   }
\edefconvertedargument #1#2-\edef #1{#2}
 \edef #1{\detokenize \...@ea {#1}}
\docomplexdoblank ...convertedargument \ascii {#1}
  \ifcsname \??bo \??bo \asc...

\dodowithnextbox ...reakparameter \c!spacebefore ]
  \flushnextbox \blank [\fan...
l.52 \fancybreak{$* * *$}



Thanks,

Scott
-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] Multiple pleas for help (long)

2010-05-31 Thread Scott Steele
If anyone has any insight on how to keep the footnotes from having their
numbers in the margin and from having line-breaks after each one, that is
the only issue from the original email that is still unsolved, I think.

———

In Latex, \fancybreak was part of a package called, I believe, fancyheader
or fancypage. It produced a break frequently seen in published prose (I'm
currently reading {\em Bluebeard} where Kurt Vonnegut uses it liberally)
with significant vertical space between two paragraphs and, centered both in
that vertical space as well as horizontally, a number of well-spaced marks.
There are usually 3 marks, and they are frequently asterisks or traditional
dingbats/fleurons. This sort of break is generally used when the author
wishes to indicate a break more significant than a change in paragraph but
short of an outright new chapter.

\def\FancyBreak{\par\blank\hfill* * *\hfill\hfill\par\blank}
\starttext
\input tufte
\FancyBreak
\input tufte
\stoptext

I don't understand why I need the two consecutive \hfill's at the end for
the marks to be centered, but the definition works well for me.

———

Thanks, Wolfgang, for your help with the emoticons—they work now.
\useexternalfigure[frowny][Frowny][factor=8,type=pdf]
\def\Frowny{\dontleavehmode\smash[h]{\externalfigure[frowny]}}

Also, thanks for the \simplealignedbox, which works very well in my table of
contents (although I have to put a \par at the end of it or it stays on one
line and goes off the page). I don't understand why, but Tex didn't like
having a \par inside the type of definition you used, but it allowed the
following:
\def\SectionListEntry#1#2#3%
{
\noindent
\simplealignedbox{left}{2cm}{#2}%
\simplealignedbox{middle}{5mm}{·}%
\simplealignedbox{right}{3cm}{#3}%
\par
}

(I have a few issues with my table of contents, but these are now less
specific to \placelist, so I'm including them in a different posting.)



Thanks again for all the help,

Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] Title page layout

2010-05-31 Thread Scott Steele
I'm trying to anchor a table or box containing my title and subtitle to the
bottom right corner of the textblock (on a title page). The following comes
very close to doing what I want, but there is still some vertical space
between the bottom of the text of the subtitle and the last major horizontal
gridline. How can I have the subtitle text be (above and) flush with the
last major horizontal gridline in the same way that it is flush with the
rightmost vertical gridline? NOTE: Small adjustments to the example I
provide might not be helpful for me since, in actuality, I'm using Adobe
Jenson, which makes both the metrics and the expression of the problem
slightly different.

Also, are there max/min functions for dealing with dimexpr's?

%\definetypeface[jenson][rm][Xserif][Adobe Jenson Pro]
%\setupbodyfont[jenson, 11pt]

\definepapersize[pocket][width=4.25in,
height=6.875in]

\setuppapersize[pocket][pocket]

\setuplayout[location=middle,
 width=0.815\paperwidth,
rightmargindistance=0in,
leftmargindistance=0in,
 height=middle,
margin=0.08\paperwidth,
backspace=0.115\paperwidth,
 marking=off,
grid=yes,
topspace=0.018889\paperheight,
 header=0.04\paperheight,
footer=0.04\paperheight,
bottomspace=0.038889\paperheight]

\setuppagenumbering[alternative=doublesided,
location={footer,marginedge}]

\def\givewidthof#1\to#2%
{
\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}
} % From a response by Hans to a mailing list question. It was originally
\setwidthof#1\to#2, which—in English at least—sounds somewhat ambiguous with
regard to which variable is providing a width.

\def\TitlePage#1#2%
{
\givewidthof{\scc #2}\to\SubtitleWidth
\newdimen\TitlePageVar
 \TitlePageVar=\dimexpr(\textwidth-\SubtitleWidth)
\dontleavehmode\vfill
\starttable[s(0pt)|lw(\TitlePageVar)|cw(\SubtitleWidth)|]
 \NC\NC{\scd #1}\AR
\NC\NC{\scc #2}
\stoptable
 \page
}

\showgrid
\startfrontmatter
\TitlePage{Title}{Longer Subtitle}
\stopfrontmatter



Thanks,
Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] Frontmatter page numbers and using ifodd / pageno

2010-05-31 Thread Scott Steele
With the page layout setups I'm using, the first table of contents entry on
each page (except for the first page) is formatted as if it were on the
preceding page. I assume that the page number is not advancing until some
number of objects are placed on the page. When I compiled the example
included below, it was the first three entries on each page (after the first
page) that were formatted as if they were on the previous page.

Related to this, I need invisible page numbers on the table of contents
pages to enable different formatting by odd/even page number (which I
accomplish now by using \phantom as a style command for page numbering), but
I'd like for the page numbering of the body matter to start at 1.

Also, how can I number the front matter backward? Like: xi, x, ix, viii,
vii, vi, v, iv, iii, ii, i.

\def\SectionListEntry#1#2#3%
{
\noindent
 \noexpand{\ifodd\pageno
\simplealignedbox{left}{.63667\textwidth}{#2}
\simplealignedbox{middle}{.06\textwidth}{·}
 \simplealignedbox{right}{.30333\textwidth}{#3}
\else
\simplealignedbox{left}{.30333\textwidth}{#3}
 \simplealignedbox{middle}{.06\textwidth}{·}
\simplealignedbox{right}{.63667\textwidth}{#2}
 \fi}
\par\blank
}

\setuplist[section]
[alternative=command,
 command=\SectionListEntry]

\def\TableOfContents%
{
\page[empty]
 \page[odd]
\setuppagenumbering[style=command,
command=\phantom]
 \setuppagenumber[state=start]
\placelist[section]
\setuppagenumber[state=stop]
 \page[empty]
\page[odd]
}
\startfrontmatter
\TableOfContents
\stopfrontmatter

\startbodymatter
\setuppagenumber[state=start]
\dorecurse{45}{\section{Section title}\input tufte}
\stopbodymatter





Thanks,
Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] Multiple pleas for help (long)

2010-05-09 Thread Scott Steele
Thanks so much for the help! Pleas 1, 2, 5, and 6 are completely solved. (In
particular, Mojca, the fix for accents is fantastic!) I wasn't able to get
\Frowny to work any better with the advice provided, but I found that when I
scaled it down, it stopped knocking the text off the grid, and I have a hard
time telling the difference in size between the old and new.

% New (works) :
\useexternalfigure[frowny][Frowny][factor=7,type=pdf]
\def\Frowny{\hbox{\externalfigure[frowny]}}
\useexternalfigure[smiley][Smiley][factor=7,type=pdf]
\def\Smiley{\hbox{\externalfigure[smiley]}}
\useexternalfigure[slashy][Slashy][factor=7,type=pdf]
\def\Slashy{\hbox{\externalfigure[slashy]}}



I'm currently working on the Table of Contents formatting. I'm trying to
format it as follows:

\starttable[|r|c|l|]
subjectName · pageNumber\MR
subjectName · pageNumber\MR
...etc...
\stoptable % Of course, where I don't actually input it subject by subject
like this.

Ideally, I'd like to be able to position the table on the page by deciding
where the center line of single dots is (eg a setup where the dots are in
the very center of the page layout or another setup where they are
two-thirds of the textblock/pagelayout size (I'm not sure what the correct
term is here) to the right).

I've tried a number of different ways to set this up. This is the only thing
close to what I want that I can get to work, but of course, it doesn't have
the dots aligned:

\def\ListCommand#1#2#3%
{
\starttabulate[|r|c|l|]
\NC #2\NC ·\NC #3
 \stoptabulate
}

\def\TableOfContents
{
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommand]
}

Here's an example of what I tried to do but which doesn't work:

\def\ListCommandOne#1#2#3%
{#2\NC}
\def\ListCommandTwo#1#2#3%
{·\NC}
\def\ListCommandThree#1#2#3%
{#3\NC}

\def\TableOfContents
{
\starttabulate[|l|l|l|]
\NC
 \placelist[section]
[criterium={chapter,subject}, alternative=command,
command=\ListCommandOne]
 \NC
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommandTwo]
\NC
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommandThree]
 \stoptabulate
}

Obviously that attempt—aside from not working—is incredibly un-elegant and
could quickly screw things up with misaligned names and page numbers. Here
is another attempt:

\def\ListCommand#1#2#3{#2 · #3\MR}

\def\TableOfContents
{
\starttable[|r|c|l|]
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommand]
\stoptable
}

I think part of my problem is that I really don't understand what placelist
{\em is} or what it is doing. Is this something that would be clearer only
if I knew more about plain Tex?

Note: I'm putting \TableOfContents in the frontmatter.



Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] ConTeXt name/branding

2010-04-26 Thread Scott Steele
Sidenote: If anyone has ever considered changing the name of the ConTeXt
project, I'd like to support that. Name consistency is important, but there
are two unnecessary problems that the current name creates.

The first is that the unusual capitalization and pronunciation are a barrier
to new users. I've used macro packages in the TeX family for about four
years now (though it seems much longer! I can't believe for how long I was
putting out such ugly papers!), but I'm now consciously trying to remember
to pronounce them as tecks, latecks, zeetecks, conteckst, etc, and to type
them as Tex, Latex, Xetex, and Context (outside of this message/forum). The
odd capitalization doen't win fans among people who appreciate typographic
tradition, and the pronunciation requires that, instead of explaining first
how powerful and useful these systems are, one explain the Greek chi and
Donald Knuth. It doesn't give a good impression when one's first exposure to
TeX involves being told one is wrong in how one pronounces a word that is
less than 40 years old (The same goes for many open source projects).
Further, if the name is brought up in conversation and piques the interest
of a potential user, they will have a difficult time later searching for it
when they type in contekt or conteckt.

The second problem with the ConTeXt name is its shared spelling with
context. When I google context and font, I get so many pages imploring me to
consider the context of my document when choosing between Arial, Times New
Roman, and Comic Sans. Many of the things I'll be searching for while using
ConTeXt yield thousands of irrelevant pages because of how context can pop
up in so many topics that share major keywords with the typesetting process.

Of course, I myself am in no position to advocate a name change, and if the
two issues I listed are the price for having a cutting-edge typesetting
system, then I'm still a pretty happy camper. But if any of the people who
have actually worked really hard to put this together have ever thought
about bringing up a branding change, here's my two pence.

Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] Multiple pleas for help (long)

2010-04-26 Thread Scott Steele
Hullo, all. I've been trying for 3 months now to get my last 2 years' worth
of journal entries satisfactorily typeset for printing on lulu.com. This is
my first major project using Context (with the Xetex engine—the current
procedures required by Pdftex to set up and manage fonts are too
intimidating for me (I {\em did} try it.)) as I'm no longer in school and
had typeset the preceding year's worth of entries in Latex. I started to use
(xe)Latex again this time but gave up in frustration with all of the
predefined formatting, which I've moved away from as I've read more of
Robert Bringhurst.

Anyway, I have a number of problems.

I apologize for putting them all into one message and for failing to find
solutions elsewhere on the site. I've looked around a great deal, but am
hampered in doing so by my limiting of my internet time with an {\sc ems}
PowerCop (otherwise, I'd be on Wikipedia until they decided to lock me
away). (I do my writing, editing, and typesetting on a little
internet-crippled netbook with CrunchBang and Vim.)

I'll include my current preämble information at the end of this message in
case it is useful in addressing any of my issues. If they're addressed
elsewhere, I'd be thrilled with links. If they're not, I'd greatly
appreciate any help.

I've found solutions to a number of previous problems, but here are all that
I believe are in the way of my finishing this project:

1
How do I make bulleted lists not have lines between items in the list?

2
Is it possible to push the bullets for bulleted lists into the margin (and
then have the text of each item start at the same level of indentation as
normal text)? Also, given my target printing medium, this would require
alteration of the space between the bullet mark and its text—how do I alter
this and the glyph used as the bullet mark?

3
Is it possible to alter the way footnotes are displayed? I might want to
have new footnotes follow previous ones with a 3-em space rather than
starting a new line in the footer. And if I go that route, I'd need a way to
pull the footer number in from the margin.

4
How can I adjust the formatting settings for the frontmatter (title page,
table of contents) and backmatter (colophon, appendices, index). In general,
I need to be able to set whether page numbers are used and what kind and
positioning of the text on the page. In particular, how do I change the
formatting for items in the table of contents (and what glyph/spacing go
between the item's title and corresponding page number as well as how all of
those elements are positioned)?

5
How can I have either unnumbered sections, or subjects that appear in the
table of contents?

6
Does Xetex or Context have a facility for positioning accents over letters
when those particular combinations are not in the font? (Or should I just go
ahead and do this manually in Fontforge?)

7
Is there a built-in equivalent of the \fancybreak function from Latex? I
think I know now how to put something like it together manually but don't
want go the amateur route if there's something more polished available.

8
Since this is just a journal, I have used simple emoticons (don't laugh!). I
tweaked a vector smiley from Wikimedia to get a frowny and slashy, and they
work well except for when they end up on the first (printed) text line of a
page. I have one page that has a subject title on the grid but that is
followed by a (logical) line with a smiley that ends up on its first printed
line. This printed line and all of the rest of the text on the page
(including another subject title) sit several points (approx) lower than
where they should (so that the grid lines bisect the bowls of all the
lower-case a's). There is another page that does not start with a subject
title but directly with a printed line containing an emoticon, and it has
exactly the same problem as the first page, with the text sitting just low
enough that the grid lines bisect the bowls of the lower-case a's. Pages
with emoticons on them do not exhibit this problem when the emoticon is not
on the first printed line, and all lines remain correctly positioned on the
grid. You can see below how I'm putting in the emoticons.


Many apologies for those answers that I failed to find, and thanks reading
the whole message,

Scott


See my current preämble below:

\version[final]

\definepapersize[pocket][width=4.25in,
height=6.875in]

\setuppapersize[pocket][pocket]

\setuplayout[location=middle,
width=0.815\paperwidth,
rightmargindistance=0in,
 leftmargindistance=0in,
height=middle,
margin=0.08\paperwidth,
 backspace=0.115\paperwidth,
marking=off,
grid=yes,
 topspace=0.018889\paperheight,
header=0.04\paperheight,
footer=0.04\paperheight,
 bottomspace=0.038889\paperheight]

\setuppagenumbering[alternative=doublesided,
location={footer}]

\setupinterlinespace[top=0.0] % `top=0.0' gets rid of unoccupied vertical
white space at the top of the first line

\setupwhitespace[big] % Turns on blank line between ¶’s