how to generate correct single and double quotes in texIsn't there any other way of doing double quotes in LaTeX besides `` + ''?How to avoid overlapping when using single quotes (German)Per-word info needed in DVI to create touch rectangles on LaTeX documents in iTeX for the iPadHow to implement (low-level) arrays in TeXXeLaTeX output prints fine, pdfLaTeX print failsUsing glossaries package with Texmaker (running PDFLaTex)Double accent on single characterLuaTex bug ignoring (If so, how to report?)full final line + pagenote = spurious blank lineHow to insert quotes from another source into texHow to get pdftex to have same PDF output for each run on the same input

Adding a vertical line at the right end of the horizontal line in frac

Can I capture stereo IQ signals from WebSDR?

Remove intersect line for one circle using venndiagram2sets

Are L-functions uniquely determined by their values at negative integers?

Too many spies!

Concatenation using + and += operator in Python

What is the German equivalent of 干物女 (dried fish woman)?

Mistakenly modified `/bin/sh'

Published paper containing well-known results

Commutator subgroup of Heisenberg group.

HackerRank: Electronics Shop

Is killing off one of my queer characters homophobic?

Why do they not say "The Baby"

Possible isometry groups of open manifolds

How are "soeben" and "eben" different from one another?

Nested-Loop-Join: How many comparisons and how many pages-accesses?

Crab Nebula short story from 1960s or '70s

What are some symbols representing peasants/oppressed persons fighting back?

Do native speakers use ZVE or CPU?

How to draw a gif with expanding circles that reveal lines connecting a non-centered point to the expanding circle using Tikz

Getting fresh water in the middle of hypersaline lake in the Bronze Age

How can I legally visit the United States Minor Outlying Islands in the Pacific?

Should you avoid redundant information after dialogue?

Why do candidates not quit if they no longer have a realistic chance to win in the 2020 US presidents election



how to generate correct single and double quotes in tex


Isn't there any other way of doing double quotes in LaTeX besides `` + ''?How to avoid overlapping when using single quotes (German)Per-word info needed in DVI to create touch rectangles on LaTeX documents in iTeX for the iPadHow to implement (low-level) arrays in TeXXeLaTeX output prints fine, pdfLaTeX print failsUsing glossaries package with Texmaker (running PDFLaTex)Double accent on single characterLuaTex bug ignoring (If so, how to report?)full final line + pagenote = spurious blank lineHow to insert quotes from another source into texHow to get pdftex to have same PDF output for each run on the same input






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I am writing a tex document using book document class. I have already typed close to 100 pages, but i did a mistake with typing single and double quotes.
I have done it as follows :
"test double quotes" and 'test double quotes' which generated the output of the form : enter image description here



Is there a way i can generate the correct output without changing the quotes in all the places ? I saw some similar answers @ Isn't there any other way of doing double quotes in LaTeX besides `` + ''? but none seemed to work.










share|improve this question






















  • Are you willing and able to use LuaLaTeX to compile your document?

    – Mico
    7 hours ago






  • 1





    I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

    – David Carlisle
    7 hours ago

















3















I am writing a tex document using book document class. I have already typed close to 100 pages, but i did a mistake with typing single and double quotes.
I have done it as follows :
"test double quotes" and 'test double quotes' which generated the output of the form : enter image description here



Is there a way i can generate the correct output without changing the quotes in all the places ? I saw some similar answers @ Isn't there any other way of doing double quotes in LaTeX besides `` + ''? but none seemed to work.










share|improve this question






















  • Are you willing and able to use LuaLaTeX to compile your document?

    – Mico
    7 hours ago






  • 1





    I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

    – David Carlisle
    7 hours ago













3












3








3








I am writing a tex document using book document class. I have already typed close to 100 pages, but i did a mistake with typing single and double quotes.
I have done it as follows :
"test double quotes" and 'test double quotes' which generated the output of the form : enter image description here



Is there a way i can generate the correct output without changing the quotes in all the places ? I saw some similar answers @ Isn't there any other way of doing double quotes in LaTeX besides `` + ''? but none seemed to work.










share|improve this question














I am writing a tex document using book document class. I have already typed close to 100 pages, but i did a mistake with typing single and double quotes.
I have done it as follows :
"test double quotes" and 'test double quotes' which generated the output of the form : enter image description here



Is there a way i can generate the correct output without changing the quotes in all the places ? I saw some similar answers @ Isn't there any other way of doing double quotes in LaTeX besides `` + ''? but none seemed to work.







xetex pdftex tex-core texstudio






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 8 hours ago









mezdamezda

1464 bronze badges




1464 bronze badges












  • Are you willing and able to use LuaLaTeX to compile your document?

    – Mico
    7 hours ago






  • 1





    I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

    – David Carlisle
    7 hours ago

















  • Are you willing and able to use LuaLaTeX to compile your document?

    – Mico
    7 hours ago






  • 1





    I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

    – David Carlisle
    7 hours ago
















Are you willing and able to use LuaLaTeX to compile your document?

– Mico
7 hours ago





Are you willing and able to use LuaLaTeX to compile your document?

– Mico
7 hours ago




1




1





I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

– David Carlisle
7 hours ago





I wouldn't try to have macros or Lua fixing this on the fly: simply change the " in your editor.

– David Carlisle
7 hours ago










2 Answers
2






active

oldest

votes


















3














Replace at first the last quote with the editor and "Search and Replace"



"<space> -> }


Then repcae the first quote with



" -> enquote 









Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499953%2fhow-to-generate-correct-single-and-double-quotes-in-tex%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














Replace at first the last quote with the editor and "Search and Replace"



"<space> -> 


Then repcae the first quote with



" -> enquote


and then use always:



documentclassarticle
usepackage[french,ngerman,english]babel
usepackage[autostyle]csquotes

begindocument

enquotequote
enquote*quote

enquotequote enquotequote in quote

foreignquotengermanquote
foreignquote*ngermanquote

foreignquotengermanquote foreignquotengermanquote in quote

foreignquotefrenchquote
foreignquote*frenchquote

foreignquotefrenchquote foreignquotengermanquote in quote

enddocument


enter image description here






share


Then repcae the first quote with



" -> enquote


and then use always:



documentclassarticle
usepackage[french,ngerman,english]babel
usepackage[autostyle]csquotes

begindocument

enquotequote
enquote*quote

enquotequote enquotequote in quote

foreignquotengermanquote
foreignquote*ngermanquote

foreignquotengermanquote foreignquotengermanquote in quote

foreignquotefrenchquote
foreignquote*frenchquote

foreignquotefrenchquote foreignquotengermanquote in quote

enddocument


enter image description here






share


Then repcae the first quote with



" -> enquote


and then use always:



documentclassarticle
usepackage[french,ngerman,english]babel
usepackage[autostyle]csquotes

begindocument

enquotequote
enquote*quote

enquotequote enquotequote in quote

foreignquotengermanquote
foreignquote*ngermanquote

foreignquotengermanquote foreignquotengermanquote in quote

foreignquotefrenchquote
foreignquote*frenchquote

foreignquotefrenchquote foreignquotengermanquote in quote

enddocument


enter image description here






share


Then repcae the first quote with



" -> enquote{


and then use always:



documentclassarticle
usepackage[french,ngerman,english]babel
usepackage[autostyle]csquotes

begindocument

enquotequote
enquote*quote

enquotequote enquotequote in quote

foreignquotengermanquote
foreignquote*ngermanquote

foreignquotengermanquote foreignquotengermanquote in quote

foreignquotefrenchquote
foreignquote*frenchquote

foreignquotefrenchquote foreignquotengermanquote in quote

enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 7 hours ago

























answered 8 hours ago









Red-CloudRed-Cloud

4,7042 silver badges17 bronze badges




4,7042 silver badges17 bronze badges







  • 2





    The OP asked whether "there [is] a way i can generate the correct output without changing the quotes in all the places?"

    – Mico
    7 hours ago












  • 2





    The OP asked whether "there [is] a way i can generate the correct output without changing the quotes in all the places?"

    – Mico
    7 hours ago







2




2





The OP asked whether "there [is] a way i can generate the correct output without changing the quotes in all the places?"

– Mico
7 hours ago





The OP asked whether "there [is] a way i can generate the correct output without changing the quotes in all the places?"

– Mico
7 hours ago













2














Here's a LuaLaTeX-based solution, which doesn't require you to modify the existing "..." and '...' pairs of quotes. It consists of a Lua function called msq (short for 'make smart quotes') and two utility LaTeX macros which switch the Lua function on and off.



enter image description here



documentclassbook
usepackage[english]babel % or some other suitable language choice
usepackage[autostyle]csquotes

usepackageluacode
beginluacode
-- msq: "make smart quotes"
function msq ( s )
s = s:gsub ( '"(.-)"' , "\enquote%1" )
s = s:gsub ( "'(.-)'" , "`%1'" )
return s
end
endluacode

