From: gnpan <g.panayotou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: PDF - How center image on title page
Date: Sat, 26 Dec 2020 02:37:26 -0800 (PST) [thread overview]
Message-ID: <1f006dad-8595-4f94-b8c0-ac99c0c5ce49n@googlegroups.com> (raw)
In-Reply-To: <c53afc45-5ef0-44c9-841d-7c46fea07316n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 6198 bytes --]
Another way, simpler but maybe less flexible is to add this to the YAML:
title: |
![ ](WGLogo.png){width=1in}
Your title here
On Thursday, 24 December 2020 at 21:35:19 UTC+2 the.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> 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 <return> 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 <return> 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
>>> <https://groups.google.com/d/msgid/pandoc-discuss/775d0e0f-927c-4dc4-aed0-dfc930f47b50n%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-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
>>> <https://groups.google.com/d/msgid/pandoc-discuss/5d9f1292-2e7c-4555-8ddc-cfb2d114fc78%40www.fastmail.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/1f006dad-8595-4f94-b8c0-ac99c0c5ce49n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 10293 bytes --]
next prev parent reply other threads:[~2020-12-26 10:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 21:38 LRP
[not found] ` <ed6a6971-5dc8-476e-8ebd-3898774a1746n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-24 14:43 ` gnpan
[not found] ` <775d0e0f-927c-4dc4-aed0-dfc930f47b50n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-24 17:33 ` Lloyd R. prentice
[not found] ` <5d9f1292-2e7c-4555-8ddc-cfb2d114fc78-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2020-12-24 17:54 ` Lloyd R. prentice
[not found] ` <d9f5d384-fab0-4651-9ece-9b1fdca9efeb-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2020-12-24 18:35 ` gnpan
[not found] ` <fd6f740f-0316-4199-a407-0b088a225629n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-24 19:35 ` Pranesh Prakash
[not found] ` <c53afc45-5ef0-44c9-841d-7c46fea07316n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-26 10:37 ` gnpan [this message]
[not found] ` <1f006dad-8595-4f94-b8c0-ac99c0c5ce49n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-27 17:12 ` Lloyd R. prentice
[not found] ` <9de2e423-f1d1-436c-b50d-2bdfe75ab343-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2020-12-27 17:59 ` gnpan
[not found] ` <3ffcc187-39e6-4d23-98f8-59bac27ad095n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-12-28 19:06 ` Lloyd R. prentice
2020-12-27 17:23 ` Lloyd R. prentice
2020-12-27 17:17 ` Lloyd R. prentice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f006dad-8595-4f94-b8c0-ac99c0c5ce49n@googlegroups.com \
--to=g.panayotou-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).