Duplicate equal sign on line break in text mode
In Cyrillic typography tradition you need to duplicate the math operators (+, =, -, x) on line break. Following this answer I can get it working in math mode. How can I make = duplicate on line break in text mode:
MWE:
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
math-mode cyrillic
add a comment |
In Cyrillic typography tradition you need to duplicate the math operators (+, =, -, x) on line break. Following this answer I can get it working in math mode. How can I make = duplicate on line break in text mode:
MWE:
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
math-mode cyrillic
2
just use a macro that expands todiscretionary{=}{=}{=}
– David Carlisle
7 hours ago
add a comment |
In Cyrillic typography tradition you need to duplicate the math operators (+, =, -, x) on line break. Following this answer I can get it working in math mode. How can I make = duplicate on line break in text mode:
MWE:
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
math-mode cyrillic
In Cyrillic typography tradition you need to duplicate the math operators (+, =, -, x) on line break. Following this answer I can get it working in math mode. How can I make = duplicate on line break in text mode:
MWE:
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
math-mode cyrillic
math-mode cyrillic
asked 8 hours ago
Denys PotapovDenys Potapov
22819
22819
2
just use a macro that expands todiscretionary{=}{=}{=}
– David Carlisle
7 hours ago
add a comment |
2
just use a macro that expands todiscretionary{=}{=}{=}
– David Carlisle
7 hours ago
2
2
just use a macro that expands to
discretionary{=}{=}{=}
– David Carlisle
7 hours ago
just use a macro that expands to
discretionary{=}{=}{=}
– David Carlisle
7 hours ago
add a comment |
1 Answer
1
active
oldest
votes
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
newcommandz[1]{ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak}
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
or
documentclass{article}
usepackage{amsmath}
newcommandz[1]{relax
ifmmode
#1discretionary{}{thetextfont0 #1}{}%
else
ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak
fi}
begin{document}
In math mode: $a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
And how can i usez=
in math mode? So I can replace = withz=
in whole document?
– Denys Potapov
7 hours ago
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
@DenysPotapov you could make = active and define it to be as above so not needz
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = inincludegraphics[width=...]
ortextwidth=5cm
or ...
– David Carlisle
6 hours ago
add a comment |
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
});
}
});
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%2f483839%2fduplicate-equal-sign-on-line-break-in-text-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
newcommandz[1]{ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak}
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
or
documentclass{article}
usepackage{amsmath}
newcommandz[1]{relax
ifmmode
#1discretionary{}{thetextfont0 #1}{}%
else
ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak
fi}
begin{document}
In math mode: $a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
And how can i usez=
in math mode? So I can replace = withz=
in whole document?
– Denys Potapov
7 hours ago
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
@DenysPotapov you could make = active and define it to be as above so not needz
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = inincludegraphics[width=...]
ortextwidth=5cm
or ...
– David Carlisle
6 hours ago
add a comment |
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
newcommandz[1]{ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak}
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
or
documentclass{article}
usepackage{amsmath}
newcommandz[1]{relax
ifmmode
#1discretionary{}{thetextfont0 #1}{}%
else
ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak
fi}
begin{document}
In math mode: $a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
And how can i usez=
in math mode? So I can replace = withz=
in whole document?
– Denys Potapov
7 hours ago
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
@DenysPotapov you could make = active and define it to be as above so not needz
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = inincludegraphics[width=...]
ortextwidth=5cm
or ...
– David Carlisle
6 hours ago
add a comment |
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
newcommandz[1]{ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak}
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
or
documentclass{article}
usepackage{amsmath}
newcommandz[1]{relax
ifmmode
#1discretionary{}{thetextfont0 #1}{}%
else
ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak
fi}
begin{document}
In math mode: $a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
documentclass{article}
usepackage{amsmath}
mathchardefmathequals=mathcode`=
begingrouplccode`~=`=
lowercase{endgroupdef~}{mathequalsdiscretionary{}{thetextfont0=}{}}
AtBeginDocument{mathcode`=="8000 }
mathchardefmathplus=mathcode`+
begingrouplccode`~+`+
lowercase{endgroupdef~}{mathplusdiscretionary{}{thetextfont0+}{}}
AtBeginDocument{mathcode`+="8000 }
newcommandz[1]{ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak}
begin{document}
In math mode: $a = b = c = d = e = f = g = h = i = j = k = l = m = n = o =
p = q = r = s = t = u = v = w = x = y = z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
or
documentclass{article}
usepackage{amsmath}
newcommandz[1]{relax
ifmmode
#1discretionary{}{thetextfont0 #1}{}%
else
ifhmodeunskipfinobreak discretionary{#1}{#1}{#1}nobreak
fi}
begin{document}
In math mode: $a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h +
i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z$
In Text mode: a z= b z= c z= d z= e z= f z= g z= h z= i z= j z= k z= l z= m z= n z= o z=
p z= q z= r z= s z= t z= u z= v z= w z= x z= y z= z + a + b + c + d + e + f + g + h + i
+ j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z
end{document}
edited 7 hours ago
answered 7 hours ago
David CarlisleDavid Carlisle
498k4111441893
498k4111441893
And how can i usez=
in math mode? So I can replace = withz=
in whole document?
– Denys Potapov
7 hours ago
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
@DenysPotapov you could make = active and define it to be as above so not needz
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = inincludegraphics[width=...]
ortextwidth=5cm
or ...
– David Carlisle
6 hours ago
add a comment |
And how can i usez=
in math mode? So I can replace = withz=
in whole document?
– Denys Potapov
7 hours ago
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
@DenysPotapov you could make = active and define it to be as above so not needz
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = inincludegraphics[width=...]
ortextwidth=5cm
or ...
– David Carlisle
6 hours ago
And how can i use
z=
in math mode? So I can replace = with z=
in whole document?– Denys Potapov
7 hours ago
And how can i use
z=
in math mode? So I can replace = with z=
in whole document?– Denys Potapov
7 hours ago
1
1
@DenysPotapov I added something
– David Carlisle
7 hours ago
@DenysPotapov I added something
– David Carlisle
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
Thanks! If there will be no answer when i do not need to replace each occurrence of = than i will mark your answer as correct.
– Denys Potapov
7 hours ago
1
1
@DenysPotapov you could make = active and define it to be as above so not need
z
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = in includegraphics[width=...]
or textwidth=5cm
or ...– David Carlisle
6 hours ago
@DenysPotapov you could make = active and define it to be as above so not need
z
but active = is far more intrusive than the mathcode"8000 "math active" used in your question, it would work in a simple example above but break = in includegraphics[width=...]
or textwidth=5cm
or ...– David Carlisle
6 hours ago
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.
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%2f483839%2fduplicate-equal-sign-on-line-break-in-text-mode%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
2
just use a macro that expands to
discretionary{=}{=}{=}
– David Carlisle
7 hours ago