Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocaml source-code examples are not "copy-paste-able" (if they employ apostrophe-character) #5497

Closed
vicuna opened this issue Jan 31, 2012 · 5 comments

Comments

@vicuna
Copy link

vicuna commented Jan 31, 2012

Original bug ID: 5497
Reporter: kosik
Status: closed (set by @xavierleroy on 2013-08-31T10:46:32Z)
Resolution: fixed
Priority: low
Severity: minor
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: documentation
Related to: #5261
Monitored by: @maranget @dbuenzli

Bug description

The program that renders HTML and PDF version of the Reference Manual projects ordinary apostrophe-character to (in case of HTML)

and in case of PDFs probably to some non-ASCII character.

As a result, when reader tries to copy-paste provided examples to Ocaml toplevel, e.g.

http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html#toc5

he gets an error:

??a’;;

Error: Illegal character (\128)

"Reader-friendly-ness" can be improved if source-code excerpts, that include apostrophe-characters, can be freely copy-pasted without the need to manually translate characters.

@vicuna
Copy link
Author

vicuna commented Jan 31, 2012

Comment author: @dbuenzli

To the doc maintainers. If you are using the listings package. Add the following at the beginning of the document :

\lstset{upquote=true} %% Otherwise ticks look like backticks.

@vicuna
Copy link
Author

vicuna commented Feb 1, 2012

Comment author: @damiendoligez

This is the second problem reported in #5261.

@vicuna
Copy link
Author

vicuna commented Feb 5, 2012

Comment author: @xavierleroy

The LaTeX sources for the manual do not use the listings package, but some old TeX hacks very similar to verbatim and alltt styles. And, yes, these are proper ASCII single quote characters in the LaTeX sources.

For the PDF output, we really don't control what's going on between pdflatex and the PDF reader. However, for the Hevea-generated HTML output, one would hope that ASCII quotes can be generated. Luc, could you please have a look at this issue?

@vicuna
Copy link
Author

vicuna commented Feb 9, 2012

Comment author: @damiendoligez

Fixed in the PDF version in trunk [3.13.0] (commit 12142).
Fixed also for backquote characters (commit 12145).

TODO: see with Luc how to fix it in the HTML version.

@vicuna
Copy link
Author

vicuna commented Feb 15, 2012

Comment author: @damiendoligez

Fixed also in the HTML version in trunk [3.13.0] (commit 12157).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant