| 404 | |
| 405 | def bump_beamerposter_scale(tex: str, target: float) -> str: |
| 406 | def repl(m): |
| 407 | opts = m.group(1) |
| 408 | if re.search(r"scale\s*=\s*[\d.]+", opts): |
| 409 | opts2 = re.sub(r"scale\s*=\s*[\d.]+", f"scale={target}", opts) |
| 410 | else: |
| 411 | if opts.strip().endswith(","): opts2 = opts + f"scale={target}" |
| 412 | elif opts.strip()=="": opts2 = f"scale={target}" |
| 413 | else: opts2 = opts + f",scale={target}" |
| 414 | return f"\\usepackage[{opts2}]{{beamerposter}}" |
| 415 | return re.sub(r"\\usepackage\[(.*?)\]\{beamerposter\}", repl, tex, flags=re.S) |
| 416 | |
| 417 | def inject_font_tweaks(tex: str, title_size_cmd: str) -> str: |