public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Yaml object question
@ 2013-10-09 19:47 russurquhart1
       [not found] ` <11ff2f79-76a2-4d9e-a8bb-007ba46ad0fa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: russurquhart1 @ 2013-10-09 19:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Hi,

You helped me with using a yaml object to set values in a DocBook template 
i created and that worked like a champ.

When i went to try and add another object to the yaml block it didn't seem 
to work. I'm sure i'm missing something but here was what i was trying to 
do:

Here is the markdown text i had:

---
# <!-- Here is the block that contains the required text. -->

title: Demystify DSI I/F

abstract: |
 The purpose of this Application Note (APN) is to demystify the DSI I/F by 
presenting different configuration and their impact on the DSI protocol. 
The document is illustrated by numerous waveforms probe on an OMAP platform.

 This APN covers the DSI protocol in video mode (Non-frame buffer display) 
and in command mode (frame buffer display).

 A section dedicated to debugging tips is enumerating different method to 
measure various parameters and decode LP and HS packets. 

 However the APN does not contain programming model and complete DSI 
protocol standard, for more details on programming model refer to the OMAP 
Technical Reference Manual and the MIPI DSI protocol standard.

revhistory: | 
  Document History

  | Version | Date | Author | Notes |
  |:-----:|:----:|:-------:|:------:|
  |   1.0  |  November 2012  |    E. Petillon   |    First release  
---


In my DocBook template i have the following:

<?xml version="1.0" encoding="utf-8" ?>

<userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserDocInfo CoverStyle="None" DocType="AR" Logo="TI" 
Stylesheet="SingleChapter">
<LitNumber/>
<OrigDate Month="10" Year="2013"/>
<Revision RevMonth="" RevYear="" Version=""/>
<Disclosure Statement="DraftOnly"/>
<Author>Russ Urquhart</Author>
<ProductType/>
<TechnicalOwner/>
<TISWriter Location="DAL"/>
</UserDocInfo>
<Title>$title$</Title>
<TOC/>
<GenSection type="SingleChapter">
<Title>$title$</Title>

$if(abstract)$
    <abstract>
    $abstract$
    </abstract>
$endif$ 

$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</GenSection>
$if(revhistory)$
    <RevHistory>
    $revhistory$
    </RevHistory>
$endif$ 
</userDoc>


The abstract and title values all came through, the revhistory did not, and 
also, the xml that was generated, ended BEFORE the </userDoc> element. I 
tried moving the revhistory value around but it would not work, and it 
would always stop the processing/output of the xml at that point.

Have i defined the yaml objecg wrong? Using it wrong?

Any help is really appreciated!

thanks,


Russ

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/11ff2f79-76a2-4d9e-a8bb-007ba46ad0fa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

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

* Re: Yaml object question
       [not found] ` <11ff2f79-76a2-4d9e-a8bb-007ba46ad0fa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-10-11 18:43   ` russurquhart1
       [not found]     ` <c240693b-e70c-47d3-8a7c-cb7fcad91527-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: russurquhart1 @ 2013-10-11 18:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Well, i figured out the issue but it raises another question.

