From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27305 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: gnpan Newsgroups: gmane.text.pandoc Subject: Re: PDF - How center image on title page Date: Thu, 24 Dec 2020 10:35:33 -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_6442_1170930041.1608834933534" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33977"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCMK7GUUXYBRB5V6SP7QKGQEGETGRRQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Dec 24 19:35:38 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f57.google.com ([209.85.210.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ksVSb-0008iD-T0 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 24 Dec 2020 19:35:38 +0100 Original-Received: by mail-ot1-f57.google.com with SMTP id v15sf1349914otp.10 for ; Thu, 24 Dec 2020 10:35:37 -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=Ii46cI79fr7p8bs8OX7444xzxb2oCgKQECtPIBTmojQ=; b=CNM1cpdOWP+DK3ryW/3iOdpfxv9fSTLyxO7yGs0C4Rjb0c2sdLiFLAFAvGTSRJE5EU rjNEPgRuNFNTsI9cV5++VRWvk/fWARyDo/BOfbk5/7VNlchU/LhCZBiNj4so96L2NSlk Sdfl4CkBGr0heZHRc+omCQXa9GKV+v827f0QhVNifbol3wM+r4ugCEc9fwfcych+Y77u AUfx83EFf3lJxRxJi1xN9sHVoVEuKrs6sm3tGIJW1MfngCw+BykS1Tu5FAR1LHaZowqI 6gtq6IVenkKK8ENdRF0SysMzkKtrDHrco89RF5AZj1+cXCvWsFRQGGHSIE6NkgB3Hc/e tSlg== 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=Ii46cI79fr7p8bs8OX7444xzxb2oCgKQECtPIBTmojQ=; b=RKgydZs1E7IyevyG10kod6yrsoLgKqpV2znBWf50iPCZkwP/Adm6DQoJKDWqGrmwKM KDEcN4Cgw+HBNSxlAK1XY6eF1fHPS+dP4vSuXfEg5Ple2CRj+ZAUffIplTIybk37PRQi q0i3mAW14QiO0E6ECnjyvgxxHG/4+jL5mSxYcRcpL9HKSv8oN5tTm4Qr9nz4ycvK6CFV ImbVqy6ARhv03GvoGUr/wzOxTMX623ZtEfSQUSJI225XiYhzD6hCQfn186MzIOi6+N7x jTnOw9bp0PXYPPe978Gv+5AXlqnGeKH1LrGiPODkU9k58IILCr5SDu8AoHJ+ywnZjfsv Jqvw== 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=Ii46cI79fr7p8bs8OX7444xzxb2oCgKQECtPIBTmojQ=; b=OHDyyQQ9+HLhGGH+Rc5oD57juNMztkN8bb9YF45cbuTc/SU/Fs6sWBuzdv3CvqLd7k S70HAS0YrcAUWlSZXT+xODsjukjBr1/wKi4owxlle8dkZLVjznvZIq8Yso3ho0KSY2YK +NH+Vu8FdtsfSTsXsugRpJZcartHA5NYraOiGl17/IOmscdmYP21NV4GZKiQY+ek77OL /M4I1vWIIkmPzZZo2gXF+uqbjVXpDancgvdy6JVI+SknPmdyvrkEXu4NFLPPaVikS81d bax0AXWAfHC3R2/fYopNmnBdN81nKNHrp0CvgYOUUiZlnVAj6qaqH1kV6ky/C+jwOuX/ 3YnA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531QUtRvDCmbBhII17mmxrDY/ok406wYl4XU66m8Tn/6fgh+B3V0 aG/y2BtYnwCmt2LNk8tO3MI= X-Google-Smtp-Source: ABdhPJxY57Eqyf7pWR+4/3iNXVC0kTVfpG+v+5q7cjB59DgyOyrYxedBlgY9eVd5n2+t8uCXDo6Uvw== X-Received: by 2002:aca:3194:: with SMTP id x142mr3649546oix.82.1608834936864; Thu, 24 Dec 2020 10:35:36 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:18f1:: with SMTP id d17ls9221512otf.6.gmail; Thu, 24 Dec 2020 10:35:34 -0800 (PST) X-Received: by 2002:a9d:64da:: with SMTP id n26mr24439611otl.283.1608834934283; Thu, 24 Dec 2020 10:35:34 -0800 (PST) In-Reply-To: X-Original-Sender: g.panayotou-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:27305 Archived-At: ------=_Part_6442_1170930041.1608834933534 Content-Type: multipart/alternative; boundary="----=_Part_6443_1257495388.1608834933534" ------=_Part_6443_1257495388.1608834933534 Content-Type: text/plain; charset="UTF-8" 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/fd6f740f-0316-4199-a407-0b088a225629n%40googlegroups.com. ------=_Part_6443_1257495388.1608834933534 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 si= mple first:
Create a test.md file with the following content (or use th= e attachment):
---
date: 24 December 2020
header-includes: 
  - \usepackage{wallpaper}
  - \addtolength{\wpYoffset}{12cm} 
  - \ThisCen= terWallPaper{1}{WGLogo.png}
---

# Your t= itle

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 the= re. 
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.
<= div>
See the LaTeX manual or LaTeX Companion for explanation.=
Type=C2=A0 H <return>=C2=A0 for immediate h= elp.
...=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

He= re's YAML file:

---
...
date: December 23, 2020
header-includes:=
=C2=A0=C2=A0 - \usepackage{wallpaper}
=C2=A0= =C2=A0 - \ThisCenterWallPaper{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 --variable 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= --variable geometry:"top=3D1in, bottom=3D2in, left=3D1in, right=3D1in= " \
=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 --number-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 $&= lt; \
=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,

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': repl= acing image with description
[WARNING] Could not fetch resour= ce 'WritersglenLogo_Color.png': replacing image with description
Error producing PDF.
! Package pdftex.def Error: = File `WritersglenLogo\T1\textunderscoreColor.png' n
ot fo= und: using draft setting.

See the pdftex.def p= ackage documentation for explanation.
Type=C2=A0 H <return= >=C2=A0 for immediate help.

Here's m YA= ML declaration:
---
...
date: Dec= ember 23, 2020
header-includes:
=C2=A0=C2=A0 - = \usepackage{wallpaper}
=C2=A0=C2=A0 - \ThisCenterWallPaper{1}= {WGLogo.png}
---

And here's = my source directory:

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

L= RP

On Thu, Dec 24, 2020, at 9:43 AM, gnpan wro= te:
Put the following in your Y= AML block:
header-includes:=C2=A0
=C2=A0 -= \usepackage{wallpaper}
=C2=A0 - \addtolength{\wpYoffset}{12c= m}=C2=A0
=C2=A0 - \ThisCenterWallPaper{1}{logo.png}
=

Change logo.png to whatever you logo is called (make su= re 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 t= he scale factor {1}.=C2=A0
On W= ednesday, 23 December 2020 at 23:38:58 UTC+2 LRP wrote:
I'd like to center a logo before the t= itle on my PDF title page.

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

Many thanks,

LRP


--
You received this message because you are subscribed to the Goo= gle Groups "pandoc-discuss" group.
To unsubscribe f= rom this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.


--
You re= ceived this message because you are subscribed to the Google Groups "p= andoc-discuss" group.
To unsubscribe from this group an= d stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

--
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/fd6f740f-0316-4199-a407-0b088a225629n%40googlegroups.= com.
------=_Part_6443_1257495388.1608834933534-- ------=_Part_6442_1170930041.1608834933534 Content-Type: text/markdown; charset=US-ASCII; name=test.md Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=test.md X-Attachment-Id: 585dcd6c-5c29-4e18-90cc-3ddb0125ecff Content-ID: <585dcd6c-5c29-4e18-90cc-3ddb0125ecff> --- date: 24 December 2020 header-includes: - \usepackage{wallpaper} - \addtolength{\wpYoffset}{12cm} - \ThisCenterWallPaper{0.2}{WGLogo.png} --- # Your title Your text. ------=_Part_6442_1170930041.1608834933534--