yindian / zhspacing

Automatically exported from code.google.com/p/zhspacing
1 stars 0 forks source link

Using zhspacing in Beamer class may lead to an "Overfull \hbox" #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I made a minimum example to reproduce it, as following.
[code=LaTeX]
\documentclass{beamer}
\mode<presentation> {
    \usetheme{Warsaw} % Frankfurt, Copenhagen, Warsaw, Madrid etc.
}

\usepackage{zhspacing}
\zhspacing

% \date{}
\begin{document}
\begin{frame}
    \titlepage
\end{frame}
\end{document}
[/code]
2. Save the above TeX file into a plaintext file, e.g. test.tex.
3. From a console or what ever, run `xelatex test'.

What is the expected output? What do you see instead?
For such an empty file, there should be no warnings and should generate a 
one-page slide with everything well. But there is an `Overfull \hbox 
(21.89998pt too wide) in paragraph at lines 10--10' showing in the output, the 
line is actually the \begin{document} line.

What version of the product are you using? On what operating system?
I'm using MikTeX portable 2.8:
MiKTeX-XeTeX 2.8.3758 (0.9995.1 texlive svn 15079) (MiKTeX 2.8)

I don't know how to get the exact version of zhspacing, but I find such a line 
in zhspacing.sty: version 3.5, and \def\zhspacingrevisioin{2008/01/02}, but in 
History, there's an item of 090720.

OS: Windows XP en with SP3.

Please provide any additional information below.
This issue may be caused by the beamer theme, some themes can reproduce this 
and others can't; What's more, when place `\zhspacing' after 
`\begin{document}', the `Overfull \hbox' seems disappear(at least in this 
example).

Original issue reported on code.google.com by suxp...@gmail.com on 16 Dec 2010 at 8:47

GoogleCodeExporter commented 9 years ago
The overfull \hbox seems to be caused by paragraph indent. After \zhspacing, 
\parindent will be set to 2em in normal font size. Even without activating 
zhspacing, if you set \parindent to non-zero before \begin{document}, the 
minimal example would also generate overfull \hbox.

To solve this, simply set \parindent back to zero after \zhspacing. For example,
\setlength{\parindent}{0em}

Original comment by yindian@gmail.com on 17 Dec 2010 at 2:41

GoogleCodeExporter commented 9 years ago
Development of zhspacing has been freezed. The code in this project is not 
going to be changed in the foreseeable future . If a change request is wanted, 
you can post a issue at ctex-kit project, which holds the CTAN version of 
zhspacing, which was last modified, maybe, on 090720.

Change issue status to Accepted to bring it on top page.

Original comment by yindian@gmail.com on 17 Dec 2010 at 2:50

GoogleCodeExporter commented 9 years ago
Verified. But I just can't understand why this only happens on certain themes. 
For example, when I simply change the theme to `Ilmenau', the `overfull \hbox' 
disappears.

Original comment by suxp...@gmail.com on 17 Dec 2010 at 3:38

GoogleCodeExporter commented 9 years ago
Problematic beamer themes seem to be using the `split' outer theme, which uses 
split theme for footline, letting \beamer@@tmpl@footline expand to \leavevmode 
\hbox {\begin {beamercolorbox}.....}, which would insert \parindent after 
entering horizontal mode by \leavevmode, yielding overfull box if \parindent is 
non-zero.

Ilmenau theme uses miniframes theme for footline, letting 
\beamer@@tmpl@footline expand to \begin {beamercolorbox} ..., without 
\leavevmode and \hbox. This might be the cause.

If you \usetheme{Ilmenau} and \useoutertheme{split}, overfull \hbox could also 
be produced.
If you comment out the \leavevmode in \defbeamertemplate*{footline}{split 
theme} in beamerouterthemesplit.sty, the overfull \hbox is no more.

Original comment by yindian@gmail.com on 17 Dec 2010 at 10:48

GoogleCodeExporter commented 9 years ago
感谢yindian大师的耐心讲解,我大体上知道怎么回事了,虽然�
��深入理解可能还需要学习好多东西~:)

BTW,关于zhspacing(或者xeCJK)我还发现有个问题,已经在ctex-k
it提交了一个issue:
http://code.google.com/p/ctex-kit/issues/detail?id=42
yindian大师如果有时间可否解释下?谢谢~~

PS: Sorry for my poor English :P
再PS: 
本想也在CTeX论坛发出来,毕竟那边人多,但是提示只有特定�
��才能发帖(长期潜水的缘故?),所以只好跑到GoogleCode这��
�了……

Original comment by suxp...@gmail.com on 17 Dec 2010 at 1:19

GoogleCodeExporter commented 9 years ago
不用谢:) 
其实我两年没用TeX了,beamer也不熟悉,看到你发的issue能够重
现,就用
\usepackage[logonly]{trace}
\traceon
来跟踪代码,分析log来得出结论的。

另一个issue我大致看了一下,确实是能重现,不过跟zhspaincg和
xeCJK没直接关系,只要有\usepackage{fontspec}就会出现那些Warning��
�Warning的产生应该跟beamer加的一堆\special和xdvipdfmx有关,我确�
��不太懂。由于个人能力、精力有限,恐怕帮不到太多忙了。

国内高人气的TeX论坛还有水木的TeX版,建议你也去那问问吧��
�虽然我早就退出江湖连水也不潜了XD)示例文件可以进一步��
�简,像设\title什么的其实都不必要。如果国内论坛得不到解�
��,还可以去XeTeX邮件列表,以及comp.text.tex新闻组提问。

HTH.

Original comment by yindian@gmail.com on 17 Dec 2010 at 2:17