再次您好,
我回到这个帖子询问处理这些以及其他在 basic checks(基本检查)中出现的标记相关错误的最佳实践。由于它们的有效性是在 .sty 文件中定义的,这让我认为需要在该处进行配置以解决错误,但如果其他地方有我应该更改的内容,我不想乱动内部机制。
我有一段时间一直在忽略/拒绝标记错误,但现在我正在准备一本书提交给 DBL,这些错误似乎应该更妥善地解决。我有三种无法解决的通用标记错误:
\xt 不允许在引言段落(\ip)中;
\ior 不允许在引言大纲段落(\io#)中;以及
嵌入式标记被报告为“未知”(例如,在带有 \+w 标记的耶稣话语中嵌入的词汇表链接)。
项目属性(Project Properties)高级选项卡中的样式表信息显示它使用的是 usfm.sty 样式表,并注明是“已自定义”(Customized)。我将 USFM 版本更改为 3,但 Basic Checks 的结果没有变化。当我查看“C:\My Paratext 9 Projects”文件夹中的 usfm.sty 时,它显示“Version=3.0.2”。由于项目属性报告它使用的是“已自定义”样式表,我也查看了项目文件夹中的 custom.sty 文件。该文件顶部的注释说它“是在升级到 Paratext 8.0 时创建的。它基于项目最初使用的样式文件。这些文件已被删除,但文件的备份已保存到 usfm-color.sty.bak 和 custom.sty.bak ” 我在当前项目文件夹中没有看到这两个 .bak 文件,但我假设它们一定在 Paratext 8 文件夹中。
我暂时重命名了项目文件夹中的 custom.sty(即重启 Paratext 后,高级选项卡不再报告“已自定义”样式表)。我不再拥有我们习惯的自定义颜色样式,但当我在该设置下运行 basic checks 时,\xt 和 \ior 的错误已解决。不过,+w 标记仍被报告为“未知标记”。
因此,我查看了当前项目文件夹中 custom.sty 文件里的 \Marker 定义,并发现了一些解决标记错误的线索:
对于“\Marker xt”规则,我当前的 custom.sty 中其“\Occurs under”属性只有值“x”,而在 usfm.sty 文件中,我发现了一个相当长的允许标记列表。
对于“\Marker ior”规则,我当前的 custom.sty 中其“\Occurs under”属性只有值“id”,而在 usfm.sty 文件中,我发现它允许出现在各种引言大纲下,以及“NEST”值。
对于“\Marker w”规则,我当前的 custom.sty 中是 usfm.sty 文件中出现的值的一个子集,并且缺少“NEST”值。
因此,我制作了 custom.sty 文件的其他临时副本;一个是我使用了 usfm.sty 中这三个标记的所有“\Occurs under”值,另一个是我在 custom.sty 文件中注释掉了这些标记的信息。正如预期的那样,我确实恢复了自定义颜色样式,但 Basic Checks 的结果与我移除 custom.sty 时相同:\xt 和 \ior 的错误已解决,但 \+w 标记仍被报告为“未知标记”。
有没有办法解决 \+w 标记的“未知标记”错误?并且,如上所述编辑我的 custom.sty 文件是否是解决引言中 \xt 和 \ior 标记“不能在此处出现”错误的最佳方式?
Hi again,
I’m returning to this thread to ask about the best practice for handling these and other marker-related errors that come up when basic checks. Since their validity is defined in the .sty files, it makes me think that configurations need to be done there to resolve errors, but I don’t want to mess around under the hood if there is something I should be changing somewhere else instead.
I had been ignoring/denying marker errors for a while, but now I’m getting a book ready for submission to the DBL and it seems like these errors should be resolved more properly. There are three general errors with markers that I can’t resolve:
\xt not allowed in Introduction paragraphs (\ip);
\ior not allowed in Introduction Outline paragraphs (\io#); and
embedded markers being reported as ‘unknown’ (eg. a glossary link embedded within words of Jesus with a \+w marker).
The stylesheet info in the Advanced tab of Project Properties indicates that it is using the usfm.sty Stylesheet, noting that it is “Customized”. I changed the USFM version to 3, but there was no change in the results of the Basic Checks. When I look in usfm.sty in the “C:\My Paratext 9 Projects” folder, it shows “Version=3.0.2”. Since the Project Properties reports that it uses a “Customized” Stylesheet, I looked at the custom.sty file in my project folder as well. The comments at the top of that file say that it “was created by the upgrade to Paratext 8.0. It is based upon the original style files used by your project. These files have been removed, but a backup of the files has been saved to usfm-color.sty.bak and custom.sty.bak ” I don’t see either of those .bak files in my current project folder, but I assume they must have been in the Paratext 8 folder.
I temporarily renamed custom.sty in my project folder (ie so the Advanced tab no longer reported a “Customized” stylesheet when I restarted Paratext). I no longer had the same custom color styling we were used to, but when I ran the basic checks with that setup, the errors with \xt and the \ior were resolved. The +w maker was still reported as an “Unknown marker”, though.
So I took a look through the \Marker definitions in the custom.sty fie in my current project folder, and saw some clues to resolving the Marker errors:
For the “\Marker xt” rule, my current custom.sty has only the value “x” for its “\Occurs under” property, while in the usfm.sty file I find quite a long list of permissible markers.
For the “\Marker ior” rule, my current custom.sty has only the value “id” for its “\Occurs under” property, while in the usfm.sty file I find it allowed to occur under the various Introduction Outline, as well as the “NEST” value.
For the “\Marker w” rule, my current custom.sty has a subset of the values that occur in the usfm.sty file, as well as missing the “NEST” value.
So I made other temporary copies of the custom.sty file; one in which I used all the “\Occurs under” values from the usfm.sty for these three markers, and another in which I just commented-out the informaton for these arkers in the custom.sty file. As expected, I did get my custom color styling back, but the results of the Basic Checks was the same as when I had removed custom.sty: the errors with \xt and the \ior were resolved, but \+w maker was still reported as an “Unknown marker”.
Is there any way to resolve the “Unknown marker” errors for \+w markers? And is editing my custom.sty file as I described above the best way to resolve the “Cannot occur here” errors for \xt and \ior markers in the Introduction?
机器翻译自 English 显示原文