Skip to content

Local and figure combination doesnt work #126

@kvapca

Description

@kvapca

hi, im trying to render local codly inside of figure so I can reference it:

#show: codly-init.with()
#codly(languages: codly-languages, header-cell-args: (align: center), number-align: right + top)

#figure(
local(number-format: none,
```c
#include <Rinternals.h>

SEXP c_add(SEXP x, SEXP y) {
}
```),
caption: [C part of `.Call`],
placement: none
)<c_add_example>

this code, however, results in this:

Image

I even tried to wrap figure into local but without any luck.
I'm using codly 1.3.0.

EDIT: here is minimal reproducible code:

#import "@preview/codly:1.3.0": *

#show: codly-init.with()
#codly(number-align: right + top)

#figure(
local(number-format: none,
```c
#include <Rinternals.h>

SEXP c_add(SEXP x, SEXP y) {}
```),
)

When I remove number-align: right + top it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions