Re: [XeTeX] tabular in footnote
2011/12/8 Tobias Schoel liesdieda...@googlemail.com: On 08.12.2011 05:59, Daniel Greenhoe wrote: 2011/12/8 Zdenek Wagnerzdenek.wag...@gmail.com: No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. ... Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Then if that is the current state of the platform, as a LaTeX/XeLaTeX user it is not reasonable for me to make the demands on the system such as I originally sought (e.g. keeping text completely within the text area); that is, absolute precision is beyond the reach of one who only codes at the LaTeX/XeLaTeX level, and is only within the reach of one who codes at the TeX level. There is no TeX level and LaTeX level. You have always the same set of primitives (with extensions) but no one codes using the primitives only. Even plain (Xe)TeX defines macros and most of them are shared in LaTeX. The difference is that LaTeX offers additional macros and changes some plain TeX macros (e.g. \line in plain TeX means \hbox to \hsize but in LaTeX it draws a line in the picture environment). Yes. It's not (Xe)LaTeX's purpose. It's (Xe)TeX's purpose. But when using (Xe)LaTeX, I don't want to care about different modes. (Xe)LaTeX should understand the structure, I give to text, the different formatting options, I give to the structures, and should tell TeX, how to accomplish these tasks. The meaning of all these structures depends on the mode. You cannot break a line into a few pages because a line is a line. It would be nonsense to have the upper part of characters on one line and the lower part on another page. This is the same with a table. The tabular environment must be handled in a different way if it appears in the middle of a paragraph. The problem is, that the LaTeX manual does not say what happens if such object are inserted within a paragraph. You have to code the in-paragraph table in such a way that TeX knows how you wish to align it with the lines of the paragraph. If you do not express your options, LaTeX will use its own default which means align the top of the table with the baseline and thence let the whole table extend below the baseline. [Because (Xe)LaTeX is only software working on hardware, which can only tell wheter a specific electric quantum (voltage, current, charge) is 0 or not (1), it can only work with structures and formatting options that it's programmers has translated into 0 and 1.] Which means, only the structures, formatting options and their interactions, which are precomposed by LaTeX or composed by the author (via \newcommand, \newenvironment, etc.) are available. Unfortunately, the interaction tabulars in footnotes was not specifically designed, so it's interaction is definded by more general approaches, which happen to fail. No, tabular is just a box as anything else, footnote is an insert. There is nothing specila with these structures. The problem is that a footnote is a paragraph and tables usually do not appear in the middle of a paragraph. The tabular environment was not designed to work well in the middle of a paragraph. If a user wants to do it, he or she is supposed to cope with it. LaTeX has a strong macro language and anything can be defined. Macros for proper alignment of tables in the middle of a paragraph can be designed but I am afraid there will not be a general solution. If I were supposed to write such a general-purpose macro, I would not know how to do it because I do not know any general rule how a table should be aligned in the middle of a paragraph. This is not a complaint, it is only an observation. I actually have a copy of the TeX Book, I just need to open it. ^___^ It may be difficult reading for the beginning. I would suggest to read first A Gentle Introduction to TeX. This is a nice simply written book that can be found on the web. It describes the basic macros and then reading the TeXbook will be easier. As a LaTeX user I have never read the sections dealing with \halign and use LaTeX's tabular environment with various extension packages. I have never read the chapter about math although I know something about math families. There are nice plain TeX tricks that cannot be achieved with \newcommand. On the other hand, \DeclareRobustCommand is a useful macro for defining robust macros in LaTeX. If you take some features from the plain TeX and some features from LaTeX, your life will be easier. Thank you for the clarification, Dan 2011/12/8 Zdenek Wagnerzdenek.wag...@gmail.com: 2011/12/8 Daniel Greenhoedgreen...@gmail.com: Hello Heiko, ... In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly,
Re: [XeTeX] tabular in footnote
On 08.12.2011 12:16, Zdenek Wagner wrote: 2011/12/8 Tobias Schoelliesdieda...@googlemail.com: [snip] There is no TeX level and LaTeX level. You have always the same set of primitives (with extensions) but no one codes using the primitives only. Yes, there is a difference: TeX typesets what LaTeX tells it to. LaTeX transforms the structures and information _I give to LaTeX_, into typesetting commands for TeX. Even plain (Xe)TeX defines macros and most of them are shared in LaTeX. The difference is that LaTeX offers additional macros and changes some plain TeX macros (e.g. \line in plain TeX means \hbox to \hsize but in LaTeX it draws a line in the picture environment). Yes. It's not (Xe)LaTeX's purpose. It's (Xe)TeX's purpose. But when using (Xe)LaTeX, I don't want to care about different modes. (Xe)LaTeX should understand the structure, I give to text, the different formatting options, I give to the structures, and should tell TeX, how to accomplish these tasks. The meaning of all these structures depends on the mode. No, the meaning is does not depend on the mode. The tabular environment means, that the stuff inside is set as a table (with some options, bla blubb). At this point in workflow, as an author I don't care, how this table will be placed on the page. LaTeX has to do it. And it guesses based on the mode. You cannot break a line into a few pages because a line is a line. It would be nonsense to have the upper part of characters on one line and the lower part on another page. Why would I do this, and what does this have to do with LaTeX giving me tools to structure and format my text. This is the same with a table. The tabular environment must be handled in a different way if it appears in the middle of a paragraph. Then LaTeX should treat tabulars differently, depending on the mode. The problem is, that the LaTeX manual does not say what happens if such object are inserted within a paragraph. It should, because of what you will say next. [snip] No, tabular is just a box as anything else, footnote is an insert. From the technical side, I don't care. As far as I'm concerned, tabular can be 1000 times \relax or whatever, as long as it does, what it says it does (and nothing more): give me a table. From the structure side, I agree: a tabular is a box with specially laid out content; a footnote is a small mark and the task to do something at the foot of the page. There is nothing specila with these structures. The problem is that a footnote is a paragraph and tables usually do not appear in the middle of a paragraph. OK, so what I do care about, is how the tabular I want interacts with the surrounding material. LaTeX has a default for this because it needs a default for such things and Lamport has supposedly thought well about it. So when I'm don't agree with that interaction, I need to tell LaTeX something about this interaction. Fine, let's say the top line of the tabular should have the same basline as the surrounding line, and the next line should start below the tabular. How, how nice, that Lamport has thought of this idea (although not the default) and gave me the possibility to express this wish via the optional argument [t]. The tabular environment was not designed to work well in the middle of a paragraph. It does a fair job. The only thing I'd critisize concerning the issue is, that a \toprule or top \hline with [t] yields a tabular set below the baseline, because the \hline or \toprule are interpreted as the top line [at least I think so}]. This I would regard as a bug. If a user wants to do it, he or she is supposed to cope with it. Yes, but only because LaTeX's behaviour isn't defined well in beforehand. LaTeX has a strong macro language and anything can be defined. Macros for proper alignment of tables in the middle of a paragraph can be designed but I am afraid there will not be a general solution. If I were supposed to write such a general-purpose macro, I would not know how to do it because I do not know any general rule how a table should be aligned in the middle of a paragraph. Assuming, the content of the table is textual, it should be aligned along baselines or bounding boxes. One could also think of options to align it in a way nodes in TikZ/pgf are aligned. [snip] There are nice plain TeX tricks that cannot be achieved with \newcommand. As a LaTeX-_User_ I'm not interested in tricks of macro programming. That's the field of package programmers. For me, a usual programming interface like \newcommand, \newenvironment with optional and obligatory arguments or a keyval-control is sufficient. On the other hand, \DeclareRobustCommand is a useful macro for defining robust macros in LaTeX. If you take some features from the plain TeX and some features from LaTeX, your life will be easier. I'd prefer keeping to one of them. As you said, some plain-TeX primitives / macros (I still don't get the difference) are
Re: [XeTeX] tabular in footnote
Hello Heiko, On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Yes, that misunderstanding was my fault. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. A very nice solution --- thank you very much to exceed the textarea. Aligning the last line of the tabular with the bottom of the textarea is much more tricky. The following assumes that the last line of the tabular contains normal text without large depths: Thank you for this solution as well. I have tested it and it did work. I am sorry for my slow response in acknowledging it. I have worked for it seems several hours trying to integrate it into a larger project. The integration did not go so smoothly. In particular, when I tried to use it in a real project, the spacing between footnotes increased. I finally traced the conflict to the directive \VerbatimFootnotes from the fancyvrb (fancy verbatim) package. I reproduced the problem in the code you provided and will attach it to this email. You can take a look if you happen to have time. But if you don't have time, I do want to say that I greatly appreciate all the time you have already spent in helping me with this problem. Even if you do choose to take a look at the attached files, I don't think you need to spend time on this problem. I have observed that LaTeX apparently often has this bottom overflow problem, not just in the case of footnotes. For example, when using AMS's {align*} environment, the index n in \sum_n can also extend outside the lower text boundary. Even in the patch that you so skillfully crafted, the letter g still can violate the lower boundary (maybe letters with descenders in general have this problem)? But I suppose that could be remedied as well. Even if this problem was fixed, there is still the problem that the patch does not work well when there is only one entry in the tltabular environment (too much vertical spacing). On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: Please, be more precise. What do you consider as bug? In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly, if a 32 line section of code is required to prevent my correctly coded (as defined by documented syntax) code from violating such a parameter, then such a violation is by definition a bug and the 32 lines of additional code is by definition a patch. Having said that, let me make these additional comments: 1. I am embarrassed by my own lack of knowledge with respect to TeX coding. 2. I realize that I take a lot from this email list but contribute nothing or next to nothing 3. I very much appreciate all the help that I have and do receive from this mailing list 4. I know that beggars can't be choosers. 5. TeX and it's derivatives has to be one of the greatest developments of all time --- like unto the Gutenberg Press --- many many thanks to everyone who has and continues to work so hard to develop it. Dan On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. The exceeding part of the second footnote text is correct behaviour: TeX tries to align the top and bottom lines of a page in order to get the baselines at the same position: * At the top vertical space is added up to \topskip unless the height of the first element is larger than \topskip. * At the bottom the bottom element might have a depth up to \maxdepth. The
Re: [XeTeX] tabular in footnote
2011/12/8 Daniel Greenhoe dgreen...@gmail.com: Hello Heiko, ... In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly, if a 32 line section of code is required to prevent my correctly coded (as defined by documented syntax) code from violating such a parameter, then such a violation is by definition a bug and the 32 lines of additional code is by definition a patch. No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. Consider the expression my text. You would certainly be disapointed if the word text were verticaly aligned so that its baseline matched with the bottom of y. That's why boxes have height and depth and are aligned to baselines, not to bottom. The truth is that the documentation of tabular is incomplete. It does not say that it has zero width and the whole table extends below baseline. Thus in your original sample file you aske LaTeX to put the table below the baseline and LaTeX did exactly what you asked for. Incomplete documentation is unfortunately a feature of LaTeX. Normal users do not know that \vspace is expanded to \vskip in the vertical mode but to \vadjust{...} in the horizontal mode and the starred variant is esentially \vglue. I am afraid that the LaTeX documentation does not even mention the 5 modes so that the vertical and horizontal modes may be strange for you. Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Having said that, let me make these additional comments: 1. I am embarrassed by my own lack of knowledge with respect to TeX coding. 2. I realize that I take a lot from this email list but contribute nothing or next to nothing 3. I very much appreciate all the help that I have and do receive from this mailing list 4. I know that beggars can't be choosers. 5. TeX and it's derivatives has to be one of the greatest developments of all time --- like unto the Gutenberg Press --- many many thanks to everyone who has and continues to work so hard to develop it. Dan On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. The exceeding part of the second footnote text is correct behaviour: TeX tries to align the top and bottom lines of a page in order to get the baselines at the same position: * At the top vertical space is added up to \topskip unless the height of the first element is larger than \topskip. * At the bottom the bottom element might have a depth up to \maxdepth. The default for \maxdepth with \documentclass[12pt]{book} is .5\topskip = 8pt. \maxdepth=0pt doesn't allow the bottom element to exceed the textarea. Aligning the last line of the tabular with the bottom of the textarea is much more tricky. The following assumes that the last line of the tabular contains normal text without large depths: \documentclass[12pt]{book} \usepackage{array} \usepackage[ a4paper,noheadfoot,nomarginpar,margin=20mm,showframe ]{geometry} \usepackage{zref-savepos} \pagestyle{empty} %\maxdepth=0pt \makeatletter \newsavebox\tl@box \newcount\c@tlcount \setcounter{tlcount}{0} \def\thetlcount{\the\c@tlcount} \newenvironment*{tltabular}[1]{% \stepcounter{tlcount}% \begin{lrbox}{\tl@box}% \begin{tabular}[t]{|#1|}% \hline \zref@savepos \zref@labelbyprops{tl@b\thetlcount}{posy}% \xdef\g@dp@arstrutbox{% \the\dimexpr\dp\@arstrutbox+\arrayrulewidth }% \ignorespaces }{% \hline \end{tabular}% \end{lrbox}% \zref@refused{tl@a\thetlcount}% \zref@refused{tl@b\thetlcount}% \dimen@=\dimexpr \zposy{tl@a\thetlcount}sp-\zposy{tl@b\thetlcount}sp% \relax \raisebox{\dimen@}{% \zref@savepos \zref@labelbyprops{tl@a\thetlcount}{posy}%
Re: [XeTeX] tabular in footnote
2011/12/8 Zdenek Wagner zdenek.wag...@gmail.com: No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. ... Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Then if that is the current state of the platform, as a LaTeX/XeLaTeX user it is not reasonable for me to make the demands on the system such as I originally sought (e.g. keeping text completely within the text area); that is, absolute precision is beyond the reach of one who only codes at the LaTeX/XeLaTeX level, and is only within the reach of one who codes at the TeX level. This is not a complaint, it is only an observation. I actually have a copy of the TeX Book, I just need to open it. ^___^ Thank you for the clarification, Dan 2011/12/8 Zdenek Wagner zdenek.wag...@gmail.com: 2011/12/8 Daniel Greenhoe dgreen...@gmail.com: Hello Heiko, ... In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly, if a 32 line section of code is required to prevent my correctly coded (as defined by documented syntax) code from violating such a parameter, then such a violation is by definition a bug and the 32 lines of additional code is by definition a patch. No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. Consider the expression my text. You would certainly be disapointed if the word text were verticaly aligned so that its baseline matched with the bottom of y. That's why boxes have height and depth and are aligned to baselines, not to bottom. The truth is that the documentation of tabular is incomplete. It does not say that it has zero width and the whole table extends below baseline. Thus in your original sample file you aske LaTeX to put the table below the baseline and LaTeX did exactly what you asked for. Incomplete documentation is unfortunately a feature of LaTeX. Normal users do not know that \vspace is expanded to \vskip in the vertical mode but to \vadjust{...} in the horizontal mode and the starred variant is esentially \vglue. I am afraid that the LaTeX documentation does not even mention the 5 modes so that the vertical and horizontal modes may be strange for you. Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Having said that, let me make these additional comments: 1. I am embarrassed by my own lack of knowledge with respect to TeX coding. 2. I realize that I take a lot from this email list but contribute nothing or next to nothing 3. I very much appreciate all the help that I have and do receive from this mailing list 4. I know that beggars can't be choosers. 5. TeX and it's derivatives has to be one of the greatest developments of all time --- like unto the Gutenberg Press --- many many thanks to everyone who has and continues to work so hard to develop it. Dan On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. The exceeding part of the second footnote text is correct behaviour: TeX tries to align the top and bottom lines of a page in order to get the baselines at the same position: * At the top vertical space is added up to \topskip unless the height of the first element is larger than \topskip. * At the bottom the bottom element might have a depth up to \maxdepth. The default for \maxdepth with \documentclass[12pt]{book} is .5\topskip = 8pt. \maxdepth=0pt doesn't allow the bottom element to exceed the textarea. Aligning the last line of the tabular with the bottom of the textarea is much more tricky. The following assumes that the last line of the tabular contains normal text
Re: [XeTeX] tabular in footnote
Or... you could use context. I've never used context, but I hear good things about it. On Wed, Dec 7, 2011 at 22:59, Daniel Greenhoe dgreen...@gmail.com wrote: 2011/12/8 Zdenek Wagner zdenek.wag...@gmail.com: No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. ... Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Then if that is the current state of the platform, as a LaTeX/XeLaTeX user it is not reasonable for me to make the demands on the system such as I originally sought (e.g. keeping text completely within the text area); that is, absolute precision is beyond the reach of one who only codes at the LaTeX/XeLaTeX level, and is only within the reach of one who codes at the TeX level. This is not a complaint, it is only an observation. I actually have a copy of the TeX Book, I just need to open it. ^___^ Thank you for the clarification, Dan 2011/12/8 Zdenek Wagner zdenek.wag...@gmail.com: 2011/12/8 Daniel Greenhoe dgreen...@gmail.com: Hello Heiko, ... In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly, if a 32 line section of code is required to prevent my correctly coded (as defined by documented syntax) code from violating such a parameter, then such a violation is by definition a bug and the 32 lines of additional code is by definition a patch. No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. Consider the expression my text. You would certainly be disapointed if the word text were verticaly aligned so that its baseline matched with the bottom of y. That's why boxes have height and depth and are aligned to baselines, not to bottom. The truth is that the documentation of tabular is incomplete. It does not say that it has zero width and the whole table extends below baseline. Thus in your original sample file you aske LaTeX to put the table below the baseline and LaTeX did exactly what you asked for. Incomplete documentation is unfortunately a feature of LaTeX. Normal users do not know that \vspace is expanded to \vskip in the vertical mode but to \vadjust{...} in the horizontal mode and the starred variant is esentially \vglue. I am afraid that the LaTeX documentation does not even mention the 5 modes so that the vertical and horizontal modes may be strange for you. Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Having said that, let me make these additional comments: 1. I am embarrassed by my own lack of knowledge with respect to TeX coding. 2. I realize that I take a lot from this email list but contribute nothing or next to nothing 3. I very much appreciate all the help that I have and do receive from this mailing list 4. I know that beggars can't be choosers. 5. TeX and it's derivatives has to be one of the greatest developments of all time --- like unto the Gutenberg Press --- many many thanks to everyone who has and continues to work so hard to develop it. Dan On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. The exceeding part of the second footnote text is correct behaviour: TeX tries to align the top and bottom lines of a page in order to get the baselines at the same position: * At the top vertical space is added up to \topskip unless the height of the first element is larger than \topskip. * At the bottom the bottom element might have a depth up to \maxdepth. The default for \maxdepth with \documentclass[12pt]{book} is .5\topskip = 8pt. \maxdepth=0pt doesn't allow the bottom element to exceed the textarea.
Re: [XeTeX] tabular in footnote
On 08.12.2011 05:59, Daniel Greenhoe wrote: 2011/12/8 Zdenek Wagnerzdenek.wag...@gmail.com: No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. ... Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Then if that is the current state of the platform, as a LaTeX/XeLaTeX user it is not reasonable for me to make the demands on the system such as I originally sought (e.g. keeping text completely within the text area); that is, absolute precision is beyond the reach of one who only codes at the LaTeX/XeLaTeX level, and is only within the reach of one who codes at the TeX level. Yes. It's not (Xe)LaTeX's purpose. It's (Xe)TeX's purpose. But when using (Xe)LaTeX, I don't want to care about different modes. (Xe)LaTeX should “understand” the structure, I give to text, the different formatting options, I give to the structures, and should tell TeX, how to accomplish these tasks. [Because (Xe)LaTeX is only software working on hardware, which can only tell wheter a specific electric quantum (voltage, current, charge) is 0 or not (1), it can only work with structures and formatting options that it's programmers has translated into 0 and 1.] Which means, only the structures, formatting options and their interactions, which are precomposed by LaTeX or composed by the author (via \newcommand, \newenvironment, etc.) are available. Unfortunately, the interaction tabulars in footnotes was not specifically designed, so it's interaction is definded by more general approaches, which happen to fail. This is not a complaint, it is only an observation. I actually have a copy of the TeX Book, I just need to open it. ^___^ Thank you for the clarification, Dan 2011/12/8 Zdenek Wagnerzdenek.wag...@gmail.com: 2011/12/8 Daniel Greenhoedgreen...@gmail.com: Hello Heiko, ... In my mind (and maybe in my mind only) if I code something (e.g. a tabular in a footnote) in accordance with documented syntax and then the result of that code violates a parameter (e.g. a lower text area boundary) defined in the same documentation, then that by definition is a bug. Secondly, if a 32 line section of code is required to prevent my correctly coded (as defined by documented syntax) code from violating such a parameter, then such a violation is by definition a bug and the 32 lines of additional code is by definition a patch. No, I do not agree. I can only agree that the LaTeX user documentatioin is incomplete. Consider the expression my text. You would certainly be disapointed if the word text were verticaly aligned so that its baseline matched with the bottom of y. That's why boxes have height and depth and are aligned to baselines, not to bottom. The truth is that the documentation of tabular is incomplete. It does not say that it has zero width and the whole table extends below baseline. Thus in your original sample file you aske LaTeX to put the table below the baseline and LaTeX did exactly what you asked for. Incomplete documentation is unfortunately a feature of LaTeX. Normal users do not know that \vspace is expanded to \vskip in the vertical mode but to \vadjust{...} in the horizontal mode and the starred variant is esentially \vglue. I am afraid that the LaTeX documentation does not even mention the 5 modes so that the vertical and horizontal modes may be strange for you. Without knowledge of the modes you cannot understand why the table behaves differently in the footnote. It is documented in the TeXbook. Having said that, let me make these additional comments: 1. I am embarrassed by my own lack of knowledge with respect to TeX coding. 2. I realize that I take a lot from this email list but contribute nothing or next to nothing 3. I very much appreciate all the help that I have and do receive from this mailing list 4. I know that beggars can't be choosers. 5. TeX and it's derivatives has to be one of the greatest developments of all time --- like unto the Gutenberg Press --- many many thanks to everyone who has and continues to work so hard to develop it. Dan On Wed, Dec 7, 2011 at 7:51 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the
Re: [XeTeX] tabular in footnote
Thank you everyone for your help with this problem. I will regard it as a bug. I hope that someday it can be fully resolved. Dan On Tue, Dec 6, 2011 at 6:07 AM, Daniel Greenhoe dgreen...@gmail.com wrote: Hello Heiko, Thank you for your hard work on my behalf. I did try compiling your code; but it still seems to have the same problem as my original example (see attachments). Did I do something wrong? Dan On Mon, Dec 5, 2011 at 4:16 PM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Sun, Dec 04, 2011 at 07:31:59AM +0800, Daniel Greenhoe wrote: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% I don't see a relation to XeTeX, thus the mailing list texhash might be the better choice for this question. The following example addresses calculates the shift to align the baseline of the footnote line with the first line of the tabular. No time for looking at the problem with the overfull \vbox. \documentclass[12pt]{book} \usepackage{array} \usepackage[ a4paper,noheadfoot,nomarginpar,margin=20mm,showframe ]{geometry} \usepackage{zref-savepos} \makeatletter \newsavebox\tl@box \newcount\c@tlcount \setcounter{tlcount}{0} \def\thetlcount{\the\c@tlcount} \newenvironment*{tltabular}[1]{% \stepcounter{tlcount}% \begin{lrbox}{\tl@box}% \begin{tabular}[t]{|#1|}% \hline \zref@savepos \zref@labelbyprops{tl@b\thetlcount}{posy}% \ignorespaces }{% \hline \end{tabular}% \end{lrbox}% \zref@refused{tl@a\thetlcount}% \zref@refused{tl@b\thetlcount}% \dimen@=\dimexpr \zposy{tl@a\thetlcount}sp-\zposy{tl@b\thetlcount}sp% \relax \raisebox{\dimen@}{% \zref@savepos \zref@labelbyprops{tl@a\thetlcount}{posy}% \box\tl@box }% } \begin{document}% xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } \end{document}% Yours sincerely Heiko Oberdiek -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hello Daniel, On 07/12/2011, at 8:16 AM, Daniel Greenhoe wrote: Thank you everyone for your help with this problem. I will regard it as a bug. I hope that someday it can be fully resolved. Heiko explains why the table doesn't align as you want. Try this variant of your example. \documentclass[12pt]{book} \usepackage[a4paper,noheadfoot,nomarginpar,margin=20mm,showframe] {geometry} % adjust this value to suit \def\foottableraise{2ex} % define a new environment \newenvironment{foottable}{% \raise\foottableraise\hbox\bgroup\space \begin{tabular}[t]% }{% \end{tabular}\egroup\vskip\foottableraise } \begin{document}% xyz\footnote{% \raisebox{\foottableraise}{ % inserts a space \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ }% \vskip \foottableraise } xyz\footnote{% \begin{foottable}{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{foottable}%\\ } \end{document}% Note that you need to use TeX's \raise and \bgroup ... \egroup in the environment definition. This is because \raisebox reads its argument too soon, so the start and end of the box cannot then be split between the \begin and \end of the \newenvironment . Dan Hope this helps, Ross Ross Moore ross.mo...@mq.edu.au Mathematics Department office: E7A-419 Macquarie University tel: +61 (0)2 9850 8955 Sydney, Australia 2109 fax: +61 (0)2 9850 8114 -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Wed, Dec 07, 2011 at 05:16:49AM +0800, Daniel Greenhoe wrote: Thank you everyone for your help with this problem. I will regard it as a bug. I hope that someday it can be fully resolved. Please, be more precise. What do you consider as bug? [t] of \begin{tabular} means top-alignment. The top element is the \hline. On Tue, Dec 6, 2011 at 6:07 AM, Daniel Greenhoe dgreen...@gmail.com wrote: Hello Heiko, Thank you for your hard work on my behalf. I did try compiling your code; but it still seems to have the same problem as my original example (see attachments). Did I do something wrong? Yes, not reading the screen messages/.log file. You have to compile twice at least. Yours sincerely Heiko Oberdiek -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex Heiko.pdf Description: Adobe PDF document Heiko.tex Description: TeX document -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hello Ross, On Wed, Dec 7, 2011 at 5:58 AM, Ross Moore ross.mo...@mq.edu.au wrote: Heiko explains why the table doesn't align as you want. Looking at Heiko's email again, I think maybe I misunderstood it. Sorry Heiko! :( Try this variant of your example. Yes! That seems to work. Actually the only case where it doesn't seem to work as a general solution is the case when there is only one line in the tabular environment (see attachments). In this case, the value of 2ex seems to be too much. That is, the value of 2ex seems to work for all cases(?) except the case of the number of lines being 1. But I could define a separate environment for that special case (in fact that case doesn't even need a tabular, but having a tabular might be nice for consistency with the other cases). Thank you very much for your help, Dan On Wed, Dec 7, 2011 at 5:58 AM, Ross Moore ross.mo...@mq.edu.au wrote: Hello Daniel, On 07/12/2011, at 8:16 AM, Daniel Greenhoe wrote: Thank you everyone for your help with this problem. I will regard it as a bug. I hope that someday it can be fully resolved. Heiko explains why the table doesn't align as you want. Try this variant of your example. \documentclass[12pt]{book} \usepackage[a4paper,noheadfoot,nomarginpar,margin=20mm,showframe] {geometry} % adjust this value to suit \def\foottableraise{2ex} % define a new environment \newenvironment{foottable}{% \raise\foottableraise\hbox\bgroup\space \begin{tabular}[t]% }{% \end{tabular}\egroup\vskip\foottableraise } \begin{document}% xyz\footnote{% \raisebox{\foottableraise}{ % inserts a space \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ }% \vskip \foottableraise } xyz\footnote{% \begin{foottable}{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{foottable}%\\ } \end{document}% Note that you need to use TeX's \raise and \bgroup ... \egroup in the environment definition. This is because \raisebox reads its argument too soon, so the start and end of the box cannot then be split between the \begin and \end of the \newenvironment . Dan Hope this helps, Ross Ross Moore ross.mo...@mq.edu.au Mathematics Department office: E7A-419 Macquarie University tel: +61 (0)2 9850 8955 Sydney, Australia 2109 fax: +61 (0)2 9850 8114 -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex Ross.tex Description: TeX document Ross.pdf Description: Adobe PDF document -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
On Wed, Dec 07, 2011 at 06:30:39AM +0800, Daniel Greenhoe wrote: On Wed, Dec 7, 2011 at 5:46 AM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: You have to compile twice at least. I compiled at least 8 times using xelatex Heiko.tex. I still get the same error: the text extends below the text area (see attachment). You don't get this result on your system? And I had written: | The following example addresses calculates the shift to align | the baseline of the footnote line with the first line of | the tabular. No time for looking at the problem with the overfull \vbox. I have seen two problems with your example and one of them solved, the other remained unsolved. No more, no less. Taking more time, I see now, that the overfull \vbox is caused by something different: The header is set to zero (see options for geometry), but the page number is printed causing the overfull \vbox. Changing the options of geometry or \pagestyle{empty} solves the problem. The exceeding part of the second footnote text is correct behaviour: TeX tries to align the top and bottom lines of a page in order to get the baselines at the same position: * At the top vertical space is added up to \topskip unless the height of the first element is larger than \topskip. * At the bottom the bottom element might have a depth up to \maxdepth. The default for \maxdepth with \documentclass[12pt]{book} is .5\topskip = 8pt. \maxdepth=0pt doesn't allow the bottom element to exceed the textarea. Aligning the last line of the tabular with the bottom of the textarea is much more tricky. The following assumes that the last line of the tabular contains normal text without large depths: \documentclass[12pt]{book} \usepackage{array} \usepackage[ a4paper,noheadfoot,nomarginpar,margin=20mm,showframe ]{geometry} \usepackage{zref-savepos} \pagestyle{empty} %\maxdepth=0pt \makeatletter \newsavebox\tl@box \newcount\c@tlcount \setcounter{tlcount}{0} \def\thetlcount{\the\c@tlcount} \newenvironment*{tltabular}[1]{% \stepcounter{tlcount}% \begin{lrbox}{\tl@box}% \begin{tabular}[t]{|#1|}% \hline \zref@savepos \zref@labelbyprops{tl@b\thetlcount}{posy}% \xdef\g@dp@arstrutbox{% \the\dimexpr\dp\@arstrutbox+\arrayrulewidth }% \ignorespaces }{% \hline \end{tabular}% \end{lrbox}% \zref@refused{tl@a\thetlcount}% \zref@refused{tl@b\thetlcount}% \dimen@=\dimexpr \zposy{tl@a\thetlcount}sp-\zposy{tl@b\thetlcount}sp% \relax \raisebox{\dimen@}{% \zref@savepos \zref@labelbyprops{tl@a\thetlcount}{posy}% \box\tl@box }\\*[-\g@dp@arstrutbox]% \hbox{\vrule width 0pt depth\g@dp@arstrutbox}% } \begin{document}% xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } \end{document}% Yours sincerely Heiko Oberdiek -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
On Sun, Dec 04, 2011 at 07:31:59AM +0800, Daniel Greenhoe wrote: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% I don't see a relation to XeTeX, thus the mailing list texhash might be the better choice for this question. The following example addresses calculates the shift to align the baseline of the footnote line with the first line of the tabular. No time for looking at the problem with the overfull \vbox. \documentclass[12pt]{book} \usepackage{array} \usepackage[ a4paper,noheadfoot,nomarginpar,margin=20mm,showframe ]{geometry} \usepackage{zref-savepos} \makeatletter \newsavebox\tl@box \newcount\c@tlcount \setcounter{tlcount}{0} \def\thetlcount{\the\c@tlcount} \newenvironment*{tltabular}[1]{% \stepcounter{tlcount}% \begin{lrbox}{\tl@box}% \begin{tabular}[t]{|#1|}% \hline \zref@savepos \zref@labelbyprops{tl@b\thetlcount}{posy}% \ignorespaces }{% \hline \end{tabular}% \end{lrbox}% \zref@refused{tl@a\thetlcount}% \zref@refused{tl@b\thetlcount}% \dimen@=\dimexpr \zposy{tl@a\thetlcount}sp-\zposy{tl@b\thetlcount}sp% \relax \raisebox{\dimen@}{% \zref@savepos \zref@labelbyprops{tl@a\thetlcount}{posy}% \box\tl@box }% } \begin{document}% xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } \end{document}% Yours sincerely Heiko Oberdiek -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
On Sun, Dec 04, 2011 at 07:31:59AM +0800, Daniel Greenhoe wrote: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: Put it in \vbox :-). At least I would do so in plain(Xe)TeX. :-) \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Petr Tomasek http://www.etf.cuni.cz/~tomasek Jabber: but...@jabbim.cz EA 355:001 DU DU DU DU EA 355:002 TU TU TU TU EA 355:003 NU NU NU NU NU NU NU EA 355:004 NA NA NA NA NA -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
2011/12/5 Petr Tomasek toma...@etf.cuni.cz: On Sun, Dec 04, 2011 at 07:31:59AM +0800, Daniel Greenhoe wrote: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: Put it in \vbox :-). At least I would do so in plain(Xe)TeX. :-) In (Xe)LaTeX it will be even worse because the natural width of a \vbox is the line width. If such a \vbox appears in a paragraph just after the footnote number, it will result in an overful \hbox. Breaking the line between the footnote number and the \vbox is in principle possible but the \hbox will be badly underfull and TeX will not do it unless \tolerance is set to 1. The problem is most probably caused by the fact that tabular has zero height and positive depth, it is probably set as \vtop. If placed inside \vbox, the baseline of the \vbox will be aligned with the baseline of tabular, thus the \vbox will still have zero height and positive depth (see my example in one of my previous posts). Thus \vbox does not improve the situation. \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Petr Tomasek http://www.etf.cuni.cz/~tomasek Jabber: but...@jabbim.cz EA 355:001 DU DU DU DU EA 355:002 TU TU TU TU EA 355:003 NU NU NU NU NU NU NU EA 355:004 NA NA NA NA NA -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Zdeněk Wagner http://hroch486.icpf.cas.cz/wagner/ http://icebearsoft.euweb.cz -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hello Heiko, Thank you for your hard work on my behalf. I did try compiling your code; but it still seems to have the same problem as my original example (see attachments). Did I do something wrong? Dan On Mon, Dec 5, 2011 at 4:16 PM, Heiko Oberdiek heiko.oberd...@googlemail.com wrote: On Sun, Dec 04, 2011 at 07:31:59AM +0800, Daniel Greenhoe wrote: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% I don't see a relation to XeTeX, thus the mailing list texhash might be the better choice for this question. The following example addresses calculates the shift to align the baseline of the footnote line with the first line of the tabular. No time for looking at the problem with the overfull \vbox. \documentclass[12pt]{book} \usepackage{array} \usepackage[ a4paper,noheadfoot,nomarginpar,margin=20mm,showframe ]{geometry} \usepackage{zref-savepos} \makeatletter \newsavebox\tl@box \newcount\c@tlcount \setcounter{tlcount}{0} \def\thetlcount{\the\c@tlcount} \newenvironment*{tltabular}[1]{% \stepcounter{tlcount}% \begin{lrbox}{\tl@box}% \begin{tabular}[t]{|#1|}% \hline \zref@savepos \zref@labelbyprops{tl@b\thetlcount}{posy}% \ignorespaces }{% \hline \end{tabular}% \end{lrbox}% \zref@refused{tl@a\thetlcount}% \zref@refused{tl@b\thetlcount}% \dimen@=\dimexpr \zposy{tl@a\thetlcount}sp-\zposy{tl@b\thetlcount}sp% \relax \raisebox{\dimen@}{% \zref@savepos \zref@labelbyprops{tl@a\thetlcount}{posy}% \box\tl@box }% } \begin{document}% xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } xyz\footnote{% \begin{tltabular}{l} abc\\ def\\ ghj\\ klm\\ \end{tltabular}%\\ } \end{document}% Yours sincerely Heiko Oberdiek -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex Heiko.pdf Description: Adobe PDF document Heiko.tex Description: TeX document -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi Dan, Though, you problem is interesting, but I can believe you have this problem. You do realize that a footnote in general is not intend to contain this kind of information. Even though it may be possible in TeX, et al. Most writers show poor style by stuffing all kinds of information in the footnote because they do not take the time to properly integrate what the have to say into the main text. But, you can do whatever you want. regards Keith. Am 04.12.2011 um 00:31 schrieb Daniel Greenhoe: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan foottbl.texfoottbl.pdf -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi Dan, first, as Keith wrote, as a reader I would not expect a table in a footnote. If the table is important, why not to put it to the main text? And if it is not important, why it is there at all? If it is of less importance, it should rather appear in an apendix, not in a footnote. I am not such an expert. I tried to figure out how the page is completed but I do not fully understand it. What is important to know is that each box has 3 dimensions: height, depth and width. If tabular is set, the resulting box has zero height. You can see it in my example. You can also se a trick how I forced it to have nonzero height but preserving the sum of the height + depth. The boxes are treated differently depending whether they are inserted to the vertical or horizontal list. I am afraid that proper treatment of tables within footnotes will require delving into the TeX page breaking algorithm and detailed knowledge of LaTeX \output routine may also be needed. The LaTeX \output is about 40 pages of code and I have never studied these macros. 2011/12/4 Keith J. Schultz keithjschu...@web.de: Hi Dan, Though, you problem is interesting, but I can believe you have this problem. You do realize that a footnote in general is not intend to contain this kind of information. Even though it may be possible in TeX, et al. Most writers show poor style by stuffing all kinds of information in the footnote because they do not take the time to properly integrate what the have to say into the main text. But, you can do whatever you want. regards Keith. Am 04.12.2011 um 00:31 schrieb Daniel Greenhoe: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan foottbl.texfoottbl.pdf -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Zdeněk Wagner http://hroch486.icpf.cas.cz/wagner/ http://icebearsoft.euweb.cz tb.tex Description: TeX document tb.pdf Description: Adobe PDF document -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi Keith, On Sun, Dec 4, 2011 at 6:01 PM, Keith J. Schultz keithjschu...@web.de wrote: Most writers show poor style by stuffing all kinds of information in the footnote Thank you for your honest feedback. The purpose of the tabular footnotes is for citation information. I like verbose citations; I do not like seeing a reference with just a [1] and then I have to fish around in the nether regions of the book to get any clue as to what reference it refers to. Rather for each, say, theorem, I like to put on the same page (or close to the same page) as where the theorem occurs 1. multiple references for that one theorem (recent and old/original if possible) 2. reference information that is verbose enough to contain an author, a title, and a year (normally with additional info available in the Bibliography) I realize this style is not standard in the book industry, but I like it. And I think not having it this way may in part be a vestige of out-dated technology (e.g. typesetting with a simple typewriter). Thus, I often have several lines (one line per reference) for a single footnote. And I implement this using a tabular environment. I think tabular environments are a good mechanism for aligning material neatly. Dan I like to put verbose citations (one line of reference info) for each reference, On Sun, Dec 4, 2011 at 6:01 PM, Keith J. Schultz keithjschu...@web.de wrote: Hi Dan, Though, you problem is interesting, but I can believe you have this problem. You do realize that a footnote in general is not intend to contain this kind of information. Even though it may be possible in TeX, et al. Most writers show poor style by stuffing all kinds of information in the footnote because they do not take the time to properly integrate what the have to say into the main text. But, you can do whatever you want. regards Keith. Am 04.12.2011 um 00:31 schrieb Daniel Greenhoe: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan foottbl.texfoottbl.pdf -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi Zdenek, As usual, thank you for all your hard work on my behalf. The conclusion appears to be that there is no easy solution to the problem (and it seems I am about the only person who has this problem). If you do happen to come upon a solution some day, please feel free to drop me a line. In the mean time I can maybe just tolerate the 2mm or so overflow, or put a newline after the table. Thank you again, Dan 2011/12/4 Zdenek Wagner zdenek.wag...@gmail.com: Hi Dan, first, as Keith wrote, as a reader I would not expect a table in a footnote. If the table is important, why not to put it to the main text? And if it is not important, why it is there at all? If it is of less importance, it should rather appear in an apendix, not in a footnote. I am not such an expert. I tried to figure out how the page is completed but I do not fully understand it. What is important to know is that each box has 3 dimensions: height, depth and width. If tabular is set, the resulting box has zero height. You can see it in my example. You can also se a trick how I forced it to have nonzero height but preserving the sum of the height + depth. The boxes are treated differently depending whether they are inserted to the vertical or horizontal list. I am afraid that proper treatment of tables within footnotes will require delving into the TeX page breaking algorithm and detailed knowledge of LaTeX \output routine may also be needed. The LaTeX \output is about 40 pages of code and I have never studied these macros. 2011/12/4 Keith J. Schultz keithjschu...@web.de: Hi Dan, Though, you problem is interesting, but I can believe you have this problem. You do realize that a footnote in general is not intend to contain this kind of information. Even though it may be possible in TeX, et al. Most writers show poor style by stuffing all kinds of information in the footnote because they do not take the time to properly integrate what the have to say into the main text. But, you can do whatever you want. regards Keith. Am 04.12.2011 um 00:31 schrieb Daniel Greenhoe: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan foottbl.texfoottbl.pdf -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Zdeněk Wagner http://hroch486.icpf.cas.cz/wagner/ http://icebearsoft.euweb.cz -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hello I use plain XeTeX, and thanks to scholars of ancient philosophy who like to have huge footnotes (sometimes including tabular matter or extensive workings in formal logic) I do sometimes have to specify that certain groups of lines cannot split between pages. Within tabular I just have \noalign{\nobreak} between the lines of the table that aren't to be split, and if a whole table was to be regarded as non-splittable I suppose I would put it all within vertical box: \vbox{TABLE IN HERE}. Wordy commands can always be reduced for quickness in typing, for example: \def\nbr{\noalign{\nobreak}} would let you type \nbr between tabular lines that aren't to be split. Do TeX primitives like that not work in LaTeX? Best wishes John - Original Message - From: Daniel Greenhoe dgreen...@gmail.com To: Unicode-based TeX for Mac OS X and other platforms xetex@tug.org Sent: 04 December 2011 12:26 Subject: Re: [XeTeX] tabular in footnote Hi Zdenek, As usual, thank you for all your hard work on my behalf. The conclusion appears to be that there is no easy solution to the problem (and it seems I am about the only person who has this problem). If you do happen to come upon a solution some day, please feel free to drop me a line. In the mean time I can maybe just tolerate the 2mm or so overflow, or put a newline after the table. Thank you again, Dan 2011/12/4 Zdenek Wagner zdenek.wag...@gmail.com: Hi Dan, first, as Keith wrote, as a reader I would not expect a table in a footnote. If the table is important, why not to put it to the main text? And if it is not important, why it is there at all? If it is of less importance, it should rather appear in an apendix, not in a footnote. I am not such an expert. I tried to figure out how the page is completed but I do not fully understand it. What is important to know is that each box has 3 dimensions: height, depth and width. If tabular is set, the resulting box has zero height. You can see it in my example. You can also se a trick how I forced it to have nonzero height but preserving the sum of the height + depth. The boxes are treated differently depending whether they are inserted to the vertical or horizontal list. I am afraid that proper treatment of tables within footnotes will require delving into the TeX page breaking algorithm and detailed knowledge of LaTeX \output routine may also be needed. The LaTeX \output is about 40 pages of code and I have never studied these macros. 2011/12/4 Keith J. Schultz keithjschu...@web.de: Hi Dan, Though, you problem is interesting, but I can believe you have this problem. You do realize that a footnote in general is not intend to contain this kind of information. Even though it may be possible in TeX, et al. Most writers show poor style by stuffing all kinds of information in the footnote because they do not take the time to properly integrate what the have to say into the main text. But, you can do whatever you want. regards Keith. Am 04.12.2011 um 00:31 schrieb Daniel Greenhoe: When I put a tabular in a footnote, the tabular often is extended outside the text area. Besides placing a newline directive after the tabular environment, is there anything I can do to prevent this behavior? That is, how can I best ensure that tabulars in a footnote get typeset completely within the text area? Here is an example: \documentclass[12pt]{book} \usepackage[xetex,a4paper,noheadfoot,nomarginpar,margin=20mm,showframe]{geometry} \begin{document}% xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } xyz\footnote{% %\raisebox{2.5mm}{ \begin{tabular}[t]{|l|} \hline abc\\ def\\ ghj\\ klm\\ \hline \end{tabular}%\\ %}% } \end{document}% Many thanks in advance, Dan foottbl.texfoottbl.pdf -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Zdeněk Wagner http://hroch486.icpf.cas.cz/wagner/ http://icebearsoft.euweb.cz -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
2011/12/4 msk...@ansuz.sooke.bc.ca: On Sun, 4 Dec 2011, Zdenek Wagner wrote: first, as Keith wrote, as a reader I would not expect a table in a footnote. If the table is important, why not to put it to the main text? And if it is not important, why it is there at all? If it is of I would definitely expect to see a table in a footnote on a corporate financial statement. In fact, I think the standardized accounting practices in some countries may actually *require* tables in footnotes in some corporate financial statements. I suppose it's possible that the notes on the average financial statement might technically be classified as endnotes rather than footnotes, since there are typically stretches of multiple pages containing nothing but notes without any main text on the page. But it seems quite reasonable to me that that kind of context could require tables in footnotes as such. In such complex footnotes I would expect that the tables are entered in (restricted) vertical mode, not in horizontal mode. In the original Dan's sample the tables appear in a paragraph started implicitely by \footnote. This is probably the root of the problem. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex -- Zdeněk Wagner http://hroch486.icpf.cas.cz/wagner/ http://icebearsoft.euweb.cz -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Am 04.12.2011 um 12:51 schrieb Daniel Greenhoe: The purpose of the tabular footnotes is for citation information. I like verbose citations; I do not like seeing a reference with just a [1] and then I have to fish around in the nether regions of the book to get any clue as to what reference it refers to. You have two more options: a hyper-link into the appendix (with an explicit back/return element for dumb PDF viewers) or a pop-up that presents the table when the mouse cursors hovers over the reference. In a book I'd use flaps of paper with the referenced data. Using two picking belts allows to sort the page you're just reading and that one in the appendix which contains the referenced data. Just two more options. -- Greetings Pete When Richard Stallman goes to the loo, he core dumps. -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi Dan, O.K. Having references in the footnotes is quite normal. Use to do all the time. The only problem I have is that I see no reason for fancy alignment, but that be just me. I do not no if this helps, but you might try using math mode. Another, possibility I see is using Tikz/PGF. Of course, you should create a command like \myrefernce for easy typing or even \myfootnote. regards Keith. Am 04.12.2011 um 12:51 schrieb Daniel Greenhoe: Hi Keith, On Sun, Dec 4, 2011 at 6:01 PM, Keith J. Schultz keithjschu...@web.de wrote: Most writers show poor style by stuffing all kinds of information in the footnote Thank you for your honest feedback. The purpose of the tabular footnotes is for citation information. I like verbose citations; I do not like seeing a reference with just a [1] and then I have to fish around in the nether regions of the book to get any clue as to what reference it refers to. Rather for each, say, theorem, I like to put on the same page (or close to the same page) as where the theorem occurs 1. multiple references for that one theorem (recent and old/original if possible) 2. reference information that is verbose enough to contain an author, a title, and a year (normally with additional info available in the Bibliography) I realize this style is not standard in the book industry, but I like it. And I think not having it this way may in part be a vestige of out-dated technology (e.g. typesetting with a simple typewriter). Thus, I often have several lines (one line per reference) for a single footnote. And I implement this using a tabular environment. I think tabular environments are a good mechanism for aligning material neatly. Dan -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] tabular in footnote
Hi John, The philosophers can think, but have poor writing habits and style IMHO! Yet, that is a tradition. ;-)) regards Keith. Am 04.12.2011 um 13:40 schrieb John Was: Hello I use plain XeTeX, and thanks to scholars of ancient philosophy who like to have huge footnotes (sometimes including tabular matter or extensive workings in formal logic) I do sometimes have to specify that certain groups of lines cannot split between pages. Within tabular I just have \noalign{\nobreak} between the lines of the table that aren't to be split, and if a whole table was to be regarded as non-splittable I suppose I would put it all within vertical box: \vbox{TABLE IN HERE}. Wordy commands can always be reduced for quickness in typing, for example: \def\nbr{\noalign{\nobreak}} would let you type \nbr between tabular lines that aren't to be split. Do TeX primitives like that not work in LaTeX? Best wishes John -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex