public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Getting entry of geometry in latex template
@ 2021-01-25  0:33 Fabian Sch
       [not found] ` <7a682448-7474-4c54-993c-df60c5c41d0en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Sch @ 2021-01-25  0:33 UTC (permalink / raw)
  To: pandoc-discuss


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

Hey guys, I am desperately trying to get the value of geometry.right inside 
my latex template. 
I want to do
hshift=-$geometry.right$
but geometry.right seems to be always empty although if I print just 
geometry[, ] I get
top=50mm, left=40mm, right=50mm, bottom=60mm, heightrounded since I 
specified that in my markdown file.

So how I can just get the value for right?


Thank you all
Fabian

-- 
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/7a682448-7474-4c54-993c-df60c5c41d0en%40googlegroups.com.

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

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

* Re: Getting entry of geometry in latex template
       [not found] ` <7a682448-7474-4c54-993c-df60c5c41d0en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-01-25  5:26   ` John MacFarlane
       [not found]     ` <m2lfchfuy9.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2021-01-25  5:26 UTC (permalink / raw)
  To: Fabian Sch, pandoc-discuss


You can specify geometry in your markdown metadata either as a
string or as a YAML array.

geometry: top=50mm, left=40mm, ...

or

geometry:
- top=50mm
- left=40mm
...

But the members of the array are just strings.  It's not a YAML
object as you seem to expect.

You could create a custom template that would expect a YAML
object like

geometry:
  top: 50mm
  left: 40mm

but the default template wouldn't handle that.


Fabian Sch <fabian.scherer98-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hey guys, I am desperately trying to get the value of geometry.right inside 
> my latex template. 
> I want to do
> hshift=-$geometry.right$
> but geometry.right seems to be always empty although if I print just 
> geometry[, ] I get
> top=50mm, left=40mm, right=50mm, bottom=60mm, heightrounded since I 
> specified that in my markdown file.
>
> So how I can just get the value for right?
>
>
> Thank you all
> Fabian
>
> -- 
> 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/7a682448-7474-4c54-993c-df60c5c41d0en%40googlegroups.com.


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

* Re: Getting entry of geometry in latex template
       [not found]     ` <m2lfchfuy9.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-01-25 10:12       ` Fabian Sch
       [not found]         ` <1f7e9251-1bef-4e07-aebd-028cb9e4076cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Sch @ 2021-01-25 10:12 UTC (permalink / raw)
  To: pandoc-discuss


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

Since I can access geometry with the following statement like it is shown 
in the documentation
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$endif$

I expect geometry is an array/structure/field however you want to call it. 
So it should somehow be possible to access a single entry.

Pandoc Docu says: Variable names with periods are used to get at structured 
variable values. So, for example, employee.salary will return the value of 
the salary field of the object that is the value of the employee field.
John MacFarlane schrieb am Montag, 25. Januar 2021 um 06:26:54 UTC+1:

>
> You can specify geometry in your markdown metadata either as a
> string or as a YAML array.
>
> geometry: top=50mm, left=40mm, ...
>
> or
>
> geometry:
> - top=50mm
> - left=40mm
> ...
>
> But the members of the array are just strings. It's not a YAML
> object as you seem to expect.
>
> You could create a custom template that would expect a YAML
> object like
>
> geometry:
> top: 50mm
> left: 40mm
>
> but the default template wouldn't handle that.
>
>
> Fabian Sch <fabian.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hey guys, I am desperately trying to get the value of geometry.right 
> inside 
> > my latex template. 
> > I want to do
> > hshift=-$geometry.right$
> > but geometry.right seems to be always empty although if I print just 
> > geometry[, ] I get
> > top=50mm, left=40mm, right=50mm, bottom=60mm, heightrounded since I 
> > specified that in my markdown file.
> >
> > So how I can just get the value for right?
> >
> >
> > Thank you all
> > Fabian
> >
> > -- 
> > 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/7a682448-7474-4c54-993c-df60c5c41d0en%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/1f7e9251-1bef-4e07-aebd-028cb9e4076cn%40googlegroups.com.

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

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

* Re: Getting entry of geometry in latex template
       [not found]         ` <1f7e9251-1bef-4e07-aebd-028cb9e4076cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-01-25 16:50           ` John MacFarlane
  0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-01-25 16:50 UTC (permalink / raw)
  To: Fabian Sch, pandoc-discuss

Fabian Sch <fabian.scherer98-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Since I can access geometry with the following statement like it is shown 
> in the documentation
> $if(geometry)$
> \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
> $endif$
>
> I expect geometry is an array/structure/field however you want to call it. 
> So it should somehow be possible to access a single entry.

Yes, it can be an array (though for this you must specify it as
such in your metadata).  But it is just an array of strings, not
an object with key-value pairs.


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

end of thread, other threads:[~2021-01-25 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  0:33 Getting entry of geometry in latex template Fabian Sch
     [not found] ` <7a682448-7474-4c54-993c-df60c5c41d0en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-25  5:26   ` John MacFarlane
     [not found]     ` <m2lfchfuy9.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-01-25 10:12       ` Fabian Sch
     [not found]         ` <1f7e9251-1bef-4e07-aebd-028cb9e4076cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-25 16:50           ` 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).