Author Topic: Searching and Replacing Quotation Mark Fonts  (Read 55 times)

broadlighter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Searching and Replacing Quotation Mark Fonts
« on: November 29, 2017, 02:14:55 am »
Hi,

I'm a noobie to Scribus and this forum site. Even though I'm new, I think this may be the right place to ask my question.

Some background: I'm running Scribus 1.4.6 on Windows 10, designing a non-fiction book from the ground up and I've run into a problem with quotation marks. The book contains a lot of dialog so the use of quotations is very pervasive.

The client wants to use Palatino Linotype for the body paragraph text. I like Palatino Linotype for the most part, but the problem is the quotation marks are pretty substandard in that font. They are biased correctly, but they look straight, unlike Times New Roman and other serif typefaces, which have more curled quotation marks.

Problem: Quotation marks in Palatino Linotype appear substandard:



One solution, I've seen some examples that have Palatino Linotype as the text font for letters numbers and most punctuation, but quotation marks, double and single, are done in Time's New Roman or Georgia.

Desired outcome: Quotation marks in Times New Roman, while body text remains in Palatino Linotype:


My question is, is there an easy way to set quotation marks to a different font from the text font? It's possible to change the font of a quotation mark, one by one, but we're talking thousands of them throughout a 400-600 page book.

I've found that you can selectively change the font of a word or singular characters in a text frame by using search and replace, either from the Edit menu and in the Edit Text dialog box. However, it doesn't work on quotation marks. You cannot even search on quotation marks, let alone replace them. I believe that may be due to quotation marks being used in the underlying markup language as delimiters. Perhaps there is an escape character that must precede a quotation mark in order for it to be searchable.

Search and Replace will not allow user to search instances of quotation marks:



Any help on this would be very much appreciated.

Sincerely,

Broadlighter
« Last Edit: November 29, 2017, 02:23:37 am by broadlighter »

broadlighter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Searching and Replacing Quotation Mark Fonts
« Reply #1 on: November 29, 2017, 08:15:32 am »
I figured out a solution to setting the font to double-quotes. I believe I now understand the problem, which had to do with how the search and replace function handles double-quotes from the US Keyboard.

When you enter a double quote in the search field, the keyboard enters a Straight Double. If you look in Keyboard Shortcuts (File=>Preferences=>Keyboard Shortcuts) it shows actions for Apostrophe, Straight Double, Single Left, Single Right, Double Left, Double Right. By default the shortcuts for those characters are not available. Maybe they can be set as user-defined shortcuts, but that's another for another lesson; it's not necessary for proving the solution.

I experimented with different approaches, I entered in ANSI and UTF-8 codes to represent Double Quotes, but none of them worked. I searched for other resources and none seemed to have the answer. Then I experimented with selecting a Double-Left in the document sample, then copying and pasting it into the "Text" field in the "Search/Replace" dialog box on the "Search for:" side. Then on the "Replace with:" side, I checked the "Font" checkbox and set the Font to Times New Roman Regular. I clicked "Search" and the "Replace" and "Replace All" buttons became active. I clicked "Replace All" and all of the Double-Left Quotes changed their font. I repeated the same procedure for the Double-Right Quotes and the task was complete.

So here are the steps with screenshots:

To set Left and Right Double-Quote marks to a different font without changing the font for the whole body text:

1. Select the Text Frame in which you want to change the Double-Left and Double-Right Quote marks:




2. Double click inside the Text Frame, select a Double-Left Quote mark press Ctrl-C to Copy (Optional: right-mouse-click over the selection and select Copy from the pop-up menu).



3. Click the mouse to the upper left corner of the Text frame to place the cursor there.

4. From the Edit menu, select Search/Replace/

5. On the Search for: side, check the Text checkbox and click inside the Text field and Paste the Double-Left Quote mark there (Ctrl-V or right-mouse-click and select Paste from the pop-up menu).

6. On the Replace with: side, check the Font checkbox, click on the drop-down font menu and select Times New Roman Regular (You can select another font, like Georgia or Garamond if you prefer).

7. Click the Search button below. The Replace and Replace All buttons become active.

8. Click Replace to replace the font on the first or next found Double-Left. Click Replace All to replace the font in all instances of the Double-Left Quotes in the Text Frame.




9. Click Close. Your Double-Left Quotes will now appear in the desired font.

10. Repeat Steps 2 through 9, but paste the Double-Right Quotes in the Search For Text field to change the font for Double-Right Quotes.




The key to making this change is getting the correct Double-Quote character into the "Search/Replace=>Search for:" Text field.
« Last Edit: November 29, 2017, 08:23:50 am by broadlighter »

GarryP

  • Hero Member
  • *****
  • Posts: 1431
  • Karma: 22
  • Scribus User
Re: Searching and Replacing Quotation Mark Fonts
« Reply #2 on: November 29, 2017, 12:35:27 pm »
Welcome to the forum broadlighter, and thanks for offering your solution.

I have a little bit of extra information which might be useful to people reading this:

The double quote on your keyboard is there because of historical issues with typewriters. The same thing goes for single quotes and, for the same reason, the apostrophe. They are not proper quotes and should not be used in non-trivial documents unless you really want to use them for some reason. See here https://practicaltypography.com/straight-and-curly-quotes.html for a bit more information.

The keyboard quotes have different character codes to the curly quotes and that is why you cannot always successfully search for them, even if they look the same on-screen. Also, the text might look like it uses a straight quote but that could be because the font has rendered the curly quote as straight because that's how the font designer wanted it to look. Things aren't always as easy as they first seem. When searching for a character it is always best to copy the character from the text so you know you're using the right one.

For non-trivial documents you should normally use real curly quotes and apostrophes. To get these into a Scribus document you can use a variety of techniques. One way is to use the menu "Insert -> Quote -> " and then select the character you want. Or you can set-up Scribus keyboard short-cuts to these menu items to make it easier than having to go to the menu each time.

Another way is to use the operating system keyboard short-cuts as given on the linked page above but, for Windows users, be aware that the ALT+NUMKEYS methods don't work consistently in Scribus. If you are working directly in the text frame you will get the character but it will be added to the start of the line for some reason, but they do seem to work properly in the Story Editor.

I hope this has been helpful to someone.

P.S. Being able to replace the style in Search/Replace might have been more useful if the developers had chosen to allow users to replace the character style instead of the paragraph style. Changing the paragraph style for certain words doesn't make much sense to me as the whole paragraph is changed rather than just the word you're searching for. I can think of some possible uses for it, but changing the character style would be a much better option. By changing the character style you would only have to do the search/replace once and then just change the style if you need to use a different font. See https://bugs.scribus.net/view.php?id=4538 (and many other related tickets).