In LyX, is there a way to toggle the display of TeX code in math expressions?











up vote
9
down vote

favorite
5












Is there a way to toggle the display of math expressions in LyX between the default, which makes an attempt at replacing TeX code with easy to read symbols (but is short of actual rendering), and the underlying TeX code?



For example, I'd like the be able to toggle between this



Default mode for displaying math in LyX



and this



Desired TeX mode for displaying math in LyX










share|improve this question




















  • 1




    Given the view count, the developers should really consider adding a button for this action.
    – Tomáš Zato
    Feb 21 '15 at 20:12










  • @TomášZato or even just a command/menu item...
    – flow2k
    Dec 2 at 21:51















up vote
9
down vote

favorite
5












Is there a way to toggle the display of math expressions in LyX between the default, which makes an attempt at replacing TeX code with easy to read symbols (but is short of actual rendering), and the underlying TeX code?



For example, I'd like the be able to toggle between this



Default mode for displaying math in LyX



and this



Desired TeX mode for displaying math in LyX










share|improve this question




















  • 1




    Given the view count, the developers should really consider adding a button for this action.
    – Tomáš Zato
    Feb 21 '15 at 20:12










  • @TomášZato or even just a command/menu item...
    – flow2k
    Dec 2 at 21:51













up vote
9
down vote

favorite
5









up vote
9
down vote

favorite
5






5





Is there a way to toggle the display of math expressions in LyX between the default, which makes an attempt at replacing TeX code with easy to read symbols (but is short of actual rendering), and the underlying TeX code?



For example, I'd like the be able to toggle between this



Default mode for displaying math in LyX



and this



Desired TeX mode for displaying math in LyX










share|improve this question















Is there a way to toggle the display of math expressions in LyX between the default, which makes an attempt at replacing TeX code with easy to read symbols (but is short of actual rendering), and the underlying TeX code?



For example, I'd like the be able to toggle between this



Default mode for displaying math in LyX



and this



Desired TeX mode for displaying math in LyX







math-mode lyx editors






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 '12 at 18:55

























asked Feb 21 '12 at 18:52









orome

4,510114296




4,510114296








  • 1




    Given the view count, the developers should really consider adding a button for this action.
    – Tomáš Zato
    Feb 21 '15 at 20:12










  • @TomášZato or even just a command/menu item...
    – flow2k
    Dec 2 at 21:51














  • 1




    Given the view count, the developers should really consider adding a button for this action.
    – Tomáš Zato
    Feb 21 '15 at 20:12










  • @TomášZato or even just a command/menu item...
    – flow2k
    Dec 2 at 21:51








1




1




Given the view count, the developers should really consider adding a button for this action.
– Tomáš Zato
Feb 21 '15 at 20:12




Given the view count, the developers should really consider adding a button for this action.
– Tomáš Zato
Feb 21 '15 at 20:12












@TomášZato or even just a command/menu item...
– flow2k
Dec 2 at 21:51




@TomášZato or even just a command/menu item...
– flow2k
Dec 2 at 21:51










2 Answers
2






active

oldest

votes

















up vote
8
down vote



accepted










There is not a built-in toggle that I know of. But you can create one yourself by using a command sequence. First place your cursor in front of the math expression that you want to convert to LaTeX. Press alt+x to go to the command buffer (or go to view>toolbars>command buffer and then click on it at the bottom). Enter the following command and press return:



command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward`


This works for me. Does it work for you? If it works, make a shortcut for it. And then when you want to go back, just select the LaTeX code and do Ctrl + m.



Here are some additional suggestions:




  • go to View > Code Preview Pane to get a look at the LaTeX code around where your cursor is.


  • if you put your cursor inside the math box, copy (but don't copy the entire math box), go outside of math, and paste, it will paste the LaTeX code. To turn that LaTeX code back into the math symbols, highlight it, and press Ctrl + m.







share|improve this answer



















  • 2




    One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
    – Torbjørn T.
    Mar 1 '12 at 10:09










  • @TorbjørnT. good suggestion.
    – scottkosty
    Mar 2 '12 at 1:53






  • 1




    View -> Source is now View -> Code Preview Pane.
    – flow2k
    Dec 2 at 21:50






  • 1




    @flow2k thanks, just updated it.
    – scottkosty
    Dec 2 at 22:45


















up vote
1
down vote













No. The closest you can get (as of version 2.0.3) is to view the source (View > View Source) with the selection near an equation of interest, or to copy the contents of the expression (not the whole math box) and paste it somewhere.






share|improve this answer























  • @scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
    – orome
    Mar 1 '12 at 17:06












  • I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
    – scottkosty
    Mar 2 '12 at 1:53










  • @scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
    – orome
    Mar 6 '12 at 18:33










  • I made some edits. See if you like the new "solution"
    – scottkosty
    Mar 7 '12 at 0:01










  • @scottkosty: Cool, thanks; accepted!
    – orome
    Mar 7 '12 at 0:06











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',
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%2f45301%2fin-lyx-is-there-a-way-to-toggle-the-display-of-tex-code-in-math-expressions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
8
down vote



accepted










There is not a built-in toggle that I know of. But you can create one yourself by using a command sequence. First place your cursor in front of the math expression that you want to convert to LaTeX. Press alt+x to go to the command buffer (or go to view>toolbars>command buffer and then click on it at the bottom). Enter the following command and press return:



command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward`


