public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Trying to get "institute" working with "header-includes" but no luck
@ 2019-10-13 12:54 Matias
       [not found] ` <9a692e0f-1ea1-4f12-9688-5d917ffe59ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Matias @ 2019-10-13 12:54 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi all,

I am writing a scientific paper with pandoc, with pdf output. I need to add 
the institute...

So, I added this to the yaml part of my .md source file:

```yaml
---
title: the title ok
author:
  - author1 ok
  - author2 ok
date: 2019-09-24
abstract: |
    the abstract ok
header-includes: |
    \providecommand{\institute}[1]{
    \postauthor{\end{tabular}\[0.5cm]\textit{#1}\end{center}}
    }
---
```

(I found this trick looking at some github issues, related to the same 
problem I have)

Unfortunately, with `header-includes` I have the following error:

    Error producing PDF.
    ! LaTeX Error: Missing \begin{document}.

If I remove the `header-includes` section it works fine - but I have no 
institute :(

What should I do ?

I am completely ignorant of Latex/Tex or whatever (sorry). This is why I am 
using Pandoc.

Any help would be appreciated.

-- 
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/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com.

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

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

* Re: Trying to get "institute" working with "header-includes" but no luck
       [not found] ` <9a692e0f-1ea1-4f12-9688-5d917ffe59ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-13 13:30   ` Dimitri KOPRIWA
       [not found]     ` <CA+QA1PaNBNhWhcA20u+rPjN7FawQzcsdBjeifwd2zbeaoTV+3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Dimitri KOPRIWA @ 2019-10-13 13:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

You should try to remove the content of within include headers, and find
the line that cause the issue. Then fix it.

Le dim. 13 oct. 2019 à 14:54, Matias <matias.guijarro-GANU6spQydw@public.gmane.org> a écrit :

> Hi all,
>
> I am writing a scientific paper with pandoc, with pdf output. I need to
> add the institute...
>
> So, I added this to the yaml part of my .md source file:
>
> ```yaml
> ---
> title: the title ok
> author:
>   - author1 ok
>   - author2 ok
> date: 2019-09-24
> abstract: |
>     the abstract ok
> header-includes: |
>     \providecommand{\institute}[1]{
>     \postauthor{\end{tabular}\[0.5cm]\textit{#1}\end{center}}
>     }
> ---
> ```
>
> (I found this trick looking at some github issues, related to the same
> problem I have)
>
> Unfortunately, with `header-includes` I have the following error:
>
>     Error producing PDF.
>     ! LaTeX Error: Missing \begin{document}.
>
> If I remove the `header-includes` section it works fine - but I have no
> institute :(
>
> What should I do ?
>
> I am completely ignorant of Latex/Tex or whatever (sorry). This is why I
> am using Pandoc.
>
> Any help would be appreciated.
>
> --
> 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/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2BQA1PaNBNhWhcA20u%2BrPjN7FawQzcsdBjeifwd2zbeaoTV%2B3g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3097 bytes --]

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

* Re: Trying to get "institute" working with "header-includes" but no luck
       [not found]     ` <CA+QA1PaNBNhWhcA20u+rPjN7FawQzcsdBjeifwd2zbeaoTV+3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-13 17:18       ` Matias
       [not found]         ` <aacabb91-8c20-46e0-82b5-76200faa7e6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Matias @ 2019-10-13 17:18 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks Dimitri. But my header-includes only has what I posted, it does not 
seem I can remove something.

Why is "institute" ignored ?

All scientific papers need author's affiliation.

I am trying to have the institute properly written after authors list.


On Sunday, October 13, 2019 at 3:31:16 PM UTC+2, Dimitri KOPRIWA wrote:
>
> You should try to remove the content of within include headers, and find 
> the line that cause the issue. Then fix it.
>
> Le dim. 13 oct. 2019 à 14:54, Matias <matias....-GANU6spQydw@public.gmane.org <javascript:>> a 
> écrit :
>
>> Hi all,
>>
>> I am writing a scientific paper with pandoc, with pdf output. I need to 
>> add the institute...
>>
>> So, I added this to the yaml part of my .md source file:
>>
>> ```yaml
>> ---
>> title: the title ok
>> author:
>>   - author1 ok
>>   - author2 ok
>> date: 2019-09-24
>> abstract: |
>>     the abstract ok
>> header-includes: |
>>     \providecommand{\institute}[1]{
>>     \postauthor{\end{tabular}\[0.5cm]\textit{#1}\end{center}}
>>     }
>> ---
>> ```
>>
>> (I found this trick looking at some github issues, related to the same 
>> problem I have)
>>
>> Unfortunately, with `header-includes` I have the following error:
>>
>>     Error producing PDF.
>>     ! LaTeX Error: Missing \begin{document}.
>>
>> If I remove the `header-includes` section it works fine - but I have no 
>> institute :(
>>
>> What should I do ?
>>
>> I am completely ignorant of Latex/Tex or whatever (sorry). This is why I 
>> am using Pandoc.
>>
>> Any help would be appreciated.
>>
>> -- 
>> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/aacabb91-8c20-46e0-82b5-76200faa7e6a%40googlegroups.com.

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

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

* Re: Trying to get "institute" working with "header-includes" but no luck
       [not found]         ` <aacabb91-8c20-46e0-82b5-76200faa7e6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-13 17:24           ` Dimitri KOPRIWA
  2019-10-13 17:43           ` John MacFarlane
  1 sibling, 0 replies; 5+ messages in thread
From: Dimitri KOPRIWA @ 2019-10-13 17:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]

I am not an expert in latex to know but I have been through this issue many
times while trying to includes headers given by tex people with the
instruction "it work", and I have faced situation where i had to remove
things, or prevent them from being added twice depending of the templates
you use. A nice command to know what is happening is pandoc -D latex to
display default template.

I believe the document class you are using is not compatible with those
headers, or the header as been injected twice, something like this. Try to
remove from the document until you only have that breaking line, then
compare with the template and your working sample (I hope someone gave you
one.) Good luck

Le dim. 13 oct. 2019 à 19:18, Matias <matias.guijarro-GANU6spQydw@public.gmane.org> a écrit :

> Thanks Dimitri. But my header-includes only has what I posted, it does not
> seem I can remove something.
>
> Why is "institute" ignored ?
>
> All scientific papers need author's affiliation.
>
> I am trying to have the institute properly written after authors list.
>
>
> On Sunday, October 13, 2019 at 3:31:16 PM UTC+2, Dimitri KOPRIWA wrote:
>>
>> You should try to remove the content of within include headers, and find
>> the line that cause the issue. Then fix it.
>>
>> Le dim. 13 oct. 2019 à 14:54, Matias <matias....-GANU6spQydw@public.gmane.org> a écrit :
>>
>>> Hi all,
>>>
>>> I am writing a scientific paper with pandoc, with pdf output. I need to
>>> add the institute...
>>>
>>> So, I added this to the yaml part of my .md source file:
>>>
>>> ```yaml
>>> ---
>>> title: the title ok
>>> author:
>>>   - author1 ok
>>>   - author2 ok
>>> date: 2019-09-24
>>> abstract: |
>>>     the abstract ok
>>> header-includes: |
>>>     \providecommand{\institute}[1]{
>>>     \postauthor{\end{tabular}\[0.5cm]\textit{#1}\end{center}}
>>>     }
>>> ---
>>> ```
>>>
>>> (I found this trick looking at some github issues, related to the same
>>> problem I have)
>>>
>>> Unfortunately, with `header-includes` I have the following error:
>>>
>>>     Error producing PDF.
>>>     ! LaTeX Error: Missing \begin{document}.
>>>
>>> If I remove the `header-includes` section it works fine - but I have no
>>> institute :(
>>>
>>> What should I do ?
>>>
>>> I am completely ignorant of Latex/Tex or whatever (sorry). This is why I
>>> am using Pandoc.
>>>
>>> Any help would be appreciated.
>>>
>>> --
>>> 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-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/aacabb91-8c20-46e0-82b5-76200faa7e6a%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/aacabb91-8c20-46e0-82b5-76200faa7e6a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2BQA1PZMwVD%2BOtq3BQVP1e3FphiB89joqr61Au%3DJzFjqiCT-9g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5446 bytes --]

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

* Re: Trying to get "institute" working with "header-includes" but no luck
       [not found]         ` <aacabb91-8c20-46e0-82b5-76200faa7e6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2019-10-13 17:24           ` Dimitri KOPRIWA
@ 2019-10-13 17:43           ` John MacFarlane
  1 sibling, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2019-10-13 17:43 UTC (permalink / raw)
  To: Matias, pandoc-discuss


A couple issues here:

- 'institute' is in the default latex template, but only under
$if(beamer)$... because the beamer documentclass defines it, but
not the standard LaTeX documentclasses.

- In your header-includes you're using commands defined by
the titling package, which isn't loaded in the default template.

Bottom line: standard latex article class doesn't provide special
support for institute.  One common approach is to use the 'date'
field for the institute (just put 'date: My Uni' in your YAML
metadata).

If you don't want that, then you'll need to create an external
package.  Here's one approach using authblk:

---
title: the title ok
# don't put author, title, in metadata because they'll be
# specified in raw latex below
abstract: |
    the abstract ok
header-includes: |
  ```{=latex}
  \usepackage{authblk}
  \title{This is some thing}
  \author[1]{Don Joe}
  \author[2]{Smith K.}
  \author[1]{Wanderer}
  \author[1]{Static}
  \affil[1]{TeX.SX}
  \affil[2]{Both on a bus}
  \setcounter{Maxaffil}{0}
  \renewcommand\Affilfont{\itshape\small}
  ```
---

ok


Matias <matias.guijarro-GANU6spQydw@public.gmane.org> writes:

> Thanks Dimitri. But my header-includes only has what I posted, it does not 
> seem I can remove something.
>
> Why is "institute" ignored ?
>
> All scientific papers need author's affiliation.
>
> I am trying to have the institute properly written after authors list.
>
>
> On Sunday, October 13, 2019 at 3:31:16 PM UTC+2, Dimitri KOPRIWA wrote:
>>
>> You should try to remove the content of within include headers, and find 
>> the line that cause the issue. Then fix it.
>>
>> Le dim. 13 oct. 2019 à 14:54, Matias <matias....-GANU6spQydw@public.gmane.org <javascript:>> a 
>> écrit :
>>
>>> Hi all,
>>>
>>> I am writing a scientific paper with pandoc, with pdf output. I need to 
>>> add the institute...
>>>
>>> So, I added this to the yaml part of my .md source file:
>>>
>>> ```yaml
>>> ---
>>> title: the title ok
>>> author:
>>>   - author1 ok
>>>   - author2 ok
>>> date: 2019-09-24
>>> abstract: |
>>>     the abstract ok
>>> header-includes: |
>>>     \providecommand{\institute}[1]{
>>>     \postauthor{\end{tabular}\[0.5cm]\textit{#1}\end{center}}
>>>     }
>>> ---
>>> ```
>>>
>>> (I found this trick looking at some github issues, related to the same 
>>> problem I have)
>>>
>>> Unfortunately, with `header-includes` I have the following error:
>>>
>>>     Error producing PDF.
>>>     ! LaTeX Error: Missing \begin{document}.
>>>
>>> If I remove the `header-includes` section it works fine - but I have no 
>>> institute :(
>>>
>>> What should I do ?
>>>
>>> I am completely ignorant of Latex/Tex or whatever (sorry). This is why I 
>>> am using Pandoc.
>>>
>>> Any help would be appreciated.
>>>
>>> -- 
>>> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com 
>>> <https://groups.google.com/d/msgid/pandoc-discuss/9a692e0f-1ea1-4f12-9688-5d917ffe59ff%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>
> -- 
> 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/aacabb91-8c20-46e0-82b5-76200faa7e6a%40googlegroups.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/m2y2xowngt.fsf%40johnmacfarlane.net.


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

end of thread, other threads:[~2019-10-13 17:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-13 12:54 Trying to get "institute" working with "header-includes" but no luck Matias
     [not found] ` <9a692e0f-1ea1-4f12-9688-5d917ffe59ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-13 13:30   ` Dimitri KOPRIWA
     [not found]     ` <CA+QA1PaNBNhWhcA20u+rPjN7FawQzcsdBjeifwd2zbeaoTV+3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-13 17:18       ` Matias
     [not found]         ` <aacabb91-8c20-46e0-82b5-76200faa7e6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-13 17:24           ` Dimitri KOPRIWA
2019-10-13 17:43           ` 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).