skip to main content
research-article

HTML Automatic Table Layout

Published:01 March 2013Publication History
Skip Abstract Section

Abstract

Automatic layout of tables is required in online applications because of the need to tailor the layout to the viewport width, choice of font, and dynamic content. However, if the table contains text, minimizing the height of the table for a fixed maximum width is NP-hard. Thus, more efficient heuristic algorithms are required. We evaluate the HTML table layout recommendation and find that while it generally produces quite compact layout it is brittle and can lead to quite uncompact layout. We present an alternate heuristic algorithm. It uses a greedy strategy that starts from the widest reasonable layout and repeatedly chooses to narrow the column for which narrowing leads to the least increase in table height. The algorithm is simple, fast enough to be used in online applications, and gives significantly more compact layout than is obtained with HTML’s recommended table layout algorithm.

Skip Supplemental Material Section

Supplemental Material

References

  1. Anderson, R. J. and Sobti, S. 1999. The table layout problem. In Proceedings of the 15th Annual Symposium on Computational Geometry (SCG’99). ACM Press, 115--123. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Badros, G. J., Borning, A., Marriott, K., and Stuckey, P. 1999. Constraint cascading style sheets for the web. In Proceedings of the ACM Conference on User Interface Software and Technology. ACM, 73--82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Beach, R. J. 1985. Setting tables and illustrations with style. Ph.D. dissertation, University of Waterloo. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Beaumont, N. 2004. Fitting a table to a page using non-linear optimization. Asia-Pac. J. Oper. Res. 21, 2, 259--270.Google ScholarGoogle ScholarCross RefCross Ref
  5. Bilauca, M. and Healy, P. 2010. A new model for automated table layout. In Proceedings of the 10th ACM Symposium on Document Engineering (DocEng’10). ACM, 169--176. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bilauca, M. and Healy, P. 2011. Building table formatting tools. In Proceedings of the 11th ACM Symposium on Document Engineering (DocEng’11). ACM, 13--22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Borning, A., Lin, R., and Marriott, K. 2000. Constraint-Based document layout for the web. Multimedia Syst. 8, 3, 177--189. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Gange, G., Marriott, K., Moulder, P., and Stuckey, P. 2011. Optimal automatic table layout. In Proceedings of the 11th ACM Symposium on Document Engineering (DocEng’11). ACM, 23--32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Hurst, N. and Marriott, K. 2007. Approximating text by its area. In Proceedings of the ACM Symposium on Document Engineering (DocEng’07). 147--149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Hurst, N., Marriott, K., and Moulder, P. 2005. Towards tighter tables. In Proceedings of the ACM Symposium on Document Engineering (DocEng’05). ACM, 74--83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Hurst, N., Marriott, K., and Albrecht, D. 2006a. Solving the simple continuous table layout problem. In Proceedings of the ACM Symposium on Document Engineering (DocEng’06). ACM, 28--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Hurst, N., Marriott, K., and Moulder, P. 2006b. Minimum sized text containment shapes. In Proceedings of the ACM Symposium on Document Engineering (DocEng’06). ACM, 3--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Hurst, N., Li, W., and Marriott, K. 2009. Review of automatic document formatting. In Proceedings of the 9th ACM Symposium on Document Engineering. ACM, 99--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Lin, X. 2006. Active layout engine: Algorithms and applications in variable data printing. Comput.-Aided Des. 38, 5, 444--456. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Lutteroth, C. and Weber, G. 2006. User interface layout with ordinal and linear constraints. In Proceedings of the 7th Australasian User Interface Conference (AUIC’06). Australian Computer Society, 53--60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Page, L., Brin, S., Motwani, R., and Winograd, T. 1999. The pagerank citation ranking: Bringing order to the web. Tech. rep. 1999-66, Stanford InfoLab. http://ilpubs.stanford.edu:8090/422/.Google ScholarGoogle Scholar
  17. Raggett, D., Le Hors, A., and Jacobs, I. 1999. HTML 4.01 specification, section ‘autolayout algorithm’. http://www.w3.org/TR/html4/appendix/notes.html#h-B.5.2.Google ScholarGoogle Scholar
  18. Vanoirbeek, C. 1992. Formatting structured tables. In Proceedings of Electronic Publishing (EP92). Cambridge University Press, 291--309.Google ScholarGoogle Scholar
  19. Wang, X. and Wood, D. 1997. Tabular formatting problems. In Proceedings of the 3rd International Workshop on Principles of Document Processing (PODP’96). Springer, 171--181. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. HTML Automatic Table Layout

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on the Web
        ACM Transactions on the Web  Volume 7, Issue 1
        March 2013
        128 pages
        ISSN:1559-1131
        EISSN:1559-114X
        DOI:10.1145/2435215
        Issue’s Table of Contents

        Copyright © 2013 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 March 2013
        • Accepted: 1 September 2012
        • Revised: 1 April 2012
        • Received: 1 February 2011
        Published in tweb Volume 7, Issue 1

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!