Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Could someone post a complete minimal input file for LuaLaTeX to output

"Hallo"

also to get around ,,Hallo´´

In LaTeX I would have written

``Hallo´´


%% Minimal Inputfile for LuaLaTeX
\documentclass[a4paper]{scrartcl}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=new, babelshorthands=true]{german}
\usepackage{fontspec}
\usepackage{csquotes}

\begin{document}

\enquote{Hallo--mit enquote--this is working}

But: how to produce the euivalent Text, based on babelshorthands?

“`Hallo”’  --- is not working

\end{document}
share|improve this question
    
Hallo. Ich verstehe nicht richtig was Du machen willst. Willst Du "Hallo" drucken oder ,,Hallo´´ ? –  Trefex Apr 17 at 15:51
1  
Better: \usepackage[ngerman]{babel} \usepackage{csquotes} & Ich schreibe ``Hallo'' so: \enquote{Hallo}. –  jon Apr 17 at 16:13

2 Answers 2

For babel-style shortcuts, don't use "smart" quotes: using "dumb" double quotes is the way to go.

enter image description here

\documentclass[a4paper]{scrartcl}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=new, babelshorthands=true]{german}
\usepackage{csquotes}

\begin{document}
\enquote{Hallo} --- with \texttt{\string\enquote}, this works

"`Hallo"'  --- with \verb+"`+ and \verb+"'+, this works too
\end{document}
share|improve this answer

The conversion from ``Hello'' to „Hello“ via a feature file.

Disadvantages:

  • Copy&paste will catch the first form.
  • LuaTeX only.

Example file:

\documentclass{article}

\usepackage{fontspec}
\usepackage{filecontents}

\begin{filecontents*}{germanquotes.fea}
# germanquotes.fea
languagesystem DFLT dflt ;
languagesystem latn dflt ;

feature liga {
  sub \grave \grave by \quotedblbase;
  sub \quotesingle \quotesingle by \quotedblleft;
} liga;
\end{filecontents*}

\setmainfont[
  Ligatures=TeX,
  FeatureFile={germanquotes.fea},
]{Latin Modern Roman}

\begin{document}
  ``Hello'' -- fi fl

  \textit{``Hello'' -- fi fl}

  \textbf{``Hello'' -- fi fl}
\end{document}

Result

Disclaimer: My first experiment with a feature file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.