My question points actually to a particular problem, as opposed to the more general type of problem suggested in the title -- which would nevertheless be interesting to me to see answered: I'd like to have the first line of text after a section (or chapter) heading set in small caps.

If this were about automating such a processing task for a given number of words starting after the sectional heading it would be an easy thing to do, but how could this be done for exactly an entire line of running text? Maybe with just a little better knowledge of TeX on my side I would not be making this question, but I don't know...

An answer on TeX, LateX2e or even LaTeX3 to the particular setting ("small caps") would be welcome and enough for my checking it (as long as it works, of course). And if there is some suggestion for the more general problem, that'd be simply wonderful: Let's say (just for the sake of concreteness and without pretending that what follows is a rigid spec) that "a given line" in the more general setting means "the line in which a particular string is to be found", and the "particular string" might be marked up in terms of some command. The processing, of a nature similar to the "small caps transformation" I'm concerned with in the particular setting, is to be applied to the entire line in which the string will eventually appear in the typeset document (i.e., once the processing has been performed).

PS: My tags for this question may not be the most fortunate, but they are the closest I could see among those provided.

  • 1
    related, possible duplicate tex.stackexchange.com/questions/86296/… – David Carlisle Aug 21 '13 at 20:45
  • @David Carlisle: Right. I didn't know about the magaz package. I have to look at it more closely, but it seems it solves the "small caps" problem in my OP. I wonder if it could be extended in the sense of the general issue I address. – Marcos Aug 21 '13 at 21:20
  • extending it might be hard: it's massively difficult to do that much in TeX (Donald Arseneau knows more than most about manipulating TeX parshapes:-) – David Carlisle Aug 21 '13 at 21:23
  • So... does it make any sense providing an answer in these terms? From what you say, it seems most unlikely that somebody is going to provide an alternative in the affirmative. – Marcos Aug 21 '13 at 21:27
  • Not sure I have anything to have as an answer, you could make a self-answer with small caps, or close as duplicate, or perhaps Heiko will step in with a general solution:-) – David Carlisle Aug 21 '13 at 22:12

The basic functionality of adjusting the typesetting of the first line is handled by the magaz package. Note a small adjustment to that to help with color support is in this answer. Extending the package to support lines other than the first is likely to be hard (the package already does more than one would expect possible given the nature of TeX's paragraph breaker).

  • Answer checked for its constructiveness in the waiting for a "more affirmative" contribution... if possible. – Marcos Aug 22 '13 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.