I used custom renderer to display a Label as RichTextBlock. Using Paragraph, there is a TextIndentProperty to indent first line. However, I also need "Hanging Indentation" found in RichEditBox or SetIndent found in ITextParagraphFormat.
Is there a way to implemnent "Hanging Indentation" in RichTextBlock?
I have found the solution to this question.
Use left-padding to shift the entire paragraph in (say 10px)
Then, use text-indent with negative value to shift the first line of the paragraph out again (say -10px).
With this method, a hanging indentation can be achieved.
Related
I have this little challenge.
I want to ask, how do i sort the emails using the color code (light green) as stated in this picture here
I have tried to remove the non emails by scrolling through, but i need a solution that can make it a one click through sorting.
I will appreciate your kind response.
Open the Replace dialog box and enter the following regex in the Find field:
^((.*#[^\.]*)|([^#]+))$\n
Change the radio button to Regular Expressions. This regex pattern finds any line without a dot after # or any line without a #. Note that you need the last line of the document to be empty as shown in line 7 of your document.
Since we are deleting those lines, the "Replace with" field is blank. Now click Replace All.
I need to go through and join hundreds of separate text frames into a unified text thread. The problem is that when I link the frames the style of the first paragraph of the frame I'm linking to ofter changes to the style of the last paragraph in the text frame I'm linking from. If I could put a frame break into the end of every text frame I could avoid this problem. The hidden character for 'end of text' looks like a hashtag. Is there a GREP for this?
Just found on the Adobe forums that \z is the character I want, and it does find all the instances, but when I try to change them for page breaks I crash my programme. Every damn time.
You can't only search for a single location placeholder with InDesign's GREP (it has its wings clipped) – although it should not have made it crash. Change the Keep Settings for every first paragraph in your stories to start in a new frame, it'll have the same result when joining.
You can use GREP for this as well. Search for
\A.
and leave the Change To field blank. In the Change To formatting field, set your new Keep options. \A matches Start of Story, and the single . is so you actually can find a (any) character so it won't crash on you again.
So I did this in the end which achieved what I wanted:
Find: (.)(\z)
Change to: $1~R
This way when I linked the text frames the styles didn't get changed.
Thanks for everyone's help, esp. user1754036 for the link to InDesign Secrets which really solved the puzzle for me.
I want to edit a multi-cursor (^ + shift + click) of Xcode but I don't find the option to edit it. Anybody know where is it?
Thanks
It appears that you want to replace control-shift-click with option-shift-click. I don't believe there is any way to do that.
(My original answer, outlining how multiple cursors work, is below.)
If you’re talking about multiple cursors, you do it with option-click and drag.
For example, I wanted to add some spacing in the definition of this array:
This is #32 in Hacking with Swift’s Xcode tips and tricks.
(That having been said, Hacking with Swift uses example of the writing of an memberwise init method. That is something probably more easily achieved with “Editor” » “Refactor” » “Generate Memberwise Initializer”.)
The control-shift-click is for adding a cursor. E.g., in this example, I “accidentally” missed a cursor on the first line, so I control-shift-clicked on first line to add the missing cursor:
And if you control-shift-click on an existing cursor, it will remove it, effectively toggling the various cursors.
I have a bulleted list in InDesign but I want the bullet character to be shown twice.
I'm using the / character, so I want it to appear like // like a comment. I can't figure it out. I have the bullet a different colour/style as the text following it, so I don't want to "hard-code" it in either.
Sorry for the trolls fellow. Your question isn't a programming question, which is why you got a downvote.
However, to help you out, try using a font for your bullet point that has a glyph that you like - you can use any character for the bullets, you know.
Or, if you create a new paragraph style, you can go into the Paragraph Style Options under Bullets and Numbering. Now, where it says Text After you can enter another bullet character there. But you'll have to also create a character style to set it to the right font to show your bullet character.
I've been playing around with NSTextView and have applied some paragraph styles to certain lines. However, when I type enter and get a new line, the attributes that I applied to one line are bleeding into the next.
I want to be able to apply a paragraph style to one line and have the next line be formatted in the default way. You can see what I mean from the screenshots.
When I add some spacing between paragraphs via NSParagraphStyle, the same spacing applies to the newline, which makes the whole thing look pretty shotty. Basically, I am looking for a way to reset the paragraph style for an empty line.
I have tried [MyTextView resetTypingAttributes:theAttributes] to no avail, since you first have to start typing for the new attributes to apply. Just to be clear, the line below the text in the screenshot is the cursor, which is really far down there as a result of the paragraph spacing.
Screenshot:
It seems that you have to use setTypingAttributes on the textview.