From mboxrd@z Thu Jan 1 00:00:00 1970 From: edgar@openmail.cc Subject: Fwd: Re: How to export LaTeX amsmath align bmatrix to ODT? Date: Sun, 25 Jun 2017 00:35:08 +0000 Message-ID: References: <053c5f245be78d9dd8952c300c6b192b@openmail.cc> <87poe6irsi.fsf@nicolasgoaziou.fr> <3c4faaee17eb7e7fdd5aea5136742bd5@openmail.cc> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_f02e29e754eccb9524e614cff6c447ff" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOvWW-0005bI-ET for emacs-orgmode@gnu.org; Sat, 24 Jun 2017 20:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOvWS-0000pA-AO for emacs-orgmode@gnu.org; Sat, 24 Jun 2017 20:35:32 -0400 Received: from onethreetwo.vfemail.net ([199.16.11.132]:46222 helo=vfemail.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOvWS-0000oP-1U for emacs-orgmode@gnu.org; Sat, 24 Jun 2017 20:35:28 -0400 In-Reply-To: <3c4faaee17eb7e7fdd5aea5136742bd5@openmail.cc> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=_f02e29e754eccb9524e614cff6c447ff Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed I forgot to send this to the list. Sorry. -------- Original Message -------- Subject: Re: How to export LaTeX amsmath align bmatrix to ODT? Date: 2017-06-15 22:57 From: edgar@openmail.cc To: Nicolas Goaziou Hello Nicolas, Thank you for your help. My comments are under each block: On 2017-06-14 14:10, Nicolas Goaziou wrote: > Hello, > > >> On 2017-06-10 05:13, edgar wrote: >>> On 2017-06-10 04:54, edgar wrote: >>>> Hello, >>>> >>>> I have been making progress with my export procedure to ODT. I would >>>> like to know if someone knows how to export the following LaTeX >>>> block >>>> to ODT correctly: >>>> >>>> \[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4 >>>> \end{bmatrix} \end{align}\] >>>> https://www.vfemail.net/roundcube/?_task=mail&_action=compose&_id=289067995593b7fd683a1f# >>>> \[\begin{align} a = & 1 + 2 + 3 + 4 \\ c = & 4 \end{bmatrix} >>>> \end{align}\] > > I'm a bit lost here. In particular, I'm able to export the example > above > out-of-the-box, provided I add "#+options: tex:dvipng" or some such in > the document. > Yes, indeed, without modifying any variable, the code exports correctly, but I had modified org-preview-latex-process-alist to include my symbols.tex file like this: On 2017-06-05 07:00, edgar wrote: I managed to get the special symbols by 1. M-x customize-variable org-preview-latex-process-alist 2. Doing [Ins] into the dvipng (or imagemagick) section 3. typing :latex-header in the Key: field 4. typing "\\input{./symbols.tex}" in the Value: field After I did that, some symbols would export correctly, but others would not. I was not importing any LaTeX packages within that file. I use this file to export PDF (through LaTeX: C-c C-e l p). One of the things that did not work was the matrix environment. I thought that it was better to start a new question regarding the matrix, because I thought it was independent of the symbols. This is related to the following: >> For the record, I had modified org-preview-latex-process-alist to get >> custom symbols, and this got in the way of the LaTeX bmatrix >> environment (I don't know how; I was loading a file with >> with :latex-header as "\\input{preamble.tex}"). >> >> My partial answer (it is partial, because the \tensor preview renders >> in a different color than the rest of symbols): Instead of modifying >> org-preview-latex-process-alist, the answer I modified >> org-format-tex-header. I added the following at the end of M-x >> customize-variable org-format-tex-header (I leave it here for >> posterity; I added some symbols: tensor, derivative, vector, Roman >> numeral, etc.) > > I don't think you need to modify `org-format-latex-header' at all. > There > is `org-latex-packages-alist' for that. I don't really know how to modify org-latex-packages-alist to have a latex command like this in my tex file: \newcommmand{\mysymbol}[1]{\mathrm{my_{#1}}} I do have a bunch of packages with custom options over there :P ! > > So, is there a bug in the ODT export back-end? If so, could you post an > ECM? Loads of LaTeX code doesn't help understanding the issue. > I think that the only bug is that I don't know how to use it very well ;) . I don't know what a ECM is :S , sorry. I typed ECM emacs on a web search engine, and only got ECB. Is it the same? If you are willing to tell me how to get one, I'll do my best. Right now, I am having a glitch on the screen. I get some of my custom symbols in black (all the others are in light gray) on a black background (my screen has a black background; see attached picture: there is an I with two tildes underneath next to the p). I would like to know if you or someone else can help me to get a light gray on that symbol too. I suspect that it may have to do with the stackengine (LaTeX) package, because all of my other symbols are doing well. This is the snippet of code that I have in org-format-latex-header to define the \tensor symbol \newcommand{\tensor}[1]{ \stackunder[0pt]{\stackunder[1pt]{#1}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}} I also opened a new emacs with -Q, did a (require 'org), yanked my configuration of org-format-latex-header and created a new Org file. Then, changed the theme to a dark one and I typed $\tensor{F}$ $a$. For the $\tensor{F}$ I get a white square with a black font face. For the $a$ I get the same set of colors as the theme (dark background, light-gray font face). Thank you a lot for you time! Edgar ------------------------------------------------- ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! --=_f02e29e754eccb9524e614cff6c447ff Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name=org-ltximg_968041b7b2f6ea14aa6a6df6b779409cb85988b9.png Content-Disposition: attachment; filename=org-ltximg_968041b7b2f6ea14aa6a6df6b779409cb85988b9.png; size=368 iVBORw0KGgoAAAANSUhEUgAAABkAAAAXCAMAAADJPRQhAAAAXVBMVEUkJCTc3NxVVVV5eXmqqqov Ly9gYGBtbW2Ghoa3t7dISEjQ0NCfn588PDySkpLDw8MAAAAODg4HBwcJCQkTExMcHBwCAgIfHx8Q EBAVFRUaGhoLCwsEBAQYGBghISGnglgPAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAuUlEQVQoFY2R bReCIAyFBwqCaC7RLMn+/88MXzY7aKf4wrj37jwDAI7r2iL67qhHpcdzHaDD/rQDwOMXA9Cvjsxy pQuTcY4xBqwtAZwmizClBDfn84ocwiioRR1Fx86tpUzhYqUEgQa8k1PNaS0ia1kPHLcqxQS+TS0u AIVVFNwxWsjMmE0fwhMxTOvpklM63RvKp4YS8lMK7TJzHE83wvK7xA/oYfQDTDw4d83Ka+tj8Vex c5LkP5w3bLIIHGxR/dIAAAAASUVORK5CYII= --=_f02e29e754eccb9524e614cff6c447ff--