![](https://secure.gravatar.com/avatar/11bdb092d7681af7742fdd43617e975c.jpg?s=120&d=mm&r=g)
Dear gang, Suppose I want to end the last line of every paragraph with a command, say, \thinrule, or a string of dots. Is there a straightforward way to do that? TeX has \everypar but I'm not aware of any, say, \endeverypar command. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
On Sat, 1 Aug 2015 17:35:38 -0600
Idris Samawi Hamid ادريس سماوي حامد
Suppose I want to end the last line of every paragraph with a command, say, \thinrule, or a string of dots. Is there a straightforward way to do that? TeX has \everypar but I'm not aware of any, say, \endeverypar command.
Hello Idris, I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line). My guess, untested, would be \setupparagraph[after=\thinrule] Alan
![](https://secure.gravatar.com/avatar/11bdb092d7681af7742fdd43617e975c.jpg?s=120&d=mm&r=g)
Hi Alan,
On Sun, 02 Aug 2015 01:11:38 -0600, Alan BRASLAU
On Sat, 1 Aug 2015 17:35:38 -0600 Idris Samawi Hamid ادريس سماوي حامد
wrote: Suppose I want to end the last line of every paragraph with a command, say, \thinrule, or a string of dots. Is there a straightforward way to do that? TeX has \everypar but I'm not aware of any, say, \endeverypar command.
Hello Idris,
I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line).
My guess, untested, would be \setupparagraph[after=\thinrule]
I actually tried that before sending the note to the list. It doesn't work; if it is supposed to work then I guess it's a bug. Of course, using \start-stopparagraph is much more verbose than simply adding a control sequence at the end of each par. It's also curious that, for all its power, TeX has no straightforward way to recognize paragraph endings. But I'll bet Hans could figure out a way to do it in lua. On the other hand, this is not a priority at this juncture; more experimental. Thanks, Alan, and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sun, 2 Aug 2015, Idris Samawi Hamid ادريس سماوي حامد wrote:
But I'll bet Hans could figure out a way to do it in lua.
If you need this to happen before macro expansion, then there are two options: use input translation (see, for example, the m-translate module) or capture the entire content in a buffer and use Lua to do the appropriate substitutions (see, http://wiki.contextgarden.net/Programming_in_LuaTeX#Manipulating_verbatim_te...) Both these methods will miss things like: one paragraph \par second paragraph, etc. Aditya
![](https://secure.gravatar.com/avatar/d4bd34a45c928e8356f38323ff84763e.jpg?s=120&d=mm&r=g)
Am Sun, 2 Aug 2015 05:36:29 -0600 schrieb Idris.Hamid@colostate.edu:
It's also curious that, for all its power, TeX has no straightforward way to recognize paragraph endings.
But tex *does* recognize paragraph endings. After all it does paragraph separation in a very reliable way and inserts a \par token. You could redefine \par to insert something: \def\par{end of line\endgraf} \starttext abc abc abc abc \par blblbl \stoptext But as \par is used in various places it could get rather difficult to fight against the side-effects. A dedicated "\stopparagraph" command is much easier to control. -- Ulrike Fischer http://www.troubleshooting-tex.de/
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Alan BRASLAU mailto:alan.braslau@cea.fr 2. August 2015 09:11 On Sat, 1 Aug 2015 17:35:38 -0600
Hello Idris,
I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line).
My guess, untested, would be \setupparagraph[after=\thinrule]
The paragraph environment has no before/after keys and even if it would the after key would be normally applied after the paragraph has needed. Wolfgang
![](https://secure.gravatar.com/avatar/11bdb092d7681af7742fdd43617e975c.jpg?s=120&d=mm&r=g)
On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster
Alan BRASLAU mailto:alan.braslau@cea.fr 2. August 2015 09:11 On Sat, 1 Aug 2015 17:35:38 -0600
Hello Idris,
I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line).
My guess, untested, would be \setupparagraph[after=\thinrule]
The paragraph environment has no before/after keys
Then the wiki is mistaken: http://wiki.contextgarden.net/Command/setupparagraphs
and even if it would the after key would be normally applied after the paragraph has needed.
That was my guess as to why it didn't work. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Idris Samawi Hamid ادريس سماوي حامد mailto:Idris.Hamid@colostate.edu 2. August 2015 19:34 On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster
wrote: Alan BRASLAU mailto:alan.braslau@cea.fr 2. August 2015 09:11 On Sat, 1 Aug 2015 17:35:38 -0600
Hello Idris,
I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line).
My guess, untested, would be \setupparagraph[after=\thinrule]
The paragraph environment has no before/after keys
Then the wiki is mistaken:
http://wiki.contextgarden.net/Command/setupparagraphs The page describes the paragraph*s* environment which isn’t related to \startparagraph.
Wolfgang
![](https://secure.gravatar.com/avatar/11bdb092d7681af7742fdd43617e975c.jpg?s=120&d=mm&r=g)
On Sun, 02 Aug 2015 11:40:59 -0600, Wolfgang Schuster
Idris Samawi Hamid ادريس سماوي حامد mailto:Idris.Hamid@colostate.edu 2. August 2015 19:34 On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster
wrote: Alan BRASLAU mailto:alan.braslau@cea.fr 2. August 2015 09:11 On Sat, 1 Aug 2015 17:35:38 -0600
Hello Idris,
I would think that your only hope in this case would be through the use of \startparagraph \stopparagraph, for otherwise TeX does not know where a paragraph is to end (only where one begins, through an explicit \par or through an implicit blank line).
My guess, untested, would be \setupparagraph[after=\thinrule]
The paragraph environment has no before/after keys
Then the wiki is mistaken:
http://wiki.contextgarden.net/Command/setupparagraphs The page describes the paragraph*s* environment which isn’t related to \startparagraph.
Ah you are right as usual. The comment to the link under "See also" at the bottom of http://wiki.contextgarden.net/Command/startparagraph was misleading. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523
participants (5)
-
Aditya Mahajan
-
Alan BRASLAU
-
Idris Samawi Hamid ادريس سماوي ح امد
-
Ulrike Fischer
-
Wolfgang Schuster