Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Education Media The Internet

HTML Tags For Academic Printing? 338

meketrefi writes "It's been quite a while since I got interested in the idea of using html (instead of .doc. or .odf) as a standard for saving documents — including the more official ones like academic papers. The problem is using HTML to create pages with a stable size that would deal with bibliographical references, page breaks, different printers, etc. Does anyone think it is possible to develop a decent tag like 'div,' but called 'page,' specially for this? Something that would make no use of CSS? Maybe something with attributes as follows: {page size="A4" borders="2.5cm,2.5cm,2cm,2cm" page_numbering="bottomleft,startfrom0"} — You get the idea... { /page} I guess you would not be able to tell when the page would be full, so the browser would have to be in charge of breaking the content into multiple pages when needed. Bibliographical references would probably need a special tag as well, positioned inside the tag ..." Is this such a crazy idea? What would you advise?
This discussion has been archived. No new comments can be posted.

HTML Tags For Academic Printing?

Comments Filter:
  • LaTeX (Score:5, Informative)

    by Anonymous Coward on Thursday July 02, 2009 @10:40PM (#28567623)
    You seem to be talking about LaTex. It already exists. Don't reinvent it.
    • Re:LaTeX (Score:5, Insightful)

      by Liquidrage ( 640463 ) on Thursday July 02, 2009 @10:42PM (#28567637)
      Good answer. Now all we need is for someone to mod your post up to +5 and then lock the thread.

      *sigh* it's a slow news day
      • Re:LaTeX (Score:5, Interesting)

        by Petrushka ( 815171 ) on Thursday July 02, 2009 @11:42PM (#28568039)

        I have a sneaking suspicion that when the OP is saying things like "no CSS" and doesn't mention LaTeX, s/he is actually giving specifications in a very obfuscated way -- specifications that need to be deduced. What I take from the post is that the OP wants

        • Portability. Anyone can open an HTML file without having to install new software; the same doesn't go for ODF, LaTeX, or MSWord. I suspect this is the main thing the OP wants. But this shouldn't rule out CSS.
        • Everything in one file: I'm guessing this may be why the OP doesn't want CSS. But that's not a good reason to avoid CSS either, since CSS can perfectly easily go in the same file. (I think it does rule out editing the XML in ODF documents, though, since as far as I'm aware they're always a composite of several files.)
        • Read/edit in the same document. This could be another reason why the OP doesn't mention LaTeX. LaTeX is perfect for editing, not so great for reading: for that you have PDF. Maybe the OP doesn't want to have two separate files like that.

        I'm guessing the OP has been inspired by the use of HTML for slide presentations, in the form of S5 [wikipedia.org]. I can see that. But the specifications, if I've deduced them correctly, are not hugely well-thought-out ones. I can kind of see someone not wanting to use LaTeX for the reasons given above, but insisting on no CSS is crazy.

        In any case, the OP should certainly give slightly clearer specifications if s/he doesn't want to have people yelling "LaTeX!!!" all day.

        • Re: (Score:3, Informative)

          Most distributions of LaTeX come with some way to compile it and export to PDF, which is both portable and readable.
          • Re: (Score:3, Insightful)

            by andymadigan ( 792996 )
            I've written few LaTeX documents that will work out of the box on most distributions, let alone all of them. Realistically, I can't send a LaTeX document to someone else and expect them to be able to edit it and read it, even if they have LaTeX installed.

            Unfortunately any program able to handle everyone's different styles for document printing is probably going to be too specialized for everyone to have. LaTeX shows that print layouts are a difficult problem. Even on webpages (screen display), to get reall
            • Re:LaTeX (Score:5, Informative)

              by smallfries ( 601545 ) on Friday July 03, 2009 @06:06AM (#28569817) Homepage

              Further to the two AC posts: you are doing something wrong. As an academic I send / receive latex source all the time and expect it to compile and reproduce the same exact same results. How are you abusing TeX to get these kinds of problems?

        • I have a sneaking suspicion that when the OP is saying things like "no CSS" ... s/he is actually giving specifications in a very obfuscated way

          Definitely. The problem with this question is that the OP is suggesting an idea for solving a problem, but then not giving a complete description of the problem being solved. A complete description would also give the restrictions on how you can solve the problem so that you can really analyze what the problem is.

          Just to add to your list, another thing that popped into my head (which may be on the 'unlikely' side): the aversion to CSS may be that the poster wants people to be able to edit in an office su

        • Re:LaTeX (Score:4, Insightful)

          by AceofSpades19 ( 1107875 ) on Friday July 03, 2009 @12:47AM (#28568415)
          I'm pretty sure every one that has a browser, has a pdf reader to read pdfs written in latex
        • HTML is only portable and widely spread because every operating system that one would view an HTML file in has a rendering engine designed to render HTML -- yeah, a browser!

          If, for example, Mozilla incorporated LaTeX into Gecko then LaTeX would do the job that your first bullet points out. Probably any implementation using LaTeX would be a on-the-fly compile and view as PDF.
        • Re:LaTeX (Score:5, Informative)

          by Nitewing98 ( 308560 ) on Friday July 03, 2009 @01:14AM (#28568529) Homepage

          Yes, not using CSS is crazy. Especially since CSS includes the concept of media types. A simple "media='print'" in the CSS spec should hand that.

          • Re:LaTeX (Score:4, Informative)

            by TheRaven64 ( 641858 ) on Friday July 03, 2009 @04:49AM (#28569435) Journal
            CSS has had attributes for page breaks since CSS 2.1. I've not played with them for a while, but Opera supported them correctly back in 2003, so I'd imagine that they work well now. You can find the relevant part of the specification here [w3.org]. It lets you specify margins, soft breaks, rules for two-sided printing and so on. I played with the idea of using HTML instead of LaTeX for a while, but decided not to for two reasons. First, LaTeX is easier to type and read, and second because LaTeX produces nicer-looking output.
        • Re: (Score:3, Informative)

          by Idbar ( 1034346 )
          it's the eternal fight between intepreted vs. compiled languages. You are arguing that html is easier to read. Well , it's not, neither latex. The fact that you have an interpreter that i's more common (a browser) is another thing. But don't be confused reading a plain html is as or more annoying than reading a tex file.
          Please also remember that the "compiled" output of latex is dvi, not ps or pdf.
        • Portability:

          Name me an OS that doesn't have a PDF or PS reader installed by default. If one wants to bitch about no LaTeX installed by default, then don't write an academic paper. It's a speciality and as such, bitching about having to install something special is rather asinine.

          Everything in one file:

          LaTeX can do this just as good as HTML i.e. it would requite the same kludge.

          Read/edit in the same document:

          Bullshit. With HTML you have to open the doc in a browser to see what would be printed. Similarly

    • Re:LaTeX (Score:5, Informative)

      by The Snowman ( 116231 ) on Thursday July 02, 2009 @10:47PM (#28567679)

      You seem to be talking about LaTex. It already exists. Don't reinvent it.

      Another alternative is RTF, which is a sister SGML language of HTML. While it may have drawbacks, it would accomplish most if not all of what is required.

      • Re: (Score:3, Informative)

        by Anonymous Coward
        No one really writes RTF by hand though. DocBook [wikipedia.org] is more like what this person is suggesting.
        • Re: (Score:3, Informative)

          by Liquidrage ( 640463 )
          Sadly I have. I've spit out RTF docs from websites many moons ago back when we had lots of printing issues on the web (still sucks, but at least now it's manageable).

          In hindsight there was probably a better way...but I was young, and string manipulation is easy.
          • Re: (Score:3, Informative)

            by amicusNYCL ( 1538833 )

            Exactly. Until I can use a server scripting language to open a (binary) PDF template and do string find-replace, and not break the document, I'll stick with the ASCII-based RTF format.

            There are a lot of people who seem to be screaming "LaTex" as the solution to this non-problem. This is specifically what the PDF format was created for: to create a portable document that renders and prints the same anywhere. HTML is a fluid layout to fit various resolutions, PDF is guaranteed to print the same on any mach

      • Rich Text Format is nothing like SGML. It has a completely different syntax and it behaves a lot differently.
    • Re:LaTeX (Score:5, Informative)

      by fermion ( 181285 ) on Thursday July 02, 2009 @11:09PM (#28567809) Homepage Journal
      Latex is really the solution. There is no reason to reinvent the wheel. In fact, reinventing the wheel might cause problems when submitting papers. From what I have seen, many academic journals prefer .tex and .eps files. I can't imagine what they would do with HTML.

      The nice thing about LaTex is that, like HTML, it is a pure markup language, but it is a markup language that understands typesetting so one tend to get a good page layout no matter what. OTOH, HTML merely identifies blocks of text as various generic types, and really does not have a context for the types. The render engine is free visualize, make a sound, or do whatever it wishes to represent the blocks. CSS is what imposes a consistent visual framework, so what one needs to duplicate LaTex is in fact CSS.

      Use LaTex. Except for the often limited fonts, it is vastly superior to an word processor, because a word processor is not the write tool to create real documents. We have know that for many years. That is why people bought pagemaker. And I think the lack of fonts forces people to create compelling content. LaTex is free, there are many good books,and if you do have a hankering to code, you can always play with Tex.

      • Re:LaTeX (Score:5, Informative)

        by Anonymous Coward on Thursday July 02, 2009 @11:18PM (#28567861)

        Actually, the font problem is solved by using XeLaTeX (which uses XeTeX [wikipedia.org]).

        Full OpenType support. Looks amazing.

        • Re: (Score:2, Funny)

          by amicusNYCL ( 1538833 )

          Actually, the font problem is solved by using XeLaTeX

          It's nice to see the naming conventions from 1996 making a CoMeBaCk.

      • Re: (Score:3, Informative)

        by dangitman ( 862676 )

        LaTex is a solution for certain (usually niche) purposes, but has its drawbacks, like everything else. The problem is that we are a dealing with an online world, where things are published in several different formats, online and offline. LaTex doesn't translate easily or cleanly into HTML, or vice-versa. And good luck getting people outside of math and science academia to use LaTex.

        This is a real problem, and shouldn't simply be brushed aside with "use this" comments. There currently is no workable format,

      • Re:LaTeX (Score:5, Informative)

        by plasticsquirrel ( 637166 ) on Thursday July 02, 2009 @11:59PM (#28568159)

        Use LaTex. Except for the often limited fonts, it is vastly superior to an word processor, because a word processor is not the write tool to create real documents. We have know that for many years. That is why people bought pagemaker. And I think the lack of fonts forces people to create compelling content. LaTex is free, there are many good books,and if you do have a hankering to code, you can always play with Tex.

        LaTeX has limited fonts, but if you use XeTeX [wikipedia.org] (which uses LaTeX), you can not only use all the LaTeX stuff, but also any TrueType or OpenType font, and native unicode support as well. This is a godsend for typesetting anything that includes words or characters not in English, or just for people who are picky about typography. My personal favorite font is the open source SIL Gentium [sil.org] family, which is not only much more beautiful and readable than Times, but contains a fuller character set that makes it compatible with many more languages. Once you start writing documents with XeTeX and nicer fonts, you see how lacking word processors are for good typography and well-structured documents, and how self-limiting the concept is.

        For newcomers to LaTeX and XeTeX, including packages and specifying options can be a bit time-consuming when you just want to get started with a basic A4-sized document. Here is the basic XeTeX file template I use for simple stuff. I'm picky about margins, line spacing, fonts, etc. so you know that it's a safe place to start out.
        -

        \documentclass[11pt]{article}

        %%
        % XeTeX packages
        %%
        \usepackage{fontspec}
        \usepackage{xunicode}
        \usepackage{xltxtra}

        %%
        % Formatting packages
        %%
        \usepackage{setspace}
        \usepackage[vcentering,dvips]{geometry}
        \usepackage{fancyhdr}

        \geometry{papersize={8.5in,11in},total={6.5in,8.8in}}

        \pdfpagewidth 8.5in
        \pdfpageheight 11in

        % 10pt font: 1.15
        % 11pt font: 1.1
        \setstretch{1.1}

        \setmainfont[Mapping=tex-text]{Gentium Basic}

        \begin{document}

        Some text...

        \end{document}

    • LaTeX works. It's about as enjoyable as a proctological exam being performed by a porcupine, but it does work.
      • Re:LaTeX (Score:5, Informative)

        by femto ( 459605 ) on Thursday July 02, 2009 @11:34PM (#28567981) Homepage
        LyX [lyx.org]. I wrote a thesis in it and didn't have to resort to any manual interventions in the generated LaTeX. Couple it with [lyx.org] SVG diagrams, generated by inkscape [inkscape.org], and you have a seamless authoring system that handles both text and graphics. SVG means there is no messy task of keeping source and postscript output synchronised (just right click a diagram within LyX to edit the SVG source with inkscape). Use gnuplot [gnuplot.info] to generate your (postscript) graphs and you have pretty well a complete authoring system. A few years ago, LyX and inkscape were too immature to use seriously, but they have matured. I recommend the combination.
        • by igny ( 716218 )
          You had it easy young man. I had to use ChiWriter [wikipedia.org].
        • You have no idea how much I could have used that when I was still in the academic arena. The head of our math/comp sci department dictated that all work be produced in LaTeX. Hours of my time wasted. Oh well, at least I know should I find myself in grad school. Thanks for the links! :)
        • I LOVE inkscape. That coupled with GIMP enables just about any graphic manipulation you want. Plus, inkscape has some plugins that allow you directly enter (and in one case edit) LaTeX code. All for free. Unbelievably useful. I have futzed with LyX, but because I am used to handcoding my tags, I doubt I will start using it. I use WinEdt to create my documents, though IMO the autotabbing leaves something to be desired.
      • Re: (Score:2, Informative)

        by Anonymous Coward
        I think you are overstating the enjoyment possible when using LaTeX :)
    • Re:LaTeX (Score:5, Insightful)

      by moosesocks ( 264553 ) on Friday July 03, 2009 @12:17AM (#28568279) Homepage

      Although I agree with you in that LaTeX is widely used in the scientific community, and unambiguously offers the best typesetting facilities you'll find outside of a publishing house, is it still appropriate today?

      The internet as we know it was created at CERN to facilitate the sharing of scientific information. Why are we still publishing in a format designed to be presented on dead trees?

      Like it or not, a properly-formatted print article looks horrible on a screen. An article formatted for printing on A4 or Letter-sized paper will use the whole width of the page, be set in 10-point type, and use columns. Unfortunately, modern computer screens don't have nearly enough resolution to display the full width of the page alongside much else. Obviously, PDF files also don't have the ability to flow to fit the width of the screen.

      LaTeX also doesn't give you the benefit of hypertext. Yes, there are various hacks you can use to add anchors and links to PDFs, although these are mere hacks on top of a broken format. Things such as high-resolution figures and hyperlinked references would be particularly beneficial for academic uses. It'd also be great to be able to see all articles linking back to what you happen to be reading. (This brings up all sorts of questions about the very nature of scientific publishing, although this is another debate entirely)

      Wikipedia (more specifically, MediaWiki) actually offers a promising solution to these (and the original poster's) requirements. It provides a convenient and simplistic markup for multi-sectioned articles, flows to fit the width of the page, and also provides LaTeX's fantastic mathematical typesetting facilities. Hyperlinking to other parts of the Wiki (and to external sites) is excessively easy. I'm sure the DOI [doi.org] system could be integrated to allow linking back to other articles within the constraints of the existing academic publishing regime.

      Google could very easily provide the "glue" to hold such a system together, although it would ultimately be better to put a public, non-profit entity in charge. It's absurd and hypocritical that so much of academic research (particularly the publishing part of it) is profit-driven.

      • Re:LaTeX (Score:4, Insightful)

        by AigariusDebian ( 721386 ) <aigarius@debia[ ]rg ['n.o' in gap]> on Friday July 03, 2009 @12:35AM (#28568361) Homepage

        LaTeX describes the document, just like HTML describes it, but with more structure about it. What you see in a web browser is not HTML, it is a *rendering* of HTML. Different browsers render the same HTML differently, for example a mobile browser will skip stuff and reformat other stuff. In the same way there are different LaTeX renderers - some output PDF, some output HTML, some output ODF. It would be much easier to use LaTeX for the source document and then compile a pretty HTML file and a PDF file from it than to craft it in HTML or some other XML variant directly. You can have links in LaTeX that render as normal links in the HTML output. Why stress?

        • Re: (Score:3, Insightful)

          by moosesocks ( 264553 )

          99.99% of LaTeX is output straight to PDF, Postscript, or (in special cases such as Wikipedia's math renderer) a rasterized image. The documentation, plugins, and user community of LaTeX all reflect this.

          I haven't come across any serious usage of LaTeX in the manner that you describe it.

          ODF and HTML do not support the full set of typographic features that LaTeX does. Something will almost certainly be lost in translation.

          Although I suppose it's possible to craft a source document that would look good both

    • Re: (Score:3, Interesting)

      by nine-times ( 778537 )

      On the other hand, .tex files don't render so well if you drop them into web browsers. I mean, which format you choose really should depend on what your needs are. If you want to be able to store a single copy that can be opened in a web browser or an office suite, HTML isn't necessarily a bad choice, but at this point you wont get great layout control. I really think it's reasonable to hope that as new versions of HTML and CSS come out, they should be aiming towards enabling people to have a good "print

      • HTML does not render so well if you drop it into an image viewer.

        That is why there are LaTeX renderers. Or at least LaTeX->HTML renderers.

        • Yeah, but my whole point is: it depends on what your requirements are. Since the OP brings up HTML, I would guess being directly viewable in a web browser is a plus, and being viewable in an image viewer isn't desired.

          Is part of your aim to be that you can have common users edit the file in an office suite, dump documents to a website as-is, set up an index page with a link to each document, and allow the general public to view the articles just by visiting the website (without any additional software or

    • LaTeX is not a great solution these days. It doesn't handle unicode characters that well, and as far as I've seen, there's no way to generate accessible tagged PDFs. HTML is more modern in many ways. Mostly I just like the terse syntax of LaTeX, and it's support for math and nice rendering. With a good renderer for HTML+MATHML+SVG+CSS print media, and maybe also a preprocessing language that supports syntax like \body(style="",...) { \h1{ ... } ... } and a few macros to generate indicese etc., I'd be mu

  • Congratulations! (Score:5, Insightful)

    by Anonymous Coward on Thursday July 02, 2009 @10:43PM (#28567639)

    Congratulations, you're the 5,134,978th person to suggest a change to HTML which will prevent it from being reflowable!

    Please step up to the spiked door in front of the acid pit to claim your prize.

  • PDF? (Score:5, Informative)

    by sys.stdout.write ( 1551563 ) on Thursday July 02, 2009 @10:44PM (#28567645)
    As much as I hate Adobe, there's a reason why PDF files dominate acadamia..
  • CSS3 is the solution (Score:5, Informative)

    by Tiles ( 993306 ) on Thursday July 02, 2009 @10:46PM (#28567673)
    This is exactly what CSS is designed for, presentation. The CSS3 Paged Media [w3.org] module already defines a number of the properties and settings you're going for. It even includes positions such as @bottom-center to allow you to position footnotes and references. The only thing missing is a way to mark this up in HTML, which could easily be done with anchors and the longdesc attribute, coupled with the CSS content: property. What you're looking for is a CSS3 enabled browser, not a new specification.
    • by rs79 ( 71822 )

      Nice. So there's 3 ways to skin a cat.

      Normally I'd say use PDF cause the entire planet seems to use PDFs to get the page numbers right but acrobad became such an obnoxious pig in the last couple of releases I regard PDF now more as a warning than anything else.

      And yes stupid new spell checker in Opera, I means to say "acrobad". Stop underlining it damn you.

      • I've switched from adobe to foxit reader for my pdf viewing. Much much quicker to load. You do need to uninstall a toolbar tho, which I didn't like.
  • ODF (Score:3, Insightful)

    by minsk ( 805035 ) on Thursday July 02, 2009 @10:46PM (#28567675)

    LaTeX already got mentioned, and probably makes more sense.

    If you really want an unreadable super-general XML-based format, use ODF.

  • I don't seem to understand why you couldn't simply change the properties of standard HTML tags to fit your needs with a simple CSS sheet. HTML, after all, was designed with the explicit purpose of representing a document.
    Otherwise, if you want special tags, use LaTEX.
    Otherwise, I'm sorry, its really a crazy idea.
  • by sandford ( 1577271 ) on Thursday July 02, 2009 @10:49PM (#28567697)
    Is there a reason you don't want to use CSS? Because, there are already CSS extensions that do exactly what you want. The book Cascading Style Sheets - Designing for the web, was written using only HTML and CSS and prepped for printing using PrinceXML. The PrinceXML web site has a bunch of HTML+CSS similar samples, including academic papers.
    • Re: (Score:2, Interesting)

      by ccvqc ( 307904 )

      I've had great experience with PrinceXML -- same document to generate both interactive web page and printable PDF using CSS3 tailored to the media. If you already know HTML/CSS, extending yourself to CSS3 is a lot easier than learning LaTeX.

  • Something that would make no use of CSS?

    Given that CSS does this already [w3.org], what's the advantage of adding another way of doing it without CSS?

  • by Zaffle ( 13798 ) on Thursday July 02, 2009 @10:53PM (#28567721) Homepage Journal

    What you want (being able to define pages) is wrong in many many ways.

    You should, as an authoring tool, never define a page, or its dimensions, especially academic works, which will be printed in different formats, on different paper (A4/Letter/Tradeback/etc/etc)

    At most, whatever markup you have, many define things like page breaks, but even then, they are more a typesetting issue.

    What you want is either LaTeX or DocBook.

  • by caffiend666 ( 598633 ) on Thursday July 02, 2009 @10:53PM (#28567729) Homepage

    Static configurations are available already, not the intelligent ones being requested. Has sufficed for what I needed:

    To have print page break add: <p style="page-break-before: always">

    Also, to hide odd font and underline for links:

    <STYLE TYPE="text/css" MEDIA=print> <!-- A { text-decoration: none; color: black } --> </STYLE>

    Yes, they have to be massaged a little.

  • by Anonymous Coward
    create yet another little-used and poorly supported document format...
  • HTML describes a document. "Document" used to imply printed pages, but it doesn't anymore. HTML doesn't have anything to represent the notion of a page because documents don't have pages.

    • Re:Nope (Score:4, Informative)

      by nlawalker ( 804108 ) on Thursday July 02, 2009 @11:06PM (#28567785)

      I should have been more clear: HTML describes the *structure* of a document, of which pages are not a part.

      As many have said above, you could use CSS if you really wanted to, since page specifications are presentational aspects of the document. Or, you could use LaTeX, which is designed for this kind of use.

  • by Anonymous Coward

    Seriously. It's pretty bad. You can, however, use Docbook (or your own schema or Docbook extended with your own stuff) and XSLT it into XTHML (or something entirely different) at the end.

    Most likely you just want to use Latex though.

  • by jipn4 ( 1367823 ) on Thursday July 02, 2009 @11:11PM (#28567823)

    If you want to save the source form or markup, use a language designed for it: LaTeX. LaTeX lets you represent all the things you would want to represent in an academic paper, it's fairly readable, very widespread, and has tons of tools. And LaTeX converts to both HTML and PDF.

    If you want to display on the web, use HTML. It's meant for the web. It's not a good representation for paged media. If you must represent paged media, you need to use CSS or XSL, but you probably don't want to.

    If you want archival quality paged representations, PDF is the only game in town really. HTML with CSS doesn't come close. But it doesn't make sense to save your own papers only in PDF because PDF is not really editable and doesn't have the semantic information.

  • Don't use HTML (Score:3, Informative)

    by emandres ( 857332 ) on Thursday July 02, 2009 @11:13PM (#28567837)
    You wouldn't want to use HTML for something like this, especially with newer versions of HTML. There has been a steady transition in HTML away from specification of the aesthetic appearance of a page. For this reason tags like <font> and <center> are considered nonstandard anymore, mostly because CSS does a way better (and cleaner) job of it.
    • Re:Don't use HTML (Score:4, Insightful)

      by Wonko the Sane ( 25252 ) * on Thursday July 02, 2009 @11:23PM (#28567907) Journal

      HTML was never supposed to do those things in the first place. The tags you are referring were hacks invented because CSS did not exist yet.

      Unfortunately there is a whole generation of "web developers" who don't understand the concepts of semantic markup and output device-independent layouts.

  • In my day (Score:3, Insightful)

    by Barny ( 103770 ) on Thursday July 02, 2009 @11:20PM (#28567885) Journal

    I used netscape communicator to write all my papers for uni, mainly because it was available under windows and unix (IRIX in our case) and could be read by anyone on any platform.

    It was a reasonably easy to use editor, without all the useless crap most others have.

    A few lecturers were quite impressed with the idea, the portability and cost were big factors.

    • by brusk ( 135896 )
      How did you handle footnotes? Page numbers?
      • Academic citation guidelines allow you to cite paragraph numbers instead of page numbers.

      • by Barny ( 103770 )

        Select everything you want on one page, wrap it in a table tag, set table to 100% of screen height and leave a separate row at the bottom for page numbers (and a second for footnotes if there were any).

  • XSL:FO (Score:5, Informative)

    by Roxton ( 73137 ) <roxton.gmail@com> on Thursday July 02, 2009 @11:30PM (#28567959) Homepage Journal

    There's a little-used standard that came out of the W3C along with XSLTs called XSL:FO. You write your document in XSL:FO markup, and then one of any number of processors like XEP [renderx.com] to convert it into PDF or what have you.

    http://www.w3schools.com/xslfo/default.asp [w3schools.com]

    One of the original purposes of it was so that you could use XSLTs to transform the same XML data into both XHTML or XSL:FO for publishing. The standard never took off though. XSL:FO just doesn't have enough options to be typographically interesting, compared to SVG.

    Of course, the right answer is LaTeX, but you might want to give XSL:FO a try for familiarity's sake.

    • Re: (Score:3, Informative)

      by styrotech ( 136124 )

      You write your document in XSL:FO markup, and then one of any number of processors like XEP to convert it into PDF or what have you.

      Ouch :)

      Hand writing XSL:FO is extremely painful - very fiddly and the embedded layout/styling gets tedious quickly. It's kinda like writing a very very long webpage using HTML 3.2 with all the nasty old embedded presentation tags (but worse).

      One of the original purposes of it was so that you could use XSLTs to transform the same XML data into both XHTML or XSL:FO for publishing

  • It has exactly what you need, an html-like format, but tagged by meaning, not presentation. The project has tools to convert it to printable formats.

    The spec: http://www.docbook.org/ [docbook.org]

    The tools: http://docbook.sourceforge.net/ [sourceforge.net]

  • Use DITA (Score:4, Informative)

    by wooden pickle ( 1006975 ) on Thursday July 02, 2009 @11:47PM (#28568087)

    Someone mentioned XML/XSL/FO. Don't try to write your content in XSL-FO. You'll hate every minute of it.

    I'd look in to using DITA (Darwin Information Typing Architecture). It's a set of canned XML structures, plus a specification for how to process and customize those structures. It includes tags for stuff like footnotes...I bet it covers a lot of your use cases. There are some good intros to how these XML structures work here: http://dita.xml.org/book/dita-wiki-knowledgebase [xml.org]

    As DITA is XML, you can convert it to HTML and whatever else you feel like, pretty easily. There's an open-source implementation of the DITA spec called the DITA Open Toolkit (http://sourceforge.net/projects/dita-ot/). The DITA Open Toolkit includes stylesheets/scripts to publish HTML and PDF, among other things. PDFs are published via XSL-FO. Just like HTML needs a web browser to render something useful, XSL-FO requires a FO processor to create a PDF. So, in the end you write DITA, XSLT and other scripts transform that DITA to XSL-FO, the a FO processor consumes the XSL-FO and spits out a PDF. The DITA Open Toolkit comes with an open-source FO processor (Apache FOP). FOP doesn't fulfill everyone's needs, but it might work very well for you.

    Unfortunately, working with the Open Toolkit and customizing its output can be a bit unwieldy. http://groups.yahoo.com/search?query=dita+users [yahoo.com] is a pretty good place to look for help.

  • texexplorer (Score:5, Interesting)

    by e**(i pi)-1 ( 462311 ) on Thursday July 02, 2009 @11:59PM (#28568163) Homepage Journal
    yes, latex is nice, but it would be even better, if basic TeX would
    be understood by browsers.  About 10 years ago, IBM had a cool plugin called texexplorer.
    The plugin would compile latex on the fly. No need to publish a PDF. It worked
    pretty well for basic documents which would not rely on macros.

    Still, to address the question of the submitter, it would be nice to have something like

    <latex>
    $\int_0^1  \frac{\sqrt{\sin(x)}}{1+x^2} \; dx$.
    </latex>

    It would not have to be the full latex stack but the ability to place mini latex pages into
    HTML documents. Its a pity techexplorer technology seems have disappeared. If IBM would
    opensource it, it could become an add-on for firefox.
  • What is it you're trying to accomplish? Non-standard HTML is certainly not a solution for whatever printing problem you're having, and it eliminates the benefits of HTML. Listen to everyone else that's responded. LaTeX solves most gripes people have with word processors, stick with CSS if you have a compelling reason to use HTML, and look into Docbook XML if you're not happy with the first two options.

    If you want to use HTML just to prove it can be done, go for it if you think it sounds fun. But if you'r
  • This is exactly what HTML was *not* intended to be. We're talking about viewing of a document, with different browsers. No standard display is guaranteed, no matter what you try. For academic documents use software like LaTeX, and create a PDF file, or, use MIcrosoft and create doc file, or whatever. I remember reading somewhere discussion why LaTeX cannot be mapped exactly to HTML (may be it was TeX faq, not sure), and that was pretty much it. Different goals in either case.

  • by crmartin ( 98227 ) on Friday July 03, 2009 @12:12AM (#28568233)

    See, as someone has already pointed out, there's at least one such tool that's in wide use already: TeX and LaTeX. If you don't like that one, it turns out that HTML, with CSS and a little bit of Javascript, is perfectly capable of doing all the things you want, too. You just have to learn how. Have a look at Lie's Cascading Style Sheets: Designing for the Web [amazon.com] (written and typeset in HTML/CSS) and at Prince XML [princexml.com] for detailed examples.

  • by mellon ( 7048 ) on Friday July 03, 2009 @12:27AM (#28568327) Homepage

    The ability to cite an HTML document is something that would indeed be useful. The ability to hard code page numbers into an HTML document isn't. The reason why academia and the press have been so resistant to HTML, historically, is that you don't get any control over page layout. Which means that you can't refer to things by page number.

    The solution isn't to fix HTML so that you can number pages. It is to fix the bibliographic references to not use page numbers. Generally speaking, it's not hard to number documents by section, and you can make the numbering fine-grained enough for bibliographic references. Then refer to the chapter and section, rather than the page number in your bibliography, and you're done. No need to "fix" HTML.

    It might make sense to ID paragraphs in HTML, so that you could simply refer to the paragraph ID in your bibliography. If this were simply document metadata, and didn't have anything to do with layout, it would work pretty well. As a bonus, you wouldn't need to renumber, because the ID would just be an arbitrary cookie, and wouldn't need to make sense to a human.

    Of course, with hypertext, there's really no need for a bibliography anyway. Just link to the text you're referencing... But I realize that that's impractical in academia at the moment. I'm just saying...

  • SGML pre-dated HTML, in fact, HTML is (in many ways) a subset of SGML.

    I suspect the poster never heard of SGML, or it's predecessor GML

    Here's a link to a good book on the subject in Google Books: The SGML Book [google.com]

    There is also DOCBOOK and LaTex..

  • Some versions of Microsoft Word have a really cool feature called "Save as HTML". Saves simple one-page documents as fantastically redundant HTML in less than a terabyte --and you might even get a cute little paperclip to help you through the process!

    HTH.

  • Obviously the only sensible robust solutions to this problem are either LaTeX or Docbook. The main problem with both of those is they're kind of painful to author. What I've switched to for any quick documents I write is reST [sourceforge.net]. It's easy to learn for quick documents, you can edit with just about anything (its rudimentary tables support is best handled with emacs), includes features like footnotes, and is easy to render into HTML and PDF. After a few months of writing docs for some projects I work on in r

  • by Fireflymantis ( 670938 ) on Friday July 03, 2009 @02:00AM (#28568747)
    <html>
      <head>
        <title>Abstract of a usable design</title>
        <style type="text/css">
          @media print {
             body { margin: 2.5cm; }
          }
          @media screen {
             body { margin:  50px; width: 50%; }
          }
          body { font-family: sans-serif; font-size: 12pt; }
        </style>
      </head>
      <body>
        <h1>It's so crazy it just might work</h2>
        <h2>and other html inspired musings</h2>
        <p>Why not just use css?</p>
        <p>Also, don't worry about page numbering. that's the browser's job.</p>
      </body>
    </html>
  • by pdboddy ( 620164 ) <pdboddy.gmail@com> on Friday July 03, 2009 @02:22AM (#28568845) Journal
    Why the OP specified not using CSS and then suggested an HTML element that looks almost exactly like CSS?

    CSS has a method of creating pages, for printing and more. It's no more difficult to learn than HTML is. You could use XML, create all the custom tags you want, and use XSL (oh look stylesheets again) to style the XML however you want.

    HTML5 is coming out in the near or distant future, if you have suggestions for tags and functions, you might want to try to get involved with the W3.
  • restructuredtext... (Score:3, Informative)

    by tyroneking ( 258793 ) on Friday July 03, 2009 @04:38AM (#28569387)

    is made for what you're talking about

    Documents are written in human-readable text format - good for storing in version control and using for diffs
    Python Docutils is used to convert to HTML and/or LaTeX and a few other formats
    rst2pdf is a tool that converts to beautiful PDF (easier than using Docutils + LaTeX)

It is easier to write an incorrect program than understand a correct one.

Working...