Rich Text Format Tags for Hiding and Un-hiding
Asked Answered
I

2

8

I would like to hide part of the text in my RichTextBox. I know that \v is the start of a hiding section. But how do I unhide ? For example if I want to hide the word "big" in the string "hello big world" so that "hello world" is visible:


text              : "hello big world"
RTF so far        : "hello \v big world"
result            : "hello "
wanted result  -> : "hello  world"
doesn't work      : "hello \v big\v  world"


Is there a way ?
Imperfective answered 15/1, 2013 at 13:40 Comment(0)
I
13

Solution by Alex K. is probably better but I'm adding this solution I just found because it also works. \plain resets the text style back to defaults:

hello \v big\plain  world

Yet another solution (actually used by the RichTextBoxes): \v0 disables just the hiding

hello \v big\v0  world
Imperfective answered 15/1, 2013 at 14:10 Comment(0)
J
10

You need to use curly braces to group the code;

"hello {\v big} world"
Jujitsu answered 15/1, 2013 at 13:48 Comment(1)
Thanks! I tried to do that before but I put the opening brace behind the tag like in LaTeX \v{}Imperfective

© 2022 - 2024 — McMap. All rights reserved.