From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27306 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pranesh Prakash Newsgroups: gmane.text.pandoc Subject: Re: PDF - How center image on title page Date: Thu, 24 Dec 2020 11:35:19 -0800 (PST) Message-ID: References: <775d0e0f-927c-4dc4-aed0-dfc930f47b50n@googlegroups.com> <5d9f1292-2e7c-4555-8ddc-cfb2d114fc78@www.fastmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_10536_1412166087.1608838519649" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4606"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDA2Z3PTWYIBB6G2SP7QKGQENEE6AJQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Dec 24 20:35:26 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ksWOS-00012v-9F for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 24 Dec 2020 20:35:24 +0100 Original-Received: by mail-ot1-f61.google.com with SMTP id y14sf1405383oto.21 for ; Thu, 24 Dec 2020 11:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=6k4sPMROGuMpRPCLQjYhKuJClRS4WsPkxTsbpfKBcCg=; b=QoIpCcw3DtuSs9UxAfOWjYBRVLG1sutCY7DNOU+xqMSI3/eL4GTyfnb+9WuzV4G/Ag bYl+r9iyZShqEafYC7TdChLbtAax+AO6voStGa1U32BTbernDnS2CrTqTyJjOyUWxAEh uLSGu9ABh2Bbawj1DjJjy+LFRXWPkWaAJ34w5MugR0901sl7bTcS/FVGeJGE2W68a1tD lXwSxLgY6jmcdpgpzUEIbTsAFVDtXTNWLaCWKAb6emfo4ETpUbJ+rPZ6ckZE9vVYrqqo hwQ4NxTvHgkoPVtxlWEYcdobOLVu6r8P0N7zXpxAKW5HdMOxY/jMg8PfObZX+cDoB2O9 FWVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=6k4sPMROGuMpRPCLQjYhKuJClRS4WsPkxTsbpfKBcCg=; b=m1rdMa5kPcy+5aTe20ZKUnyiE7L/CZ7vxSAc3x5pZVJyFimX/P6+uFmR8AHiO3MfwU 8wKrvcQo4YXm5i5PlulK9lbSDo4E1CsB+t8Oyg8dgfUfPQcq4Z3Upy9v7AdW/cFL6vfq 9dU3qy2MkOjqsvUriYyzsGuypTwsEVX4Xp9l6WiUKGepqa/SupuERPFFZdFuyHTfwOG/ eKrjLNI0f2/TUX9q/6HTwZpsoXbFD0iQXeGz1Et8l4e/evnDC8jG9WV5AAFCwlmYZ02i VUEcQnV9S+/JhQDCOnrwsg9SiUzgGF+Ip9IxJtqtjIGpkiCAPn+CcSo0FU4DOpLybtRY MMYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=6k4sPMROGuMpRPCLQjYhKuJClRS4WsPkxTsbpfKBcCg=; b=Mwn9M7AmVAzkYOLaE1bsYAUf8UUXiZl4tdKh/k46UT33FiIMmh8nsPFlp5RoOliGyH wyEt0Ceaw0Xpho0zgovItenMh2LTQzkSa7z6bTjrbPhQSDgSqI+n0GVLimIWOS/T2oS2 dZDCescEfWjS8atf+TcO4+VJZbjb4OKYSOA3NPAnEbGKKdlt4X36HsE1l4y3M/bOr+tD hiNWUq6JXrm9Gn0X2f+Ph3tmSecBWa5bBWrjGXzUkM4ZmGpwbsgUTHD7XaCNsBhVPbGu Bqb9XS9BHuoy81bak52xScd4IEy47Bo5Fr0SNmqDZ8BFp8TB98vYayxxFdlnX8W39k2o sWIQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532FyH6Y7LcdUcIzdmjnfb4qQwYOKcIYyfQ0mo8bDPG8qsx+BqdV 44LFIbWOa9xPCrcWIBpFgv4= X-Google-Smtp-Source: ABdhPJykrXOWGkSHsbN9ucplcGVjtu51tvIRqJYBqu9iqE2W9A6NWIV5ylI1rOjaqCHIv2np3zn4Gg== X-Received: by 2002:a9d:70d9:: with SMTP id w25mr23381612otj.0.1608838523359; Thu, 24 Dec 2020 11:35:23 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:12f5:: with SMTP id g108ls11714208otg.2.gmail; Thu, 24 Dec 2020 11:35:20 -0800 (PST) X-Received: by 2002:a05:6830:1581:: with SMTP id i1mr23970500otr.35.1608838520318; Thu, 24 Dec 2020 11:35:20 -0800 (PST) In-Reply-To: X-Original-Sender: the.solipsist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:27306 Archived-At: ------=_Part_10536_1412166087.1608838519649 Content-Type: multipart/alternative; boundary="----=_Part_10537_1877425256.1608838519649" ------=_Part_10537_1877425256.1608838519649 Content-Type: text/plain; charset="UTF-8" I'm not a LaTeX expert, but I recently used this excerpted bit in a metadata file, and it worked for me. Your mileage may vary. ``` header-includes: | \usepackage{graphicx} \usepackage{titling} \pretitle{\begin{center} \includegraphics[height=1.25in]{source/full-logo.png}\Huge\vskip 5em} \posttitle{\vfill \color{NavyBlue} \LARGE Long Title of Project \par \large PROJECT \par \normalsize Project Agreement No: XXXX \par \end{center}} ``` On Friday, 25 December, 2020 at 12:05:33 am UTC+5:30 gnpan wrote: > Hmm, I don't use Makefile so can't be sure what goes wrong - I put all the > fontsize, mainfont, geometry, papersize, etc. in the YAML. Try something > simple first: > Create a test.md file with the following content (or use the attachment): > --- > date: 24 December 2020 > header-includes: > - \usepackage{wallpaper} > - \addtolength{\wpYoffset}{12cm} > - \ThisCenterWallPaper{1}{WGLogo.png} > --- > > # Your title > > Your text. > > Then run this command: > pandoc --pdf-engine xelatex -o test.pdf test.md > > That should work and you can take it on from there. > On Thursday, 24 December 2020 at 19:54:28 UTC+2 LRP wrote: > >> Oops. I forgot to delete two lines in my YAML file. >> >> error message now reads: >> >> Error producing PDF. >> ! LaTeX Error: Can be used only in preamble. >> >> See the LaTeX manual or LaTeX Companion for explanation. >> Type H for immediate help. >> ... >> >> l.65 \usepackage >> >> Here's YAML file: >> >> --- >> ... >> date: December 23, 2020 >> header-includes: >> - \usepackage{wallpaper} >> - \ThisCenterWallPaper{1}{WGLogo.png} >> -- >> >> Here's -how I call pandoc in Makefile: >> pandoc \ >> --top-level-division=chapter \ >> --variable mainfont="DejaVu Sans" \ >> --variable monofont="DejaVu Sans Mono" \ >> --variable fontsize=11pt \ >> --variable geometry:"top=1in, bottom=2in, left=1in, >> right=1in" \ >> --variable geometry:a4paper \ >> --table-of-contents \ >> --number-sections \ >> -f markdown $< \ >> --pdf-engine=pdflatex \ >> -o $@ >> >> Thanks again, >> >> LRP >> >> >> >> >> >> On Thu, Dec 24, 2020, at 12:33 PM, Lloyd R. prentice wrote: >> >> Thanks. But I get this feedback: >> >> [WARNING] Could not fetch resource 'WritersglenLogo_Color.png': replacing >> image with description >> [WARNING] Could not fetch resource 'WritersglenLogo_Color.png': replacing >> image with description >> Error producing PDF. >> ! Package pdftex.def Error: File >> `WritersglenLogo\T1\textunderscoreColor.png' n >> ot found: using draft setting. >> >> See the pdftex.def package documentation for explanation. >> Type H for immediate help. >> >> Here's m YAML declaration: >> --- >> ... >> date: December 23, 2020 >> header-includes: >> - \usepackage{wallpaper} >> - \ThisCenterWallPaper{1}{WGLogo.png} >> --- >> >> And here's my source directory: >> >> -rw-r--r-- 1 lloyd lloyd 25516 Aug 1 00:31 WGLogo.png >> -rw-r--r-- 1 lloyd lloyd 871 Dec 24 12:23 Writersglen.md >> >> LRP >> >> On Thu, Dec 24, 2020, at 9:43 AM, gnpan wrote: >> >> You could use the wallpaper package ( >> https://ftp.cc.uoc.gr/mirrors/CTAN/macros/latex/contrib/wallpaper/wallpapermanual.pdf >> ). >> Put the following in your YAML block: >> header-includes: >> - \usepackage{wallpaper} >> - \addtolength{\wpYoffset}{12cm} >> - \ThisCenterWallPaper{1}{logo.png} >> >> Change logo.png to whatever you logo is called (make sure it's in the >> same folder as your txt file) and adjust the Y offset to a value that gets >> the logo in the required position. You can also change the scale factor >> {1}. >> On Wednesday, 23 December 2020 at 23:38:58 UTC+2 LRP wrote: >> >> I'd like to center a logo before the title on my PDF title page. >> >> I found a recipe on the web using \usepackage{titling} in the metadata, >> but it failed. Can some kind soul show me how? >> >> Many thanks, >> >> LRP >> >> >> -- >> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/775d0e0f-927c-4dc4-aed0-dfc930f47b50n%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/5d9f1292-2e7c-4555-8ddc-cfb2d114fc78%40www.fastmail.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/c53afc45-5ef0-44c9-841d-7c46fea07316n%40googlegroups.com. ------=_Part_10537_1877425256.1608838519649 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm not a LaTeX expert, but I recently used this excerpted bit in a metadat= a file, and it worked for me.  Your mileage may vary.

```
header-includes: |
  \usepa= ckage{graphicx}
  \usepackage{titling}
  \pre= title{\begin{center}
    \includegraphics[height=3D1.25= in]{source/full-logo.png}\Huge\vskip 5em}
  \posttitle{= \vfill \color{NavyBlue} \LARGE Long Title of Project
   = ;          \par \large PROJECT \par \normalsize Pr= oject Agreement No: XXXX \par \end{center}}
```
=

On Friday, 25 December, 2020 at 12:05:33 am UTC+5:30 gnpan wrote:=
Hmm, I don&#= 39;t use Makefile so can't be sure what goes wrong - I put all the font= size, mainfont, geometry, papersize, etc. in the YAML. Try something simple= first:
Create a test.md file with the following content (or use the at= tachment):
---
date: 24 December 2020
he= ader-includes:=C2=A0
=C2=A0 - \usepackage{wallpaper}
= =C2=A0 - \addtolength{\wpYoffset}{12cm}=C2=A0
=C2=A0 - \ThisCente= rWallPaper{1}{WGLogo.png}
---

# Your tit= le

Your text.=C2=A0

Then run t= his command:
pandoc --pdf-engine xelatex -o test.pdf test.md
<= /div>

That should work and you can take it on from there= .=C2=A0
On Thursday, 24 December 2020 at 19:54:28 UTC+2 LRP wrote:
Oops. I forgot to= delete two lines in my YAML=C2=A0 file.

error= message now reads:

Error producing PDF.
! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
<= /div>
Type=C2=A0 H <return>=C2=A0 for immediate help.
...=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0
l.65 \usepackage

Here's = YAML file:

---
...
date: December 23, 2020
header-includes:
=C2=A0=C2=A0 - \usepackage{wallpaper}
=C2=A0=C2=A0 - \T= hisCenterWallPaper{1}{WGLogo.png}
--

=
Here's -how I call pandoc in Makefile:
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pandoc \
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= --top-level-division=3Dchapter=C2=A0 \
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --var= iable mainfont=3D"DejaVu Sans" \
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --= variable monofont=3D"DejaVu Sans Mono" \
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 --variable fontsize=3D11pt \
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --variab= le geometry:"top=3D1in, bottom=3D2in, left=3D1in, right=3D1in" \<= br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --variable geometry:a4paper \
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 --table-of-contents \
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --num= ber-sections \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -f markdown=C2=A0 $< \
=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 --pdf-engine=3Dpdflatex \
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 -o $@

Thanks again,
<= div>

LRP




On Thu, Dec 24, 2020, at 12:33 PM= , Lloyd R. prentice wrote:
Thanks. But I get this feedback:

[WARNING] = Could not fetch resource 'WritersglenLogo_Color.png': replacing ima= ge with description
[WARNING] Could not fetch resource 'W= ritersglenLogo_Color.png': replacing image with description
Error producing PDF.
! Package pdftex.def Error: File `Wri= tersglenLogo\T1\textunderscoreColor.png' n
ot found: usin= g draft setting.

See the pdftex.def package do= cumentation for explanation.
Type=C2=A0 H <return>=C2= =A0 for immediate help.

Here's m YAML decl= aration:
---
...
date: December 2= 3, 2020
header-includes:
=C2=A0=C2=A0 - \usepac= kage{wallpaper}
=C2=A0=C2=A0 - \ThisCenterWallPaper{1}{WGLogo= .png}
---

And here's my sour= ce directory:

-rw-r--r-- 1 lloyd lloyd 25516 A= ug=C2=A0 1 00:31 WGLogo.png
-rw-r--r-- 1 lloyd lloyd=C2=A0=C2= =A0 871 Dec 24 12:23 Writersglen.md

LRP

On Thu, Dec 24, 2020, at 9:43 AM, gnpan wrote:
Put the following in your YAML block= :
header-includes:=C2=A0
=C2=A0 - \usepack= age{wallpaper}
=C2=A0 - \addtolength{\wpYoffset}{12cm}=C2=A0<= br>
=C2=A0 - \ThisCenterWallPaper{1}{logo.png}

=
Change logo.png to whatever you logo is called (make sure it'= ;s in the same folder as your txt file) and adjust the Y offset to a value = that gets the logo in the required position. You can also change the scale = factor {1}.=C2=A0
On Wednesday,= 23 December 2020 at 23:38:58 UTC+2 LRP wrote:
I'd like to center a logo before the title on= my PDF title page.

I found a recipe on the we= b using \usepackage{titling} in the metadata, but it failed. Can some kind = soul show me how?

Many thanks,
<= br>
LRP


--
=
You received this message because you are subscribed to the Google Gro= ups "pandoc-discuss" group.
To unsubscribe from thi= s group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

<= /div>


--
You received this message because y= ou 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<= /a>.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/c53afc45-5ef0-44c9-841d-7c46fea07316n%40googlegroups.= com.
------=_Part_10537_1877425256.1608838519649-- ------=_Part_10536_1412166087.1608838519649--