I have an openoffice text using different styles. I need to extract all text in one style as a text .txt file (but not including text marked in the other styles). How can this be achieved?
I tried to mark other styles as hidden and save as .txt, but the result contains all text, not only the one which is visible. If I save as .pdf and then cut and paste the text from I get what I need, but this seems a roundabout solution and I am certain a better one exists.
To select all text with a certain paragraph style, go to Edit -> Find & Replace. Expand Other options and check Paragraph Styles. Then select the style name to Find and press Find All.
Now close the dialog. Copy and paste to a text editor such as Notepad (depending on your operating system). Then save the text file from the text editor.
For character styles, this will not work, so use AltSearch.
Related
The textview in flutter has some styling(Font family,color,style etc) and when I try to copy the text, only the text value gets copied but I need styling also.
styling properties are given to display text in given Style it is not the property of text.
Text is copied in UTF byte Format
so, When you copy text Only text gets copied the style and Other property does not get copied.
I have a text file where I would like to change all the Carriage Return to Line Feed. I am working on a Mac, and it seems like BBedit should be able to easily do this. However, in the search function it does not appear to differentiate between CR (\r) and LF (\n). Searching for either character gets the same hits, and a search for "\r" to replace with "\n" does not work.
Is there some other way to represent CR and LF, so that BBedit can differentiate between them?
A possibly simpler way to do this is to make sure you enable "Line Break Types" in BBedit's Preferences -> Appearance.
This will add a Line Types popup menu at the bottom of the window.
Not only does it show you what the current format is, but it makes it trivial to switch between them.
(I also turn on "Text Encoding" as well, in case I need to switch between UTF8 and UFT16 and others.)
For a single file:
Text -> Apply Text Transform
Select Change Line Endings
Click the Configure button and choose your desired line endings
For multiple files:
File -> New -> Text Factory
Select Change Line Endings
Click the Options button and choose your desired line endings
Save the Text Factory and apply it to the files you want changed through the Choose and Options buttons
I am an Autohotkey user. How can I make some text in clipboard having bold style. Actually, I want to get some text as input from clipboard and then change style (bold or unbold) of some words in there and eventually to paste the enhanced text to where it was previously copied. Also notice that the existing format of the text is important (thus using ClipboardAll) and I don't want to lose the original format; just to change / modify style of some words in there.
Any idea / clue to accomplish this?
Thanks
I assume you're working in word or some other text editor that allows Ctrl+B to bold highlighted text. Something like this should work.
clipboard =
ClipWait,,
OutVar := StrLen(clipboard)
;put code for navigating to your paste place here
send,^v
send,{Shift Down}
send,{Left %OutVar%}
send,{Shift Up}
send,^b
send,{end}
;send,%OutVar%
I'm kind of an amateur at this, but I tested it and it seems to work if you want to bold the entire clipboard. If you're bolding only certain words within a clipboard... I'm not sure. Personally, I would create a script that transfers the clipboard to Word or some other rich text editor, then use ^f to find the words I'm looking for (using input or InputBox), and then bolding those words in the style used above, and then copy/pasting the finished work to the final destination.
But there's probably an easier way to do it...
EDIT: InStr() might help you there... check the AutoHotkey help for more info about InStr().
I have many source code files which are idented with 8 space characters, I want to convert these to 4 character indents. What is the best way of doing this? A technique using eclipse would be preferable.
Select the project(s), then press Ctrl+H to open the Search dialog (or click the Search > File menu).
Make sure the File Search tab is selected at the top.
Enter 8 spaces into the Containing text: field
Select your File name pattern (probably *.java or just *)
Select the scope (probably Selected Resources)
Press the *Replace... button.
As I said in the comments above, however, using spaces for indentation is a fool's game; tabs are the proper abstraction for indentation so that you don't have this problem.
How would you copy the code from this example page
http://framework.zend.com/manual/en/learning.quickstart.create-layout.html
(Below the text "Now that we've initialized Zend_Layout and set the Doctype, let's create our site-wide layout:" )
A simple copy paste will also copy the line number or #. Any tricks ?
I hate these line numbers as well. The way I do it:
Copy the text to your favorite text editor (notepad won't do, Word for example would) and block-select using the ALT Key.
Let me give you an example with Notepad++. here I copied text from the said site with all line numbers included. Now I just hold the ALT button and select normally with my mouse (or using SHIFT+arrow keys). The result of me selecting only the code sans the line numbers you see in the following screenshot:
Now I could just copy this code to a new editor.