Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: One-liner to fix LaTeX quotation marks

by CountZero (Bishop)
on Oct 15, 2012 at 07:50 UTC ( #999021=note: print w/ replies, xml ) Need Help??


in reply to One-liner to fix LaTeX quotation marks

Perhaps not directly applicable to your post, but nevertheless very useful if you use LaTeX a lot and have to transform non-LaTeX to properly formatted LaTeX: LaTeX::Encode. It has an "intelligent quotes - iquotes" option in its main latex_encode routine.

single or double quotes around words will be changed to LaTeX single or double quotes; double quotes around a phrase will be converted to "``" and "''" and single quotes to "`" and "'". This is sometimes called "intelligent quotes"
So once you have replaced your double quotes by single quotes where necessary, you can run your text through latex_encode to get proper opening and closing quotes.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: One-liner to fix LaTeX quotation marks
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999021]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-09-18 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (115 votes), past polls