public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "R (Chandra) Chandrasekhar" <chyavana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Unable to use longdivision package with LaTeX
Date: Sun, 10 Dec 2023 11:01:58 +0530	[thread overview]
Message-ID: <39fa8da1-3566-4950-b505-8ae1b8ef235a@gmail.com> (raw)
In-Reply-To: <ZXTGM7kGnjzIksH2@localhost>

Thanks for that.

I have now found out that if longdivision is invoked _before_ 
unicode-math, there is no error or warning, but the result is wrong.

I have written to the package author describing the behaviour and 
requesting a resolution.

Chandra

On 10/12/2023 01:25, Bastien DUMONT wrote:
> You can answer your question by searching for files containing "\longdivision" in your TeX installation (the texmf/ or texmf-dist/ directory). In this case, the package "unicode-math" already defines \longdivision as a long division rule (the Unicode x027CC character, if I understand well).
> 
> The long-term solution would be to ask the developpers of longdivision to provide an alias when the macro is already defined. For now, one possible workaround is to place a copy of longdivision.sty in the same folder as the MD file and to replace \longdivision with e.g. \mylongdivision in the following line:
> 
> \NewDocumentCommand \longdivision { omm } {
> 
> Then, you will be able to use \mylongdivision in your document instead of \longdivision.
> 
> Of course, you can also remove \usepackage{unicode-math} from your template if you are sure that you don't need it.
> 
> Le Saturday 09 December 2023 à 09:09:50PM, R (Chandra) Chandrasekhar a écrit :
>> Dear Folks,
>>
>> The .tex file below compiles with lualatex without murmur:
>>
>> ---
>> \documentclass{article}
>> \usepackage{longdivision}
>> \begin{document}
>> \longdivision{516}{27}
>> \end{document}
>> ---
>>
>> and the result is attached as longdivision.png.
>>
>> However, when I compile the equivalent markdown file, md-ld.md,
>>
>> ===
>> ---
>> title: "Test of long division"
>> date: 2023-12-09
>> header-includes:
>>    - \usepackage{longdivision}
>> ---
>>
>> This is a test of long division.
>>
>> $$
>> \longdivision{516}{27}
>> $$
>> ===
>>
>> using
>>
>> pandoc --from markdown --to latex --pdf-engine lualatex --standalone
>> --output md-ld.pdf md-ld.md
>>
>> I get the error message
>>
>> ---
>> Error producing PDF.
>> ! LaTeX cmd Error: Command '\longdivision' already defined.
>>
>> For immediate help type H <return>.
>>   ...
>>
>> l.192 }
>> ---
>>
>> If I leave out the longdivision package, and use the same command line, it
>> compiles, but the output of the long division is not correct and is shown in
>> the image pdf-from-pandoc.png.
>>
>> Can someone please tell me which package is "already defining" the
>> \longdivision command, and also how I might get the desired result from the
>> .md file?
>>
>> Thanks.
>>
>> Chandra
>> 2023-12-09
>>
>> -- 
>> 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/d9e637b2-06d5-4085-9b56-4ba80c9a0299%40gmail.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/39fa8da1-3566-4950-b505-8ae1b8ef235a%40gmail.com.


      reply	other threads:[~2023-12-10  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 15:39 R (Chandra) Chandrasekhar
     [not found] ` <d9e637b2-06d5-4085-9b56-4ba80c9a0299-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-12-09 19:55   ` Bastien DUMONT
2023-12-10  5:31     ` R (Chandra) Chandrasekhar [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=39fa8da1-3566-4950-b505-8ae1b8ef235a@gmail.com \
    --to=chyavana-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).