Article View: comp.text.tex
Article #128New on CTAN: codemwe
From: CTAN Announcements
Date: Sun, 25 Oct 2026 17:36
Date: Sun, 25 Oct 2026 17:36
87 lines
5605 bytes
5605 bytes
Nan Geng submitted the
codemwe
package.
Version: 1.1.0
License: lppl1.3c
Summary description: Typeset code with a result box and generate MWE files
Announcement text:
------------------------------------------------------------------------
codemwe typesets example code and its compiled result in one box and,
from the same source, writes a minimal independently compilable file
for the example. It is written in expl3 on top of tcolorbox, fancyvrb
and graphicx, and was developed while writing a package manual, where
every example must appear as code, as result, and as a file the reader
can compile.
Features
* example, example* and texcode environments for horizontal, vertical
and code-only layout, plus a ccode environment preset for C code.
Each example is numbered, labelled and cross-referenceable.
* Automatic generation of an MWE .tex file per example, with the
document class, the packages and optional extra preamble material
placed in the preamble and the body delimited by comment lines.
* Code backends: extension, comment character, compilability and
minted language name are kept together, so that non-LaTeX code
can be shown and saved.
LaTeX and C are built in; \codemweNewBackend registers more.
* Optional syntax highlighting through minted (“minted” and
“mintedstyle” options). minted is detected and loaded when
codemwe itself is loaded, so highlighting can be switched on
and off anywhere in the body or per environment with no preamble
preparation; when minted or -shell-escape is missing, the
package falls back to fancyvrb with a single warning.
* Six built-in box designs plus \codemweNewBox for user-defined
tcolorbox designs; optional titles.
* Language varieties for the transition phrases, the structural
comment words and the reference prefix, “en” and “zh” built in,
\codemweNewLang for further varieties.
* Fine control over what is printed in the code box (withcls,
withpkg, withextra, nobody, noshow) and over numbering,
line numbers, spacing and result figure size.
* All options usable as package options, environment options,
or with \codemweset in the current scope.
Requirements
* LaTeX2e 2020-10-01 or later, expl3, tcolorbox (2020-10-09 or later),
fancyvrb, graphicx.
* For the minted option only: the minted package and a compilation
with -shell-escape.
The bilingual (Chinese/English) manual, codemwe.pdf, is included.
It is typeset with codemwe itself and may serve as a gallery of
the package's output.
------------------------------------------------------------------------
The package’s Catalogue entry can be viewed at
https://ctan.org/pkg/codemwe
The package’s files themselves can be inspected at
https://mirrors.ctan.org/macros/latex/contrib/codemwe/
------------------------------------------------------------------------
Thanks for the upload.
For the CTAN Team
Petra RĂĽbe-Pugliese
------------------------------------------------------------------------
CTAN is run entirely by volunteers and supported by TeX user groups.
Please join a user group or donate to one, see https://ctan.org/lugs
Technical Details
Message-ID:
<at4-LqRltQp1ku4D@prptp>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: CTAN Announcements <petra@ctan.org> Newsgroups: comp.text.tex Subject: New on CTAN: codemwe Date: Sun, 25 Oct 2026 18:36:46 +0100 Organization: CTAN Lines: 87 Message-ID: <at4-LqRltQp1ku4D@prptp> Reply-To: ctan@ctan.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: solani.org; logging-data="371952"; mail-complaints-to="abuse@news.solani.org" To: ctan-ann@ctan.org Cancel-Lock: sha1:NCJ10J4xomtFlfRQNPayx1NWBwE= X-Message-ID-Hash: IRC6DU62HWDAAMITZTG7O7DQGWFSY6P6 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address Content-Disposition: inline X-Rspamd-Action: no action X-Mailman-Version: 3.3.8 X-User-ID: eJwFwYEBwCAIA7CX1JUC51Am/59gYh8320EjbGyy4J1nr5iM0o9gZpnXFQVCxFo0tUuHFw8USxDg Message-ID-Hash: IRC6DU62HWDAAMITZTG7O7DQGWFSY6P6 X-Spamd-Result: default: False [-2.60 / 16.00]; BAYES_HAM(-3.00)[100.00%]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[]; RCVD_TLS_LAST(0.00)[]; LOCAL_OUTBOUND(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; HAS_REPLYTO(0.00)[ctan@ctan.org]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_DOM_EQ_TO_DOM(0.00)[]; MIME_TRACE(0.00)[0:+] X-Rspamd-Server: irony X-Mailman-Rule-Hits: member-moderation X-Rspamd-Queue-Id: A30CE8052E X-MailFrom: petra@ctan.org Precedence: list DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ctan.org; s=201703; t=1792949813; bh=bTUnBvaLv8kqXUzDeyLTaMTsn3R9cWevr29sw4CO16g=; h=Date:From:To:Subject:Reply-To:From; b=pZNG1rVdGRwCj4c82qQbfLqLHfcI/yd8pdbrUtzr/rTjPurCdjfG0qQ48AW/irWjJ 342ymJ1qXl+rq9L1vYGdoyr2iAwp65t4imYhou36eh3XOeEL9LZDtyPRTq4W6s6Kwy dik/Gx3IvTKzJog2k/iDocNuPur0kOFsstm5NATo=