Formatting issues

kl
klester
Posts: 61
Joined: Wed Oct 08, 2014 2:51 pm
Platform: Windows

Fri Mar 27, 2015 5:51 pm Post

When pasting text into Scrivener from websites, I have a devil of a time with formatting. For some reason, pasted text is very resistant to changing of certain text and paragraph attributes. Sometimes I can change the font, but not the font size. Other times, I can change the font but not paragraph attributes. Quite often, I cannot change indenting at all. Even when using presets, certain formatting elements remain unchangeable.

1. What causes this issue, and how do I fix it?
2. Is there a way to simply remove ALL formatting?

JJ
JJSlote
Posts: 663
Joined: Tue Oct 26, 2010 5:44 pm
Platform: Windows
Location: NY, USA

Fri Mar 27, 2015 6:47 pm Post

Greetings klester

Much experience with this. First recommendation is to copy out, from Scrivener's editor, the selection just pasted in. Then paste it in again. That gets rid of certain HTML residue the converter can't handle. Then try "Convert -- To Default Text Style" on the Documents menu.

But certain intractable formatting issues are a consequence of invisible HTML tables pasted into Scrivener. My longstanding hope and request is that Scrivener will make all zero-border tables visible via the Show Invisibles button. But absent that, we can right-click on suspected tables, choose Table Properties, and add pixels to the border and maybe color to the background to make the framework visible. Then copy the desired cell contents out into a body text area where it'll respond to paragraph formatting.

Good Luck -- Jerome

kl
klester
Posts: 61
Joined: Wed Oct 08, 2014 2:51 pm
Platform: Windows

Fri Mar 27, 2015 10:46 pm Post

Thanks Jerome. I suspected as much. It sounds like Scrivener allows html formatting, which would be fine if we could "see" the html and delete it when it interferes with normal processing. It's sort of silly that I am forced to paste my Internet text into a text editor to strip out invisible formatting. Scrivener should handle this on its own.

I know this is a tenuous balance, but Scrivener is supposed to be about words and ideas, not fancy text, so when they allow "fancy text formatting" invisibly, it just gets in the way of writing, which was supposed to be the goal of Scrivener in the first place: writing and ideas.

JJSlote wrote:Greetings klester

Much experience with this. First recommendation is to copy out, from Scrivener's editor, the selection just pasted in. Then paste it in again. That gets rid of certain HTML residue the converter can't handle. Then try "Convert -- To Default Text Style" on the Documents menu.

But certain intractable formatting issues are a consequence of invisible HTML tables pasted into Scrivener. My longstanding hope and request is that Scrivener will make all zero-border tables visible via the Show Invisibles button. But absent that, we can right-click on suspected tables, choose Table Properties, and add pixels to the border and maybe color to the background to make the framework visible. Then copy the desired cell contents out into a body text area where it'll respond to paragraph formatting.

Good Luck -- Jerome

User avatar
MimeticMouton
Posts: 9005
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sat Mar 28, 2015 12:20 am Post

Scrivener is a rich-text editor, not plain-text, so simple formatting is certainly still a part of the design. Copying and pasting from webpages, especially when we're trying as best as possible to preserve images and some basic character formatting like italic and bold, isn't a straightforward task. Pages can get pretty complicated with the coding, and different browsers will put text on the clipboard differently. We've put a lot of work into cleaning up the webpage copy, but there are always going to be cases where something doesn't paste perfectly.

Stripping formatting is easy, though. That's what the Edit > Paste > Paste and Match Style command is for. That will just paste the content as plain-text, which sounds like what you're after. If you're trying to preserve character formatting, a regular paste and then Documents > Convert > Formatting to Default Text Style should do the trick.

Finally, make sure you're up to date with Scrivener version 1.8.6. You may run into the problem of the un-resizable text more frequently if you're on an older version and pasting from Chrome.
Jennifer Hughes
(MM for short)

kl
klester
Posts: 61
Joined: Wed Oct 08, 2014 2:51 pm
Platform: Windows

Sat Mar 28, 2015 4:20 am Post

Stripping formatting is easy, though. That's what the Edit > Paste > Paste and Match Style command is for. That will just paste the content as plain-text, which sounds like what you're after. If you're trying to preserve character formatting, a regular paste and then Documents > Convert > Formatting to Default Text Style should do the trick


