* latex to html or plain text without any latex construct @ 2017-08-21 14:26 Uwe Brauer [not found] ` <87r2w5xaie.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-21 14:26 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Hi I want to strip from my latex file any latex command. I know about the detex command but even that leaves some text constructs. Is there any option in pandoc which can achieve that? I tried pandoc file.tex -o file.epub pandoc file.epub -t plain -o result.text But still the file contains stuff like $$\begin{aligned} \label{eq:iteration-scheme:1} \partial_t\rho + v^a\partial_a\rho + \rho \partial_a v^a &= 0 \\ \label{eq:iteration-scheme:2} \rho \left(\partial_t v^a + v^b\partial_b v^a \right) + \partial^a p &= - \rho\partial^a\phi \\ \label{eq:iteration-scheme:3} \Delta\phi &= Etc etc Thanks Uwe Brauer ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <87r2w5xaie.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: latex to html or plain text without any latex construct [not found] ` <87r2w5xaie.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-21 21:00 ` John MACFARLANE 2017-08-22 12:20 ` Uwe Brauer 0 siblings, 1 reply; 18+ messages in thread From: John MACFARLANE @ 2017-08-21 21:00 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw With -t plain, pandoc will only emit tex math if it can't "fake it with unicode." (Of course, that will be the case with the complicated equation you mention.) If you want this to be simply removed, you can combine -t plain with a filter that removes all Math elements. +++ Uwe Brauer [Aug 21 17 14:26 ]: >Hi > >I want to strip from my latex file any latex command. I know about the >detex command but even that leaves some text constructs. >Is there any option in pandoc which can achieve that? > >I tried > >pandoc file.tex -o file.epub > >pandoc file.epub -t plain -o result.text > >But still the file contains stuff like >$$\begin{aligned} \label{eq:iteration-scheme:1} \partial_t\rho + >v^a\partial_a\rho + \rho \partial_a v^a &= 0 \\ >\label{eq:iteration-scheme:2} \rho \left(\partial_t v^a + v^b\partial_b >v^a \right) + \partial^a p &= - \rho\partial^a\phi \\ >\label{eq:iteration-scheme:3} \Delta\phi &= > >Etc etc > >Thanks > >Uwe Brauer > >-- >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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87r2w5xaie.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: latex to html or plain text without any latex construct 2017-08-21 21:00 ` John MACFARLANE @ 2017-08-22 12:20 ` Uwe Brauer [not found] ` <871so3yet8.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-22 12:20 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > With -t plain, pandoc will only emit tex math if it can't > "fake it with unicode." (Of course, that will be the case > with the complicated equation you mention.) > If you want this to be simply removed, you can combine > -t plain with a filter that removes all Math elements. Sorry, I just realized that I asked this some years ago and you proposed the following solution > -- stripmath.hs > -- compile: ghc --make stripmath.hs > -- run: pandoc input.txt -t json | ./stripmath | pandoc -f json -t plain where stripmath is import Text.Pandoc main = toJsonFilter stripmath where stripmath (Math _ _) = Str "FORMULA" stripmath x = x I just tried that out with the old compiled stripmath but I obtain /home/oub/scripts/stripmath: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory So I presume I have to recompile it again but this time I receive hc --make stripmath.hs [1 of 1] Compiling Main ( stripmath.hs, stripmath.o ) stripmath.hs:3:8: No instance for (ToJsonFilter (Inline -> Inline)) arising from a use of `toJsonFilter' Possible fix: add an instance declaration for (ToJsonFilter (Inline -> Inline)) In the expression: toJsonFilter stripmath In an equation for `main': main = toJsonFilter stripmath where stripmath (Math _ _) = Str "FORMULA" stripmath x = x I don't know enough haskell to deal with this. Any help is appreciated. Thanks Uwe Brauer ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <871so3yet8.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: latex to html or plain text without any latex construct [not found] ` <871so3yet8.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-22 17:50 ` John MACFARLANE 2017-08-22 20:16 ` Uwe Brauer 0 siblings, 1 reply; 18+ messages in thread From: John MACFARLANE @ 2017-08-22 17:50 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Try with toJSONFilter rather than toJsonFilter >import Text.Pandoc > >main = toJsonFilter stripmath > where stripmath (Math _ _) = Str "FORMULA" > stripmath x = x ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: latex to html or plain text without any latex construct 2017-08-22 17:50 ` John MACFARLANE @ 2017-08-22 20:16 ` Uwe Brauer [not found] ` <878tibz7c2.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-22 20:16 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > Try with toJSONFilter rather than toJsonFilter >> import Text.Pandoc >> >> main = toJsonFilter stripmath >> where stripmath (Math _ _) = Str "FORMULA" >> stripmath x = x Then I obtain stripmath.hs:3:8: Not in scope: `toJSONFilter' Perhaps you meant `toJsonFilter' (imported from Text.Pandoc) I am running pandoc 1.17.2 ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <878tibz7c2.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: latex to html or plain text without any latex construct [not found] ` <878tibz7c2.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-23 0:09 ` John MacFarlane 2017-08-23 12:22 ` [SOLVED, almost] (was: latex to html or plain text without any latex construct) Uwe Brauer 0 siblings, 1 reply; 18+ messages in thread From: John MacFarlane @ 2017-08-23 0:09 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Ah, you also need import Text.Pandoc.JSON instead of import Text.Pandoc +++ Uwe Brauer [Aug 22 17 20:16 ]: >>>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > > > Try with toJSONFilter rather than toJsonFilter > >> import Text.Pandoc > >> > >> main = toJsonFilter stripmath > >> where stripmath (Math _ _) = Str "FORMULA" > >> stripmath x = x > >Then I obtain >stripmath.hs:3:8: > Not in scope: `toJSONFilter' > Perhaps you meant `toJsonFilter' (imported from Text.Pandoc) > > >I am running pandoc 1.17.2 > >-- >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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/878tibz7c2.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* [SOLVED, almost] (was: latex to html or plain text without any latex construct) 2017-08-23 0:09 ` John MacFarlane @ 2017-08-23 12:22 ` Uwe Brauer [not found] ` <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-23 12:22 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > Ah, you also need > import Text.Pandoc.JSON Thanks! That works like charm. However a typical sentence could look like this. Replacing the density $\rho$ by the Makino variable $w$, the system (\ref{eq:iteration-scheme:1})--(\ref{eq:iteration-scheme:3}) coupled with the equation of state (\ref{eq:state}) takes the following form. Which is then replace by Replacing the density FORMULA by the Makino variable FORMULA, the system ([eq:iteration-scheme:1])–([eq:iteration-scheme:3]) coupled with the equation of state ([eq:state]) takes the following form: Is there any change to replace \ref{eq:iteration-scheme:1} by the word LABEL? Thanks Uwe Brauer -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87k21uwk14.fsf_-_%40mat.ucm.es. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: (was: latex to html or plain text without any latex construct) [not found] ` <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-23 14:15 ` John MacFarlane 2017-08-23 16:13 ` Uwe Brauer 2017-08-23 14:15 ` (was: latex to html or plain text without any latex construct) John MacFarlane 1 sibling, 1 reply; 18+ messages in thread From: John MacFarlane @ 2017-08-23 14:15 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw +++ Uwe Brauer [Aug 23 17 12:22 ]: >However a typical sentence could look like this. >Replacing the density $\rho$ by the Makino variable $w$, the system >(\ref{eq:iteration-scheme:1})--(\ref{eq:iteration-scheme:3}) coupled with the >equation of state (\ref{eq:state}) takes the >following form. > >Which is then replace by > >Replacing the density FORMULA by the Makino variable FORMULA, the system >([eq:iteration-scheme:1])–([eq:iteration-scheme:3]) coupled with the >equation of state ([eq:state]) takes the following form: > >Is there any change to replace \ref{eq:iteration-scheme:1} by the word >LABEL? It's quite easy to do that with the dev version of pandoc, but with the version you're using you'd need to filter for a string with contents beginning "[eq:". Use pandoc -t native to see what the parsed document looks like, and that should help you write the filter. -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20170823141516.GA22331%40Johns-MacBook-Pro.local. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: 2017-08-23 14:15 ` John MacFarlane @ 2017-08-23 16:13 ` Uwe Brauer [not found] ` <8760dew9da.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-23 16:13 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw > +++ Uwe Brauer [Aug 23 17 12:22 ]: > It's quite easy to do that with the dev version of pandoc, > but with the version you're using you'd need to filter for > a string with contents beginning "[eq:". I wouldn't mind to download and compile the dev version of pandoc. But how am I supposed to do it with that version? ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <8760dew9da.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: [not found] ` <8760dew9da.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-23 20:54 ` John MACFARLANE 2017-08-24 16:26 ` Re: Uwe Brauer 0 siblings, 1 reply; 18+ messages in thread From: John MACFARLANE @ 2017-08-23 20:54 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw +++ Uwe Brauer [Aug 23 17 16:13 ]: >I wouldn't mind to download and compile the dev version of pandoc. >But how am I supposed to do it with that version? With dev pandoc, pandoc -t native -f latex \label{hi} [Para [Span ("hi",[],[("label","hi")]) [Str "[hi]"]]] So your filter could pattern match on a Span with label attribute: go (Math _ _) = Str "FORMULA" go (Span (_,_,[("label",_)]) _) = Str "LABEL" go x = x ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: 2017-08-23 20:54 ` Re: John MACFARLANE @ 2017-08-24 16:26 ` Uwe Brauer [not found] ` <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-24 16:26 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > +++ Uwe Brauer [Aug 23 17 16:13 ]: >> I wouldn't mind to download and compile the dev version of pandoc. >> But how am I supposed to do it with that version? > With dev pandoc, > pandoc -t native -f latex > \label{hi} > [Para [Span ("hi",[],[("label","hi")]) [Str "[hi]"]]] > So your filter could pattern match on a Span with > label attribute: > go (Math _ _) = Str "FORMULA" > go (Span (_,_,[("label",_)]) _) = Str "LABEL" > go x = x I just found out that I have a compiled version from march this year. ,---- | pandoc 1.19.2.1 | Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4 | Default user data directory: /home/oub/.pandoc | Copyright (C) 2006-2016 John MacFarlane | Web: http://pandoc.org | This is free software; see the source for copying conditions. | There is no warranty, not even for merchantability or fitness | for a particular purpose. `---- So I hoped this is recent enough. I now considered the following stripmath.hs file ,---- | import Text.Pandoc.JSON | | main = toJSONFilter stripmath | where stripmath (Math _ _) = Str "FORMULA" | stripmath x = x | go (Math _ _) = Str "FORMULA" | go (Span (_,_,[("label",_)]) _) = Str "LABEL" | go x = x `---- then I did ghc --make stripmath.hs And after compilation /home/oub/.local/bin/pandoc eulerpoisson.tex -t json | /home/oub/scripts/Strip2/stripmath | pandoc -f json -t plain -o euler-grammar.tex But I obtainedstripmath: Error in $: expected product (:*:), encountered Object pandoc: Error in $: not enough input Sorry for this elementary question. Uwe Brauer ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: [not found] ` <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-24 16:43 ` John MACFARLANE 2017-08-24 17:30 ` Re: Uwe Brauer 2017-08-24 16:44 ` Re: John MACFARLANE 1 sibling, 1 reply; 18+ messages in thread From: John MACFARLANE @ 2017-08-24 16:43 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw No, you need dev pandoc. +++ Uwe Brauer [Aug 24 17 16:26 ]: >>>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > > > +++ Uwe Brauer [Aug 23 17 16:13 ]: > >> I wouldn't mind to download and compile the dev version of pandoc. > >> But how am I supposed to do it with that version? > > > With dev pandoc, > > > pandoc -t native -f latex > > \label{hi} > > [Para [Span ("hi",[],[("label","hi")]) [Str "[hi]"]]] > > > So your filter could pattern match on a Span with > > label attribute: > > > go (Math _ _) = Str "FORMULA" > > go (Span (_,_,[("label",_)]) _) = Str "LABEL" > > go x = x > >I just found out that I have a compiled version from march this year. > >,---- >| pandoc 1.19.2.1 >| Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4 >| Default user data directory: /home/oub/.pandoc >| Copyright (C) 2006-2016 John MacFarlane >| Web: http://pandoc.org >| This is free software; see the source for copying conditions. >| There is no warranty, not even for merchantability or fitness >| for a particular purpose. >`---- > >So I hoped this is recent enough. >I now considered the following stripmath.hs file >,---- >| import Text.Pandoc.JSON >| >| main = toJSONFilter stripmath >| where stripmath (Math _ _) = Str "FORMULA" >| stripmath x = x >| go (Math _ _) = Str "FORMULA" >| go (Span (_,_,[("label",_)]) _) = Str "LABEL" >| go x = x >`---- >then I did >ghc --make stripmath.hs > >And after compilation > >/home/oub/.local/bin/pandoc eulerpoisson.tex -t json | /home/oub/scripts/Strip2/stripmath | pandoc -f json -t plain -o euler-grammar.tex > >But I obtainedstripmath: Error in $: expected product (:*:), encountered Object >pandoc: Error in $: not enough input > >Sorry for this elementary question. > >Uwe Brauer > >-- >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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87378h53vq.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: 2017-08-24 16:43 ` Re: John MACFARLANE @ 2017-08-24 17:30 ` Uwe Brauer [not found] ` <87y3q850vx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 0 siblings, 1 reply; 18+ messages in thread From: Uwe Brauer @ 2017-08-24 17:30 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw > No, you need dev pandoc. Following the INSTALL.md file I run stack setup stack install --test and got an error. Warning: File listed in pandoc.cabal file does not exist: data/odt/Configurations2/accelerator/current.xml pandoc-1.19.2.1: build (lib + exe + test) Package pandoc uses a custom Cabal build, but does not use a custom-setup stanza Not using the explicit setup deps approach based on configuration Strongly recommend fixing the package's cabal file Preprocessing library pandoc-1.19.2.1... Preprocessing executable 'pandoc' for pandoc-1.19.2.1... Preprocessing test suite 'test-pandoc' for pandoc-1.19.2.1... Warning: File listed in pandoc.cabal file does not exist: data/odt/Configurations2/accelerator/current.xml pandoc-1.19.2.1: copy/register Package pandoc uses a custom Cabal build, but does not use a custom-setup stanza Not using the explicit setup deps approach based on configuration Strongly recommend fixing the package's cabal file data/odt/Configurations2/accelerator/current.xml: copyFile: does not exist (No such file or directory) Progress: 0/2'cabal copy' failed. Error message: -- While building package pandoc-1.19.2.1 using: /home/oub/ALLES/src/pandoc-hg/.stack-work/dist/i386-linux/Cabal-1.24.0.0/setup/setup --builddir=.stack-work/dist/i386-linux/Cabal-1.24.0.0 copy Process exited with code: ExitFailure 1 Possible causes of this issue: * No module named "Main". The 'main-is' source file should usually have a header indicating that it's a 'Main' module. * The Setup.hs file is changing the installation target dir. ^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <87y3q850vx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>]
* Re: [not found] ` <87y3q850vx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> @ 2017-08-24 17:56 ` John MACFARLANE 0 siblings, 0 replies; 18+ messages in thread From: John MACFARLANE @ 2017-08-24 17:56 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Doesn't look like you're using the right source code (it says pandoc-1.19.2.1). Easiest approach would be to grab a binary from pandoc-nightly. For compiling the filters, it should suffice if you 'cabal install pandoc-types' first, then use ghc. +++ Uwe Brauer [Aug 24 17 17:30 ]: > > > No, you need dev pandoc. > >Following the INSTALL.md file >I run >stack setup >stack install --test >and got an error. > >Warning: File listed in pandoc.cabal file does not exist: data/odt/Configurations2/accelerator/current.xml >pandoc-1.19.2.1: build (lib + exe + test) >Package pandoc uses a custom Cabal build, but does not use a custom-setup stanza >Not using the explicit setup deps approach based on configuration >Strongly recommend fixing the package's cabal file >Preprocessing library pandoc-1.19.2.1... >Preprocessing executable 'pandoc' for pandoc-1.19.2.1... >Preprocessing test suite 'test-pandoc' for pandoc-1.19.2.1... >Warning: File listed in pandoc.cabal file does not exist: data/odt/Configurations2/accelerator/current.xml >pandoc-1.19.2.1: copy/register >Package pandoc uses a custom Cabal build, but does not use a custom-setup stanza >Not using the explicit setup deps approach based on configuration >Strongly recommend fixing the package's cabal file >data/odt/Configurations2/accelerator/current.xml: copyFile: does not exist (No >such file or directory) >Progress: 0/2'cabal copy' failed. Error message: > >-- While building package pandoc-1.19.2.1 using: > /home/oub/ALLES/src/pandoc-hg/.stack-work/dist/i386-linux/Cabal-1.24.0.0/setup/setup --builddir=.stack-work/dist/i386-linux/Cabal-1.24.0.0 copy > Process exited with code: ExitFailure 1 > >Possible causes of this issue: >* No module named "Main". The 'main-is' source file should usually have >a header indicating that it's a 'Main' module. >* The Setup.hs file is changing the installation target dir. > > > > >-- >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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87y3q850vx.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [not found] ` <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-24 16:43 ` Re: John MACFARLANE @ 2017-08-24 16:44 ` John MACFARLANE 2017-08-24 17:32 ` Re: Uwe Brauer 1 sibling, 1 reply; 18+ messages in thread From: John MACFARLANE @ 2017-08-24 16:44 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw And in addition, you must make sure that your filter is compiled against the same version of pandoc-types as the pandoc executable. +++ Uwe Brauer [Aug 24 17 16:26 ]: >>>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > > > +++ Uwe Brauer [Aug 23 17 16:13 ]: > >> I wouldn't mind to download and compile the dev version of pandoc. > >> But how am I supposed to do it with that version? > > > With dev pandoc, > > > pandoc -t native -f latex > > \label{hi} > > [Para [Span ("hi",[],[("label","hi")]) [Str "[hi]"]]] > > > So your filter could pattern match on a Span with > > label attribute: > > > go (Math _ _) = Str "FORMULA" > > go (Span (_,_,[("label",_)]) _) = Str "LABEL" > > go x = x > >I just found out that I have a compiled version from march this year. > >,---- >| pandoc 1.19.2.1 >| Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4 >| Default user data directory: /home/oub/.pandoc >| Copyright (C) 2006-2016 John MacFarlane >| Web: http://pandoc.org >| This is free software; see the source for copying conditions. >| There is no warranty, not even for merchantability or fitness >| for a particular purpose. >`---- > >So I hoped this is recent enough. >I now considered the following stripmath.hs file >,---- >| import Text.Pandoc.JSON >| >| main = toJSONFilter stripmath >| where stripmath (Math _ _) = Str "FORMULA" >| stripmath x = x >| go (Math _ _) = Str "FORMULA" >| go (Span (_,_,[("label",_)]) _) = Str "LABEL" >| go x = x >`---- >then I did >ghc --make stripmath.hs > >And after compilation > >/home/oub/.local/bin/pandoc eulerpoisson.tex -t json | /home/oub/scripts/Strip2/stripmath | pandoc -f json -t plain -o euler-grammar.tex > >But I obtainedstripmath: Error in $: expected product (:*:), encountered Object >pandoc: Error in $: not enough input > >Sorry for this elementary question. > >Uwe Brauer > >-- >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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87378h53vq.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: 2017-08-24 16:44 ` Re: John MACFARLANE @ 2017-08-24 17:32 ` Uwe Brauer 0 siblings, 0 replies; 18+ messages in thread From: Uwe Brauer @ 2017-08-24 17:32 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > And in addition, you must make sure that your > filter is compiled against the same version of > pandoc-types as the pandoc executable. How do I do that? The installation file INSTALL.md does not give hints or is it ### Building the whole pandoc ecosystem ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: (was: latex to html or plain text without any latex construct) [not found] ` <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-23 14:15 ` John MacFarlane @ 2017-08-23 14:15 ` John MacFarlane 2017-08-23 16:13 ` Uwe Brauer 1 sibling, 1 reply; 18+ messages in thread From: John MacFarlane @ 2017-08-23 14:15 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Or, you could use sed or perl to convert the \refs before processing with pandoc. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: 2017-08-23 14:15 ` (was: latex to html or plain text without any latex construct) John MacFarlane @ 2017-08-23 16:13 ` Uwe Brauer 0 siblings, 0 replies; 18+ messages in thread From: Uwe Brauer @ 2017-08-23 16:13 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw >>> "John" == John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes: > Or, you could use sed or perl to convert the \refs before > processing with pandoc. I think than I would prefer elisp and emacs. :-D ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2017-08-24 17:56 UTC | newest] Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-08-21 14:26 latex to html or plain text without any latex construct Uwe Brauer [not found] ` <87r2w5xaie.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-21 21:00 ` John MACFARLANE 2017-08-22 12:20 ` Uwe Brauer [not found] ` <871so3yet8.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-22 17:50 ` John MACFARLANE 2017-08-22 20:16 ` Uwe Brauer [not found] ` <878tibz7c2.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-23 0:09 ` John MacFarlane 2017-08-23 12:22 ` [SOLVED, almost] (was: latex to html or plain text without any latex construct) Uwe Brauer [not found] ` <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-23 14:15 ` John MacFarlane 2017-08-23 16:13 ` Uwe Brauer [not found] ` <8760dew9da.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-23 20:54 ` Re: John MACFARLANE 2017-08-24 16:26 ` Re: Uwe Brauer [not found] ` <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-24 16:43 ` Re: John MACFARLANE 2017-08-24 17:30 ` Re: Uwe Brauer [not found] ` <87y3q850vx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> 2017-08-24 17:56 ` Re: John MACFARLANE 2017-08-24 16:44 ` Re: John MACFARLANE 2017-08-24 17:32 ` Re: Uwe Brauer 2017-08-23 14:15 ` (was: latex to html or plain text without any latex construct) John MacFarlane 2017-08-23 16:13 ` Uwe Brauer
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).