{"id":25039350,"url":"https://github.com/multimeric/fwrappe","last_synced_at":"2025-05-05T14:40:58.959Z","repository":{"id":269376205,"uuid":"907218722","full_name":"multimeric/Fwrappe","owner":"multimeric","description":"Text Wrapping around Figures in Quarto","archived":false,"fork":false,"pushed_at":"2024-12-27T15:28:40.000Z","size":463,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T21:43:47.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://multimeric.github.io/Fwrappe/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multimeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T05:18:12.000Z","updated_at":"2025-03-22T08:13:03.000Z","dependencies_parsed_at":"2024-12-23T18:06:37.241Z","dependency_job_id":null,"html_url":"https://github.com/multimeric/Fwrappe","commit_stats":null,"previous_names":["multimeric/fwrappe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FFwrappe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FFwrappe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FFwrappe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FFwrappe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multimeric","download_url":"https://codeload.github.com/multimeric/Fwrappe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252516041,"owners_count":21760710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-06T02:21:07.228Z","updated_at":"2025-05-05T14:40:58.939Z","avatar_url":"https://github.com/multimeric.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fwrappe - Text Wrapping around Figures in Quarto\n\nFwrappe (pronounced like the frappe drink, probably) is a **F**igure **Wrappe**r for Quarto.\n\n## Motivation\n\nQuarto HTML outputs don't support wrapping text around figures.\nHowever, people often request this feature:\n\n- \u003chttps://github.com/quarto-dev/quarto-cli/discussions/11053\u003e\n- \u003chttps://forum.posit.co/t/picture-and-text-side-by-side-on-quarto/147682\u003e\n\nIt is possible to use a manual solution as described in the above issues.\nThe reason Fwrappe is a better option is because:\n\n- Fwrappe is portable to both HTML and PDF (LaTeX) formats\n- Fwrappe wraps entire figures instead of just images. This means that figure captions look correct\n- Fwrappe provides an auto-wrap feature so you don't need to modify each figure\n- You don't need to use or learn CSS and/or LaTeX yourself\n\n## Installing\n\n```bash\nquarto add multimeric/fwrappe\n```\n\nThis will install the extension under the `_extensions` subdirectory.\nIf you're using version control, you will want to check in this directory.\n\n## Basic Usage\n\nFirst you will need to enable the filter by adding it to the filters list in your YAML metadata, **making sure you put `quarto` in the list preceding it**:\n```yaml\nfilters:\n  - quarto\n  - fwrappe\n```\n\nThen, you can add the `.wrap-left` or `.wrap-right` classes to your images, to make text wrap around them.\n```md\n![](https://live.staticflickr.com/5042/5362356515_9d782e74f6_b.jpg){width=200 .wrap-left}\n```\n\n`.wrap-left` means \"the figure will sit on the left of the page, and the text will wrap around it to the right\".\nThis is a little confusing, I realise.\n\nThe end product will look [like this](https://multimeric.github.io/Fwrappe/examples/example.html).\n\n## Specifying Width\n\nFor the HTML format, you can optionally specify a figure width [the standard way](https://quarto.org/docs/authoring/figures.html#figure-sizing), which will determine how much text can fit around it.\n\nHowever, for the LaTeX format, it is *mandatory* to provide a width.\nThis is for various technical reasons explained [in the technical documentation](https://multimeric.github.io/Fwrappe/implementation.html).\n\nNote if you are using [figure divs](https://quarto.org/docs/authoring/figures.html#figure-divs) that the `width=` attribute must go on the image and not on the figure div when doing this. You can refer to [this source code](https://github.com/multimeric/Fwrappe/blob/main/examples/figure_div.qmd) and [its rendered copy](https://multimeric.github.io/Fwrappe/examples/figure_div.html) for help.\n\n## Advanced Config\n\nYou can also customize the extension using the `fwrappe` metadata key in your documents.\nThis supports two different options: `auto` and `margin`.\n\n### `margin`\n\n\u003e [!NOTE]\n\u003e `margin` is not currently supported for the LaTeX/PDF format. Instead, the figure will have a margin of `\\intextsep` at the top, and `\\columsep` at the sides\n\n\nThe `margin` parameter can be set the the number of pixels to leave as a space around the text-wrapped image.\nFor example:\n```\n---\nfwrappe:\n  margin: 200\n---\n```\n\n[Here's an example of this obscenely large margin](https://multimeric.github.io/Fwrappe/examples/margin.html).\n\nYou can also customize different parts of the margin by providing a dictionary with four keys:\n\n```\n---\nfwrappe:\n  margin:\n    top: 0\n    right: 100\n    bottom: 100\n    left: 0\n---\n```\n\n[Here's an example where the bottom and right margins are wide, but the top and left margins are zero](https://multimeric.github.io/Fwrappe/examples/complex_margin.html).\n\n### `auto`\n\nSetting `auto` to `left` or `right` will automatically make all figures text wrap in the specified direction:\n\n```\n---\nfwrappe:\n  auto: \"left\"\n---\n```\nYou can disable this selectively by adding a `.nowrap` class to some images.\nThis is demonstrated [in the following example](https://multimeric.github.io/Fwrappe/examples/autowrap.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Ffwrappe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultimeric%2Ffwrappe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Ffwrappe/lists"}