A useful feature of TeXworks is the smart quote. Does TeXstudio have a similar feature? (to replace ""
and ''
with their Unicode opening and closing counterparts)
-
2Options > Configure TeXStudio... > Editor > Replace Double Quotes > English Quotes. I don't know if there is an equivalent for single quotes.– hpesoj626May 9, 2013 at 6:57
-
For more detail on @hpe 's answer consider this answer: tex.stackexchange.com/a/315360/110394 This question also generalizes to all the different quotation styles. German, french, etc.– CadoizAug 18, 2020 at 2:17
3 Answers
Currently TeXStudio does not support Unicode quote substitution, only TeX and csquotes quotes. I contacted the maintainer a while ago about the same issue and he told me he added that feature to the svn.
-
Similarly an option for inserting Unicode Greek letter and other symbols instead of LaTeX command is useful. May 13, 2013 at 14:14
-
now -- as of 2016 -- it does, at least for English style (see below)– FlorianJun 18, 2016 at 18:09
-
Link to below using the integrated replacement feature: tex.stackexchange.com/a/315360/110394 - link to below using TexStudio Makros: tex.stackexchange.com/a/113430/110394– CadoizAug 18, 2020 at 2:15
TexStudio provides a better method to covert your text into LaTeX directly by going to
Idefix->Paste as Latex / Covert to Latex
or if your are writing in the TexStudio itself then please go the options
Options->Configure TexStudio -> Editor ->Replace Double Quotes -> Select English quote
After pressing OK
, whenever you write a double quote in the editor it will automatically changed to smart quotes.
-
That is a helpful feature, but in the times of XeTeX and LuaTeX I'd wish the developers would get around to add the other main traditions (« French », »reverse French«, „German“) as Unicode, too. Seeing that they have it for English, it shouldn't be too difficult to add the others. On top of that a customizable menu or even support for inner quotes would be really helpful, but that might mean considerable rework.– FlorianJun 18, 2016 at 18:05
Besides the feature to replace double quotes with their TeX companions (e.g. ```` `` and ''
) or their Unicode equivalents which is only available in the SVN version, you can use User Macros. Single Quotes can currently only be replaced by them.
Overview:
Trigger LaTeX Content/Tag
(?<=\s|^)" “
(?<=\S)" ”
(?<=\s|^)' ‘
(?<=\S|^)' ’
You may also look into the csquotes
package which is very powerful when it comes to nested quotations or making "
a trigger for quotes.
-
Great solution, considering TeXstudio allows for regex triggered macros (gladly +1'd). One remark/question: technically, you only need one macro -- the third line of your overview -- right? Double quotes are already handled if TeXstudio "double quote replacement" is enabled. And replacing "single quote, straight" at the end by a "single quote, thick end up" doesn't change the latex output, as far as I can tell. I'm simply asking to learn something new in case I'm wrong, not trying to criticize your elegant solution. Apr 19, 2017 at 13:13