The problem, was that the row of the table contianed colons. Once that line 
had single quotes around it, everything passed through. (Should have looked 
closer at what i was doing.

NOW, the new question is that, this is supposed to be a two row table, 
however it comes across in one para element.

It appears that the ':' character used to control the alignment of the 
column is causing a problem. As i have to quote that line for the ':' to be 
acceptable, that line, with the others is no longer being recognized as a 
table. When i removed the ':' characters from that row, the table comes 
across as a table. For this table, that will work.

Is this a bug, or is it working as designed?

Thanks,

Russ

On Wednesday, October 9, 2013 2:47:35 PM UTC-5, russurquhart1 wrote:
>
> Hi,
>
> You helped me with using a yaml object to set values in a DocBook template 
> i created and that worked like a champ.
>
> When i went to try and add another object to the yaml block it didn't seem 
> to work. I'm sure i'm missing something but here was what i was trying to 
> do:
>
> Here is the markdown text i had:
>
> ---
> # <!-- Here is the block that contains the required text. -->
>
> title: Demystify DSI I/F
>
> abstract: |
>  The purpose of this Application Note (APN) is to demystify the DSI I/F by 
> presenting different configuration and their impact on the DSI protocol. 
> The document is illustrated by numerous waveforms probe on an OMAP platform.
>
>  This APN covers the DSI protocol in video mode (Non-frame buffer display) 
> and in command mode (frame buffer display).
>
>  A section dedicated to debugging tips is enumerating different method to 
> measure various parameters and decode LP and HS packets. 
>
>  However the APN does not contain programming model and complete DSI 
> protocol standard, for more details on programming model refer to the OMAP 
> Technical Reference Manual and the MIPI DSI protocol standard.
>
> revhistory: | 
>   Document History
>
>   | Version | Date | Author | Notes |
>   |:-----:|:----:|:-------:|:------:|
>   |   1.0  |  November 2012  |    E. Petillon   |    First release  
> ---
>
>
> In my DocBook template i have the following:
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <UserDocInfo CoverStyle="None" DocType="AR" Logo="TI" 
> Stylesheet="SingleChapter">
> <LitNumber/>
> <OrigDate Month="10" Year="2013"/>
> <Revision RevMonth="" RevYear="" Version=""/>
> <Disclosure Statement="DraftOnly"/>
> <Author>Russ Urquhart</Author>
> <ProductType/>
> <TechnicalOwner/>
> <TISWriter Location="DAL"/>
> </UserDocInfo>
> <Title>$title$</Title>
> <TOC/>
> <GenSection type="SingleChapter">
> <Title>$title$</Title>
>
> $if(abstract)$
>     <abstract>
>     $abstract$
>     </abstract>
> $endif$ 
>
> $for(include-before)$
> $include-before$
> $endfor$
> $body$
> $for(include-after)$
> $include-after$
> $endfor$
> </GenSection>
> $if(revhistory)$
>     <RevHistory>
>     $revhistory$
>     </RevHistory>
> $endif$ 
> </userDoc>
>
>
> The abstract and title values all came through, the revhistory did not, 
> and also, the xml that was generated, ended BEFORE the </userDoc> element. 
> I tried moving the revhistory value around but it would not work, and it 
> would always stop the processing/output of the xml at that point.
>
> Have i defined the yaml objecg wrong? Using it wrong?
>
> Any help is really appreciated!
>
> thanks,
>
>
> Russ
>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-8a7c-cb7fcad91527%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

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

* Re: Yaml object question
       [not found]     ` <c240693b-e70c-47d3-8a7c-cb7fcad91527-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-10-12  1:20       ` John MacFarlane
       [not found]         ` <20131012012047.GB26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
  2013-10-12  1:23       ` John MacFarlane
  1 sibling, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2013-10-12  1:20 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Everything in an indented block started by '|\n' will be treated
as a literal string - so you shouldn't add any quotes inside it.

This works fine and generates a pandoc table:

    % pandoc -t native -s
    ---
     revhistory: |
         Document History


         | Version | Date | Author | Notes |
         |:-----:|:----:|:-------:|:------:|
         |   1.0  |  November 2012  |    E. Petillon   |    First release
    ---

    hi

    ^D
    Pandoc (Meta {unMeta = fromList [("revhistory",MetaBlocks [Para [Str "Document",Space,Str "History"],Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain [Str "Version"]],[Plain [Str "Date"]],[Plain [Str "Author"]],[Plain [Str "Notes"]]] [[[Plain [Str "1.0"]],[Plain [Str "November",Space,Str "2012"]],[Plain [Str "E.",Space,Str "Petillon"]],[Plain [Str "First",Space,Str "release"]]]]])]})
    [Para [Str "hi"]]


Perhaps your problem has to do with the 'abstract' field -- from your email, it
wasn't clear that you were indenting it properly, but it might just be my
mail reader.  This will not work:

     abstract: |
       The purpose of this Application Note (APN) is to demystify the DSI I/F by
     presenting different configuration and their impact on the DSI protocol.
     The document is illustrated by numerous waveforms probe on an OMAP platform.

Rather, you need:

     abstract: |
       The purpose of this Application Note (APN) is to demystify the DSI I/F by
       presenting different configuration and their impact on the DSI protocol.
       The document is illustrated by numerous waveforms probe on an OMAP platform.

Hope that helps.


