# Question:problem translating string to latex. Using standard latex for string translation

## Question:problem translating string to latex. Using standard latex for string translation

Maple 2023

The standard way of writing quotes and double quotes in LaTeX is with  and ''

So a string should be translated to Latex using the_string' '  and not the_string"  which is what Maple does.

see for example this

For example, Maple translates  "regular" to

"\text{regular\"}"

It should be

"\text{regular' '}"

i.e. instead of closing it on the RIGHT with string quote  \"  it should close it with two upticks, like this ' '

Hard to see the differene here, so here is screen shot

s:="regular";
latex(s,output=string);
lprint(%)

The difference will show up depending on what font one is using. Here is an example below where when using different font, the effect is now visible.

\documentclass[12pt]{book}
\usepackage{amsmath}

\usepackage[T1]{fontenc}
\usepackage{mlmodern}

\begin{document}

\text{regular"}

\text{regular''}

\end{document}

The first one above is what Maple generates, the second one is what it should have been. Compiling with luatex gives this pdf, You can see clearly the difference now

It is important to note that this behavior shows depending on font used. For example, this code

\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}

\text{regular"}

\text{regular''}

\end{document}


When compiled gives

So to be safe, it is better to always use the standard   ....' '   and not  .... \" because it then works the same for different fonts being used.

So, would it be possible to make Maple generate quoted string using the standard latex by closing it with ' ' instead of \"  ?

﻿