GithubHelp home page GithubHelp logo

mpark / wg21 Goto Github PK

View Code? Open in Web Editor NEW
118.0 14.0 43.0 12.04 MB

Framework for Writing C++ Committee Papers

License: Boost Software License 1.0

Makefile 7.03% Python 57.46% HTML 12.81% CSS 20.83% Shell 1.87%
wg21 cpp proposals papers tony-tables

wg21's Introduction

Framework for Writing C++ Committee Papers

Introduction

This is a paper-writing framework designed to ease the pain of authoring papers for WG21, built on top of Pandoc.

In short, you write your papers in Markdown and the framework produces the paper either in HTML or PDF.

Requirements

  • python3
  • xelatex (Only for PDF papers)

OS X

brew install mactex # Only for PDF papers

Ubuntu

sudo apt-get install texlive-latex-base # Only for PDF papers

Debian

Debian installation may require these additional packages:

  • texlive-fonts-recommended
  • texlive-latex-recommended
  • texlive-latex-extra

Integration

git submodule add https://github.com/mpark/wg21.git

echo "include wg21/Makefile" > Makefile

make <paper>.pdf  # `<paper>.md` -> `generated/<paper>.pdf`
make <paper>.html # `<paper>.md` -> `generated/<paper>.html`

See mpark/wg21-papers for an example use of this project.

Generation

make <paper>.pdf  # `<paper>.md` -> `generated/<paper>.pdf`
make <paper>.html # `<paper>.md` -> `generated/<paper>.html`

Formatting

This framework provides support for various common elements for C++ papers.

Title

The title is specified in a YAML metadata block.

date: today will generate today's date in YYYY-MM-DD (ISO 8601) format.

YAML lists can be used to specify multiple audiences and authors:

---
title: Integration of chrono with text formatting
document: P1361R0
date: 2018-10-16
audience:
  - Library Evolution Working Group
  - Library Working Group
author:
  - name: Victor Zverovich
    email: <[email protected]>
  - name: Daniela Engert
    email: <[email protected]>
  - name: Howard E. Hinnant
    email: <[email protected]>
---

Table of Contents



The default toc-depth is 3, but it can be specified to go deeper:

Markdown

Refer to the full Pandoc Markdown spec for useful extensions!

Embedded Markdown within Code

Within default, cpp, and diff code elements, any text surrounded by the @ symbol is formatted as Markdown! This is useful for conventions such as see below, unspecified, and exposition-only variable names.

This also works for inline code, e.g.,

Recall the `static_cast`{.cpp} syntax: `static_cast < @_type-id_@ > ( @_expression_@ )`{.cpp}.

If you need to nest embedded Markdown, surround the outer context with @@. This comes up sometimes if you want to produce inline diffs within a code block, and some of the inner code need to be marked up.

```
template <@[`invocable`]{.rm}[`class`]{.add}@ F@[`, class`]{.add}@>
struct @_as-receiver_@ {
@[`private:`]{.rm}@
  @[`using invocable_type = std::remove_cvref_t<F>;`]{.rm}@
  @[`invocable_type`]{.rm}[`F`]{.add}@ f_;
@[`public:`]{.rm}@
  @@[`explicit @_as-receiver_@(invocable_type&& f)`]{.rm}@@
  @@[`@_as-receiver_@(@_as-receiver_@&& other) = default;`]{.rm}@@
  void set_value() @[`noexcept(is_nothrow_invocable_v<F&>)`]{.add}@ {
    invoke(f_);
  }
  @[`[[noreturn]]`]{.add}@ void set_error(std::exception_ptr) @[`noexcept`]{.add}@ {
    terminate();
  }
  void set_done() noexcept {}
};
```

Comparison Tables

Comparison Tables are fenced Div blocks that open with ::: cmptable and close with :::. Fenced code blocks are the only elements that actually get added to Comparison Tables, except that the last header (if any) before a fenced code block is attached to the cell above.

::: cmptable

### Before
```cpp
switch (x) {
  case 0: std::cout << "got zero"; break;
  case 1: std::cout << "got one"; break;
  default: std::cout << "don't care";
}
```

### After
```cpp
inspect (x) {
  0: std::cout << "got zero";
  1: std::cout << "got one";
  _: std::cout << "don't care";
}
```

