Re: hook for line breaks?
- From: Patrik Nyman <adress@xxxxxx>
- Date: Mon, 12 Sep 2005 09:44:36 +0200
Brooks Moses wrote:
Patrik Nyman wrote:
I see. Ok, I want to write lute (or guitar) tabulature,
like
|-------------|-3---------3-|
|-3---------3-|-------------|
|---------2---|---------0---|
|-----3-1-----|-------1-----|
|---1---------|-0-3-0-------|
|-0-----------|-------------|
but with the lines unbroken. Every column is defined in a
seven-argument macro (the sevent argument being the note
value that goes on top). The columns are set in boxes, and
the space between these boxes must be allowd to stretch
in order to get justified lines. The way I've been doing it
so far is to place a box containing six horisontal lines
over each vertical box with \rlap, and making the line box
slightly wider than the box with the numbers, so there'll
be no gaps when the space stretches. This works pretty well,
but in extreme situations there will stil be gaps.
I think it would be possible to use a \discretionary command between
each column box, rather than simple glue as it sounds like you're
currently doing. This would provide a hook for something that is only
used at the end of the line, though there are some limits on what it can
contain -- only characters, boxes, and kerns, according to the TeXbook.
That sounds workable in this case; you should be able set your lines in
a box, and then put that box in the \discretionary. (The glue, though,
will have to go outside.)
- Brooks
Thanks for the tip, I'll look into it.
--
Patrik Nyman
patrik dot nyman at orient dot su dot se
.
Relevant Pages
- Re: Bad TOC alignment on the right (before the page number)
... the alignment is done on the last dot. ... and I don't think TeX can do it without rather ... TeX can make leaders (copies of boxes that behave like ... Imagine the grid squares are as wide as ... (comp.text.tex) - Re: Too hard on myself?
... I'm getting more and more into making little wood boxes for jewelery, ... where some glue dripped. ... if you are going to sell ... (rec.woodworking) - Re: Good night
... His column was usually three dot ... I've got the picture. ... Wink wink nudge nudge :-) ... Now you've given me the impetus to plow through the boxes ... (alt.support.stop-smoking) - Re: Bad TOC alignment on the right (before the page number)
... the space is not entirely filled with boxes. ... (ignoring the grid entirely) ... So, to have the last dot at the right, I need to: ... change some of its commands. ... (comp.text.tex) - Re: "ALL YOUR BOX ARE BELONG TO STINKY"
... am up to my butt in boxes and paper, ... I was watching TV, and half-watching Dante jump in and out of a shoe box, and rattle the paper around, when Stinky came in, and it's so funny how I knew exactly what was going to happen--and it happened just that way. ... Marina, Miranda and Caliban. ... marina (dot) kurten iki fi ... (rec.pets.cats.anecdotes) |
|