public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* French quotation marks \og \fg support
@ 2021-04-08 18:56 Pierre Willaime
  2021-04-08 19:01 ` Joost Kremers
  2021-04-08 19:52 ` Albert Krewinkel
  0 siblings, 2 replies; 7+ messages in thread
From: Pierre Willaime @ 2021-04-08 18:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hello,

I have a bunch of LaTeX files using \og and \fg commands. These
commands are provided by babel package for French and produces French
quotation marks ("<<", ">>").

Pandoc skips these commands when converting from LaTeX to html (see
below). Is there a simple workaround?

Minimal working example:
test.tex
---
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\begin{document}
\og test \fg{}
\end{document}
---

$ pandoc test.tex --verbose -o test.html
[INFO] Could not load include file 'inputenc.sty' at line 2 column 28
[INFO] Could not load include file 'fontenc.sty' at line 3 column 25
[INFO] Could not load include file 'babel.sty' at line 4 column 27
[INFO] Skipped '\og ' at line 6 column 5
[INFO] Skipped '\og ' at line 6 column 5
[INFO] Skipped '\fg{}' at line 6 column 15


$ pandoc -v
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5


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

* Re: French quotation marks \og \fg support
  2021-04-08 18:56 French quotation marks \og \fg support Pierre Willaime
@ 2021-04-08 19:01 ` Joost Kremers
       [not found]   ` <87mtu8oako.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2021-04-08 19:52 ` Albert Krewinkel
  1 sibling, 1 reply; 7+ messages in thread
From: Joost Kremers @ 2021-04-08 19:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Thu, Apr 08 2021, Pierre Willaime wrote:
> Hello,
>
> I have a bunch of LaTeX files using \og and \fg commands. These
> commands are provided by babel package for French and produces French
> quotation marks ("<<", ">>").
>
> Pandoc skips these commands when converting from LaTeX to html (see
> below). Is there a simple workaround?
>
> Minimal working example:
> test.tex
> ---
> \documentclass{article}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[french]{babel}
> \begin{document}
> \og test \fg{}
> \end{document}
> ---
>
> $ pandoc test.tex --verbose -o test.html
> [INFO] Could not load include file 'inputenc.sty' at line 2 column 28
> [INFO] Could not load include file 'fontenc.sty' at line 3 column 25
> [INFO] Could not load include file 'babel.sty' at line 4 column 27
> [INFO] Skipped '\og ' at line 6 column 5
> [INFO] Skipped '\og ' at line 6 column 5
> [INFO] Skipped '\fg{}' at line 6 column 15

You are getting errors that the packages inputenc, fontenc and babel cannot be
loaded. You may need to check your LaTeX installation.

-- 
Joost Kremers
Life has its moments


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

* Re: French quotation marks \og \fg support
  2021-04-08 18:56 French quotation marks \og \fg support Pierre Willaime
  2021-04-08 19:01 ` Joost Kremers
@ 2021-04-08 19:52 ` Albert Krewinkel
       [not found]   ` <87pmz4d061.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2021-04-08 19:52 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Pierre Willaime <pierre.willaime-mHc8WM8rKNgDTEWcYJR2Ng@public.gmane.org> writes:

> Hello,
>
> I have a bunch of LaTeX files using \og and \fg commands. These
> commands are provided by babel package for French and produces French
> quotation marks ("<<", ">>").
>
> Pandoc skips these commands when converting from LaTeX to html (see
> below). Is there a simple workaround?

You could create a new file `quotes.tex` with the following content

    \def\og{« }
    \def\fg{»}

Then pass that file as an additional argument when calling pandoc (must
go *before* the actual LaTeX input):

    pandoc quotes.tex test.tex


> Minimal working example:
> test.tex
> ---
> \documentclass{article}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[french]{babel}
> \begin{document}
> \og test \fg{}
> \end{document}
> ---
>
> $ pandoc test.tex --verbose -o test.html
> [INFO] Could not load include file 'inputenc.sty' at line 2 column 28
> [INFO] Could not load include file 'fontenc.sty' at line 3 column 25
> [INFO] Could not load include file 'babel.sty' at line 4 column 27
> [INFO] Skipped '\og ' at line 6 column 5
> [INFO] Skipped '\og ' at line 6 column 5
> [INFO] Skipped '\fg{}' at line 6 column 15
>
>
> $ pandoc -v
> pandoc 2.9.2.1
> Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

-- 
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/87pmz4d061.fsf%40zeitkraut.de.


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

* Re: French quotation marks \og \fg support
       [not found]   ` <87mtu8oako.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2021-04-09  6:51     ` Pierre Willaime
  2021-04-09  6:56       ` Joost Kremers
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Willaime @ 2021-04-09  6:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 08/04/21 21:01, Joost Kremers wrote:
>
>On Thu, Apr 08 2021, Pierre Willaime wrote:
>> Hello,
>You are getting errors that the packages inputenc, fontenc and babel cannot be
>loaded. You may need to check your LaTeX installation.

My LaTeX installation works fine (it is Texlive on Debian). I can
compile without issue in commandline and with Emacs+Auctex.

Why I am getting these errors?


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

* Re: French quotation marks \og \fg support
  2021-04-09  6:51     ` Pierre Willaime
