cpitclaudel / alectryon

A collection of tools for writing technical documents that mix Coq code and prose.
MIT License
227 stars 36 forks source link

Nice quotes in TeX output #95

Closed s5bug closed 4 months ago

s5bug commented 4 months ago

Perhaps this question belongs somewhere else, but searching for rst quote tex and similar queries came up short:

I have quoted phrases in my .v:

image

And these quotes always produce right-quotes:

image

when I would like them to produce quote-pairs:

image

The rules that build my .tex and .pdf are the following:

$(RSTV_TEXES): %.v.tex: %.v $(patsubst %.dot,%.dot.tex,$(wildcard *.dot))
    alectryon --frontend coq+rst --backend latex --latex-dialect xelatex $< --output $@

$(RSTV_PDFS): %.pdf: %.v.tex
    latexmk -xelatex $^ -jobname=$* -interaction=nonstopmode

and I have a docutils.conf like so:

[xetex writer]
documentclass: scrartcl
latex-preamble:
  \usepackage{amsfonts}
  \usepackage{amssymb}
  \usepackage{tikz}
  \usetikzlibrary{shapes.geometric}

Any suggestions on how to fix this / where to move this issue to are very much appreciated 🙇

cpitclaudel commented 4 months ago

I believe you want "smart quotes": https://docutils.sourceforge.io/docs/user/smartquotes.html ; does that work?

s5bug commented 4 months ago

Yippee thank you!

image

cpitclaudel commented 4 months ago

Woot! Thanks for the update. Please do send me a link if you put your document online, so I can put it in the gallery :)

s5bug commented 4 months ago

As much as I'd love to, I don't think my professor would be too fond of me publicly sharing homework answers 😅