返回列表 回复 发帖

[ConTeXt] 你们的标点符号有这样的吗

见附件

log:
  1. This is luaTeX, Version snapshot-0.31.3-2008122922

  2. (ctx.tex

  3. ConTeXt  ver: 2009.01.14 11:29 MKIV  fmt: 2009.1.15  int: english/english

  4. system         : cont-new loaded
  5. (d:/contextminimal/texmf-context/tex/context/base/cont-new.tex
  6. systems         : beware: some patches loaded from cont-new.tex
  7. (d:/contextminimal/texmf-context/tex/context/base/cont-new.mkiv) (d:/contextminimal/texmf-context/tex/context/base/cont-mtx.tex))
  8. system         : cont-fil loaded
  9. (d:/contextminimal/texmf-context/tex/context/base/cont-fil.tex
  10. loading        : Context File Synonyms
  11. )
  12. system         : cont-sys.rme loaded
  13. (d:/contextminimal/texmf-context/tex/context/user/cont-sys.rme (d:/contextminimal/texmf-context/tex/context/base/type-tmf.tex) (d:/contextminimal/texmf-context/tex/context/base/type-siz.tex) (d:/contextminimal/texmf-context/tex/context/base/type-otf.tex))
  14. bodyfont       : 12pt rm is loaded
  15. specials       : pdftex loaded
  16. language       : language en is active
  17. system         : ctx.top loaded
  18. (ctx.top) (zhfonts.tex) (ctx.tuo) (ctx.tuo)
  19. systems        : begin file ctx at line 6
  20. fonts          : resetting map file list
  21. {d:/contextminimal/texmf-context/fonts/map/pdftex/context/original-empty.map}
  22. fonts          : using map file: original-base
  23. {d:/contextminimal/texmf-context/fonts/map/pdftex/context/original-base.map}
  24. fonts          : using map file: lm-math
  25. {d:/contextminimal/texmf/fonts/map/dvips/lm/lm-math.map}
  26. fonts          : using map file: lm-rm
  27. {d:/contextminimal/texmf/fonts/map/dvips/lm/lm-rm.map}
  28. fonts          : using map file: original-ams-base
  29. {d:/contextminimal/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
  30. fonts          : using map file: original-ams-euler
  31. {d:/contextminimal/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
  32. fonts          : using map file: original-public-lm
  33. {d:/contextminimal/texmf-context/fonts/map/pdftex/context/original-public-lm.map} [1.1]
  34. systems        : end file ctx at line 12
  35. system         : cont-err loaded
  36. (d:/contextminimal/texmf-context/tex/context/base/cont-err.tex
  37. systems        : no file 'cont-sys.tex', using 'cont-sys.rme' instead
  38. ) )<C:/WINDOWS/Fonts/AdobeSongStd-Light.otf><d:/contextminimal/texmf/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf>
  39. mkiv lua stats : result saved in file      - ctx.pdf
  40. mkiv lua stats : used config path          - d:/contextminimal/texmf/web2c/texmf.cnf
  41. mkiv lua stats : used cache path           - d:/contextminimal/texmf-cache
  42. mkiv lua stats : luatex banner             - this is luatex, version snapshot-0.31.3-2008122922
  43. mkiv lua stats : modules/dumps/instances   - 101/26/1
  44. mkiv lua stats : input load time           - 0.063 seconds
  45. mkiv lua stats : startup time              - 3.703 seconds (including runtime option file processing)
  46. mkiv lua stats : jobdata time              - 0.000 seconds saving, 0.000 seconds loading
  47. mkiv lua stats : fonts load time           - 34.156 seconds
  48. mkiv lua stats : xml load time             - 0.000 seconds, lpath calls: 0, cached calls: 0
  49. mkiv lua stats : lxml load time            - 0.000 seconds preparation, backreferences: 0
  50. mkiv lua stats : mps conversion time       - 0.000 seconds
  51. mkiv lua stats : node processing time      - 0.000 seconds including kernel
  52. mkiv lua stats : kernel processing time    - 0.000 seconds
  53. mkiv lua stats : attribute processing time - 0.000 seconds
  54. mkiv lua stats : language load time        - 0.078 seconds, n=2
  55. mkiv lua stats : graphics processing time  - 0.000 seconds including tex, n=0
  56. mkiv lua stats : metapost processing time  - 0.000 seconds, loading: 0.000 seconds, execution: 0.000 seconds, n: 0
  57. mkiv lua stats : current memory usage      - 188 MB (ctx: 193 MB)
  58. mkiv lua stats : cleaned up reserved nodes - 19 nodes, 8 lists of 100
  59. mkiv lua stats : node memory usage         - 20 glue_spec, 2 dir
  60. mkiv lua stats : loaded patterns           - us:us:pat:exc:2
  61. mkiv lua stats : loaded fonts              - AdobeHeitiStd-Regular:otf AdobeKaitiStd-Regular:otf AdobeSongStd-Light:otf TeXGyrePagella-Bold:otf TeXGyrePagella-BoldItalic:otf TeXGyrePagella-Italic:otf TeXGyrePagella-Regular:otf lmex10:tfm lmmi12:tfm lmmi7:tfm lmmi9:tfm lmroman10-bolditalic:otf lmroman10-italic:otf lmroman12-bold:otf lmroman12-italic:otf lmroman12-regular:otf lmroman7-bold:otf lmroman7-regular:otf lmroman9-bold:otf lmroman9-italic:otf lmroman9-regular:otf lmromancaps10-regular:otf lmromanslant10-bold:otf lmromanslant10-regular:otf lmromanslant12-regular:otf lmromanslant9-regular:otf lmsy10:tfm lmsy7:tfm lmsy9:tfm msam10:tfm msam7:tfm msbm10:tfm msbm7:tfm rm-lmr12:tfm rm-lmr7:tfm rm-lmr9:tfm
  62. mkiv lua stats : control sequences         - 34004 of 165536
  63. mkiv lua stats : callbacks                 - direct: 363, indirect: 5092, total: 5455
  64. mkiv lua stats : runtime                   - 36.422 seconds, 1 processed pages, 1 shipped pages, 0.027 pages/second
复制代码
附件: 您所在的用户组无法下载或查看附件
有。我的就是这样的
你问题解决了没有呢?咋解决的?
对于 2009.01.14 的 MkIV,比较拙劣的解决方案就是去 hack $TEXMFCONTEXT/tex/context/base/font-otf.lua 文件。

如果你对标点是否与右侧边界对齐并不在意的话,可以将 font-otf.lua 文件中的
  1. inter_char_half_factor        = 0.50
复制代码
修改为:
  1. inter_char_half_factor        = 0.00
复制代码
这样做,就是禁止 MkIV 对中文标点压缩。

关于这个问题的更多一些的讨论,请见 http://bbs.ctex.org/viewthread.p ... %26amp%3Btypeid%3D7 帖的第 26 ~ 28 楼。

BTW, 要是有一种办法能够判断出标点出现在版面边界就好了。

[ 本帖最后由 lyanry 于 2009-1-15 15:12 编辑 ]
是这样啊,那我试试。

不过我觉得是在处理中文字符间的空格时出问题了。
我给的例子中,出问题的标点的前一个汉字的前面都有空格。而其他情况下的标点都没问题。
不晓得哪位有空能看看源代码。

回复 #4 lyanry 的帖子

我这边没找到你说的那个变量。
又是咋回事啊。
奥,我写错了。2009.1.14 之前版本的中文标点处理是在 font-otf.lua 中,现在是在 font-ota.lua 文件中。

回复 #7 lyanry 的帖子

是可以了,不过标点符号也难看了点。
高手们有空折腾一下。
这个问题跟所使用的字体有很大关系,感觉很难找到通用的解决方法。我基本上只使用一款宋体,针对性的去调整 font-ota.lua 文件。现在,作为一名普通用户,我能做的也只有这些。

很想好好学习一下 LuaTeX 和 ConTeXt,把这类问题像 zhspacing 或者 xeCJK 那样地解决了。只是,时间一直都不是很充裕,能力也很有限。很无奈,只好慢慢地等。好在,ConTeXt 的开发者们已经开始准备考虑这些问题了。

回复 #9 lyanry 的帖子

串通一下帖子。

解决方案见:http://bbs.ctex.org/viewthread.php?tid=48562&extra=page%3D1
技术潜水员
返回列表