* Get position mapping of LaTeX and Text files
@ 2019-11-12 15:19 Sir Hamburger
[not found] ` <f3c152d0-eacd-44cf-8f03-bbbd7763d7c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Sir Hamburger @ 2019-11-12 15:19 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]
Hello,
at the moment i am writing my bachelor thesis in Germany.
I'm trying to implement a grammar and word checker for LaTeX.
To reduce false positives while checking my plan is to convert the LaTeX
into a plaintext document. But afterwards I've to map the errors which are
detected with the source files.
For that i need something like:
In File /main.tex line 250 word 20
If i understand it correctly a filter is added after the internal
conversion to the native format had happened. To get the information out of
the filter there would have to be such information already in the native
format. But i didn't find anything in that.
Do you have any idea how to get such positions in pandoc?
Or do you know an alternative?
Kind regards,
Simon
--
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/f3c152d0-eacd-44cf-8f03-bbbd7763d7c6%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1733 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get position mapping of LaTeX and Text files
[not found] ` <f3c152d0-eacd-44cf-8f03-bbbd7763d7c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-11-12 18:18 ` John MacFarlane
[not found] ` <m236et7ybc.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2019-11-12 18:18 UTC (permalink / raw)
To: Sir Hamburger, pandoc-discuss
The pandoc AST doesn't include source location information.
See https://github.com/jgm/pandoc/issues/4565
However, you might find the tokenize function in
Text.Pandoc.Readers.LaTeX useful. This parses LaTeX
source into a sequence of Toks which DO include source
information.
Sir Hamburger <dunklerdrache-S0/GAf8tV78@public.gmane.org> writes:
> Hello,
>
> at the moment i am writing my bachelor thesis in Germany.
> I'm trying to implement a grammar and word checker for LaTeX.
>
> To reduce false positives while checking my plan is to convert the LaTeX
> into a plaintext document. But afterwards I've to map the errors which are
> detected with the source files.
>
> For that i need something like:
> In File /main.tex line 250 word 20
>
>
>
> If i understand it correctly a filter is added after the internal
> conversion to the native format had happened. To get the information out of
> the filter there would have to be such information already in the native
> format. But i didn't find anything in that.
>
> Do you have any idea how to get such positions in pandoc?
>
> Or do you know an alternative?
>
> Kind regards,
>
> Simon
>
> --
> 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/f3c152d0-eacd-44cf-8f03-bbbd7763d7c6%40googlegroups.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get position mapping of LaTeX and Text files
[not found] ` <m236et7ybc.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-11-12 19:27 ` Sir Hamburger
[not found] ` <b1994d9d-5e78-438c-adcc-21eb3121b440-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Sir Hamburger @ 2019-11-12 19:27 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 647 bytes --]
Thank you very much for the fast answer.
I didn't find a function with the name tokenize. Do you mean this one:
tok :: LP Inlines
tok = try $ grouped inline <|> inlineCommand <|> str <$> count 1 inlineChar
thanks and have a nice day
--
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/b1994d9d-5e78-438c-adcc-21eb3121b440%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 6063 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get position mapping of LaTeX and Text files
[not found] ` <b1994d9d-5e78-438c-adcc-21eb3121b440-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-11-12 22:36 ` John MacFarlane
[not found] ` <yh480kpnhwen8a.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2019-11-12 22:36 UTC (permalink / raw)
To: Sir Hamburger, pandoc-discuss
See
http://hackage.haskell.org/package/pandoc-2.7.3/docs/Text-Pandoc-Readers-LaTeX.html
Perhaps you have an older version?
Sir Hamburger <dunklerdrache-S0/GAf8tV78@public.gmane.org> writes:
> Thank you very much for the fast answer.
>
> I didn't find a function with the name tokenize. Do you mean this one:
>
> tok :: LP Inlines
> tok = try $ grouped inline <|> inlineCommand <|> str <$> count 1 inlineChar
>
> thanks and have a nice day
>
> --
> 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/b1994d9d-5e78-438c-adcc-21eb3121b440%40googlegroups.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get position mapping of LaTeX and Text files
[not found] ` <yh480kpnhwen8a.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-11-13 8:43 ` Sir Hamburger
0 siblings, 0 replies; 5+ messages in thread
From: Sir Hamburger @ 2019-11-13 8:43 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 569 bytes --]
Thank you very much for your patience and the fast help. I did look in the
wrong file but now i found it.
So hopefully i can achieve what I am looking for.
--
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/f1627bed-9801-466f-85a1-25ccf4f10fa6%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 926 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-13 8:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 15:19 Get position mapping of LaTeX and Text files Sir Hamburger
[not found] ` <f3c152d0-eacd-44cf-8f03-bbbd7763d7c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-11-12 18:18 ` John MacFarlane
[not found] ` <m236et7ybc.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-11-12 19:27 ` Sir Hamburger
[not found] ` <b1994d9d-5e78-438c-adcc-21eb3121b440-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-11-12 22:36 ` John MacFarlane
[not found] ` <yh480kpnhwen8a.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-11-13 8:43 ` Sir Hamburger
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).