# 解包修改txt文件重新打包后，原词典的排版效果消失了，

**URL:** <https://forum.freemdict.com/t/topic/25719>\
**Category:** 技术交流与词典编修\
**Created:** [2023 年12 月 29 日 13:31 UTC](https://forum.freemdict.com/t/topic/25719 "2023-12-29T13:31:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 29 日 13:31 UTC](https://forum.freemdict.com/t/topic/25719/1 "2023-12-29T13:31:51Z")

</div>

变成了纯文本的效果。

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年12 月 29 日 13:38 UTC](https://forum.freemdict.com/t/topic/25719/2 "2023-12-29T13:38:05Z")

</div>

什么细节也没有，让大家猜谜？

我猜测：

1.词典用了compact html，而你漏了style sheet。

2.词典用了compact html，而你用mdict util打包，不行。

参看：[compact html](https://forum.freemdict.com/t/topic/16431/39)

或者：掉了css？改了css的名字？

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2023 年12 月 29 日 14:05 UTC](https://forum.freemdict.com/t/topic/25719/3 "2023-12-29T14:05:43Z")

</div>

需要上传txt文件，才知道原因。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 29 日 19:27 UTC](https://forum.freemdict.com/t/topic/25719/4 "2023-12-29T19:27:15Z")

</div>

漢語大詞典.mdx

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年12 月 30 日 00:03 UTC](https://forum.freemdict.com/t/topic/25719/5 "2023-12-30T00:03:09Z")

</div>

《汉语大词典》mdx用了compact html。

看一下我在楼上发的链接。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 30 日 01:31 UTC](https://forum.freemdict.com/t/topic/25719/6 "2023-12-30T01:31:19Z")

</div>

AutoMdxBuilder解决不了这个问题？

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年12 月 30 日 01:34 UTC](https://forum.freemdict.com/t/topic/25719/7 "2023-12-30T01:34:20Z")

</div>

> [@ygbimdpgyx](#):
>
> AutoMdxBuilder解决不了这个问题？

有compact html的词典只能用Mdxbuider编译。AutoMdxBuilder用的是mdict-util，mdict-util不能弄compact html。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 30 日 01:36 UTC](https://forum.freemdict.com/t/topic/25719/8 "2023-12-30T01:36:19Z")

</div>

Mdxbuider只能在win上用，请问有没有Mac上的同类软件？

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年12 月 30 日 01:43 UTC](https://forum.freemdict.com/t/topic/25719/9 "2023-12-30T01:43:47Z")

</div>

> [@ygbimdpgyx](#):
>
> Mac上的同类软件

Mac上的这个软件也是基于mdict-util的：

Pdawikimdx/mdd解压&打包工具-Mac版

> **[mdx/mdd解压&打包工具-Mac版 - 词库制作交流区 - Dictionary-Making - 掌上百科 - PDAWIKI - ...](https://www.pdawiki.com/forum/thread-40121-1-1.html)**
>
> 【REVIEW】：我的上一篇（第3篇）帖子☞\[教程\] 从零开始创建css文件（为没有css文件的mdx词典制作css文件）↪～～～～✂～～～～↩↪～～～～✂～～～～↩↪～～～～分割线 ... mdx/mdd解压&打包工具-Mac版 ,掌上百科 - PDAWIKI

Pdawiki存档：mdx/mdd解压&打包工具-Mac版  
[https://061061.xyz/40121.html](https://061061.xyz/40121.html)

凡是基于mdict-util的软件都不能编译compact html。

你只能装个视窗的虚拟机，然后在虚拟机上用mdxbuilder：

[Windows Virtual machine (虚拟机)](https://forum.freemdict.com/t/topic/13402/3)

还有一个方法：彻底改版，把《汉语大词典》光盘2.0mdx用到compact html的部分全部改写为使用css。不是整本词典都用了compact html，只有从光盘3mdx搬过来的词条用了。改造起来需要费力，但也不至于需要做到筋疲力尽。

---

<div class="post-metadata">

作者： ![shaoshi](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/shaoshi/32/14529_2.png) [@shaoshi](https://forum.freemdict.com/u/shaoshi)\
发布日期： [2023 年12 月 30 日 02:24 UTC](https://forum.freemdict.com/t/topic/25719/10 "2023-12-30T02:24:43Z")

</div>

光盘2.0mdx的compact html样本。

**compact htm开头有\<!\>，需要全在同一行，不能分行。这个帖子分行了，纯粹是展示。**

\<!\>有30304条。

\<!\>

* * *
`20`一`21``24`补义条目`26`

`24`1.`25` 可；可以。`6`  
`11``5``3`唐`4` `3`王维`4`《林园即事寄舍弟紞》诗：“寓目一蕭散，消憂冀俄頃。”`6`  
`11``5``3`唐`4` `3`李白`4`《古风》之三四：“如何舞干戚，一使有苗平？”`6`

`18``24`2.`25` 此。`6`  
`11``5``3`唐`4` `3`韦应物`4`《偶入西斋院示释子恒璨》诗：“一來非問訊，自是看山花。”`6`  
`11``5``3`唐`4` `3`朱湾`4`《假摄池州留别东溪隐居》诗：“一官仍是假，豈願數離羣。”`6`

`18``24`3.`25` 副词。  
（1）常；经常。`6`  
`11``5`《淮南子·说林训》：“尾生之信，不如隨牛之誕，而又況一不信者乎！”`3`高诱`4` 注：“一，猶常也。況常不爲信不爲誕乎！”`6`  
`11``5``3`唐`4` `3`谭用之`4`《山中晚春寄贾员外》诗：“珍重仙曹舊知己，往來星騎一相過。”`6`  
`18`（2）才；刚一。`6`  
`11``5`《史记·平原君虞卿列传》：“毛先生一至楚，而使趙重於九鼎、大吕。”`6`  
`11``5``3`南朝梁`4` `3`刘孝绰`4`《为人赠美人》诗：“巫山薦枕日，洛浦獻珠時。一遇便如此，寧關先有期。”`6`  
`11``5``3`明`4` `3`徐渭`4`《知清丰沈公祠碑》：“且詔下百官議，衆莫敢聲，獨趙公貞吉一問口，公輒和之，觸諱忌。”`6`  
`18`（3）忽而；忽然。`6`  
`11``5`《左传·成公八年》：“七年之中，一與一奪，二三孰甚焉？”`6`  
`11``5`《庄子·天运》：“風起北方，一西一東，有（在）上彷徨。”`6`  
`11``5``3`南朝梁`4` `3`何逊`4`《日夕望江赠鱼司马》诗：“誰能一羽化，輕舉逐飛浮？”`6`  
`11``5``3`唐`4` `3`杜甫`4`《秋日夔府咏怀奉寄郑监李宾客一百韵》：“胡星一彗孛，黔首遂拘攣。”`6`  
`18`（4）已；已经。`6`  
`11``5``3`唐`4` `3`陈子昂`4`《同宋参军之问梦赵六赠卢陈二子之作》诗：“撫孤一流慟，懷舊日暌違。”`6`  
`11``5``3`唐`4` `3`白居易`4`《寄元九》诗：“秋意一蕭條，離容兩寂寞。”`6`

`18``24`4.`25` 介词。自；自从。`6`  
`11``5``3`唐`4` `3`卢照邻`4`《咏史》诗之三：“一爲侍御史，慷慨説何公。”`6`  
`11``5``3`唐`4` `3`令狐楚`4`《夏至日衡阳郡斋书怀》诗：“一來江城守，七見江月圓。”`6`  
`11``5``3`唐`4` `3`韩愈`4`《感春》诗之二：“宫門一鎖不復啓，雖有九陌無塵埃。”`6

光盘2.0mdx的compact html的style sheet。

[handa.Style.txt.zip](https://forum.freemdict.com/uploads/short-url/gdX8KqbrPiNtiqYi7v0ckz8c6OA.zip) (532 Bytes)

理论上可以用Emeditor的批量替换，根据style sheet把那些符号替换回html。

先备份后再玩。

使用电脑最重要的三件事：第一是备份，第二是备份，第三还是备份。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 30 日 02:39 UTC](https://forum.freemdict.com/t/topic/25719/11 "2023-12-30T02:39:41Z")

</div>

谢谢，修改成功。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 30 日 02:42 UTC](https://forum.freemdict.com/t/topic/25719/12 "2023-12-30T02:42:47Z")

</div>

如果能自动转换style和html就好了。

---

<div class="post-metadata">

作者： ![ygbimdpgyx](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/b38774/32.png) [@ygbimdpgyx](https://forum.freemdict.com/u/ygbimdpgyx)\
发布日期： [2023 年12 月 30 日 02:47 UTC](https://forum.freemdict.com/t/topic/25719/13 "2023-12-30T02:47:03Z")

</div>

改一个字，mdx文件大了10MB!

---

<div class="post-metadata">

作者： ![jcz777](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/jcz777/32/60576_2.png) [@jcz777](https://forum.freemdict.com/u/jcz777)\
发布日期： [2023 年12 月 30 日 03:36 UTC](https://forum.freemdict.com/t/topic/25719/14 "2023-12-30T03:36:22Z")

</div>

![QQ截图20231230113343](https://forumcdn.freemdict.com/uploads/default/original/3X/2/f/2f4a5f8e3aa876189fec530bfb9de3fd0b4ea7b1.png)  
注意转换后，文本还需要处理一下，删除行尾的 \n 、分离词头等。但都比较简单。一两个替换完事。  
最好还是处理一下标签，做成样式表。