:::

Each fenced code block is pushed onto the current row, and horizontal rules (---) are used to move to the next row.

::: cmptable

### Before
```cpp
switch (x) {
  case 0: std::cout << "got zero"; break;
  case 1: std::cout << "got one"; break;
  default: std::cout << "don't care";
}
```

### After
```cpp
inspect (x) {
  0: std::cout << "got zero";
  1: std::cout << "got one";
  _: std::cout << "don't care";
}
```

---

```cpp
if (s == "foo") {
  std::cout << "got foo";
} else if (s == "bar") {
  std::cout << "got bar";
} else {
  std::cout << "don't care";
}
```

```cpp
inspect (s) {
  "foo": std::cout << "got foo";
  "bar": std::cout << "got bar";
  _: std::cout << "don't care";
}
```

:::

The last block quote > caption (if any) is used as the caption.

::: cmptable

> Put your caption here

### Before
```cpp
switch (x) {
  case 0: std::cout << "got zero"; break;
  case 1: std::cout << "got one"; break;
  default: std::cout << "don't care";
}
```

### After
```cpp
inspect (x) {
  0: std::cout << "got zero";
  1: std::cout << "got one";
  _: std::cout << "don't care";
}
```

:::

Proposed Wording

Paragraph Numbers

Paragraph numbers are bracketed Span elements that look like: [2]{.pnum} and [2.1]{.pnum}.

[2]{.pnum} An expression is _potentially evaluated_ unless it is an unevaluated
operand (7.2) or a subexpression thereof. The set of _potential results_ of
an expression `e` is defined as follows:

- [2.1]{.pnum} If `e` is an _id-expression_ (7.5.4), the set contains only `e`.
- [2.2]{.pnum} If `e` is a subscripting operation (7.6.1.1) with an array operand,
the set contains the potential results of that operand.

Code Changes

Wording Changes

Large changes are fenced Div blocks with ::: add for additions, ::: rm for removals.

Small, inline changes are bracketed Span elements that looks like [new text]{.add} or [old text]{.rm}.

Grammar Changes

Use line blocks (|) in order to preserve the leading spaces.

> | _selection-statement:_
> |     `if constexpr`_~opt~_ `(` _init-statement~opt~_ _condition_ `)` _statement_
> |     `if constexpr`_~opt~_ `(` _init-statement~opt~_ _condition_ `)` _statement_ `else` _statement_
> |     `switch (` _init-statement~opt~_ _condition_ `)` _statement_
> |     [`inspect` `constexpr`~_opt_~ `(` _init-statement~opt~_ _condition_ `)` `{`
>            _inspect-case-seq_
>        `}`]{.add}
>
> ::: add
> | _inspect-case-seq:_
> |     _inspect-case_
> |     _inspect-case-seq_ _inspect-case_
>
> | _inspect-case:_
> |     _attribute-specifier-seq~opt~_ _inspect-pattern_ _inspect-guard~opt~_ `:` _statement_
>
> | _inspect-pattern:_
> |     _wildcard-pattern_
> |     _identifier-pattern_
> |     _constant-pattern_
> |     _structured-binding-pattern_
> |     _alternative-pattern_
> |     _binding-pattern_
> |     _extractor-pattern_
>
> | _inspect-guard:_
> |     `if (` _expression_ `)`
> :::

Stable Names

Stable names are bracketed Span elements that look like: [stable.name]{.sref}.

In [expr.sizeof]{.sref}/5:

The identifier in a `sizeof...` expression shall name a [parameter]{.rm} pack.
The `sizeof...` operator yields the number of [arguments provided for]{.rm}
[elements in]{.add} the [parameter]{.rm} pack [identifier]{.rm} ([temp.variadic]{.sref}).

Run make update to update the local cache of annex-f.

Citations

In-text citations look like this: [@id]

References

Automatic References

The bibliography is automatically generated from https://wg21.link/index.yaml for citations of the following types.

Type Id
Paper Nxxxx / PxxxxRn
Issue CWGxxxx / EWGxxxx / LWGxxxx / LEWGxxxx / FSxxxx
Editorial EDITxxx
Standing Document SDx

The [@N3546] example from Citations generates:

Run make update to update the local cache of index.yaml.

Manual References

Manual references are specified in a YAML metadata block similar to Title, typically at the bottom of the document.