newcommandmsqOndirectlua luatexbase.add_to_callback(
"process_input_buffer", msq , "msq" )
newcommandmsqOffdirectlua luatexbase.remove_from_callback(
"process_input_buffer", "msq" )

begindocument
msqOn
"test double quotes" and 'test single quotes'

msqOff
"test double quotes" and 'test single quotes'
enddocument





share|improve this answer























  • What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

    – barbara beeton
    1 hour ago















2














Here's a LuaLaTeX-based solution, which doesn't require you to modify the existing "..." and '...' pairs of quotes. It consists of a Lua function called msq (short for 'make smart quotes') and two utility LaTeX macros which switch the Lua function on and off.



enter image description here



documentclassbook
usepackage[english]babel % or some other suitable language choice
usepackage[autostyle]csquotes

usepackageluacode
beginluacode
-- msq: "make smart quotes"
function msq ( s )
s = s:gsub ( '"(.-)"' , "\enquote%1" )
s = s:gsub ( "'(.-)'" , "`%1'" )
return s
end
endluacode

newcommandmsqOndirectlua luatexbase.add_to_callback(
"process_input_buffer", msq , "msq" )
newcommandmsqOffdirectlua luatexbase.remove_from_callback(
"process_input_buffer", "msq" )

begindocument
msqOn
"test double quotes" and 'test single quotes'

