Giter VIP home page Giter VIP logo

pandoc-theoremnos's People

Contributors

jschlatow avatar tomduck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pandoc-theoremnos's Issues

New project

This project was contributed to the the pandoc-xnos filter suite by @ValiValpas. Many thanks!

I'm going to use this Issue to report and discuss changes as we work toward a release.

I have made some changes to the initial commit. The version number is now 2.0.0a1 which identifies it as an alpha release. Install instructions are given at the top of the README.md. Any existing installation may need to be removed before installing this one.

I have created a 'nextrelease' branch for development.

Pandoc-xnos has been updated and will be automatically upgraded when this project is installed. Some more changes to pandoc-xnos will likely be needed as described in PR #1.

The demos have been built and are pushed to the 'demos' branch.

More soon. ☺︎

TypeError: 'NoneType' object is not subscriptable

Got the following error when running:

pandoc -f markdown+smart+fenced_divs --lua-filter=texclass.lua --standalone -F pandoc-theoremnos -F pandoc-crossref --citeproc --number-sections --output=output/test.pdf test.md
Traceback (most recent call last):
  File "/usr/local/bin/pandoc-theoremnos", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pandoc_theoremnos.py", line 488, in main
    altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta),
  File "/usr/local/lib/python3.8/dist-packages/pandoc_theoremnos.py", line 488, in <lambda>
    altered = functools.reduce(lambda x, action: walk(x, action, fmt, meta),
  File "/usr/local/lib/python3.8/dist-packages/pandocfilters.py", line 110, in walk
    res = action(item['t'],
  File "/usr/local/lib/python3.8/dist-packages/pandocxnos/core.py", line 856, in process_refs
    _process_refs(value[-5], pattern, labels)
  File "/usr/local/lib/python3.8/dist-packages/pandocxnos/core.py", line 92, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pandocxnos/core.py", line 758, in _process_refs
    if v['t'] == 'Cite' and len(v['c']) == 2:
TypeError: 'NoneType' object is not subscriptable

re.compile('(asum|prop|lemma):[\\w/-]*')
Error running filter pandoc-theoremnos:
Filter returned error status 1

My example markdown is as follows:

---
title: "ABC"
author: "XYZ"
date: \today
geometry: margin=1in
fontsize: 12pt
fontfamily: times
link-citations: true
abstract: "Example."

header-includes:
    - \usepackage{setspace}
    - \doublespacing
    - \usepackage{floatpag}
	- \usepackage{cleveref}
    - \usepackage[utf8]{inputenc}
    - \floatpagestyle{empty}
    - \usepackage[small,compact]{titlesec}
theoremnos-cleveref: True
theoremnos-names:
    - id: asum
      name: Assumption
    - id: prop
      name: Proposition
    - id: lemma
      name: Lemma
---

a   b   c
--- --- ---
1   2   3
4   5   6

: Caption {#tbl:label}

[My Theorem]{#lemma:id}
: This is my theorem.

[123]{#lemma:n-derivative}
: In equilibrium, $n^*$ can be expressed as:

$$
n^*=\frac{b-\frac{4 (\beta  D_H+(1-\beta)D_L)^2}{(\beta D_H^2+(1-\beta)D_L^2)+4/q}}{2 t}
$$


@lemma:n-derivative

@tbl:label

@lemma:id

The problem is with the table reference. That seems to be the one that is conflicting with this filter. Removing the table will resolve the issue, but it is currently the only way to reference a table AFAIK: http://lierdakil.github.io/pandoc-crossref/#table-labels

Has it been removed from pypi? INstallation fails

Hello,

this is a wonderful project. But python3 -m pip install --user pandoc-theoremnos fails with

ERROR: Could not find a version that satisfies the requirement pandoc-theoremnos (from versions: none)
ERROR: No matching distribution found for pandoc-theoremnos

Use Latex mathematical mode inside theorem name results in error.

This is my markdown:

[$\epsilon$]{#dfn:def}
: Epsilon is a letter of the Greek alphabet

This is the error I get

Error producing PDF.
! Missing $ inserted.
<inserted text>
                $
l.123 \begin{dfn}[\epsilon]

How can I access mathematical mode inside the theorem name?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.