How do I prevent "s from turning into ß with babel?
up vote
6
down vote
favorite
I'm writing a German document and thus I need äÄöÖüÜß to work. However I don't use it this way: "a"A"o... I just type äÄö...
My Problem is that "Test" s is displayed as "Testß
Here is a MWE:
% !TEX encoding=latin1
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
"Test" s
end{document}
input-encodings characters german
|
show 1 more comment
up vote
6
down vote
favorite
I'm writing a German document and thus I need äÄöÖüÜß to work. However I don't use it this way: "a"A"o... I just type äÄö...
My Problem is that "Test" s is displayed as "Testß
Here is a MWE:
% !TEX encoding=latin1
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
"Test" s
end{document}
input-encodings characters german
1
useutf8
instead oflatin1
and it should work IMHO. Or it is angerman
issue.
– sztruks
Dec 1 at 18:01
3
You should never use straight quotes. Useglqq Term heregrqq
if you want quotes in the output or resort to a package likecsquotes
.
– TeXnician
Dec 1 at 18:02
@sztruks I tried usingutf8
in both places. Sadly that didn't change anything
– Dr_DragonKiller
Dec 1 at 18:05
4
the use of"
is an error you should use left and right quotes
– David Carlisle
Dec 1 at 18:11
2
Add a character:"Test" s
to"Test" s
.
– JouleV
Dec 1 at 19:30
|
show 1 more comment
up vote
6
down vote
favorite
up vote
6
down vote
favorite
I'm writing a German document and thus I need äÄöÖüÜß to work. However I don't use it this way: "a"A"o... I just type äÄö...
My Problem is that "Test" s is displayed as "Testß
Here is a MWE:
% !TEX encoding=latin1
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
"Test" s
end{document}
input-encodings characters german
I'm writing a German document and thus I need äÄöÖüÜß to work. However I don't use it this way: "a"A"o... I just type äÄö...
My Problem is that "Test" s is displayed as "Testß
Here is a MWE:
% !TEX encoding=latin1
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
"Test" s
end{document}
input-encodings characters german
input-encodings characters german
edited Dec 1 at 23:17
Davislor
4,242820
4,242820
asked Dec 1 at 18:00
Dr_DragonKiller
403
403
1
useutf8
instead oflatin1
and it should work IMHO. Or it is angerman
issue.
– sztruks
Dec 1 at 18:01
3
You should never use straight quotes. Useglqq Term heregrqq
if you want quotes in the output or resort to a package likecsquotes
.
– TeXnician
Dec 1 at 18:02
@sztruks I tried usingutf8
in both places. Sadly that didn't change anything
– Dr_DragonKiller
Dec 1 at 18:05
4
the use of"
is an error you should use left and right quotes
– David Carlisle
Dec 1 at 18:11
2
Add a character:"Test" s
to"Test" s
.
– JouleV
Dec 1 at 19:30
|
show 1 more comment
1
useutf8
instead oflatin1
and it should work IMHO. Or it is angerman
issue.
– sztruks
Dec 1 at 18:01
3
You should never use straight quotes. Useglqq Term heregrqq
if you want quotes in the output or resort to a package likecsquotes
.
– TeXnician
Dec 1 at 18:02
@sztruks I tried usingutf8
in both places. Sadly that didn't change anything
– Dr_DragonKiller
Dec 1 at 18:05
4
the use of"
is an error you should use left and right quotes
– David Carlisle
Dec 1 at 18:11
2
Add a character:"Test" s
to"Test" s
.
– JouleV
Dec 1 at 19:30
1
1
use
utf8
instead of latin1
and it should work IMHO. Or it is a ngerman
issue.– sztruks
Dec 1 at 18:01
use
utf8
instead of latin1
and it should work IMHO. Or it is a ngerman
issue.– sztruks
Dec 1 at 18:01
3
3
You should never use straight quotes. Use
glqq Term heregrqq
if you want quotes in the output or resort to a package like csquotes
.– TeXnician
Dec 1 at 18:02
You should never use straight quotes. Use
glqq Term heregrqq
if you want quotes in the output or resort to a package like csquotes
.– TeXnician
Dec 1 at 18:02
@sztruks I tried using
utf8
in both places. Sadly that didn't change anything– Dr_DragonKiller
Dec 1 at 18:05
@sztruks I tried using
utf8
in both places. Sadly that didn't change anything– Dr_DragonKiller
Dec 1 at 18:05
4
4
the use of
"
is an error you should use left and right quotes– David Carlisle
Dec 1 at 18:11
the use of
"
is an error you should use left and right quotes– David Carlisle
Dec 1 at 18:11
2
2
Add a character:
"Test" s
to "Test" s
.– JouleV
Dec 1 at 19:30
Add a character:
"Test" s
to "Test" s
.– JouleV
Dec 1 at 19:30
|
show 1 more comment
3 Answers
3
active
oldest
votes
up vote
12
down vote
accepted
The character "
should never be used in running text to denote quotes. For double English quotes, use
``Test'' s
If you want German style quotes, use
"`Test"' s
With UTF-8 input, you can use
“Test” s
for English style and
„Test“ s
for German style. The alternative glqq Testgrqq s
is less convenient.
Examples:
documentclass[a4paper]{article}
usepackage[T1]{fontenc}
%usepackage[utf8]{inputenc} % not needed with LaTeX after 2018-04-01
usepackage[ngerman]{babel}
usepackage{upquote,booktabs} % for the table
begin{document}
begin{tabular}{lll}
toprule
multicolumn{1}{c}{Style} &
multicolumn{1}{c}{Input} &
multicolumn{1}{c}{Output} \
midrule
English & verb|``Test'' s| & ``Test'' s
\
English & verb|“Test” s| & “Test” s
\
German & verb|"`Test"' s| & "`Test"' s
\
German & verb|„Test“ s| & „Test“ s
\
German & verb|glqq Testgrqq s| & glqq Testgrqq s
\
bottomrule
end{tabular}
end{document}
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 intexdoc babel-ngerman
. Thanks!
– egreg
Dec 1 at 21:10
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
add a comment |
up vote
5
down vote
Solution 3: use left and right quotes in the source too, as David Carlisle auggested:
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
“Test”s, and “test” s too (but I’d use “test”~s, then).
end{document}
This is the output I get:
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
add a comment |
up vote
3
down vote
If you want to use latin1 (which is ISO 8859-1), then I have collected two solutions which are already mentioned in the comments.
The problem is, that in some cases*
"A, "O, "U, "a, "o, "u, "s
are
commands for special characters (instead of"A, "O or ss{}
for
example). So LaTeX cannot know what you mean in your example.
*Depending on the loaded packages, in this case, the
babel
package.
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{csquotes}
begin{document}
section*{They are all the same regarding the ß}
begin{itemize}
item "Test" s
item " s
item "s
item But: " s % Thanks to comment of user Dũng Vũ
end{itemize}
section*{Solution 1: Use texttt{babel}'s quotation marks}
% See also https://www.namsu.de/Extra/befehle/Anfuehrungszeichen.html
% https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Anf%C3%BChrungszeichen
% glqq --> German Left Double Quote
% grqq --> German Right Double Quote
% glq --> German Left Single Quote
% grq --> German Right Single Quote
begin{itemize}
item glqq Testgrqq s (Don't forget the textbackslash after the command)
item glq Testgrq s
end{itemize}
section*{Solution 2: Use the texttt{csquote} package}
% For more information, have a look at the manual
% https://ctan.org/pkg/csquotes
enquote{Test} s
end{document}
Note: On the screenshot, you see on the bottom right that I use the correct encoding in the editor, in this case ISO-8859-1 which is latin1.
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
accepted
The character "
should never be used in running text to denote quotes. For double English quotes, use
``Test'' s
If you want German style quotes, use
"`Test"' s
With UTF-8 input, you can use
“Test” s
for English style and
„Test“ s
for German style. The alternative glqq Testgrqq s
is less convenient.
Examples:
documentclass[a4paper]{article}
usepackage[T1]{fontenc}
%usepackage[utf8]{inputenc} % not needed with LaTeX after 2018-04-01
usepackage[ngerman]{babel}
usepackage{upquote,booktabs} % for the table
begin{document}
begin{tabular}{lll}
toprule
multicolumn{1}{c}{Style} &
multicolumn{1}{c}{Input} &
multicolumn{1}{c}{Output} \
midrule
English & verb|``Test'' s| & ``Test'' s
\
English & verb|“Test” s| & “Test” s
\
German & verb|"`Test"' s| & "`Test"' s
\
German & verb|„Test“ s| & „Test“ s
\
German & verb|glqq Testgrqq s| & glqq Testgrqq s
\
bottomrule
end{tabular}
end{document}
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 intexdoc babel-ngerman
. Thanks!
– egreg
Dec 1 at 21:10
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
add a comment |
up vote
12
down vote
accepted
The character "
should never be used in running text to denote quotes. For double English quotes, use
``Test'' s
If you want German style quotes, use
"`Test"' s
With UTF-8 input, you can use
“Test” s
for English style and
„Test“ s
for German style. The alternative glqq Testgrqq s
is less convenient.
Examples:
documentclass[a4paper]{article}
usepackage[T1]{fontenc}
%usepackage[utf8]{inputenc} % not needed with LaTeX after 2018-04-01
usepackage[ngerman]{babel}
usepackage{upquote,booktabs} % for the table
begin{document}
begin{tabular}{lll}
toprule
multicolumn{1}{c}{Style} &
multicolumn{1}{c}{Input} &
multicolumn{1}{c}{Output} \
midrule
English & verb|``Test'' s| & ``Test'' s
\
English & verb|“Test” s| & “Test” s
\
German & verb|"`Test"' s| & "`Test"' s
\
German & verb|„Test“ s| & „Test“ s
\
German & verb|glqq Testgrqq s| & glqq Testgrqq s
\
bottomrule
end{tabular}
end{document}
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 intexdoc babel-ngerman
. Thanks!
– egreg
Dec 1 at 21:10
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
add a comment |
up vote
12
down vote
accepted
up vote
12
down vote
accepted
The character "
should never be used in running text to denote quotes. For double English quotes, use
``Test'' s
If you want German style quotes, use
"`Test"' s
With UTF-8 input, you can use
“Test” s
for English style and
„Test“ s
for German style. The alternative glqq Testgrqq s
is less convenient.
Examples:
documentclass[a4paper]{article}
usepackage[T1]{fontenc}
%usepackage[utf8]{inputenc} % not needed with LaTeX after 2018-04-01
usepackage[ngerman]{babel}
usepackage{upquote,booktabs} % for the table
begin{document}
begin{tabular}{lll}
toprule
multicolumn{1}{c}{Style} &
multicolumn{1}{c}{Input} &
multicolumn{1}{c}{Output} \
midrule
English & verb|``Test'' s| & ``Test'' s
\
English & verb|“Test” s| & “Test” s
\
German & verb|"`Test"' s| & "`Test"' s
\
German & verb|„Test“ s| & „Test“ s
\
German & verb|glqq Testgrqq s| & glqq Testgrqq s
\
bottomrule
end{tabular}
end{document}
The character "
should never be used in running text to denote quotes. For double English quotes, use
``Test'' s
If you want German style quotes, use
"`Test"' s
With UTF-8 input, you can use
“Test” s
for English style and
„Test“ s
for German style. The alternative glqq Testgrqq s
is less convenient.
Examples:
documentclass[a4paper]{article}
usepackage[T1]{fontenc}
%usepackage[utf8]{inputenc} % not needed with LaTeX after 2018-04-01
usepackage[ngerman]{babel}
usepackage{upquote,booktabs} % for the table
begin{document}
begin{tabular}{lll}
toprule
multicolumn{1}{c}{Style} &
multicolumn{1}{c}{Input} &
multicolumn{1}{c}{Output} \
midrule
English & verb|``Test'' s| & ``Test'' s
\
English & verb|“Test” s| & “Test” s
\
German & verb|"`Test"' s| & "`Test"' s
\
German & verb|„Test“ s| & „Test“ s
\
German & verb|glqq Testgrqq s| & glqq Testgrqq s
\
bottomrule
end{tabular}
end{document}
edited Dec 2 at 8:12
answered Dec 1 at 20:57
egreg
703k8618753154
703k8618753154
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 intexdoc babel-ngerman
. Thanks!
– egreg
Dec 1 at 21:10
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
add a comment |
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 intexdoc babel-ngerman
. Thanks!
– egreg
Dec 1 at 21:10
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
+1: Didn't know `"``. Congratulations to 700k btw.
– Dr. Manuel Kuehner
Dec 1 at 21:09
@Dr.ManuelKuehner Table 1 in
texdoc babel-ngerman
. Thanks!– egreg
Dec 1 at 21:10
@Dr.ManuelKuehner Table 1 in
texdoc babel-ngerman
. Thanks!– egreg
Dec 1 at 21:10
1
1
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
@JanusBahsJacquet Typo, sorry.
– egreg
Dec 2 at 8:11
add a comment |
up vote
5
down vote
Solution 3: use left and right quotes in the source too, as David Carlisle auggested:
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
“Test”s, and “test” s too (but I’d use “test”~s, then).
end{document}
This is the output I get:
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
add a comment |
up vote
5
down vote
Solution 3: use left and right quotes in the source too, as David Carlisle auggested:
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
“Test”s, and “test” s too (but I’d use “test”~s, then).
end{document}
This is the output I get:
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
add a comment |
up vote
5
down vote
up vote
5
down vote
Solution 3: use left and right quotes in the source too, as David Carlisle auggested:
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
“Test”s, and “test” s too (but I’d use “test”~s, then).
end{document}
This is the output I get:
Solution 3: use left and right quotes in the source too, as David Carlisle auggested:
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
begin{document}
“Test”s, and “test” s too (but I’d use “test”~s, then).
end{document}
This is the output I get:
edited Dec 1 at 20:13
answered Dec 1 at 20:06
GuM
16.1k2255
16.1k2255
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
add a comment |
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
1
1
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
+1: Good point: But I cannot find them on my German keyboard (as direct keys).
– Dr. Manuel Kuehner
Dec 1 at 20:09
2
2
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
@Dr.ManuelKuehner: I have a Mac with an “international English” keyboard, so I can type them rather easily. I couldn’t stand using LaTeX with a different keyboard! :-)
– GuM
Dec 1 at 20:15
1
1
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
@GuM My advice is: buy whatever keyboard you prefer, so long as it is International English.
– egreg
Dec 1 at 20:42
1
1
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
@egreg Never have heard of international English keyboards :)
– Dr. Manuel Kuehner
Dec 1 at 20:54
add a comment |
up vote
3
down vote
If you want to use latin1 (which is ISO 8859-1), then I have collected two solutions which are already mentioned in the comments.
The problem is, that in some cases*
"A, "O, "U, "a, "o, "u, "s
are
commands for special characters (instead of"A, "O or ss{}
for
example). So LaTeX cannot know what you mean in your example.
*Depending on the loaded packages, in this case, the
babel
package.
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{csquotes}
begin{document}
section*{They are all the same regarding the ß}
begin{itemize}
item "Test" s
item " s
item "s
item But: " s % Thanks to comment of user Dũng Vũ
end{itemize}
section*{Solution 1: Use texttt{babel}'s quotation marks}
% See also https://www.namsu.de/Extra/befehle/Anfuehrungszeichen.html
% https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Anf%C3%BChrungszeichen
% glqq --> German Left Double Quote
% grqq --> German Right Double Quote
% glq --> German Left Single Quote
% grq --> German Right Single Quote
begin{itemize}
item glqq Testgrqq s (Don't forget the textbackslash after the command)
item glq Testgrq s
end{itemize}
section*{Solution 2: Use the texttt{csquote} package}
% For more information, have a look at the manual
% https://ctan.org/pkg/csquotes
enquote{Test} s
end{document}
Note: On the screenshot, you see on the bottom right that I use the correct encoding in the editor, in this case ISO-8859-1 which is latin1.
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
add a comment |
up vote
3
down vote
If you want to use latin1 (which is ISO 8859-1), then I have collected two solutions which are already mentioned in the comments.
The problem is, that in some cases*
"A, "O, "U, "a, "o, "u, "s
are
commands for special characters (instead of"A, "O or ss{}
for
example). So LaTeX cannot know what you mean in your example.
*Depending on the loaded packages, in this case, the
babel
package.
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{csquotes}
begin{document}
section*{They are all the same regarding the ß}
begin{itemize}
item "Test" s
item " s
item "s
item But: " s % Thanks to comment of user Dũng Vũ
end{itemize}
section*{Solution 1: Use texttt{babel}'s quotation marks}
% See also https://www.namsu.de/Extra/befehle/Anfuehrungszeichen.html
% https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Anf%C3%BChrungszeichen
% glqq --> German Left Double Quote
% grqq --> German Right Double Quote
% glq --> German Left Single Quote
% grq --> German Right Single Quote
begin{itemize}
item glqq Testgrqq s (Don't forget the textbackslash after the command)
item glq Testgrq s
end{itemize}
section*{Solution 2: Use the texttt{csquote} package}
% For more information, have a look at the manual
% https://ctan.org/pkg/csquotes
enquote{Test} s
end{document}
Note: On the screenshot, you see on the bottom right that I use the correct encoding in the editor, in this case ISO-8859-1 which is latin1.
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
add a comment |
up vote
3
down vote
up vote
3
down vote
If you want to use latin1 (which is ISO 8859-1), then I have collected two solutions which are already mentioned in the comments.
The problem is, that in some cases*
"A, "O, "U, "a, "o, "u, "s
are
commands for special characters (instead of"A, "O or ss{}
for
example). So LaTeX cannot know what you mean in your example.
*Depending on the loaded packages, in this case, the
babel
package.
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{csquotes}
begin{document}
section*{They are all the same regarding the ß}
begin{itemize}
item "Test" s
item " s
item "s
item But: " s % Thanks to comment of user Dũng Vũ
end{itemize}
section*{Solution 1: Use texttt{babel}'s quotation marks}
% See also https://www.namsu.de/Extra/befehle/Anfuehrungszeichen.html
% https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Anf%C3%BChrungszeichen
% glqq --> German Left Double Quote
% grqq --> German Right Double Quote
% glq --> German Left Single Quote
% grq --> German Right Single Quote
begin{itemize}
item glqq Testgrqq s (Don't forget the textbackslash after the command)
item glq Testgrq s
end{itemize}
section*{Solution 2: Use the texttt{csquote} package}
% For more information, have a look at the manual
% https://ctan.org/pkg/csquotes
enquote{Test} s
end{document}
Note: On the screenshot, you see on the bottom right that I use the correct encoding in the editor, in this case ISO-8859-1 which is latin1.
If you want to use latin1 (which is ISO 8859-1), then I have collected two solutions which are already mentioned in the comments.
The problem is, that in some cases*
"A, "O, "U, "a, "o, "u, "s
are
commands for special characters (instead of"A, "O or ss{}
for
example). So LaTeX cannot know what you mean in your example.
*Depending on the loaded packages, in this case, the
babel
package.
documentclass{article}
usepackage[ngerman]{babel}
usepackage[latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{csquotes}
begin{document}
section*{They are all the same regarding the ß}
begin{itemize}
item "Test" s
item " s
item "s
item But: " s % Thanks to comment of user Dũng Vũ
end{itemize}
section*{Solution 1: Use texttt{babel}'s quotation marks}
% See also https://www.namsu.de/Extra/befehle/Anfuehrungszeichen.html
% https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Anf%C3%BChrungszeichen
% glqq --> German Left Double Quote
% grqq --> German Right Double Quote
% glq --> German Left Single Quote
% grq --> German Right Single Quote
begin{itemize}
item glqq Testgrqq s (Don't forget the textbackslash after the command)
item glq Testgrq s
end{itemize}
section*{Solution 2: Use the texttt{csquote} package}
% For more information, have a look at the manual
% https://ctan.org/pkg/csquotes
enquote{Test} s
end{document}
Note: On the screenshot, you see on the bottom right that I use the correct encoding in the editor, in this case ISO-8859-1 which is latin1.
edited Dec 1 at 20:05
answered Dec 1 at 19:52
Dr. Manuel Kuehner
8,89132766
8,89132766
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
add a comment |
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
@dũng-vũ I mentioned you in the "solution".
– Dr. Manuel Kuehner
Dec 1 at 19:55
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462728%2fhow-do-i-prevent-s-from-turning-into-%25c3%259f-with-babel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
use
utf8
instead oflatin1
and it should work IMHO. Or it is angerman
issue.– sztruks
Dec 1 at 18:01
3
You should never use straight quotes. Use
glqq Term heregrqq
if you want quotes in the output or resort to a package likecsquotes
.– TeXnician
Dec 1 at 18:02
@sztruks I tried using
utf8
in both places. Sadly that didn't change anything– Dr_DragonKiller
Dec 1 at 18:05
4
the use of
"
is an error you should use left and right quotes– David Carlisle
Dec 1 at 18:11
2
Add a character:
"Test" s
to"Test" s
.– JouleV
Dec 1 at 19:30