@ 2021-04-09  6:56       ` Joost Kremers
  0 siblings, 0 replies; 7+ messages in thread
From: Joost Kremers @ 2021-04-09  6:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Fri, Apr 09 2021, Pierre Willaime wrote:
> On 08/04/21 21:01, Joost Kremers wrote:
>>
>>On Thu, Apr 08 2021, Pierre Willaime wrote:
>>> Hello,
>>You are getting errors that the packages inputenc, fontenc and babel cannot be
>>loaded. You may need to check your LaTeX installation.
>
> My LaTeX installation works fine (it is Texlive on Debian). I can
> compile without issue in commandline and with Emacs+Auctex.

I'm sorry, I read your message too hastily. I now see you're converting *from*
LaTeX, not *to* LaTeX. That means your LaTeX installation isn't even relevant.

> Why I am getting these errors?

Apparently, the Pandoc LaTeX reader doesn't know where to find them, or how to
read them.  They are the cause, I assume, of the fact that \og and \fg aren't
converted, because one of those files is where they're defined.

Have you tried Albert Krewinkel's solution? It sounds like it could solve your
problem.

Alternatively, a search and replace in your source files may be a solution
(provided you can modify them). Pandoc supports Unicode, so it should be able to
deal with « » without problems.

-- 
Joost Kremers
Life has its moments

-- 
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/87eefk6ivs.fsf%40fastmail.fm.


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

* Re: French quotation marks \og \fg support
       [not found]   ` <87pmz4d061.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2021-04-09  9:03     ` Pierre Willaime
  2021-04-09 15:40     ` John MacFarlane
  1 sibling, 0 replies; 7+ messages in thread
From: Pierre Willaime @ 2021-04-09  9:03 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 08/04/21 21:52, Albert Krewinkel wrote:
>You could create a new file `quotes.tex` with the following content
>
>    \def\og{« }
>    \def\fg{»}
>
>Then pass that file as an additional argument when calling pandoc (must
>go *before* the actual LaTeX input):
>
>    pandoc quotes.tex test.tex

Thanks! job done.

-- 
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/20210409090333.ajh6mpqyjl4ituwo%40daneel.


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

* Re: French quotation marks \og \fg support
       [not found]   ` <87pmz4d061.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  2021-04-09  9:03     ` Pierre Willaime
@ 2021-04-09 15:40     ` John MacFarlane
  1 sibling, 0 replies; 7+ messages in thread
From: John MacFarlane @ 2021-04-09 15:40 UTC (permalink / raw)
  To: Albert Krewinkel, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


It might make sense to support these commands in the LaTeX
reader, so if you want to put an issue on the tracker asking for
that, go ahead.

Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:

> Pierre Willaime <pierre.willaime-mHc8WM8rKNgDTEWcYJR2Ng@public.gmane.org> writes:
>
>> Hello,
>>
>> I have a bunch of LaTeX files using \og and \fg commands. These
>> commands are provided by babel package for French and produces French
>> quotation marks ("<<", ">>").
>>
>> Pandoc skips these commands when converting from LaTeX to html (see
>> below). Is there a simple workaround?
>
> You could create a new file `quotes.tex` with the following content
>
>     \def\og{« }
>     \def\fg{»}
>
> Then pass that file as an additional argument when calling pandoc (must
> go *before* the actual LaTeX input):
>
>     pandoc quotes.tex test.tex
>
>
>> Minimal working example:
>> test.tex
>> ---
>> \documentclass{article}
>> \usepackage[utf8]{inputenc}
>> \usepackage[T1]{fontenc}
>> \usepackage[french]{babel}
>> \begin{document}
>> \og test \fg{}
>> \end{document}
>> ---
>>
>> $ pandoc test.tex --verbose -o test.html
>> [INFO] Could not load include file 'inputenc.sty' at line 2 column 28
>> [INFO] Could not load include file 'fontenc.sty' at line 3 column 25
>> [INFO] Could not load include file 'babel.sty' at line 4 column 27
>> [INFO] Skipped '\og ' at line 6 column 5
>> [INFO] Skipped '\og ' at line 6 column 5
>> [INFO] Skipped '\fg{}' at line 6 column 15
>>
>>
>> $ pandoc -v
>> pandoc 2.9.2.1
>> Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5
>
>
> -- 
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
>
> -- 
> 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/87pmz4d061.fsf%40zeitkraut.de.

-- 
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/m2im4vo49e.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

end of thread, other threads:[~2021-04-09 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 18:56 French quotation marks \og \fg support Pierre Willaime
2021-04-08 19:01 ` Joost Kremers
     [not found]   ` <87mtu8oako.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2021-04-09  6:51     ` Pierre Willaime
2021-04-09  6:56       ` Joost Kremers
2021-04-08 19:52 ` Albert Krewinkel
     [not found]   ` <87pmz4d061.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-04-09  9:03     ` Pierre Willaime
2021-04-09 15:40     ` John MacFarlane

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