From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26084 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Font change in \mbox in LaTeX math mode Date: Tue, 08 Sep 2020 14:02:06 -0700 Message-ID: References: <7262e88e-6096-48f2-a7c4-541fa3a15410n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19948"; mail-complaints-to="usenet@ciao.gmane.io" To: M A , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBXHC375AKGQE3RONYBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 08 23:02:25 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f192.google.com ([209.85.166.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFkky-00056R-2m for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 08 Sep 2020 23:02:24 +0200 Original-Received: by mail-il1-f192.google.com with SMTP id i80sf342250ild.18 for ; Tue, 08 Sep 2020 14:02:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1599598943; cv=pass; d=google.com; s=arc-20160816; b=gbTmonsOa6kYe4CjfstkGZyZmShG4g4zhWL6dwfLFl0nheZChPrO5wku3QobLX4gHr KDfwXFxeNl52FG3cLcne6OB0ynonnX9l1jnM9tUmhtVRhpUqPUln8ujFSNJKSAvhLfK5 5QcdbpV1Yk0MiZwVL6sHbD0efevf42y6Fq14BAp6cX+s6fgSGaW76hLX7cI796E/uIQd dTT99/fIioz/ZvtGN4w+ZVqEajxunLYC0BBBGWG5b5nRqMcO8bZFcaG82ryRzMJGrtuq rZxUwm1qgm4LTfJxc+GvfgkzHuNDP8H4yYRVlOMSKNzOP3Ecfx4H5oBlz0IZq3IdkuD5 J8lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=HmI9o2zyQxjAmXffTbaywavk34jtkoVoR0eJjI5MbZ4=; b=Qr5nEsB/2hsZUm5PFs0M1M/jPI/gvtAnNLhpqGyUls2Xdr1Lt/AqW8grioexOZqkI+ 3GAIUzjfLJE+U7W8UdLvF2s9TuHwYK3Y4wK7A0g1UCxHmtIUWHg8k6ml47L6m6RlYo1v pivckVpm1lQImcRvqb+F+kPpwl77XAzzPAa6As2DRcIr1creuW5OzuVfClumeF0GcT6S RQrWRgMd1zi4GWmNwULEm3j/hrg7gAiF41rOA2cXkszjKr8rveSnSAXbEYajXThdIh1o /ob11o+uBtS0amdG50JsW8mSnoK/ycog5VYbD+MySqkhO3RxnQs/Xxz6XAyghSHbvcor pCyA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mMrFYz0O; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=HmI9o2zyQxjAmXffTbaywavk34jtkoVoR0eJjI5MbZ4=; b=TzgZnWE+rTgCnnHRnqF4B46djxyhm6YOuMPBIpUqMj8ieDGqE9KKAr0A6eijGLRIef 0F2cAqvUKlA/0D67k1uGGSf0Wz0g4zT0ItqIIu7BfsK6s6u1PCczg1A+l4MTTsOsAvCj ZKHcEWx9Va7n8DhxpLRLaG4mZt8zE4LCJUeKedz2awbDIpJJXaJ9ACAPcJ8VoH3E8AOq w+ePj9ptRulwbruFQm4zzbubTbMQG8vdaLIyI2MLbtE17vuVQAV7RlZIOCPkpYhnIaiP L8F+JXyhaRKxmFaPy7KYGnM2g2aLtsXFR0gLOf+meY/SDuOV7HzD8Dv3oOo03OF2lUeu /8GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=HmI9o2zyQxjAmXffTbaywavk34jtkoVoR0eJjI5MbZ4=; b=sPgh+HqKraqkoCVPfofJuPcTEflZRifTIsgGeWH0HO+KdkqqH5EuJZ2bhq4fDJE33i 9VAJyw6hqYqKYG5g7+HtMsX3eZPCsUqAT2hSd+NL7vyTBKOQr+rBGzyEYc4vM25lPsgB BGbftUd4q5YKTNUsnr5pKTwcwKbhFPAZILGO0SXACzNchmsEdoXlzPFjj47wqNaF085f 9hzQf7YOPrXqYVjhR48nN17mP2HXVVl68dERNrODjBEuk8yIo+51DEmJ82M5611VBaMo e0I5rqB5Aab3oTWBNxjCvE/Q4GT+9wlD3mYBbgIvRnY1TTIgztoA0PYWYWcbxx+KnogR OORQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532lfi/WzZkKokQL30TevPoTIQGAKSoEu2MeYlDpQfJ5evQvTjgM a/ar1gpknC5WW+N+Dq2vPTU= X-Google-Smtp-Source: ABdhPJysMlOKJrCtYLiKzaJ4z4rtCoo79UligwGEEF07C5cSp1lMUCrl8urgIhFEBhT6YpoFXbGlSA== X-Received: by 2002:a02:a04d:: with SMTP id f13mr878087jah.112.1599598943122; Tue, 08 Sep 2020 14:02:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a92:8bc4:: with SMTP id i187ls164439ild.2.gmail; Tue, 08 Sep 2020 14:02:19 -0700 (PDT) X-Received: by 2002:a92:9992:: with SMTP id t18mr713036ilk.170.1599598939799; Tue, 08 Sep 2020 14:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599598939; cv=none; d=google.com; s=arc-20160816; b=Fq7jENZU1YbOgWYFTCxfWFgEQg6Fag+47eS59sdBvy/iNJYvpSGc5g/nn1Qz+RgwrT CMFTVAkebZ25f1DWJUfygB3XyHub803Iah+Ljyq7djjl+YItDd26IVhoIKqubvKuRs1K p8pDlIc8fzd9XgReC0eNQkM9mrb3DXWVjDS17mnLisdXEZ9dvhMck7XEmdlpweFtd/vr U2K2w5OBxLgsxL9LObsuEcNrZAg1hSpZbWAaYnAP5uRd20zTAZ/L4L6dAcylJF5Ult0p LCIX3BaobehY88PB0Gj9/+mJhCdnx5MvnAYBXSnBF9voAOWM8v2WVNkLqr25mxO82x2V wAqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=VZo1VUOF28lTckzYGqIooCwDe+sZ1pppNlb+32jXNj8=; b=rVttSpRVBC72NcrZOFljEh/afrGUZ/uPOX0cH0dJqp8EhQiO3FP1BmulAFvqw/X29+ abUMekrganYfFblblYBEVFoBQfZV+nAWW9JJBGCo5aE97bfdU4AlczQwfOFjIVKIBhH2 HfNjDq8PxJ8SaqFgN3zxWiQJDTG3T1fpNYsVUZsqgi46qTPE7n+W2XByTjPrmFuj4Fam O0ofFAypmOHuWjer/3lLODP+1xzr7Py9XUFgC5soDMCv6sfbwog9NBZKI+SjcirEPqIz z4TtGPoAOI0zCl9J7Y9RWI0h+cdOQp4RtG759/B2soL5yioAOcLRv7AeqckKxhM7WtYT MmLQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mMrFYz0O; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com. [2607:f8b0:4864:20::102a]) by gmr-mx.google.com with ESMTPS id n1si56117iom.0.2020.09.08.14.02.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Sep 2020 14:02:19 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102a as permitted sender) client-ip=2607:f8b0:4864:20::102a; Original-Received: by mail-pj1-x102a.google.com with SMTP id n3so288457pjq.1 for ; Tue, 08 Sep 2020 14:02:19 -0700 (PDT) X-Received: by 2002:a17:90b:360a:: with SMTP id ml10mr583866pjb.198.1599598938666; Tue, 08 Sep 2020 14:02:18 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id d77sm313497pfd.121.2020.09.08.14.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 14:02:17 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id E7C70A2A1; Tue, 8 Sep 2020 17:02:06 -0400 (EDT) In-Reply-To: <7262e88e-6096-48f2-a7c4-541fa3a15410n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=mMrFYz0O; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:26084 Archived-At: Math conversion is handled by the texmath library. This is specialized to math, and in the particular case you're interested converts tex math to the math format used by Word. Since it's specialized to math, it doesn't know how to handle arbitrary non-math text of the sort that can go into an mbox. There's not a good solution without changes in texmath's architecture (one can imagine changing it so you pass in a parser for normal text in the target format, which would be used inside mboxes). I wouldn't hold your breath, but you could put up an issue on jgm/texmath on GitHub so we don't lose track. M A writes: > I'm converting from LaTeX to MS Word (.docx). LaTeX lets you embed the > command > > \mbox{...} > > in LaTeX math mode. What goes inside the mbox is normal, non-math-mode > text and commands. In my case, I have some special terms that I use > outside of mathmode, which are italicized, e.g. like > > \textit{foo} > > I need to embed exactly the same text, formatted in the same way, in math > mode. For example, in LaTeX, this is fine: > > $2 \times \mbox{\textit{foo}}$ > > However, when using pandoc to convert to Word, I get this error: > > [WARNING] Could not convert TeX math '2\times\mbox{\textit{foo}}', > rendering as TeX: > 2\times\mbox{\textit{foo}} > ^ > unexpected "\\" > expecting "}", text, "{", "$", "$$", "\\(" or "\\[" > > It appears that \mbox is not treated as an escape out to normal non-math > mode, so that things that you could normally do in LaTeX in math mode are > not understood by pandoc. > > Is this correct? Is this just an unimplemented feature? I know that > pandoc can 't do everything that LaTeX does; that's OK. Is there a > workaround? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7262e88e-6096-48f2-a7c4-541fa3a15410n%40googlegroups.com.