+++ russurquhart1 [Oct 11 13 11:43 ]:
> Well, i figured out the issue but it raises another question.
> 
> The problem, was that the row of the table contianed colons. Once that line 
> had single quotes around it, everything passed through. (Should have looked 
> closer at what i was doing.
> 
> NOW, the new question is that, this is supposed to be a two row table, 
> however it comes across in one para element.
> 
> It appears that the ':' character used to control the alignment of the 
> column is causing a problem. As i have to quote that line for the ':' to be 
> acceptable, that line, with the others is no longer being recognized as a 
> table. When i removed the ':' characters from that row, the table comes 
> across as a table. For this table, that will work.
> 
> Is this a bug, or is it working as designed?
> 
> Thanks,
> 
> Russ
> 
> On Wednesday, October 9, 2013 2:47:35 PM UTC-5, russurquhart1 wrote:
> >
> > Hi,
> >
> > You helped me with using a yaml object to set values in a DocBook template 
> > i created and that worked like a champ.
> >
> > When i went to try and add another object to the yaml block it didn't seem 
> > to work. I'm sure i'm missing something but here was what i was trying to 
> > do:
> >
> > Here is the markdown text i had:
> >
> > ---
> > # <!-- Here is the block that contains the required text. -->
> >
> > title: Demystify DSI I/F
> >
> > abstract: |
> >  The purpose of this Application Note (APN) is to demystify the DSI I/F by 
> > presenting different configuration and their impact on the DSI protocol. 
> > The document is illustrated by numerous waveforms probe on an OMAP platform.
> >
> >  This APN covers the DSI protocol in video mode (Non-frame buffer display) 
> > and in command mode (frame buffer display).
> >
> >  A section dedicated to debugging tips is enumerating different method to 
> > measure various parameters and decode LP and HS packets. 
> >
> >  However the APN does not contain programming model and complete DSI 
> > protocol standard, for more details on programming model refer to the OMAP 
> > Technical Reference Manual and the MIPI DSI protocol standard.
> >
> > revhistory: | 
> >   Document History
> >
> >   | Version | Date | Author | Notes |
> >   |:-----:|:----:|:-------:|:------:|
> >   |   1.0  |  November 2012  |    E. Petillon   |    First release  
> > ---
> >
> >
> > In my DocBook template i have the following:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> >
> > <userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance">
> > <UserDocInfo CoverStyle="None" DocType="AR" Logo="TI" 
> > Stylesheet="SingleChapter">
> > <LitNumber/>
> > <OrigDate Month="10" Year="2013"/>
> > <Revision RevMonth="" RevYear="" Version=""/>
> > <Disclosure Statement="DraftOnly"/>
> > <Author>Russ Urquhart</Author>
> > <ProductType/>
> > <TechnicalOwner/>
> > <TISWriter Location="DAL"/>
> > </UserDocInfo>
> > <Title>$title$</Title>
> > <TOC/>
> > <GenSection type="SingleChapter">
> > <Title>$title$</Title>
> >
> > $if(abstract)$
> >     <abstract>
> >     $abstract$
> >     </abstract>
> > $endif$ 
> >
> > $for(include-before)$
> > $include-before$
> > $endfor$
> > $body$
> > $for(include-after)$
> > $include-after$
> > $endfor$
> > </GenSection>
> > $if(revhistory)$
> >     <RevHistory>
> >     $revhistory$
> >     </RevHistory>
> > $endif$ 
> > </userDoc>
> >
> >
> > The abstract and title values all came through, the revhistory did not, 
> > and also, the xml that was generated, ended BEFORE the </userDoc> element. 
> > I tried moving the revhistory value around but it would not work, and it 
> > would always stop the processing/output of the xml at that point.
> >
> > Have i defined the yaml objecg wrong? Using it wrong?
> >
> > Any help is really appreciated!
> >
> > thanks,
> >
> >
> > Russ
> >
> >
> 
> -- 
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-8a7c-cb7fcad91527%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20131012012047.GB26471%40protagoras.phil.berkeley.edu.
For more options, visit https://groups.google.com/groups/opt_out.


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

* Re: Yaml object question
       [not found]     ` <c240693b-e70c-47d3-8a7c-cb7fcad91527-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2013-10-12  1:20       ` John MacFarlane
@ 2013-10-12  1:23       ` John MacFarlane
       [not found]         ` <20131012012349.GC26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2013-10-12  1:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

>    Well, i figured out the issue but it raises another question.
>    The problem, was that the row of the table contianed colons. Once that

You shouldn't need to add quotes in an indented block started
with '|\n'.  All of that will be treated literally.  So, for example,
this works fine and yields a pandoc table:

% pandoc -t native -s
---
 revhistory: |
     Document History


     | Version | Date | Author | Notes |
     |:-----:|:----:|:-------:|:------:|
     |   1.0  |  November 2012  |    E. Petillon   |    First release
---

hi
^D
Pandoc (Meta {unMeta = fromList [("revhistory",MetaBlocks [Para [Str "Document",Space,Str "History"],Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain [Str "Version"]],[Plain [Str "Date"]],[Plain [Str "Author"]],[Plain [Str "Notes"]]] [[[Plain [Str "1.0"]],[Plain [Str "November",Space,Str "2012"]],[Plain [Str "E.",Space,Str "Petillon"]],[Plain [Str "First",Space,Str "release"]]]]])]})
[Para [Str "hi"]]

