marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.56k stars 73 forks source link

Why it always exports in HTML even I select PDF or PPT types? #247

Closed RocStone closed 3 years ago

RocStone commented 3 years ago

To reproduce the bug here is my document. And it is always exported in HTML (but the HTML works perfectly.)

Thanks for your awesome work btw, I really really like this extension! Good Job!

My Document____

marp: true theme: gaia footer: 'Pengqian Lu, 2021.06.07' paginate: true style: | section a { font-size: 30px; }

GMNN: Graph Markov Neural Networks


Problem to be solved

Semi-supervised object classification in relational data.

Relational data: Here, it's graph data.


Related Field: SRL

Statistical relational learning (SRL) develops statistical methods to model relational data. Generally theses methods model the dependency of object labels using conditional random fields (CRF).


Brief introduction of CRF

图 3

Given a graph $G=(V,E,X,Y)$, let $V$ denotes a set of nodes, $E$ denotes a set of edges, $X$ denotes the feature matrix on nodes and $Y$ denotes the labels of nodes.


Brief introduction of CRF

CRF models the conditional probability of $Y$ given $X$ as:

$p(Y|X)=\frac{1}{Z(X)}\prod_{(n_i,nj)\in E}\psi{i,j}(y_i,y_j,X)$

Here, $Z=\sumY\prod{(n_i,nj)\in E}\psi{i,j}(y_i,y_j,X)$

You can define your potential functions $\psi_{i,j}$. For example, in segmentation,

$\psi_{ij}=|y_i-y_j|(-\exp{\frac{||z_i-z_j||}{2Mean(||z_i-z_j||_2)}})$.


Brief introduction of CRF

The limitations of SRL methods:

  1. the potential functions in CRF are linear combinations of some hand-crafted feature functions. The capacity of such models is insufficient.
  2. Inferring the posterior distributions of object labels for unlabeled objects remains a challenging problem.

Brief introduction of GNN

图 3

Learning object representations with non-linear neural architectures.

The limitations of such methods:

  1. labels of objects are independently predicted on their representations. But the joint dependency of object labels is ignored.
yhatt commented 3 years ago

The export format actually relies the extension in the filename specified in save dialog (e.g. slide.html, slide.pdf) and the content of slide deck does not matter. If not detected the extension from filename, Marp will try to export into HTML with regardless of setting.

Try to set a extension .pdf or .pptx explicitly.

Normally a corresponded extension with selected type will add automatically by VS Code, but some Linux distributions have reported won't add. Potentially related: https://github.com/marp-team/marp-vscode/issues/83

RocStone commented 3 years ago

The export format actually relies the extension in the filename specified in save dialog (e.g. slide.html, slide.pdf) and the content of slide deck does not matter. If not detected the extension from filename, Marp will try to export into HTML with regardless of setting.

Try to set a extension .pdf or .pptx explicitly.

Normally a corresponded extension with selected type will add automatically by VS Code, but some Linux distributions have reported won't add. Potentially related: #83

Thanks for the response, but it still doesn't work even if I explicitly set the filename as xxx.pdf. FYI, I am using Ubuntu 20.04 with KDE theme.

yhatt commented 3 years ago

How about quoted filename such as "foobar.pptx"?

-- https://github.com/marp-team/marp-vscode/issues/83#issuecomment-541426564

RocStone commented 3 years ago

How about quoted filename such as "foobar.pptx"? -- #83 (comment)

I tried "asd.pdf" and "asd.pptx", neither works.

yhatt commented 3 years ago

We cannot reproduce that in Kubuntu 20.04. PDF export is working by setting .pdf extension explicitly.

https://user-images.githubusercontent.com/3993388/121181000-7f3ba200-c89c-11eb-8f60-c8a04647b7eb.mp4

RocStone commented 3 years ago

A weird thing happened, I rebooted my PC and now it works fine. Thanks for your help!