3 ms·
No, it would not. It's critically important that there is only one "logical" article, albeit with different representations. In other words, a single "source of
by IlliOnato 3y ago
No, it would not. It's critically important that there is only one "logical" article, albeit with different representations. In other words, a single "source of truth".
With "sideloading" of HTML there is no way in general to make sure that the contents of LaTeX (and PDF) on one side and HTML on the other side is the same.
- felixfbecker 3y agoMaybe some day for some papers HTML could be the source of truth instead of LaTeX. After all, the original use case for HTML and the web was academics. The HTML and CSS specs have evolved a lot since then, with support for the typesetting features you need for papers (justified text, hyphenation, page breaks, page numbers, ...) and even math formulas are possible now again natively with MathML thanks to Igalia. Diagrams can be accessible vector SVGs instead of raster images. Referencing, linking, citing, figures, tables, etc have always been native to HTML. It's trivial nowadays too to wrap a headless chromium in a CLI to convert an HTML document to PDF rendered in the exact same way that the browser would (i.e. not some static conversion tool that lags behind standards or has render implementation differences).
- dataflow 3y ago> With "sideloading" of HTML there is no way in general to make sure that the contents of LaTeX (and PDF) on one side and HTML on the other side is the same. Is it not possible to write LaTeX code that produces different contents in HTML vs. PDF?
- kennethologist 3y agoStraight from ChatGPT: Yes, it is indeed possible to write LaTeX code that produces different contents when compiled to HTML versus PDF. This is typically done by using conditional commands within the LaTeX document that check for the output format being used. These conditional commands can then include or exclude specific content based on whether the document is being compiled to HTML or PDF. In LaTeX, the ifpdf package is commonly used to check if the output is being compiled to a PDF. For generating HTML from LaTeX, tools like TeX4ht or LaTeX2HTML are used, and they often define their own specific commands or provide a way to detect the output format. ----- It gives simple code that uses: The \ifpdf ... \else ... \fi command checks if the document is being compiled to PDF. If it is, the content between \ifpdf and \else is included. If not (which would be the case for HTML), the content between \else and \fi is included. The content outside the \ifpdf ... \fi conditional will appear in both the PDF and HTML versions.
- IlliOnato 3y agoWell, perhaps by exploiting bugs/shortcomings in PDF and HTML converters. Not by design. However, bugs get fixed, and since the PDF and HTML are generated dynamically, any such hack would be extremely fragile. And while "single source of truth" can help to prevent such malicious discrepancy, it's unlikely that people would try to hack the system this way: what for? Far more likely scenario is unintentional discrepancy, and single source of truth definitely helps to prevent that!
- GoblinSlayer 3y agoHuh? What's the point of html version if you define it as source of deception?