Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beamer slides (PDF) show linguistic examples in a overt table #1

Closed
CLRafaelR opened this issue Jan 8, 2021 · 8 comments
Closed

Beamer slides (PDF) show linguistic examples in a overt table #1

CLRafaelR opened this issue Jan 8, 2021 · 8 comments

Comments

@CLRafaelR
Copy link
Contributor

CLRafaelR commented Jan 8, 2021

When I create Beamer slides including some linguistic examples produced via pandoc-ling, the output slides undesirably have these examples in a visible table, as shown in the following screen capture. This does not occur when I create a usual LaTeX-based documents (e.g. article class).

image

The behaviour is understandable since pandoc-ling is a table-environment-based glossing system, as you stated in the manual. However, is there any good practice to make these tables invisible?

Working example

Here I put an Rmarkdown example with two subsidiary R packages, bookdown and officedown. The contents are exactly same as pandoc's markdown, except what I wrote in YAML section.

---
title: "Pandoc-ling with Beamer"
author: "CLRR"
output: 
  bookdown::beamer_presentation2:
    latex_engine: xelatex
    keep_tex: TRUE
    keep_md: TRUE
    toc: TRUE
    number_sections: TRUE
    slide_level: 2
    pandoc_args:
      - --lua-filter=path-to/pandoc-ling/pandoc-ling.lua
  bookdown::pdf_document2:
    latex_engine: xelatex
    keep_tex: true
    keep_md: true
    pandoc_args:
      - --lua-filter=path-to/pandoc-ling/pandoc-ling.lua
  officedown::rdocx_document:
    mapstyles:
      Normal: ['First Paragraph']
    keep_md: TRUE
    pandoc_args:
      - --lua-filter=path-to/pandoc-ling/pandoc-ling.lua
always_allow_html: yes
link-citations: yes
---

## Basic example

::: ex
This is the most basic structure of a linguistic example. 
:::

## Multi-line example

::: {#id .ex formatGloss=false}

This is a multi-line example.
But that does not mean anything for the result
All these lines are simply treated as one paragraph.
They will become one example with one number.

:::

## Example with a preamble

:::ex
Preamble

This is an example with a preamble.
:::

## Multiple examples

:::ex
a. This is the first example.
b. This is the second.
a. The actual letters are not important, `pandoc-ling` will put them in order.

e. Empty lines are allowed between labelled lines
Subsequent lines are again treated as one sequential paragraph.
:::

## Examples with a judgement

:::ex
Throwing in a preamble for good measure

a. ^* This traditionally signals ungrammaticality.
b. ^? Question-marks indicate questionable grammaticality.
c. ^^whynot?^ But in principle any sequence can be used (here even in superscript).
d. However, such long sequences sometimes lead to undesirable effects in the layout.
:::

## Formatted interlinear example

::: {.ex formatGloss=true}
| Dutch (Germanic)
| Deze zin is in het nederlands.
| DEM sentence AUX in DET dutch.
| This sentence is dutch.
:::

## Cross-referenceing

::: {#test .ex}
This is a test
:::

@test is grammatical.

## Complex example

::: {.ex formatGloss=true}
Completely superfluous preamble, but it works ...

a. Mixing single line examples with interlinear examples.
a. This is of course highly unusal.
Just for this example, let's add some extra material in this example.

a.
| Dutch (Germanic) Note the grammaticality judgement!
| ^^:-)^ Deze zin is (dit\ is test) nederlands.
| DEM sentence AUX ~ dutch.
| This sentence is dutch.

b.
|
| Deze tweede zin heeft geen header.
| DEM second sentence have.3SG.PRES no header.
| This second sentence does not have a header.
:::

Environment

pandoc-ling: v1.1
pandoc: v2.11.3.2
OS: Windows 10 x64 (build 19042)

@CLRafaelR
Copy link
Contributor Author

CLRafaelR commented Jan 8, 2021

In any case, I really appreciate your work of pandoc-ling. This is the greatest evolution in the creating/editing linguistic documents!!

@cysouw
Copy link
Owner

cysouw commented Jan 8, 2021

I have never used beamer so I didn't catch this! I'll look into it. Basically my approach is to use the class info embedded by my filter. However, in Latex this is difficult, so I had to write separate Latex export. I hope this is not again necessary for beamer :-(. I'll have a look into this!

@cysouw
Copy link
Owner

cysouw commented Jan 8, 2021

Quick comment before I get to the lines: I first could not reproduce your output, until I realised that there is a change between pandoc 2.11.2 and 2.11.3 for the output of the new table format to latex. Now it works! That is great news!

@CLRafaelR
Copy link
Contributor Author

Thank you for your work-around. Just a clarification: should I stop using pandoc 2.11.3 and revert to older version of pandoc?

@cysouw
Copy link
Owner

cysouw commented Jan 8, 2021

no no! 2.11.3 is much better! Your results were already better than I was getting here in the last weeks, so I was surprised to see your output. Then I found that I was a .point version behind :-)

@CLRafaelR
Copy link
Contributor Author

CLRafaelR commented Jan 8, 2021

I got it, and I will keep using the latest version of pandoc! 👍🏻

@cysouw
Copy link
Owner

cysouw commented Jan 8, 2021

Seems to work now: I simply added beamer as an output with the same structure as for general latex. I have not checked it in much detail, but it seems to work best with latexPackage: gb4e

Please try it with the new release v1.2 and tell me if it works for you

@CLRafaelR
Copy link
Contributor Author

Brilliant!! What a breathtaking result...!

image

Again, I deeply appreciate your work and definitely recommend this filter to my colleagues!

Now I close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants