Duplicate equal sign on line break in text mode












0















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:



enter image description here



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}









share|improve this question


















  • 2





    just use a macro that expands to discretionary{=}{=}{=}

    – David Carlisle
    7 hours ago
















0















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:



enter image description here



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}









share|improve this question


















  • 2





    just use a macro that expands to discretionary{=}{=}{=}

    – David Carlisle
    7 hours ago














0












0








0








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:



enter image description here



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}









share|improve this question














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:



enter image description here



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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 8 hours ago









Denys PotapovDenys Potapov

22819




22819








  • 2





    just use a macro that expands to discretionary{=}{=}{=}

    – David Carlisle
    7 hours ago














  • 2





    just use a macro that expands to discretionary{=}{=}{=}

    – 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










1 Answer
1






active

oldest

votes


















2














enter image description here



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}





share|improve this answer


























  • And how can i use z= in math mode? So I can replace = with z= 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 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














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%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









2














enter image description here



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}





share|improve this answer


























  • And how can i use z= in math mode? So I can replace = with z= 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 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


















2














enter image description here



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}





share|improve this answer


























  • And how can i use z= in math mode? So I can replace = with z= 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 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
















2












2








2







enter image description here



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}





share|improve this answer















enter image description here



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}






share|improve this answer














share|improve this answer



share|improve this answer








edited 7 hours ago

























answered 7 hours ago









David CarlisleDavid Carlisle

498k4111441893




498k4111441893













  • And how can i use z= in math mode? So I can replace = with z= 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 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





















  • And how can i use z= in math mode? So I can replace = with z= 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 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



















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




















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%2f483839%2fduplicate-equal-sign-on-line-break-in-text-mode%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

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks