From 0aa5027923451a07c90a47fbd1b7c3a915f7f5ee Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Thu, 9 Feb 2012 18:09:20 +0000 Subject: [PATCH] PR#5497: source code example copy-paste problem with single quote character git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@12142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- manual/styles/caml-sl.sty | 40 +++++++++++++++++++++------------------ manual/tools/texquote2.c | 1 + 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/manual/styles/caml-sl.sty b/manual/styles/caml-sl.sty index 9d3727390..1f1e8eddf 100644 --- a/manual/styles/caml-sl.sty +++ b/manual/styles/caml-sl.sty @@ -15,24 +15,28 @@ \def \@@@parinunderline {\@eunderline\@oldpar\@bunderline} \def\@eunderline{\egroup\underline{\box0}} -\def\caml{ - \bgroup - \flushleft - \parindent 0pt - \parskip 0pt - \let\do\@makeother\dospecials - \catcode`\^^M=\active - \catcode`\\=0 - \catcode`\ \active - \frenchspacing - \@vobeyspaces - \let\@oldpar\par - \let\?\@camlinputline - \let\:\@camloutputline - \let\;\@camlblankline - \let\<\@bunderline - \let\>\@eunderline - \let\\\@camlbackslash +{\catcode`'=\active + \global\def\caml{ + \bgroup + \flushleft + \parindent 0pt + \parskip 0pt + \let\do\@makeother\dospecials + \catcode`'=\active + \chardef'=13 + \catcode`\^^M=\active + \catcode`\\=0 + \catcode`\ \active + \frenchspacing + \@vobeyspaces + \let\@oldpar\par + \let\?\@camlinputline + \let\:\@camloutputline + \let\;\@camlblankline + \let\<\@bunderline + \let\>\@eunderline + \let\\\@camlbackslash + } } \def\endcaml{ diff --git a/manual/tools/texquote2.c b/manual/tools/texquote2.c index 0652bbcaa..9ff4b91f3 100644 --- a/manual/tools/texquote2.c +++ b/manual/tools/texquote2.c @@ -49,6 +49,7 @@ int main(argc, argv) transl['&'] = "{\\char38}"; transl['#'] = "\\#"; transl['%'] = "\\%"; + transl['\''] = "{\\char13}"; inverbatim = 0; incaml = 0; inquote = 0;