Perhaps your indentation wasn't right.  You can indent any amount,
but subsequent lines have to be indented to the level of the first
line.

OK:

   field: |
     content
     content

Bad:

   field: |
     content
   content

Hope that helps.

+++ russurquhart1 [Oct 11 13 11:43 ]:
>    line had single quotes around it, everything passed through. (Should
>    have looked closer at what i was doing.
>    NOW, the new question is that, this is supposed to be a two row table,
>    however it comes across in one para element.
>    It appears that the ':' character used to control the alignment of the
>    column is causing a problem. As i have to quote that line for the ':'
>    to be acceptable, that line, with the others is no longer being
>    recognized as a table. When i removed the ':' characters from that row,
>    the table comes across as a table. For this table, that will work.
>    Is this a bug, or is it working as designed?
>    Thanks,
>    Russ
>    On Wednesday, October 9, 2013 2:47:35 PM UTC-5, russurquhart1 wrote:
> 
>    Hi,
>    You helped me with using a yaml object to set values in a DocBook
>    template i created and that worked like a champ.
>    When i went to try and add another object to the yaml block it didn't
>    seem to work. I'm sure i'm missing something but here was what i was
>    trying to do:
>    Here is the markdown text i had:
>    ---
>    # <!-- Here is the block that contains the required text. -->
>    title: Demystify DSI I/F
>    abstract: |
>     The purpose of this Application Note (APN) is to demystify the DSI I/F
>    by presenting different configuration and their impact on the DSI
>    protocol. The document is illustrated by numerous waveforms probe on an
>    OMAP platform.
>     This APN covers the DSI protocol in video mode (Non-frame buffer
>    display) and in command mode (frame buffer display).
>     A section dedicated to debugging tips is enumerating different method
>    to measure various parameters and decode LP and HS packets.
>     However the APN does not contain programming model and complete DSI
>    protocol standard, for more details on programming model refer to the
>    OMAP Technical Reference Manual and the MIPI DSI protocol standard.
>    revhistory: |
>      Document History
>      | Version | Date | Author | Notes |
>      |:-----:|:----:|:-------:|:------:|
>      |   1.0  |  November 2012  |    E. Petillon   |    First release
>    ---
>    In my DocBook template i have the following:
>    <?xml version="1.0" encoding="utf-8" ?>
>    <userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd"
>    xmlns:xsi="[1]http://www.w3.org/2001/XMLSchema-instance">
>    <UserDocInfo CoverStyle="None" DocType="AR" Logo="TI"
>    Stylesheet="SingleChapter">
>    <LitNumber/>
>    <OrigDate Month="10" Year="2013"/>
>    <Revision RevMonth="" RevYear="" Version=""/>
>    <Disclosure Statement="DraftOnly"/>
>    <Author>Russ Urquhart</Author>
>    <ProductType/>
>    <TechnicalOwner/>
>    <TISWriter Location="DAL"/>
>    </UserDocInfo>
>    <Title>$title$</Title>
>    <TOC/>
>    <GenSection type="SingleChapter">
>    <Title>$title$</Title>
>    $if(abstract)$
>        <abstract>
>        $abstract$
>        </abstract>
>    $endif$
>    $for(include-before)$
>    $include-before$
>    $endfor$
>    $body$
>    $for(include-after)$
>    $include-after$
>    $endfor$
>    </GenSection>
>    $if(revhistory)$
>        <RevHistory>
>        $revhistory$
>        </RevHistory>
>    $endif$
>    </userDoc>
>    The abstract and title values all came through, the revhistory did not,
>    and also, the xml that was generated, ended BEFORE the </userDoc>
>    element. I tried moving the revhistory value around but it would not
>    work, and it would always stop the processing/output of the xml at that
>    point.
>    Have i defined the yaml objecg wrong? Using it wrong?
>    Any help is really appreciated!
>    thanks,
>    Russ
> 
>    --
>    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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>    To view this discussion on the web visit
>    [2]https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-
>    8a7c-cb7fcad91527%40googlegroups.com.
>    For more options, visit [3]https://groups.google.com/groups/opt_out.
> 
> References
> 
>    1. http://www.w3.org/2001/XMLSchema-instance
>    2. https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-8a7c-cb7fcad91527%40googlegroups.com
>    3. https://groups.google.com/groups/opt_out

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20131012012349.GC26471%40protagoras.phil.berkeley.edu.
For more options, visit https://groups.google.com/groups/opt_out.


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

* Re: Yaml object question
       [not found]         ` <20131012012349.GC26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
@ 2013-10-14 13:11           ` Paul M.
       [not found]             ` <CABoaWcXLZjn_eQAn8hbtiM=rvtt8hJx1yeer_c6o_fktq9paqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Paul M. @ 2013-10-14 13:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

String literals in YAML blocks don't seem to be working for LaTeX
documents. Or maybe I'm not understanding the rules correctly (likely!).

Here's a template, `minletter.tex`:

~~~
\documentclass[11pt]{letter}

\address{John Q. Public \\ 1234 Oak  St. \\ Bigtown, CA 91234}
\signature{John Q. Public}

\begin{document}
$if(to)$
\begin{letter}{$to$}
$else$
\begin{letter}{\mbox{}\\\mbox{}}
$endif$

$body$

\closing{Sincerely,}
\end{letter}
\end{document}
~~~

And here's a corresponding markdown document, `nonlit.md`:

~~~
---
to: |
    Bob Jones \\
    1234 Main St.\\
    Small Town, CA 91234 \\
---

Hi Bob!
~~~


The output I get from running `pandoc -t latex -s --template minletter
nonlit.md` is:

~~~
\documentclass[11pt]{letter}

\address{John Q. Public \\ 1234 Oak  St. \\ Bigtown, CA 91234}
\signature{John Q. Public}

\begin{document}
\begin{letter}{Bob Jones \textbackslash{} 1234 Main St.\textbackslash{}
Small Town, CA
91234 \textbackslash{}}

Hi Bob!

\closing{Sincerely,}
\end{letter}
\end{document}
~~~

NOTE: the double backslashes have been replaced.

If I change the double backslashes to "\\n" (single backslash followed by
return) I get the expected output.

--Paul





On Fri, Oct 11, 2013 at 9:23 PM, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:

> >    Well, i figured out the issue but it raises another question.
> >    The problem, was that the row of the table contianed colons. Once that
>
> You shouldn't need to add quotes in an indented block started
> with '|\n'.  All of that will be treated literally.  So, for example,
> this works fine and yields a pandoc table:
>
> % pandoc -t native -s
> ---
>  revhistory: |
>      Document History
>
>
>      | Version | Date | Author | Notes |
>      |:-----:|:----:|:-------:|:------:|
>      |   1.0  |  November 2012  |    E. Petillon   |    First release
> ---
>
> hi
> ^D
> Pandoc (Meta {unMeta = fromList [("revhistory",MetaBlocks [Para [Str
> "Document",Space,Str "History"],Table []
> [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain
> [Str "Version"]],[Plain [Str "Date"]],[Plain [Str "Author"]],[Plain [Str
> "Notes"]]] [[[Plain [Str "1.0"]],[Plain [Str "November",Space,Str
> "2012"]],[Plain [Str "E.",Space,Str "Petillon"]],[Plain [Str
> "First",Space,Str "release"]]]]])]})
> [Para [Str "hi"]]
>
> Perhaps your indentation wasn't right.  You can indent any amount,
> but subsequent lines have to be indented to the level of the first
> line.
>
> OK:
>
>    field: |
>      content
>      content
>
> Bad:
>
>    field: |
>      content
>    content
>
> Hope that helps.
>
> +++ russurquhart1 [Oct 11 13 11:43 ]:
> >    line had single quotes around it, everything passed through. (Should
> >    have looked closer at what i was doing.
> >    NOW, the new question is that, this is supposed to be a two row table,
> >    however it comes across in one para element.
> >    It appears that the ':' character used to control the alignment of the
> >    column is causing a problem. As i have to quote that line for the ':'
> >    to be acceptable, that line, with the others is no longer being
> >    recognized as a table. When i removed the ':' characters from that
> row,
> >    the table comes across as a table. For this table, that will work.
> >    Is this a bug, or is it working as designed?
> >    Thanks,
> >    Russ
> >    On Wednesday, October 9, 2013 2:47:35 PM UTC-5, russurquhart1 wrote:
> >
> >    Hi,
> >    You helped me with using a yaml object to set values in a DocBook
> >    template i created and that worked like a champ.
> >    When i went to try and add another object to the yaml block it didn't
> >    seem to work. I'm sure i'm missing something but here was what i was
> >    trying to do:
> >    Here is the markdown text i had:
> >    ---
> >    # <!-- Here is the block that contains the required text. -->
> >    title: Demystify DSI I/F
> >    abstract: |
> >     The purpose of this Application Note (APN) is to demystify the DSI
> I/F
> >    by presenting different configuration and their impact on the DSI
> >    protocol. The document is illustrated by numerous waveforms probe on
> an
> >    OMAP platform.
> >     This APN covers the DSI protocol in video mode (Non-frame buffer
> >    display) and in command mode (frame buffer display).
> >     A section dedicated to debugging tips is enumerating different method
> >    to measure various parameters and decode LP and HS packets.
> >     However the APN does not contain programming model and complete DSI
> >    protocol standard, for more details on programming model refer to the
> >    OMAP Technical Reference Manual and the MIPI DSI protocol standard.
> >    revhistory: |
> >      Document History
> >      | Version | Date | Author | Notes |
> >      |:-----:|:----:|:-------:|:------:|
> >      |   1.0  |  November 2012  |    E. Petillon   |    First release
> >    ---
> >    In my DocBook template i have the following:
> >    <?xml version="1.0" encoding="utf-8" ?>
> >    <userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd"
> >    xmlns:xsi="[1]http://www.w3.org/2001/XMLSchema-instance">
> >    <UserDocInfo CoverStyle="None" DocType="AR" Logo="TI"
> >    Stylesheet="SingleChapter">
> >    <LitNumber/>
> >    <OrigDate Month="10" Year="2013"/>
> >    <Revision RevMonth="" RevYear="" Version=""/>
> >    <Disclosure Statement="DraftOnly"/>
> >    <Author>Russ Urquhart</Author>
> >    <ProductType/>
> >    <TechnicalOwner/>
> >    <TISWriter Location="DAL"/>
> >    </UserDocInfo>
> >    <Title>$title$</Title>
> >    <TOC/>
> >    <GenSection type="SingleChapter">
> >    <Title>$title$</Title>
> >    $if(abstract)$
> >        <abstract>
> >        $abstract$
> >        </abstract>
> >    $endif$
> >    $for(include-before)$
> >    $include-before$
> >    $endfor$
> >    $body$
> >    $for(include-after)$
> >    $include-after$
> >    $endfor$
> >    </GenSection>
> >    $if(revhistory)$
> >        <RevHistory>
> >        $revhistory$
> >        </RevHistory>
> >    $endif$
> >    </userDoc>
> >    The abstract and title values all came through, the revhistory did
> not,
> >    and also, the xml that was generated, ended BEFORE the </userDoc>
> >    element. I tried moving the revhistory value around but it would not
> >    work, and it would always stop the processing/output of the xml at
> that
> >    point.
> >    Have i defined the yaml objecg wrong? Using it wrong?
> >    Any help is really appreciated!
> >    thanks,
> >    Russ
> >
> >    --
> >    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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >    To view this discussion on the web visit
> >    [2]
> https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-
> >    8a7c-cb7fcad91527%40googlegroups.com.
> >    For more options, visit [3]https://groups.google.com/groups/opt_out.
> >
> > References
> >
> >    1. http://www.w3.org/2001/XMLSchema-instance
> >    2.
> https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-8a7c-cb7fcad91527%40googlegroups.com
> >    3. https://groups.google.com/groups/opt_out
>
> --
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/20131012012349.GC26471%40protagoras.phil.berkeley.edu
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CABoaWcXLZjn_eQAn8hbtiM%3Drvtt8hJx1yeer_c6o_fktq9paqg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

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

* Re: Yaml object question
       [not found]         ` <20131012012047.GB26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
@ 2013-10-14 13:28           ` russurquhart1
  0 siblings, 0 replies; 7+ messages in thread
From: russurquhart1 @ 2013-10-14 13:28 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Well it is working. I first thought it was tied to me having a space before 
the \n, but that wasn't it.

I had thought that my text was indented properly, but i guess it wasn't. In 
any case it seems to be working now!


Thanks!

Russ

On Friday, October 11, 2013 8:20:47 PM UTC-5, fiddlosopher wrote:
>
> Everything in an indented block started by '|\n' will be treated 
> as a literal string - so you shouldn't add any quotes inside it. 
>
> This works fine and generates a pandoc table: 
>
>     % pandoc -t native -s 
>     --- 
>      revhistory: | 
>          Document History 
>
>
>          | Version | Date | Author | Notes | 
>          |:-----:|:----:|:-------:|:------:| 
>          |   1.0  |  November 2012  |    E. Petillon   |    First release 
>     --- 
>
>     hi 
>
>     ^D 
>     Pandoc (Meta {unMeta = fromList [("revhistory",MetaBlocks [Para [Str 
> "Document",Space,Str "History"],Table [] 
> [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] [[Plain 
> [Str "Version"]],[Plain [Str "Date"]],[Plain [Str "Author"]],[Plain [Str 
> "Notes"]]] [[[Plain [Str "1.0"]],[Plain [Str "November",Space,Str 
> "2012"]],[Plain [Str "E.",Space,Str "Petillon"]],[Plain [Str 
> "First",Space,Str "release"]]]]])]}) 
>     [Para [Str "hi"]] 
>
>
> Perhaps your problem has to do with the 'abstract' field -- from your 
> email, it 
> wasn't clear that you were indenting it properly, but it might just be my 
> mail reader.  This will not work: 
>
>      abstract: | 
>        The purpose of this Application Note (APN) is to demystify the DSI 
> I/F by 
>      presenting different configuration and their impact on the DSI 
> protocol. 
>      The document is illustrated by numerous waveforms probe on an OMAP 
> platform. 
>
> Rather, you need: 
>
>      abstract: | 
>        The purpose of this Application Note (APN) is to demystify the DSI 
> I/F by 
>        presenting different configuration and their impact on the DSI 
> protocol. 
>        The document is illustrated by numerous waveforms probe on an OMAP 
> platform. 
>
> Hope that helps. 
>
>
> +++ russurquhart1 [Oct 11 13 11:43 ]: 
> > Well, i figured out the issue but it raises another question. 
> > 
> > The problem, was that the row of the table contianed colons. Once that 
> line 
> > had single quotes around it, everything passed through. (Should have 
> looked 
> > closer at what i was doing. 
> > 
> > NOW, the new question is that, this is supposed to be a two row table, 
> > however it comes across in one para element. 
> > 
> > It appears that the ':' character used to control the alignment of the 
> > column is causing a problem. As i have to quote that line for the ':' to 
> be 
> > acceptable, that line, with the others is no longer being recognized as 
> a 
> > table. When i removed the ':' characters from that row, the table comes 
> > across as a table. For this table, that will work. 
> > 
> > Is this a bug, or is it working as designed? 
> > 
> > Thanks, 
> > 
> > Russ 
> > 
> > On Wednesday, October 9, 2013 2:47:35 PM UTC-5, russurquhart1 wrote: 
> > > 
> > > Hi, 
> > > 
> > > You helped me with using a yaml object to set values in a DocBook 
> template 
> > > i created and that worked like a champ. 
> > > 
> > > When i went to try and add another object to the yaml block it didn't 
> seem 
> > > to work. I'm sure i'm missing something but here was what i was trying 
> to 
> > > do: 
> > > 
> > > Here is the markdown text i had: 
> > > 
> > > --- 
> > > # <!-- Here is the block that contains the required text. --> 
> > > 
> > > title: Demystify DSI I/F 
> > > 
> > > abstract: | 
> > >  The purpose of this Application Note (APN) is to demystify the DSI 
> I/F by 
> > > presenting different configuration and their impact on the DSI 
> protocol. 
> > > The document is illustrated by numerous waveforms probe on an OMAP 
> platform. 
> > > 
> > >  This APN covers the DSI protocol in video mode (Non-frame buffer 
> display) 
> > > and in command mode (frame buffer display). 
> > > 
> > >  A section dedicated to debugging tips is enumerating different method 
> to 
> > > measure various parameters and decode LP and HS packets. 
> > > 
> > >  However the APN does not contain programming model and complete DSI 
> > > protocol standard, for more details on programming model refer to the 
> OMAP 
> > > Technical Reference Manual and the MIPI DSI protocol standard. 
> > > 
> > > revhistory: | 
> > >   Document History 
> > > 
> > >   | Version | Date | Author | Notes | 
> > >   |:-----:|:----:|:-------:|:------:| 
> > >   |   1.0  |  November 2012  |    E. Petillon   |    First release   
> > > --- 
> > > 
> > > 
> > > In my DocBook template i have the following: 
> > > 
> > > <?xml version="1.0" encoding="utf-8" ?> 
> > > 
> > > <userDoc xsi:noNamespaceSchemaLocation="ti_ud.xsd" xmlns:xsi=" 
> > > http://www.w3.org/2001/XMLSchema-instance"> 
> > > <UserDocInfo CoverStyle="None" DocType="AR" Logo="TI" 
> > > Stylesheet="SingleChapter"> 
> > > <LitNumber/> 
> > > <OrigDate Month="10" Year="2013"/> 
> > > <Revision RevMonth="" RevYear="" Version=""/> 
> > > <Disclosure Statement="DraftOnly"/> 
> > > <Author>Russ Urquhart</Author> 
> > > <ProductType/> 
> > > <TechnicalOwner/> 
> > > <TISWriter Location="DAL"/> 
> > > </UserDocInfo> 
> > > <Title>$title$</Title> 
> > > <TOC/> 
> > > <GenSection type="SingleChapter"> 
> > > <Title>$title$</Title> 
> > > 
> > > $if(abstract)$ 
> > >     <abstract> 
> > >     $abstract$ 
> > >     </abstract> 
> > > $endif$ 
> > > 
> > > $for(include-before)$ 
> > > $include-before$ 
> > > $endfor$ 
> > > $body$ 
> > > $for(include-after)$ 
> > > $include-after$ 
> > > $endfor$ 
> > > </GenSection> 
> > > $if(revhistory)$ 
> > >     <RevHistory> 
> > >     $revhistory$ 
> > >     </RevHistory> 
> > > $endif$ 
> > > </userDoc> 
> > > 
> > > 
> > > The abstract and title values all came through, the revhistory did 
> not, 
> > > and also, the xml that was generated, ended BEFORE the </userDoc> 
> element. 
> > > I tried moving the revhistory value around but it would not work, and 
> it 
> > > would always stop the processing/output of the xml at that point. 
> > > 
> > > Have i defined the yaml objecg wrong? Using it wrong? 
> > > 
> > > Any help is really appreciated! 
> > > 
> > > thanks, 
> > > 
> > > 
> > > Russ 
> > > 
> > > 
> > 
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:>. 
>
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/c240693b-e70c-47d3-8a7c-cb7fcad91527%40googlegroups.com. 
>
> > For more options, visit https://groups.google.com/groups/opt_out. 
>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/636601b2-03d7-452b-a0f1-98365461b36f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

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

* Re: Yaml object question
       [not found]             ` <CABoaWcXLZjn_eQAn8hbtiM=rvtt8hJx1yeer_c6o_fktq9paqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-10-14 14:23               ` John MacFarlane
  0 siblings, 0 replies; 7+ messages in thread
From: John MacFarlane @ 2013-10-14 14:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Paul M. [Oct 14 13 09:11 ]:
 
> ~~~
> ---
> to: |
>     Bob Jones \\
>     1234 Main St.\\
>     Small Town, CA 91234 \\
> ---

If you want hard line breaks, use a *single* backslash before the
newline.  Otherwise you get an escaped backslash.

Another approach is to use a pandoc line block (this looks nicer):

to: |
    | Bob Jones
    | 1234 Main St.
    | Small Town, CA 91234



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

end of thread, other threads:[~2013-10-14 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09 19:47 Yaml object question russurquhart1
     [not found] ` <11ff2f79-76a2-4d9e-a8bb-007ba46ad0fa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-10-11 18:43   ` russurquhart1
     [not found]     ` <c240693b-e70c-47d3-8a7c-cb7fcad91527-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-10-12  1:20       ` John MacFarlane
     [not found]         ` <20131012012047.GB26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2013-10-14 13:28           ` russurquhart1
2013-10-12  1:23       ` John MacFarlane
     [not found]         ` <20131012012349.GC26471-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2013-10-14 13:11           ` Paul M.
     [not found]             ` <CABoaWcXLZjn_eQAn8hbtiM=rvtt8hJx1yeer_c6o_fktq9paqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-14 14:23               ` 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).