Re: [NTG-context] ending every paragraph

2015-08-04 Thread Ulrike Fischer
Am Sun, 2 Aug 2015 05:36:29 -0600 schrieb idris.ha...@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/

___
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] ending every paragraph

2015-08-02 Thread Alan BRASLAU
On Sat, 1 Aug 2015 17:35:38 -0600
Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu 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]

Alan

___
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] ending every paragraph

2015-08-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Alan,

On Sun, 02 Aug 2015 01:11:38 -0600, Alan BRASLAU alan.bras...@cea.fr  
wrote:



On Sat, 1 Aug 2015 17:35:38 -0600
Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu 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
___
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] ending every paragraph

2015-08-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 02 Aug 2015 11:40:59 -0600, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:



Idris Samawi Hamid ادريس سماوي حامد mailto:idris.ha...@colostate.edu
2. August 2015 19:34
On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster
schuster.wolfg...@gmail.com wrote:


Alan BRASLAU mailto:alan.bras...@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
___
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] ending every paragraph

2015-08-02 Thread Wolfgang Schuster

Idris Samawi Hamid ادريس سماوي حامد mailto:idris.ha...@colostate.edu
2. August 2015 19:34
On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:



Alan BRASLAU mailto:alan.bras...@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
___
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] ending every paragraph

2015-08-02 Thread Aditya Mahajan

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_text)


Both these methods will miss things like: one paragraph \par second 
paragraph, etc.


Aditya___
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] ending every paragraph

2015-08-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 02 Aug 2015 11:25:01 -0600, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:



Alan BRASLAU mailto:alan.bras...@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
___
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] ending every paragraph

2015-08-02 Thread Wolfgang Schuster

Alan BRASLAU mailto:alan.bras...@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
___
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] ending every paragraph

2015-08-01 Thread Idris Samawi Hamid ادريس سماوي حامد

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
___
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
___