#Custom APA figure block not breaking with raw blocks

8 messages · Page 1 of 1 (latest)

tacit radish
#

I can't get it to work honestly IDK what's wrong with it:

#let apa-figure(
  body,
  caption: none,
  gap: 1.5em,
  kind: auto,
  numbering: "1",
  outlined: true,
  placement: auto,
  scope: "column",
  supplement: auto,
  note: none,
  specific-note: none,
  probability-note: none,
  label: "",
) = context [
  #figure(
    [
      #set par(first-line-indent: 0em)
      #body
      #set align(left)
      #if note != none [
        _Nota._
        #note
      ]
      #parbreak()
      #specific-note
      #parbreak()
      #probability-note
    ],
    caption: caption,
    gap: gap,
    kind: kind,
    numbering: numbering,
    outlined: outlined,
    placement: placement,
    scope: scope,
    supplement: supplement,
  ) #std.label(label)
]

#show figure: set block(breakable: true, sticky: false)
#show figure: set align(left)
#show raw: set block(breakable: true, sticky: false)
#set raw(block: true)
#show raw: set align(left)
#show raw: it => {
  it
}
#outline(target: figure)

#figure(
  raw(read("/compose.yaml")),
  caption: [figure],
)

#pagebreak()
#apa-figure(
  raw(read("/compose.yaml")),
  caption: [apa afd asdf adsf],
  note: [Este define 4 servicios que comparten la misma red, la aplicación web, la base de datos, el proxy, y almacenamiento de archivos estáticos. Cada uno con su respectivo volumen para persistencia de datos.],
  label: "fig:proposed-docker-compose",
)

#

The test file is:

services:
  storage:
    image: minio/minio:latest
    container_name: hall_storage
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: ${MINIO_ROOT_USER:admin}
      MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:password123}
    ports:
      - "9000:9000"
      - "9001:9001"
    volumes:
      - minio_data:/data
    networks:
      - salon_network
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  app:
    env_file: .env
    container_name: hall_app
    expose:
      - "8000"
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - ./staticfiles:/app/staticfiles:ro
      - ./media:/app/media:ro
    depends_on:
      db:
        condition: service_healthy
      storage:
        condition: service_healthy
    ports:
      - "8000:8000"
    restart: unless-stopped
    networks:
      - salon_network
  db:
    image: postgres:latest
    container_name: hall_db
    environment:
      POSTGRES_DB: hall_db
      POSTGRES_USER: hall_user
      POSTGRES_PASSWORD: ${DB_PASSWORD:hall_password}
    volumes:
      - postgres_data:/var/lib/postgresql/data/
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U salon_user -d salon_lucy_db"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped
    networks:
      - salon_network
  proxy:
    image: caddy:latest
    container_name: hall_proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
    depends_on:
      - app
    restart: unless-stopped
    networks:
      - salon_network

volumes:
  postgres_data:
  minio_data:
  caddy_data:
  caddy_config:
networks:
  salon_network:
    driver: bridge

twilit musk
#

a figure with placement cannot be broken, it's position is fixed to a single page or column

tacit radish
#

Oh

#

OHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHhhhhhhh

#

ok

#

sob the auto was overwriting my template setting 😞