Re: [tex4ht] [bug #240] Images in subdirrectories not included correctly in the ODT output
Hi Karl, 2015-01-15 19:53 GMT+01:00 Karl Berry puszcza-hack...@gnu.org.ua: Follow-up Comment #1, bug #240 (project tex4ht): hi michal - sounds great. my only comment is, why the Pictures/ subdirectory in the first place? seems like that name should be configurable as well. it seems that name 'Pictures' is not part of Open Document format, but it is usually name that, at least in document I've seen. regarding tex4ht.env, this is a different topic, but do we really have to have different .env's for unix and windows? as i recall, one of my tex live colleagues insisted on this many years ago for the sake of some very small difference. unfortunately, diffs don't show anything obvious. I think the difference is in some commands, like `cp` and `mv` vs. `move` and `copy`. anyway, the near-total redundancy (even in tex4ht-env.tex!) is awful. at the very least, the windows .env should just somehow include the unix one and then override anything that is needed. wdyt? I think that this would need to modify the source code of `t4ht` command. This code and code of `tex4ht` command seems even cryptic than sources of `.4ht` files, maybe because I don't know `c` language :) Maybe `tex4ht-env.tex` could be edited to produce some template like (just a dummy sample): .html {{cp}} {{src-file}} {{dest-dir}} and then different versions with some templating engine such as `Mustache` could be produced. Other possibility is the one I use in make4ht, where I try to bypass t4ht and process instructions in the `.lg` file with Lua. tex4ebook uses this approach and work which it does is similar to the work needed to create the `.odt` file. thanks, k regards, Michal
Re: [tex4ht] [bug #241] grave accent letter ` (hex 60) changes to left single quotation mark (hex 0xE2 0x80 0x98)
I will repost my answer on TeX.sx. This is not a bug, but default LaTeX behaviour: This is the default behaviour, you will get the same result even with `pdflatex`. You can use `upquote` package to redefine grave and upright-quote to produce correct glyphs: \documentclass[12pt]{article} \usepackage{upquote} \begin{document} `123` \verb|`123`| \end{document} the result: !--l. 6--p class=noindent ‘123‘ /p!--l. 8--p class=indentspan class=obeylines-hspan class=verbspan class=cmtt-12`123`/span/span/span /p - Best regards, Michal 2015-01-16 2:52 GMT+01:00 Nasser M. Abbasi puszcza-hack...@gnu.org.ua: URL: http://puszcza.gnu.org.ua/bugs/?241 Summary: grave accent letter ` (hex 60) changes to left single quotation mark (hex 0xE2 0x80 0x98) Project: tex4ht Submitted by: nma123 Submitted on: Fri 16 Jan 2015 03:52:11 AM EET Category: None Priority: 5 - Normal Severity: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any ___ Details: please see http://tex.stackexchange.com/questions/223362/tex4ht-changes-a-grave-accent-letter-hex-60-to-left-single-quotation-mark-h for more information. summary: when running htlatex on this file \documentclass[12pt]{article} \begin{document} `123` \verb|`123`| \end{document} the grave accent character ` is changed to left-single-quotation-mark in HTML. I need it to remain a Hex60 character as it is in the input. texlive 2014 ___ Reply to this item at: http://puszcza.gnu.org.ua/bugs/?241 ___ Message sent via/by Puszcza http://puszcza.gnu.org.ua/
Re: [tex4ht] [bug #241] grave accent letter ` (hex 60) changes to left single quotation mark (hex 0xE2 0x80 0x98)
On 1/16/2015 6:17 AM, Michal Hoftich wrote: I will repost my answer on TeX.sx. This is not a bug, but default LaTeX behaviour: This is the default behaviour, you will get the same result even with `pdflatex`. You can use `upquote` package to redefine grave and upright-quote to produce correct glyphs: \documentclass[12pt]{article} \usepackage{upquote} \begin{document} `123` \verb|`123`| \end{document} the result: !--l. 6--p class=noindent ‘123‘ /p!--l. 8--p class=indentspan class=obeylines-hspan class=verbspan class=cmtt-12`123`/span/span/span /p - Best regards, Michal Thanks Michal. But there is still an issue. This is what I tried: Using \usepackage{upquote}, does indeed correct the problem for tex4ht, but _only_ for the verbatim text in the above example, not for the normal text. Yes, the normal text, appears the same in the pdf as it is on the web page, but the encoding can't be the same. I found this, when I copied the normal text out from pdf to text file and looked at the hex encoding using xxd -p foo.txt It was the hex60, which is what I wanted, same as the input. But when I copied the normal text from the web page, and looked at its hex encoding, it was the left single quotation mark. which causes problem. So, the encoding inside pdf can't be the same as the HTML generated for the normal text. Even though they do appear to be the same (left single quotation) when looking at them on the screen. For pdf, I did not even need the \usepackage{upquote}, and was able to copy both the normal and the verbatim text, and they both came out as grave accent. But for htlatex, it did fix the verbatim part. Not the normal text part. This was the same result as when using the patched cmtt.htf I was testing with. So, there is still a problem, with normal text. For now, I will use verbatim with \usepackage{upquote} to avoid this problem. But for normal text, I think there is still a problem, since it does not work like with pdflatex or lualatex. Thanks for your help. --Nasser
Re: [tex4ht] [bug #241] grave accent letter ` (hex 60) changes to left single quotation mark (hex 0xE2 0x80 0x98)
Thanks Michal. But there is still an issue. This is what I tried: Using \usepackage{upquote}, does indeed correct the problem for tex4ht, but _only_ for the verbatim text in the above example, not for the normal text. Yes, the normal text, appears the same in the pdf as it is on the web page, but the encoding can't be the same. I found this, when I copied the normal text out from pdf to text file and looked at the hex encoding using xxd -p foo.txt This is maybe caused by PDF viewer you use, I don't get graves using Acrobat Reader or pdftotext. Grave character is used to input quotes, ie. ``hello'' will print correct English quotes, so it would be error to get anything else in a text. You can use \`{} command to get grave, or better \newcommand\textgrave{\`{}} and then use \textgrave in the document. this works in pdflatex as well as in tex4ht. It was the hex60, which is what I wanted, same as the input. But when I copied the normal text from the web page, and looked at its hex encoding, it was the left single quotation mark. which causes problem. So, the encoding inside pdf can't be the same as the HTML generated for the normal text. Even though they do appear to be the same (left single quotation) when looking at them on the screen. For pdf, I did not even need the \usepackage{upquote}, and was able to copy both the normal and the verbatim text, and they both came out as grave accent. But for htlatex, it did fix the verbatim part. Not the normal text part. This was the same result as when using the patched cmtt.htf I was testing with. So, there is still a problem, with normal text. For now, I will use verbatim with \usepackage{upquote} to avoid this problem. But for normal text, I think there is still a problem, since it does not work like with pdflatex or lualatex. Thanks for your help. you're welcome :) Michal --Nasser
Re: [tex4ht] [bug #241] grave accent letter ` (hex 60) changes to left single quotation mark (hex 0xE2 0x80 0x98)
Hi Nasser and all, I don't think it would be right to change cmtt10.htf. What is at position 0x60 of cmtt10 is, in fact, a directed left quote, not a grave accent. The fact that the standards committees screwed over all us helpless users by making that plain ASCII character into a useless standalone accent does not change Knuth's fonts. What's in the PDF file has to correspond to the fonts used by the document. Now, what gets copied/pasted from a PDF is another matter entirely. Different viewers do different things there. I realize full well that when you insert an ASCII 0x60, what you presumably see on your screen is a grave accent (I don't, but that's another story). I realize full well that that is what ASCII defined at that position. But that is not what TeX (or, more precisely, the cm fonts) does (do), by default, and therefore tex4ht follows suit. That seems undoubtedly the correct behavior to me. So, if you want to change it, you should change it at the TeX level, and then tex4ht should do what you want. Michal explained how to do that for LaTeX. (Aside: In Texinfo, I created all kinds of stupid options so people could get the stupid grave accent in their output, etc. As I expect you're aware, there is a similar issue with 0x47 being a directed right quote in CM and a useless straight quote in the standards.) Best, Karl