# Mdx制作请教，添加了新的词条但词头不生效

**URL:** <https://forum.freemdict.com/t/topic/26965>\
**Category:** 技术交流与词典编修\
**Created:** [2024 年2 月 25 日 07:28 UTC](https://forum.freemdict.com/t/topic/26965 "2024-02-25T07:28:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

作者： ![ppxia](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/ppxia/32/58538_2.png) [@ppxia](https://forum.freemdict.com/u/ppxia)\
发布日期： [2024 年2 月 25 日 07:28 UTC](https://forum.freemdict.com/t/topic/26965/1 "2024-02-25T07:28:25Z")

</div>

请教各位，练手尝试下载了几个网页，合并后的源txt文件如下，但试过多种格式调整，比如把词头1行+内容1行+\</\>一行，生成mdx以后只能检索到第一个词头“A 1”。从截图可以看出，应该是其它词头不生效，我去解包了其它mdx学习过，但未能发现原因。  
另外如果对mdx的txt格式要求有疑问，可以查看什么文档？好像搜索了一圈没找到。  
平台：WSL(Ubuntu)+Mdict-Utils；也试过Win11+MdxBuilder 3.0RC1

```auto
A 1
<link href="W1913.css" rel="stylesheet">
<div class="result">
<h1 class="result-title">A 1</h1>
<div class="result-content">
<meaning><p><hw>A 1</hw> (ā wŭn). <def>A registry mark given by
underwriters (as at Lloyd's) to ships in first-class condition. Inferior
grades are indicated by A 2 and A 3.</def></p>
<p><i>A 1</i> is also applied colloquially to other things to imply
superiority; prime; first-class; first-rate.</p></meaning>
</div>
</div>
</>
Aam
<link href="W1913.css" rel="stylesheet">
<div class="result">
<h1 class="result-title">Aam</h1>
<div class="result-content">
<meaning><p><hw>||Aam</hw> (ôm <i>or</i> äm), <pos><i>n.</i></pos> [D.
<i>aam</i>, fr. LL. <i>ama</i>; cf. L. <i>hama</i> a water bucket, Gr. ?]
<def>A Dutch and German measure of liquids, varying in different cities,
being at Amsterdam about 41 wine gallons, at Antwerp 36½, at Hamburg
38¼.</def> [Written also <i>Aum</i> and <i>Awm</i>.]</p></meaning>
</div>
</div>
</>
Aard-vark
<link href="W1913.css" rel="stylesheet">
<div class="result">
<h1 class="result-title">Aard-vark</h1>
<div class="result-content">
<meaning><p><hw>||Aard"-vark`</hw> (ärd"värk`), <pos><i>n.</i></pos> [D.,
earth-pig.] <i>(Zoöl.)</i> <def>An edentate mammal, of the genus
<i>Orycteropus</i>, somewhat resembling a pig, common in some parts of
Southern Africa. It burrows in the ground, and feeds entirely on ants,
which it catches with its long, slimy tongue.</def></p></meaning>
</div>
</div>
</>
Aard-wolf
<link href="W1913.css" rel="stylesheet">
<div class="result">
<h1 class="result-title">Aard-wolf</h1>
<div class="result-content">
<meaning><p><hw>||Aard"-wolf`</hw> (ärd"w?lf), <pos><i>n.</i></pos> [D,
earth-wolf] <i>(Zoöl.)</i> <def>A carnivorous quadruped (<i>Proteles
Lalandii</i>), of South Africa, resembling the fox and hyena. See
<u>Proteles</u>.</def></p></meaning>
</div>
</div>
</>
Aaronic
<link href="W1913.css" rel="stylesheet">
<div class="result">
<h1 class="result-title">Aaronic</h1>
<div class="result-content">
<meaning><p>{ <hw>Aa*ron"ic</hw> (?*rŏn"ĭk), <hw>Aa*ron"ic*al</hw>
(-ĭ*k<i>a</i>l), } <pos><i>a.</i></pos> <def>Pertaining to Aaron,
the first high priest of the Jews.</def></p></meaning>
</div>
</div>
</>

```

[test.txt](https://forum.freemdict.com/uploads/short-url/84c7l3WnQtW9Q8q3na8nXEX4k52.txt) (2.2 KB)

 ![Screenshot 2024-02-25 152109](https://forumcdn.freemdict.com/uploads/default/original/3X/6/8/68b43f8d0cdfbb9a32a54088665e27f26b1c50de.png)

---

<div class="post-metadata">

作者： ![amob](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/amob/32/14630_2.png) [@amob](https://forum.freemdict.com/u/amob)\
发布日期： [2024 年2 月 25 日 07:37 UTC](https://forum.freemdict.com/t/topic/26965/2 "2024-02-25T07:37:16Z")

</div>

很奇怪，好像真没错 🧐

---

<div class="post-metadata">

作者： ![amob](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/amob/32/14630_2.png) [@amob](https://forum.freemdict.com/u/amob)\
发布日期： [2024 年2 月 25 日 07:38 UTC](https://forum.freemdict.com/t/topic/26965/3 "2024-02-25T07:38:59Z")

</div>

mdxbuilder里有一堆txt，简略地说明了格式。

---

<div class="post-metadata">

作者： ![ppxia](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/ppxia/32/58538_2.png) [@ppxia](https://forum.freemdict.com/u/ppxia)\
发布日期： [2024 年2 月 25 日 07:39 UTC](https://forum.freemdict.com/t/topic/26965/4 "2024-02-25T07:39:33Z")

</div>

噢，好像结尾要批量把\n改成\r\n就好了 😂

参考这个贴

> [@新手指南：怎样编辑mdx？](https://forum.freemdict.com/t/topic/16431/13):
>
> 本层标题为 制作自己的第一个mdx词典 先搞一个只有一个词条的mdx，做着玩玩。以苹果apple为例，敲入以下内容并保存txt。 写下apple敲回车 写下苹果敲回车 写下结束符号\</\> 用以上工具打包即可。 恭喜你，你已经会制作mdx词典啦！ play_button … see more

> [@新手指南：怎样编辑mdx？](http://forum.freemdict.com/t/topic/16431/13):
>
> # 需要注意的点：
> 
> 1. 换行符\n 保存成\r\n
> 2. 确保词条格式正确，txt最后一行是\</\>

算是暂时解决了。但我好奇这是为什么？

---

<div class="post-metadata">

作者： ![ppxia](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/ppxia/32/58538_2.png) [@ppxia](https://forum.freemdict.com/u/ppxia)\
发布日期： [2024 年2 月 25 日 07:43 UTC](https://forum.freemdict.com/t/topic/26965/5 "2024-02-25T07:43:46Z")

</div>

多谢指路。  
之前下载的压缩包里面只有一个程序，其它啥没有。  
从论坛又找了另一个版本，解开确实有些文档可以参考。

> [@【阿彌陀佛】词典制作工具备份，欢迎补充](https://forum.freemdict.com/t/topic/1724):
>
> 01 Exce表格转TXT文本工具ExcelToTxtP-这个我并不使用[01 Exce表格转TXT文本工具ExcelToTxtP.zip](https://forum.freemdict.com/uploads/short-url/nVvuJt94wupMFL9W8HhVYli2r8r.zip) (409.7 KB) 以下是常用的： 02、 TXT源文件转MDX工具 附教程[MdxBuilder3.0.zip](https://forum.freemdict.com/uploads/short-url/psEzNMO76qXQzAREjWQtPPJ8a6A.zip) (2.5 MB) 03 将 MDict 词典的 mdx 格式转为 txt 格式工具 [MdxExport3.5-MDX与MDD资源导出小工具.z…](https://forum.freemdict.com/uploads/short-url/vPyMXQMrWa0RpqJK1nxkKcy80HA.zip)
