Code Monkey home page Code Monkey logo

Comments (6)

worden-lee avatar worden-lee commented on July 22, 2024

Uh, ok not quite like that... That should be:

Some papers my users have written use the ascii double-quote character in place of two single quotes (``like this" rather than ``like this''). At least some versions of LaTeX accept this. It seems LaTeXML doesn't. Maybe it could? 

from latexml.

brucemiller avatar brucemiller commented on July 22, 2024

I was initially confused by this report, in part because of wiki doing
its own translations of the quotes! LaTeXML certainly accepts the double-quote,
it just doesn't do any translation of it; nor, I think, does TeX.
Both do translate a pair of back-quotes into a left-double-quote, and a
pair of single-quotes into right-double-quote.

LaTeXML translates the two pairs into the two Unicode points
201C & 201D for the balanced double-quotes, which look like,
and also mean, the Right Thing; it leaves the regular
double-quote with the straight-up ASCII code point.

What leads to the confusion, I guess, is that TeX's font has
the regular double-quote look the same as the right double-quote
(maybe it converts two single-quotes to that code point,
rather than having a separate pair of double-quotes?).
At any rate, the TeX's left-double-quote seems to look right
with the (apparent) ascii double-quote; if you used double-quotes
on both sides it would not. I suppose LaTeXML's results would look
right under some set of browser fonts, too!

I dunno...converting a plain double-quote to 201D would have to be
conditional; at least not when in tt font...; and it seems a rather
perverse use case... so unless I can convince myself that this won't
have adverse affects, I'm going to mark this wontfix for now.

from latexml.

worden-lee avatar worden-lee commented on July 22, 2024

Okay. Sorry about the formatting glitches — I didn't realize it was doing wiki parsing when I submitted it. I'm happy to accept your decision.

Here's the counter-argument, though: intentionally or not, TeX apparently uses a quirk of font design to make the ASCII double-quote appear as a right-double-quote. As a result of that design choice, later package designers had to add \textquotedbl (in the fontenc package) to make the basic straight-up-and-down double-quote available for inches and such. I think it seems reasonable to interpret this as "convert the ASCII double quote to right-double-quote, and \textquotedbl to unidirectional double quote", and emulate that behavior by translating the ASCII double quote to 201D (unless in tt, maybe) and \textquotedbl to 0x22...

from latexml.

brucemiller avatar brucemiller commented on July 22, 2024

You almost had me convinced!

It's actually easy to implement the translation, but I was worried
about sneaky side effects... so as I was testing, I tried to compare
to the various \textquoteXXX...

The only way to get access to \textquotedbl is \usepackage[T1]{fontenc},
in which case, indeed \textquotedbl gives you the ASCII-like double-quote.
However, then also in the oddly balanced quoted Hello, the right double
quotes revert to the upright form! (but not the pair of single quotes,
nor \textquotedblleft, etc, which remain the curved double-quote!)

So, it's as if LaTeXML were (inadvertently) working with a T1 encoding
(tho' UTF8 would make more sense; but it doesn't supply \textquotedbl)

I'll solicit opinions on the list!

from latexml.

brucemiller avatar brucemiller commented on July 22, 2024

Well, given the overwhelming silence on the list, nobody cares
much one way or the other; so the vote is 1.5 to 0.5...
(and I found that one of my DLMF authors does the same thing...Ugh)

So, I fixed it after all!
(rev 944)

from latexml.

worden-lee avatar worden-lee commented on July 22, 2024

Thanks! Now our quote marks look great!

from latexml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.