I would like to create a macro command that would put everything inside brackets for example or any other character, till the end of a line or till the end of a group {\inchar ...}. Something like a custom \bfseries command. Using default commands or xparse. It is interesting to see several implementation if possible.
That is, such an inputs should produce corresponding outputs
text text \inchar() text text text text
some other text on a new line
↓
text text (text text text text)
some other text on a new line
text text \inchar|] text text text text\\
some other text on a new line
↓
text text |text text text text]
some other text on a new line
text text \inchar\{\} text text text text\par
some other text on a new line
↓
text text {text text text text}
some other text on a new line
Also it should work in amsmath environments
\begin{multline*}
abc\\
\inchar() def\\
ghi \inchar\{\} jkl + mno
\end{multline*}
↓
abc
(def)
ghi {jkl + mno}

.pdfis meant. – antshar May 29 '20 at 13:29\inchar. A great example would be\bfseriesit makes everything bold till the end of a line in your tex editor(line wrapping is not counting). I can be more speciefic and tell the actual porpuse of this question. I am looking for the solution to this problem: https://tex.stackexchange.com/q/546196 even with a bounty I have no luck getting an answer. I kinda thought up with a workaround that requires something that I am asking in this post. – antshar May 31 '20 at 20:11\bfseriescertainly does not do what you think. It goes on until the end of the current group. – egreg May 31 '20 at 20:32\bfseriesand some text it will affect everything till the end of a line. – antshar May 31 '20 at 20:34\\or\par. Could you help me in tweaking that? – antshar Jun 03 '20 at 16:36\\,\parand newline character? For example, intext text<newline> text \\ textandtext \\ text<newline>, which newline-like input is taken as the marker? – muzimuzhi Z Jun 05 '20 at 18:55\\, or\par. – antshar Jun 06 '20 at 10:47<line 1><Enter><line 2>, while double Enter means<line 1><Enter><empty line 2><Enter><line 3>. Which one do you want? – muzimuzhi Z Jun 06 '20 at 12:03\bfserieswill affect everything till the end of the current group, for example the end of document. Trytext \bfseries text <newline><newline> text text. – muzimuzhi Z Jun 06 '20 at 14:08\bfseriesdistribution to next lines. I don't know how to make it more clear, but I think you got me, "1)" says exactly what I would like to achieve. – antshar Jun 06 '20 at 14:22\\\par? – antshar Jun 07 '20 at 02:12