From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: 吴小安 <nantongwu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
pandoc-discuss
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: from Latex to Word adding new package
Date: Mon, 26 Aug 2019 09:03:17 -0700 [thread overview]
Message-ID: <m2d0grgbi2.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <5fcaa4c1-5956-407d-9243-5e73df894b14-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Pandoc is generally solid with standard latex and the most
common packages, but it can't handle tex primitives like
\kern or \raise1pt well.
If there is a unicode character, or combination of characters,
that approximates \boxright, then (assuming you're using
xelatex or lualatex) you may be able to do something like
\newcommand{\boxright}{µ}
where µ stands in for whatever the unicode character is.
The character would be passed directly through to Word.
Give it a try.
吴小安 <nantongwu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Thank you Professor MacFarlane !
>
> I tried this one :
>
> \documentclass{article}
>
> \usepackage{amsmath}
>
> \usepackage{unicode-math}
>
> \usepackage{amsfonts}
>
> \newcommand{\boxright}{\ensuremath{%
>
> \mathrel{\Box\kern-1.5pt\raise1pt\hbox{$\mathord{\rightarrow}$}}}}
>
> \begin{document}
>
> $A\boxright B$
>
> \end{document}
>
>
> but it doesn't work, I thought these packages are pandoc can handle (https://pandoc.org/MANUAL.html).
>
>
>
> On Monday, August 26, 2019 at 2:48:03 PM UTC+8, John MacFarlane wrote:
>>
>>
>> Adding a package won't help in this case. The texmath library
>> doesn't understand \boxright.
>>
>> However, you could write your own macro to redefine
>> \boxright to something pandoc can handle, and include
>> this macro in your tex document.
>>
>> 吴小安 <nant...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes:
>>
>> > Hi, I try to convert a tex document to word, everything is fine, but
>> the
>> > $boxright$ can not convert ([WARNING] Could not convert TeX math 'A
>> > \boxright C', rendering as TeX: A \boxright C )
>> >
>> > I don't know how to add "\usepackage{pifont}" to the pandoc, could you
>> > tell me how can I do it ? Thank you very much !
>> >
>> >
>> >
>> > --
>> > 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/148055b7-05a4-4ecd-9527-464cb1308518%40googlegroups.com.
>>
>>
>
> --
> 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/5fcaa4c1-5956-407d-9243-5e73df894b14%40googlegroups.com.
--
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/m2d0grgbi2.fsf%40johnmacfarlane.net.
prev parent reply other threads:[~2019-08-26 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 6:14 吴小安
[not found] ` <148055b7-05a4-4ecd-9527-464cb1308518-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-08-26 6:47 ` John MacFarlane
[not found] ` <m2wof0fmnf.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-08-26 10:48 ` 吴小安
[not found] ` <5fcaa4c1-5956-407d-9243-5e73df894b14-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-08-26 16:03 ` John MacFarlane [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2d0grgbi2.fsf@johnmacfarlane.net \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
--cc=nantongwu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).