The `id` field is for in-text citations (e.g., [@PAT]),
and `citation-label` is the label for the reference.

Typically `id` and `citation-label` are kept the same.

---
references:
  - id: PAT
    citation-label: Patterns
    title: "Pattern Matching in C++"
    author:
      - family: Park
        given: Michael
    URL: https://github.com/mpark/patterns
---

Unicode Considerations

If you build for LaTeX output and you have Unicode characters in any of your paper's source code, you may have problems. First, the default PDF engine simply does not support Unicode characters. You can add --pdf-engine=xelatex to the call to pandoc in the Makefile to use xelatex instead. That gives you access to some font selections for different parts of your paper (see the Fonts section of the Pandoc manual). The option that controls your source code fonts is monofont. You can add a line with your monofont choice to your YAML metadata block. Here, it's "DejaVu Sans Mono" which provides glyphs for a large amount of the Unicode characters:

---
title: Integration of chrono with text formatting
document: P1361R0
date: 2018-10-16
audience:
  - Library Evolution Working Group
  - Library Working Group
author:
  - name: Victor Zverovich
    email: <[email protected]>
  - name: Daniela Engert
    email: <[email protected]>
  - name: Howard E. Hinnant
    email: <[email protected]>
monofont: "DejaVu Sans Mono"
---

If you want the list of available fonts on your system, most supported systems will produce a list via the command-line tool fc-list.

Other Papers

  • P1361: Integration of chrono with text formatting
  • P1390: Suggested Reflection TS NB Resolutions

License

Distributed under the Boost Software License, Version 1.0.

Resources

wg21's People

Contributors

bcardosolopes avatar brevzin avatar chiphogg avatar dansarginson avatar kirkshoop avatar mpark avatar redbeard0531 avatar regevran avatar smurzin avatar timsong-cpp avatar tzlaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wg21's Issues

Stray quotes at beginning of HTML doc

With HTML output I get two single ticks right at the beginning of the doc, see the two &#39;:

&#39;<style type="text/css">'
   'code span.an { color: #1F1C1B; font-style: italic; }'
   'code span.in { color: #006E28; font-style: italic; }'
   'code span.wa { color: #BF0303; font-style: italic; }'
   '</style>&#39;

Unquoting the block fixes it:

diff --git a/template/header.yaml b/template/header.yaml
index e34d2b8..6d22810 100644
--- a/template/header.yaml
+++ b/template/header.yaml
@@ -30,10 +30,10 @@ header-includes:
     ```
   - |
     ```{=html}