This works for me. Does it work for you? If it works, make a shortcut for it. And then when you want to go back, just select the LaTeX code and do Ctrl + m.



Here are some additional suggestions:




  • go to View > Code Preview Pane to get a look at the LaTeX code around where your cursor is.


  • if you put your cursor inside the math box, copy (but don't copy the entire math box), go outside of math, and paste, it will paste the LaTeX code. To turn that LaTeX code back into the math symbols, highlight it, and press Ctrl + m.







share|improve this answer



















  • 2




    One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
    – Torbjørn T.
    Mar 1 '12 at 10:09










  • @TorbjørnT. good suggestion.
    – scottkosty
    Mar 2 '12 at 1:53






  • 1




    View -> Source is now View -> Code Preview Pane.
    – flow2k
    Dec 2 at 21:50






  • 1




    @flow2k thanks, just updated it.
    – scottkosty
    Dec 2 at 22:45















up vote
8
down vote



accepted










There is not a built-in toggle that I know of. But you can create one yourself by using a command sequence. First place your cursor in front of the math expression that you want to convert to LaTeX. Press alt+x to go to the command buffer (or go to view>toolbars>command buffer and then click on it at the bottom). Enter the following command and press return:



command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward`


This works for me. Does it work for you? If it works, make a shortcut for it. And then when you want to go back, just select the LaTeX code and do Ctrl + m.



Here are some additional suggestions:




  • go to View > Code Preview Pane to get a look at the LaTeX code around where your cursor is.


  • if you put your cursor inside the math box, copy (but don't copy the entire math box), go outside of math, and paste, it will paste the LaTeX code. To turn that LaTeX code back into the math symbols, highlight it, and press Ctrl + m.







share|improve this answer



















  • 2




    One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
    – Torbjørn T.
    Mar 1 '12 at 10:09










  • @TorbjørnT. good suggestion.
    – scottkosty
    Mar 2 '12 at 1:53






  • 1




    View -> Source is now View -> Code Preview Pane.
    – flow2k
    Dec 2 at 21:50






  • 1




    @flow2k thanks, just updated it.
    – scottkosty
    Dec 2 at 22:45













up vote
8
down vote



accepted







up vote
8
down vote



accepted






There is not a built-in toggle that I know of. But you can create one yourself by using a command sequence. First place your cursor in front of the math expression that you want to convert to LaTeX. Press alt+x to go to the command buffer (or go to view>toolbars>command buffer and then click on it at the bottom). Enter the following command and press return:



command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward`


This works for me. Does it work for you? If it works, make a shortcut for it. And then when you want to go back, just select the LaTeX code and do Ctrl + m.



Here are some additional suggestions:




  • go to View > Code Preview Pane to get a look at the LaTeX code around where your cursor is.


  • if you put your cursor inside the math box, copy (but don't copy the entire math box), go outside of math, and paste, it will paste the LaTeX code. To turn that LaTeX code back into the math symbols, highlight it, and press Ctrl + m.







share|improve this answer














There is not a built-in toggle that I know of. But you can create one yourself by using a command sequence. First place your cursor in front of the math expression that you want to convert to LaTeX. Press alt+x to go to the command buffer (or go to view>toolbars>command buffer and then click on it at the bottom). Enter the following command and press return:



command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward`


This works for me. Does it work for you? If it works, make a shortcut for it. And then when you want to go back, just select the LaTeX code and do Ctrl + m.



Here are some additional suggestions:




  • go to View > Code Preview Pane to get a look at the LaTeX code around where your cursor is.


  • if you put your cursor inside the math box, copy (but don't copy the entire math box), go outside of math, and paste, it will paste the LaTeX code. To turn that LaTeX code back into the math symbols, highlight it, and press Ctrl + m.








share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 2 at 22:45

























answered Mar 1 '12 at 8:02









scottkosty

10.3k21938




10.3k21938








  • 2




    One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
    – Torbjørn T.
    Mar 1 '12 at 10:09










  • @TorbjørnT. good suggestion.
    – scottkosty
    Mar 2 '12 at 1:53






  • 1




    View -> Source is now View -> Code Preview Pane.
    – flow2k
    Dec 2 at 21:50






  • 1




    @flow2k thanks, just updated it.
    – scottkosty
    Dec 2 at 22:45














  • 2




    One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
    – Torbjørn T.
    Mar 1 '12 at 10:09










  • @TorbjørnT. good suggestion.
    – scottkosty
    Mar 2 '12 at 1:53






  • 1




    View -> Source is now View -> Code Preview Pane.
    – flow2k
    Dec 2 at 21:50






  • 1




    @flow2k thanks, just updated it.
    – scottkosty
    Dec 2 at 22:45








2




2




One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
– Torbjørn T.
Mar 1 '12 at 10:09




One could bind a keyboard shortcut to View source as well, which could make it more convenient to use. The action is dialog-toggle view-source.
– Torbjørn T.
Mar 1 '12 at 10:09












@TorbjørnT. good suggestion.
– scottkosty
Mar 2 '12 at 1:53




@TorbjørnT. good suggestion.
– scottkosty
Mar 2 '12 at 1:53




1




1




View -> Source is now View -> Code Preview Pane.
– flow2k
Dec 2 at 21:50




View -> Source is now View -> Code Preview Pane.
– flow2k
Dec 2 at 21:50




1




1




@flow2k thanks, just updated it.
– scottkosty
Dec 2 at 22:45




@flow2k thanks, just updated it.
– scottkosty
Dec 2 at 22:45










up vote
1
down vote













No. The closest you can get (as of version 2.0.3) is to view the source (View > View Source) with the selection near an equation of interest, or to copy the contents of the expression (not the whole math box) and paste it somewhere.






share|improve this answer























  • @scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
    – orome
    Mar 1 '12 at 17:06












  • I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
    – scottkosty
    Mar 2 '12 at 1:53










  • @scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
    – orome
    Mar 6 '12 at 18:33










  • I made some edits. See if you like the new "solution"
    – scottkosty
    Mar 7 '12 at 0:01










  • @scottkosty: Cool, thanks; accepted!
    – orome
    Mar 7 '12 at 0:06















up vote
1
down vote













No. The closest you can get (as of version 2.0.3) is to view the source (View > View Source) with the selection near an equation of interest, or to copy the contents of the expression (not the whole math box) and paste it somewhere.






share|improve this answer























  • @scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
    – orome
    Mar 1 '12 at 17:06












  • I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
    – scottkosty
    Mar 2 '12 at 1:53










  • @scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
    – orome
    Mar 6 '12 at 18:33










  • I made some edits. See if you like the new "solution"
    – scottkosty
    Mar 7 '12 at 0:01










  • @scottkosty: Cool, thanks; accepted!
    – orome
    Mar 7 '12 at 0:06













up vote
1
down vote










up vote
1
down vote









No. The closest you can get (as of version 2.0.3) is to view the source (View > View Source) with the selection near an equation of interest, or to copy the contents of the expression (not the whole math box) and paste it somewhere.






share|improve this answer














No. The closest you can get (as of version 2.0.3) is to view the source (View > View Source) with the selection near an equation of interest, or to copy the contents of the expression (not the whole math box) and paste it somewhere.







share|improve this answer














share|improve this answer



share|improve this answer








answered Mar 1 '12 at 17:04


























community wiki





orome













  • @scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
    – orome
    Mar 1 '12 at 17:06












  • I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
    – scottkosty
    Mar 2 '12 at 1:53










  • @scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
    – orome
    Mar 6 '12 at 18:33










  • I made some edits. See if you like the new "solution"
    – scottkosty
    Mar 7 '12 at 0:01










  • @scottkosty: Cool, thanks; accepted!
    – orome
    Mar 7 '12 at 0:06


















  • @scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
    – orome
    Mar 1 '12 at 17:06












  • I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
    – scottkosty
    Mar 2 '12 at 1:53










  • @scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
    – orome
    Mar 6 '12 at 18:33










  • I made some edits. See if you like the new "solution"
    – scottkosty
    Mar 7 '12 at 0:01










  • @scottkosty: Cool, thanks; accepted!
    – orome
    Mar 7 '12 at 0:06
















@scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
– orome
Mar 1 '12 at 17:06






@scottkosty: This is closer to what I'm looking for (the question is not about "Instant Preview"). If the question could be rewritten like this, I'd accept it.
– orome
Mar 1 '12 at 17:06














I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
– scottkosty
Mar 2 '12 at 1:53




I don't understand. Do you want me to edit my answer and take out the instant preview suggestion? I'm not worried about having my answer accepted but I would be happy to improve the clarity.
– scottkosty
Mar 2 '12 at 1:53












@scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
– orome
Mar 6 '12 at 18:33




@scottkosty: That would be great. Just refocus to answer the question itself first, then the additional suggestions if you like.
– orome
Mar 6 '12 at 18:33












I made some edits. See if you like the new "solution"
– scottkosty
Mar 7 '12 at 0:01




I made some edits. See if you like the new "solution"
– scottkosty
Mar 7 '12 at 0:01












@scottkosty: Cool, thanks; accepted!
– orome
Mar 7 '12 at 0:06




@scottkosty: Cool, thanks; accepted!
– orome
Mar 7 '12 at 0:06


















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.





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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f45301%2fin-lyx-is-there-a-way-to-toggle-the-display-of-tex-code-in-math-expressions%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

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?