I am trying to create a command for right alignment of text. The text must be kept on the same line if it fits on the line, else it must flow to the next line but must keep the alignment (right aligned). Currently I can do these with two separate commands, like:
However, I am unable to combine them. That is,
- if I use the first command then it puts a new line even if there is space on the same line.
- if I use the second command then it puts the
markstowards the left on the next line if space is unavailable on the same line.