Вложенные стили в Word

1317
LBogaardt

Применяя подпись к рисунку или таблице, мне нравится форматировать ее следующим образом:

Рисунок 1: Текст подписи .

Точнее, мне нравится, чтобы стиль текста, включая двоеточие «:», был одним способом, в то время как оставшийся абзац должен иметь другой стиль.

Возможен ли этот тип вложенного стиля на основе правил? Могу ли я щелкнуть правой кнопкой мыши стиль «Заголовок», затем «Изменить» и изменить что-либо для автоматического достижения моей цели?

Я ищу решение на основе стиля, а не решение VBA / Macro.

1

1 ответ на вопрос

1
Kelly Tessena Keck

Unfortunately, because both elements are in the same paragraph, there's no way to create a style that will format one part one way and one part another way (except with numbering which creates its own issues). However, there are a couple workarounds that can do what you want.

One Style with Numbering

  1. Right-click the Caption style and select Modify.
  2. Click Format and select Numbering.
  3. Click Define New Number Format.
  4. In the Number Format: field, type "Figure " before the 1 and a colon after it.
  5. Click OK until you're out of the Modify Style dialog box.
  6. Assign the style to some text.
  7. Select the Figure 1 automatic numbering and set it as bold.
  8. Select the rest of the text and set it as italic.
  9. Right-click the Caption style and select Update Caption to Match Selection.

This does what you want, but it has the downside of messing up your table of figures. Because you're creating captions with just the numbered style rather than the field you get when you automatically insert a caption, Word won't recognize them as captions and automatically add them to the table of figures. The good news is that you can create a second table of contents that shows only the Caption style and make that your table of figures.

The other downside is that if you're used to clicking Insert Caption to add a caption, you'll end up with the caption numbered twice, and it might take a while to retrain yourself to just type the caption text in the Caption style.

Multiple Paragraph Styles

Create a new style, based on Caption. Maybe call it Caption Title. Set the formatting you want. When you create a new figure, select the figure & number and apply the new style to it. This is simple & doesn't mess up anything else, but it's still mostly a manual solution that doesn't save you much.

Find and Replace

This isn't a method in and of itself so much as a clean-up to make sure you formatted all your figures the way you want.

Annoyingly, Word lets you use wildcards or search for a field, not both. So, you can't search for Figure with a field code and then replace it with a boldface version of itself. But, you can at least do a search using field codes to find all your figures, then add the style or formatting manually.

  1. Toggle all of your captions so that the field codes are showing. (The easiest way to do this is probably Ctrl+A to select all, then Alt+F9.)

  2. Click Ctrl+F and enter Figure ^d SEQ in the Find what field

  3. Run through the list and bold all of them, either with Ctrl+B or with a style you created if you went that route.

Это лучшее, что я могу сделать ... если это не сработает, могу ли я заинтересовать вас хорошим макросом? ;) Kelly Tessena Keck 9 лет назад 0
Спасибо за усилия. Я ожидал, что не будет простого решения. До сих пор я делал это вручную, что не так уж и плохо ... но хотя бы ради знаний, я должен был спросить;). LBogaardt 9 лет назад 0

Похожие вопросы