public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Escape sequence in LUA filters, problems multiple citations conversion of docx to Latex
@ 2021-06-04 17:01 Ioan Muntean
       [not found] ` <3e06a866-8075-4031-886e-8c45cc4ab8bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Ioan Muntean @ 2021-06-04 17:01 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1927 bytes --]

Hello all,

I have some troubles with escaping sequence in a Lua filter. I am using the 
function Str() and I simply want to generate the text "\cite" in a Latex 
output . 
This is the function:
return pandoc.Str([[\cite{]]..latex_citekey.."}")

The output is: \textbackslash cite\{
How do I escape the converter if I want to get an output like "\cite"? I 
think it has something to do with inline characters, but I do not know how 
to use them.

Here is the bigger picture: 

I am trying to convert with Pandoc DOCX files to Latex. I use Zotero 
references and a Better than Bibtex style in docx to create references for 
pandoc.
The --citedoc --natlib --bibliography=<.bib file> options works with single 
reference in DOCX 
The entry: [@parker2009computinguncomputablediscrete]
is converted to \cite{parker2009computinguncomputablediscrete}

[@cartwright2006wellorderedscience; @cichy2019deepneuralnetworks; 
@parker2009computinguncomputablediscrete]

is not converted but kept exactly like that in the Latex file. But the Docx 
conversion does not work for multiple references or for prefixes or 
suffixes of citations. But the same pandoc command for a markdown input 
works fine. I suspect there is some difference on how the docx and markdown 
converter works.


I am currently almost done with writing a Lua filter and the intention is 
to generate the correct output

\cite{cartwright2006wellorderedscience, cichy2019deepneuralnetworks, 
parker2009computinguncomputablediscrete}

Thanks in advance!

Ioan



-- 
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/3e06a866-8075-4031-886e-8c45cc4ab8bdn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2513 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-27 20:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 17:01 Escape sequence in LUA filters, problems multiple citations conversion of docx to Latex Ioan Muntean
     [not found] ` <3e06a866-8075-4031-886e-8c45cc4ab8bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-04 21:43   ` Bastien DUMONT
2021-06-06  1:40     ` Ioan Muntean
     [not found]       ` <805aa20b-322e-4420-9f4c-33b5c9adf109n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-08-23  9:56         ` Sandra Martin
     [not found]           ` <bdaeff69-16cc-4498-b678-84b6e19f0454n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-10-27 20:36             ` Ioan Muntean

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).