Thanks. That explains it. I would suggest you change "Paste and Match Style" to "Paste as plain text" which is FAR more descriptive and clear. Same thing for "Convert/Formatting to Default Text Style." Change that to "Convert/To Plain Text" It's a much clearer explanation. Yes, the plain text is then going to inherit the default text style, but most people understand what "plain text" means, while "convert to Default Text Style" is specific to Scrivener and confusing to someone trying to learn the program for the first time.

In other words, your biggest problem is semantics, rather than programming. :D

User avatar
MimeticMouton
Posts: 9005
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sat Mar 28, 2015 4:40 am Post

`Convert > Formatting to Default Text Style` *doesn't* convert to plain text, though. It converts the document to use the formatting set in the editor defaults while retaining character formatting such as bold, italic, and highlighting. It can further be refined by the checkbox options presented when you run the command. So really this command is already explicit.

`Paste and Match Style` uses that phrasing because this is a common Mac text menu option, so it appears that way in Scrivener on the Mac and was kept the same when Scrivener for Windows was created. Word uses something like "Text Only". Sure, it could be changed, but there's nothing wrong with what it says: since it pastes as plain text, with no formatting of it own, the pasted text will consequently pick up whatever formatting is already set in the location you paste it. Thus if you're pasting into a paragraph set to use a 1" left indent and bold 14pt Comic Sans, using Paste and Match Style will cause the pasted text to be bold 14pt Comic Sans with a 1" left indent. Regular `Paste` retains the source formatting to the extent possible; `Paste and Match Style` takes the target formatting.
Jennifer Hughes
(MM for short)

User avatar
devinganger
Posts: 2512
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac, Win + iOS
Location: Monroe, WA 98272
Contact:

Sat Mar 28, 2015 8:00 am Post

klester wrote:I know this is a tenuous balance, but Scrivener is supposed to be about words and ideas, not fancy text, so when they allow "fancy text formatting" invisibly, it just gets in the way of writing, which was supposed to be the goal of Scrivener in the first place: writing and ideas.


Scrivener is used by a lot of people for wildly different types of writing. Scrivener allows those people to add their research -- often, from highly formatted sources -- into the same project as their draft writing, Take those together together, and Scrivener can't impose too many limitations on what the acceptable level of formatting is. After all, you may *want* that fancy formatting in your research folder. The grad student writing their dissertation may *want* that fancy formatting for the nested table they have to include.
--
Devin L. Ganger
Not a L&L employee; opinions are those of my cat
Life has a way of moving you past wants and hopes -- Kevin Flynn

User avatar
devinganger
Posts: 2512
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac, Win + iOS
Location: Monroe, WA 98272
Contact:

Sat Mar 28, 2015 8:02 am Post

klester wrote:I would suggest you change "Paste and Match Style" to "Paste as plain text" which is FAR more descriptive and clear. Same thing for "Convert/Formatting to Default Text Style." Change that to "Convert/To Plain Text" It's a much clearer explanation. Yes, the plain text is then going to inherit the default text style, but most people understand what "plain text" means, while "convert to Default Text Style" is specific to Scrivener and confusing to someone trying to learn the program for the first time.


That depends on your background. If I see "plain text" in a Windows program, I expect it to be truly unformatted plain ASCII/Unicode text like I would get in Notepad or a decent programmer's editor.

Where Scrivener does allow you to have different formats of text, the default text style really is just that -- a set of default preferences that new text will default to unless in a region already covered by other formatting preferences. Paste and Match Style tells the user exactly what's going to happen -- the text will be pasted and the style adjusted to match the style at the insertion point. Likewise with Convert to Default -- you're going to go back to the preset style, not simply strip away all formatting entirely.
--
Devin L. Ganger
Not a L&L employee; opinions are those of my cat
Life has a way of moving you past wants and hopes -- Kevin Flynn

kl
klester
Posts: 61
Joined: Wed Oct 08, 2014 2:51 pm
Platform: Windows

Sat Mar 28, 2015 1:56 pm Post

Thanks for all the great feedback. I know it is very difficult to handle all the formatting idiosyncrasies out there. I'll experiment with the "paste and match style" and see if that solves the issue of "hidden" formatting that can't be directly changed.