Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3726 closed enhancement (fixed)

PDF manual from dblatex renders fancy quotes for programlisting

Reported by: Mike Taves Owned by: robe
Priority: low Milestone: PostGIS 2.3.3
Component: documentation Version: 2.3.x
Keywords: Cc:

Description

As described in this Q/A, parts of the PostGIS manual e.g. ST_MLineFromText define an example like this within programlisting:

<programlisting>SELECT ST_MLineFromText('MULTILINESTRING((1 2, 3 4), (4 5, 6 7))');</programlisting>

which renders fine for HTML outputs, however the PDF rendering via dblatex on page 29 shows:

SELECT ST_MLineFromText(’MULTILINESTRING((1 2, 3 4), (4 5, 6 7))’);

which has fancy, but bad quotes. Straight quotes need to be preserved in the programlisting environment. The PostgreSQL PDF manual does not have this issue.

Possible fixes are to use the "-s latex_style, --texstyle=latex_style" option for dblatex in the doc/Makefile.in, which would reference a static customized LaTeX style file that may modify how LaTeX handles these characters (e.g. this or other method).

Change History (10)

comment:1 Changed 2 years ago by robe

Milestone: PostGIS FuturePostGIS 2.4.0

comment:2 Changed 2 years ago by Mike Taves

See fix here: https://github.com/postgis/postgis/pull/128

dblatex uses the listings LaTeX package, so the fix was to set the option upquote=true

comment:3 Changed 2 years ago by robe

Milestone: PostGIS 2.4.0PostGIS 2.3.3

comment:4 Changed 2 years ago by robe

Version: trunk2.3.x

comment:5 Changed 2 years ago by robe

In 15365:

PDF manual from dblatex renders fancy quotes for programlisting
Change to use regular quotes
patch from Mike Toews
References #3726 for PostGIS 2.3

comment:6 Changed 2 years ago by Mike Taves

Almost there, you need to also add the doc/texstyle.sty file too.

comment:7 Changed 2 years ago by Mike Taves

... nevermind, it was there ... thanks!

comment:8 Changed 2 years ago by robe

Resolution: fixed
Status: newclosed

In 15366:

PDF manual from dblatex renders fancy quotes for programlisting
Change to use regular quotes
patch from Mike Toews
Closes #3726 for PostGIS 2.4 (trunk)

comment:9 Changed 2 years ago by Mike Taves

In [15366] it seems you copied astyle (a copy of astyle.sh) instead of doc/texstyle.sty

comment:10 Changed 2 years ago by robe

In 15373:

Revert committ of astyle and commit the intended textstyle.sty
References #3726 for PostGIS 2.4 trunk

Note: See TracTickets for help on using tickets.