-    '<style type="text/css">'
-      'code span.an { color: #1F1C1B; font-style: italic; }'
-      'code span.in { color: #006E28; font-style: italic; }'
-      'code span.wa { color: #BF0303; font-style: italic; }'
-    '</style>'
+    <style type="text/css">
+      code span.an { color: #1F1C1B; font-style: italic; }
+      code span.in { color: #006E28; font-style: italic; }
+      code span.wa { color: #BF0303; font-style: italic; }
+    </style>
     ```
 ---

Improve readability on phones

I read most papers on my phone, but your default css has wide margins that make that difficult. Here's a screenshot (using firefox dev tools responsive viewer) of a proposal I'm working on. I extended the length so that more would be visible, but the width is the same as on a Galaxy S9:

before

Note how there are very few words per line, and how the metadata labels have fallen off the left edge.

I suggest two changes. Either set the margin to 1.5em everywhere, or at least do it within a media query like this (it needs to go after the default body block):

@media screen and (max-width: 30em) {
    body {
	margin: 1.5em;
    }
}

Also, I suggest setting text-align: justify; on the body. It makes a big difference on mobile because the ragged edges are a larger percentage of the total width. But I also think it just looks better for prose even on a desktop.

Here is another screenshot with the modified CSS, or you'd like to quickly try it on any of your devices, this draft paper is using the patched CSS:

after

If you would prefer, I'd be happy to make a PR with these changes.

Alternatives to markdown?

I came across how-i-format-my-cpp-papers and wanted to ask if you were aware of asciidoc and other alternatives to markdown?

There is no option to comment on your blog. I thought it better to ask here rather than email you directly as it could otherwise be asked a few times.

This is not a criticism or defect report and you are of course free to use whatever you want.
You might interpret this as a feature request for a companion blog entry "why Markdown is for me?" which you are free to reject.

asciidoc, if you don't know of it, is similar to markdown but much less limiting. You can write entire books in it (it can be mapped to docbook).
I've found it a very good fit for small specifications and where I want to generate both html and PDF.

There are other alternatives as well and its quite a deep well to explore but I think its interesting when someone settles on one to understand their reasons. I've observed people often start with pure Markdown and discover the alternatives only when they get fed up with its limitations.
Coming from LaTeX the limitations must have been more visible to you at the outset which should make for an interesting perspective.

Spacing is inconsistent between references that have a URL and ones that don't

In PDF output, an extra blank line is inserted after a reference if and only if the reference has a URL:

image

This inconsistent spacing is undesirable. I'm going to assume you like the version with the extra blank line better, so we need to make sure the blank line is always there regardless of whether we have a URL or not. But if you prefer it the other way (no blank line ever) then that's fine too. And if you don't have time to work on this, let me know and I'll send you a PR.

New Pandoc compains about `cslreferences`

While generating a PDF with citations on the latest Pandoc the following error is reported:

Error producing PDF.
! LaTeX Error: Environment cslreferences undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.384 \begin{cslreferences}

make: *** [../wg21/Makefile:6: generated/2007R0_std_from_chars_should_work_with_std_string_view.pdf] Error 43

Improve table styles in HTML

Tables in HTML currently are not of consistent width:

image

We should try to keep at least a somewhat consistent width for tables.

TonyTable Captions broken

I updated the submodule for wg21 today and papers with captioned tony-tables fail with:

Error producing PDF.
! Use of \LT@array doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
                                                  #2}\def \reserved@b {#3}\f...
l.499 (simplified for clarity)}

Underline / strikethrough in PDF

The PDF output does not show add/rm as underline / strikethrough. This is an issue for CWG. #18 makes me prefer PDF, were it not for the lack of underline / strikethrough...

HTML tables should have borders

This table:

+------------+------------------------------------------------------+------------------------------------------------+
| Category   | *reflexpr-operand*                                   | `reflect` Concept                              |
+============+======================================================+================================================+
| Type       | *class-name* designating a union                     | `reflect::Record`                              |
+------------+------------------------------------------------------+------------------------------------------------+
|            | *class-name* designating a closure type              | `reflect::Lambda`                              |
+------------+------------------------------------------------------+------------------------------------------------+

is rendered without cell borders when generating HTML. It would be nice if tables would have cell borders in HTML, just like they have for the C++ standard PDF. This would make complex cells much more readable. (I notice in the reflection TS; CWG will surely appreciate an improvement there!)

PDF broken in master

IIUC 2785e81 broke PDF:

-   'code span.an { color: #1F1C1B; font-style: italic; }'

produces:

\renewcommand{\WarningTok}[1]{\textcolor{rmcolor}{\textit{#1}}}

code span.an \{ color: \#1F1C1B; font-style: italic; \}

which causes:

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.113 c
       ode span.an \{ color: \#1F1C1B; font-style: italic; \}
!  ==> Fatal error occurred, no output PDF file produced!

Help! Kona is coming and I need pdfs! :-)

Add hyperlink that goes directly to other WG21 papers

I find it extremely tedious to click on a reference like [PnnnnR0] and get taken to the references section at the end of the paper, where I have to manually scan through the references to find the one I clicked on (because the browser doesn't put it at the first line because we're at the end of the doc), and then click again. I don't care about the nicely formatted references section that makes it look like a nice academic paper. I just want to go to PnnnnR0 and read the flipping paper!

Would it be possible to add a little "link" icon (e.g. U+1F517) after a reference, so that it appears as [PnnnnR0]🔗 and I can click the icon to go straight to the paper, not to the References section?

Personally, I'd just make the reference in square brackets go directly to the paper in the first place ... does anybody read the References? Maybe that info (title, author, date etc) could be presented as a mouseover popup using the title attribute of the <a> element to save jumping to the end of the paper. Most of the time I just want to read the actual paper, so I want to open it in a new browser tab ASAP. I don't want to go to the references at the end then jump back to where I was reading. That workflow dates from papers printed on actual paper, and is just tedious in hypertext.

Toggle Diffs

I've seen several papers that provide a check-box to just hide <del>-ed text from the wording. I think this helps read what the wording is intended to be like, for those papers that change/move around things.

bikeshed has a flag for this.

Is this something mpark/wg21 should provide?

paper must have at least one code block :)

otherwise you get this:

Traceback (most recent call last):
  File "./wg21/data/filter/wg21.py", line 413, in <module>
    prepare=prepare)
  File "./py/lib/python3.6/site-packages/panflute/io.py", line 236, in run_filters
    prepare(doc)
  File "./wg21/data/filter/wg21.py", line 62, in prepare
    assert(len(codeblocks) == len(texts))
AssertionError
Error running filter wg21/data/filter/wg21.py:
Filter returned error status 1

HTML title just has markdown eaten

I have a paper whose metadata has:

title: "Inheriting from `std::variant`"

This gets rendered in HTML as:

<title>Inheriting from </title>

Although this does the right thing for the actual heading;

<h1 class="title" style="text-align:center">Inheriting from <code class="sourceCode cpp">std<span class="op">::</span>variant</code></h1>

I can fix this by adding a separate pagetitle element with "Inheriting from std::variant" (no markdown), but would be cool if that happened automatically.

`language.dtd` not found

After updating to the latest master I've started getting the following error:

$ make P0655R0.pdf
pandoc P0655R0.md  ./data/references.md \
       --number-sections \
       --self-contained \
       --table-of-contents \
       --bibliography ./data/index.yaml \
       --csl ./data/cpp.csl \
       --css ./data/template/14882.css \
       --filter pandoc-citeproc \
       --filter ./data/filter/wg21.py \
       --highlight-style ./data/syntax/wg21.theme \
       --metadata datadir:./data \
       --metadata-file ./data/metadata.yaml \
       --syntax-definition ./data/syntax/isocpp.xml \
       --template ./data/template/wg21 \
       --output generated/P0655R0.pdf

fatal error: file read error: "file not found" when accessing "/private/tmp/wg21/data/syntax/language.dtd"
Could not parse syntax definition ./data/syntax/isocpp.xml
make: *** [generated/P0655R0.pdf] Error 67

Any ideas?

p1260: possible customisation point

I wonder if "first match" semantics should actually be a customisation point?

Beyond the sequential implementaiton you might have an execution policy such as inspect(par) which could execute all matching choices in parallel. You could then implement production systems in the language directly.
par would be an object analogous to an executor rather than a simple enum.

HTML does not show \pnum

\pnum{}s are swallowed by HTML output. I use HTML output as CWG really wants to have strikethrough/underline, which doesn't work in PDF, see #19 . But not having paragraph numbers will make CWG at least as unhappy... Whatever is easier to fix (also taking into account #18 - maybe adding underline / strikethrough to PDF is simpler after all?)

Run example is not correct.

Instead of what you write in the instructions you have to write:

make generated/<paper>.pdf

This got me stumped for quite some time. Please update the instructions in the README.md file, or better, make it work without the generated/ prefix.

automatically install texlive-xetex?

first run of this on a new system yields:

xelatex not found. Please select a different --pdf-engine or install xelatex

apt installing texlive-xetex on my ubuntu system fixed it

Abandoned, non-functional code base?

Hi there :)

Apologies for my overly negative title, but I have great difficulty getting this to "just work".
I'm on Ubuntu 22, dependencies installed (python3, pip3, pandoc, texlive-full, etc.), and a myriad of errors.
In no particular order:

  • had to go to wg21/deps/python/pyvenv.cfg and change the variable include-system-site-packages to true, otherwise it couldn't find the installed Python packages, e.g. requests.
  • It complained multiple times about "error reading bibliography file wg21/data/csl.json", in which case I had to manually delete that file before I could run the Makefile again.
  • After fixing a lot of problems that should seem unrelated / I don't care, I get an error with a Latex command "\CSBlock" undefined.

There are (asides from this one) 7 open issues unattended.

It seems I must resort to raw Latex, because at least that works :/
This tool looks really cool otherwise, I'm really hoping these issues get fixed / documented.

Kind regards.

Can't put a div inside a p

If I have markdown like:

Some clause

[1]{.pnum} Some numbered thing.

Running that through the filters here produces:

<p>Some clause</p>
<p><div class="marginalizedparent"><a class="marginalized">1</a></div> Some numbered thing.</p>

But as I've learned today, you're not allowed to put a <div> in a <p>. This ends up doing all sorts of nonsense when I try to add custom formatting.

caption type is blockquote that hinders some other filters

The tonytables caption is generated from a blockquote in the span directly. While this is not a problem for pandoc itself, if combined with other filters (pandoc-tablenos) this can lead to problems, if such filters assume a node of type "Plain", such as pandoc-tablenos. It works, if an extra intermediate stage of markdown is used, but not directly.

The following code snippets show my changes for that:

    def quote2plain(elem):
        result = pf.Plain()
        result.content = elem.content[0].content # switch from BlockQuote Para content to Plain
        return result 
    for elem in table.content:
        if isinstance(elem, pf.Header):
            if not isinstance(header, pf.Null):
                warn(header)

            if first_row:
                header = pf.Plain(*elem.content)
                if 'width' in elem.attributes:
                    width = float(elem.attributes['width'])
            else:
                warn(elem)
        elif isinstance(elem, pf.BlockQuote):
            caption = quote2plain(elem)
            kwargs['caption'].content.append(caption)
        #...

Feel free to close this issue immediately.

Cannot generate a .pdf file if there are no external references

When collecting and forming the references at the end of the document, the pdf rendering cannot handle an empty set of references, while the html rendering has no trouble with such cases. A typical error that is reported when trying to generate a .pdf looks like:

% make RegularNullablePointer.pdf. // <-- command line

pandoc RegularNullablePointer.md -o generated/RegularNullablePointer.pdf -d ./data/defaults.yaml --bibliography ./data/csl.json
Error producing PDF.
! LaTeX Error: Command \CSLBlock undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...

l.98 \renewcommand{\CSLBlock}

make: *** [generated/RegularNullablePointer.pdf] Error 43

Non git submodule consumption

I prefer to have a separate git repo for each of my papers. Having git submodule for every repo seems like a waste in this case. Is it possible to provide other means to use this generator?

Problems with emphasis inside code blocks.

I don't get my @-surrounded emphasis to work, instead it just writes the @thing@ to the pdf.

Same problem for html.

Same problem with both __ and ** use .

Here is a sample code block that doesn't work for me, the intent is to boldface the word typename, but instead it just outputs the @** and **@ sequences as is:

class MyClass {
    operator int() { return 0; }
    operator double() { return 1; }
};

auto conv = &MyClass::operator @**typename**@;

MyClass c;

int a = (c.*conv)();
double a = (c.*conv)();

Add instructions for Debian

On Debian I had to install the following packages on top of ones already mentioned:

  • texlive-fonts-recommended
  • texlive-latex-recommended
  • texlive-latex-extra

Otherwise I get errors like this:

Error producing PDF.
! LaTeX Error: File `xcolor.sty' not found.

Broken with Pandoc 2.10

The most recent release of Pandoc 2.10 complains with messages like this:

$ make TEST.html                                                                                                                                                       ❮❮❮
pandoc TEST.md -o generated/TEST.html -d ./data/defaults.yaml --toc-depth 2 \
    --bibliography ./data/index.yaml
Traceback (most recent call last):
  File "/Users/mcypark/Projects/wg21/data/filter/wg21.py", line 511, in <module>
    ], prepare, finalize)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 233, in run_filters
    doc = load(input_stream=input_stream)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 56, in load
    doc = json.load(input_stream, object_pairs_hook=from_json)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 361, in loads
    return cls(**kw).decode(s)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/elements.py", line 1478, in from_json
    raise Exception('unknown tag: ' + tag)
Exception: unknown tag: Caption

Thanks @cjdb for pointing me to it.

Python 3.9 posixpath not happy

Hi, I get several errors from wg21.py wrt to passing a NoneType to os.fspath()

any ideas how to fix?

I am a complete python newbie....

Improve the style in HTML

Maybe it's juts on my setup, but the HTML style mostly duplicates the PDF one. Meanwhile, P1881 shows that we can do better 🙂

Improve table style in LaTeX

The tables in LaTeX currently generate something like:

image

The table is so tight with no separators between rows that it becomes difficult to read. Try to copy the table style used in the standard.

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.