4

我想要一个简单的公式,它将两个值连接在一起,用破折号分隔。该公式将如下所示:

{?PeriodFrom} & #em-dash-character# & {?PeriodTo}

显然,我只希望 em-dash 字符出现在两个句点值之间。如何才能做到这一点?

4

2 回答 2

0

您可以使用 -U+2015 Horizontal Bar

在此处输入图像描述

也不需要为此使用公式。如果您创建一个文本对象,您实际上可以将其拖入文本框
{?PeriodFrom}{?PeriodTo}在它们之间粘贴水平条:

在此处输入图像描述

请记住,您必须将参数字段拖到
文本框中。手动输入“{?PeriodFrom}”将不起作用。

于 2016-08-09T14:09:38.887 回答
0

还发现了这个:

Four ways to insert an em dash in a Word document
The easiest way to enter an em dash ( — ) is to let Word do it.  Simply enter two hyphen characters between the two words you want to connect, and Word will turn the hyphens into an em dash. If this doesn't work for you, one of two possibilities exist:
•   You've inserted space characters between the words and the hyphen characters. When you enter spaces between the hyphens, Word formats the hyphens as an en dash ( – ), which is shorter than an em dash.
•   Someone has disabled the AutoCorrect option that formats hyphens as an em dash.
Now, this default won't work for everyone every single time. If you occasionally need two hyphens instead of an em dash, you can press [Ctrl]+Z and Word willundo the em dash character and restore the hyphens. If you find yourself doing this a lot, it might be more efficient to disable the AutoCorrect option and enter an em dash, when you require it, manually. You can disable this option as follows:
1.  From the Tools menu, choose AutoCorrect Options.
2.  Click the AutoFormat As You Type tab.
3.  Uncheck the Hyphens ( — ) With ( — ) option. 
4.  Click OK.
After disabling the AutoCorrect option, you'll have to enter an em dash manually. Fortunately, there are three easy methods:
•   Press [Ctrl]+[Alt]+-. You must use the minus sign (-) on the numeric keypad; if you use the hyphen character on the alphanumeric keypad, Word will change the cursor.
•   Hold down the [Alt] key and type 0151 on the numeric keypad.
•   Choose Symbol from the Insert menu, click the Special Characters tab, highlight the em dash, and click Insert.

在这里格式化得很好

于 2016-08-10T12:47:56.050 回答