Chisle
코딩 에이전트 플러그인, 20개 실시간 작업에서 기본 모델 52% 활용, 간결한 페르소나와 출력 압축 제공
m4cm.py는 M4 회로 매크로 독립 이미지 생성 도구 체인을 자동화한다
m4cm.py is used to automate the toolchain for producing M4 Circuit Macro standalone pictures, from .m4cm Circuit Macro source code, in either .eps, [encapsulated] .pdf, .png, .jpg or .svg format. Thes
개발 도구GitHub @pjrandewijk가동 상태 확인 전운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
저장소 정보는 아직 수집하지 않았습니다.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
M4 Cicuit Macros Python automation script to create standalone PDF, JPG and PNG pictures with ease.
README 전체를 불러오는 중입니다.
README 전문 보기 ↗The M4 Circuit Macros (M4CM) Python automation package simplifies to process to create standalone EPS, PDF, PNG, JPG and SVG pictures from Circuit Macros source, see also peter.randewijk.dk/m4cmpy for examples.
Version 4 needs only Python and a TeX distribution (MiKTeX or TeX Live): GNU m4, dpic and ImageMagick are no longer required.
| Package | Replaces | Role |
|---|---|---|
| pym4 | GNU m4 | m4 → pic |
| pppic | dpic -p | pic → PSTricks |
| m4cmpy | m4cm.py 3.3 | m4 → PDF / PNG / JPG / SVG / EPS |
pip install m4cmpy
m4cm --get-cm
m4cm --get-cm downloads the latest Circuit Macros
from CTAN into your user cache folder. Alternatively set M4PATH, pass -I DIR,
or rely on the copy in your TeX tree (found with kpsewhich libcct.m4).
The TeX tools come from MiKTeX or TeX Live: latex, dvips, Ghostscript
(mgs in MiKTeX, gs elsewhere), epstopdf for PDF and dvisvgm for SVG.
MiKTeX does not have to be on PATH; use --tex-bin DIR for other locations.
m4cm -p -n -s ex0.m4cm # PDF, PNG and SVG (plus EPS)
m4cm -p -d *.m4cm # PDF only, for every .m4cm file in the folder
m4cm -n -r 192 -o web ex0.m4cm # 192 dpi PNG in the folder "web"
| Option | Meaning |
|---|---|
-e | EPS (always made, default) |
-p / -n / -j / -s | PDF / PNG (transparent) / JPG / SVG |
--svg-fonts | SVG with embedded WOFF2 fonts instead of outlines |
-d | delete the EPS afterwards |
-r DPI | PNG/JPG resolution (default 600) |
-b L B R T | bounding-box offset in points (default 1 1 1 1) |
-a TEXT | append TEXT to the output file names |
-o DIR | output folder |
-t FILE | LaTeX template (default default.ltx) |
-I DIR | extra m4 include folder, e.g. for your own macro libraries |
-q / -Q | quiet / silent |
The LaTeX template is looked up in the current folder, then next to the input;
without one, a built-in template is used. Templates must contain a line with
%dpic_pstricks_output_here%; see Examples/default.ltx.
| Folder | Contents |
|---|---|
| src/m4cmpy | the m4cm command |
| tests | unit, toolchain and end-to-end tests: python -m unittest discover -s tests -v |
| Examples | example .m4cm files and template |
| Sansserif Math LaTeX Style Files | sansserifmath.sty, used by the example template |
| Syntax Highlighting | VS Code (.vsix), Notepad++, Kate and Programmer's Notepad definitions |
| Additional Scripts | animation helper, and m4cm_defines.py, which regenerates the syntax highlighting from a Circuit Macros release |
| legacy/m4cm.py | the classic script (version 3.3), which still uses m4, dpic and ImageMagick |
CI runs the tests on Windows, macOS and Linux against the latest pym4 and pppic, and builds the example with TeX Live (the figures are kept as a build artifact).
GPL-3.0-or-later; see LICENSE. Circuit Macros and dpic are by J. D. Aplevich.