msqOff
"test double quotes" and 'test single quotes'
enddocument





share|improve this answer























  • What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

    – barbara beeton
    1 hour ago













2












2








2







Here's a LuaLaTeX-based solution, which doesn't require you to modify the existing "..." and '...' pairs of quotes. It consists of a Lua function called msq (short for 'make smart quotes') and two utility LaTeX macros which switch the Lua function on and off.



enter image description here



documentclassbook
usepackage[english]babel % or some other suitable language choice
usepackage[autostyle]csquotes

usepackageluacode
beginluacode
-- msq: "make smart quotes"
function msq ( s )
s = s:gsub ( '"(.-)"' , "\enquote%1" )
s = s:gsub ( "'(.-)'" , "`%1'" )
return s
end
endluacode

newcommandmsqOndirectlua luatexbase.add_to_callback(
"process_input_buffer", msq , "msq" )
newcommandmsqOffdirectlua luatexbase.remove_from_callback(
"process_input_buffer", "msq" )

begindocument
msqOn
"test double quotes" and 'test single quotes'

msqOff
"test double quotes" and 'test single quotes'
enddocument





share|improve this answer













Here's a LuaLaTeX-based solution, which doesn't require you to modify the existing "..." and '...' pairs of quotes. It consists of a Lua function called msq (short for 'make smart quotes') and two utility LaTeX macros which switch the Lua function on and off.



enter image description here



documentclassbook
usepackage[english]babel % or some other suitable language choice
usepackage[autostyle]csquotes

usepackageluacode
beginluacode
-- msq: "make smart quotes"
function msq ( s )
s = s:gsub ( '"(.-)"' , "\enquote%1" )
s = s:gsub ( "'(.-)'" , "`%1'" )
return s
end
endluacode

newcommandmsqOndirectlua luatexbase.add_to_callback(
"process_input_buffer", msq , "msq" )
newcommandmsqOffdirectlua luatexbase.remove_from_callback(
"process_input_buffer", "msq" )

begindocument
msqOn
"test double quotes" and 'test single quotes'

msqOff
"test double quotes" and 'test single quotes'
enddocument






share|improve this answer












share|improve this answer



share|improve this answer










answered 7 hours ago









MicoMico

297k32 gold badges410 silver badges809 bronze badges




297k32 gold badges410 silver badges809 bronze badges












  • What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

    – barbara beeton
    1 hour ago

















  • What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

    – barbara beeton
    1 hour ago
















What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

– barbara beeton
1 hour ago





What happens when you're quoting " 'Twas brillig and the slithy toves ..."?

– barbara beeton
1 hour ago

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499953%2fhow-to-generate-correct-single-and-double-quotes-in-tex%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單