Math Functions both TeX and Infix NotationChanging colors of MATH functions and DRAWING linesDefining a...

Would an aboleth's Phantasmal Force lair action be affected by Counterspell, Dispel Magic, and/or Slow?

Can we track matter through time by looking at different depths in space?

Shifting between bemols and diesis in the key signature

Help understanding 1986 schematic for Rohde & Schwarz cryptographic key generator

Does "Until when" sound natural for native speakers?

Does a difference of tense count as a difference of meaning in a minimal pair?

Having the player face themselves after the mid-game

Signed and unsigned numbers

Should I take out a loan for a friend to invest on my behalf?

I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?

Specifying a starting column with colortbl package and xcolor

Power Strip for Europe

How do spaceships determine each other's mass in space?

Are all players supposed to be able to see each others' character sheets?

PTIJ: Why does only a Shor Tam ask at the Seder, and not a Shor Mu'ad?

Finitely many repeated replacements

Is it a Cyclops number? "Nobody" knows!

Expressing logarithmic equations without logs

Rationale to prefer local variables over instance variables?

Giving a career talk in my old university, how prominently should I tell students my salary?

Getting the || sign while using Kurier

Doubts in understanding some concepts of potential energy

What's the 'present simple' form of the word "нашла́" in 3rd person singular female?

Can one live in the U.S. and not use a credit card?



Math Functions both TeX and Infix Notation


Changing colors of MATH functions and DRAWING linesDefining a phrase containing math and text usable in both math and text modeMath notation and FontsIf statement in math notation using latexBehavior of , in both text and math modeEpsilon and log functionsMath notation in LaTeX?Writing functions and LaTeXcmbright and math functionsError on array using math notation













0















I am trying to automate plotting graphs of mathematical functions. For that I need infix (or RPN) notation. I also want to annotate the output automatically with the correct mathmode of TeX.



For example I want to generate



sin(x)          % infix (in Radian)
x RadtoDeg sin % RPN (in degree)
sin(x) % TeX (no conversion, just display)


in one go from one source. As a source I am willing to accept any of the three (or even a fourth notation if necessary).



A solution should be able to handle pi and Euler.





There is the infixtoRPN package that does half of what I want, but does not produce TeX output as far as I know.





Using another programming language might be possible as well. It's just that I don't know where to start.













share|improve this question




















  • 3





    why just rad in the middle one? why not assume the same definition of sin in all three syntax?

    – David Carlisle
    Feb 19 at 20:25











  • What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

    – Werner
    Feb 19 at 22:24











  • @DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

    – fborchers
    15 mins ago













  • you didn't mention pstricks until this comment

    – David Carlisle
    20 secs ago
















0















I am trying to automate plotting graphs of mathematical functions. For that I need infix (or RPN) notation. I also want to annotate the output automatically with the correct mathmode of TeX.



For example I want to generate



sin(x)          % infix (in Radian)
x RadtoDeg sin % RPN (in degree)
sin(x) % TeX (no conversion, just display)


in one go from one source. As a source I am willing to accept any of the three (or even a fourth notation if necessary).



A solution should be able to handle pi and Euler.





There is the infixtoRPN package that does half of what I want, but does not produce TeX output as far as I know.





Using another programming language might be possible as well. It's just that I don't know where to start.













share|improve this question




















  • 3





    why just rad in the middle one? why not assume the same definition of sin in all three syntax?

    – David Carlisle
    Feb 19 at 20:25











  • What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

    – Werner
    Feb 19 at 22:24











  • @DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

    – fborchers
    15 mins ago













  • you didn't mention pstricks until this comment

    – David Carlisle
    20 secs ago














0












0








0








I am trying to automate plotting graphs of mathematical functions. For that I need infix (or RPN) notation. I also want to annotate the output automatically with the correct mathmode of TeX.



For example I want to generate



sin(x)          % infix (in Radian)
x RadtoDeg sin % RPN (in degree)
sin(x) % TeX (no conversion, just display)


in one go from one source. As a source I am willing to accept any of the three (or even a fourth notation if necessary).



A solution should be able to handle pi and Euler.





There is the infixtoRPN package that does half of what I want, but does not produce TeX output as far as I know.





Using another programming language might be possible as well. It's just that I don't know where to start.













share|improve this question
















I am trying to automate plotting graphs of mathematical functions. For that I need infix (or RPN) notation. I also want to annotate the output automatically with the correct mathmode of TeX.



For example I want to generate



sin(x)          % infix (in Radian)
x RadtoDeg sin % RPN (in degree)
sin(x) % TeX (no conversion, just display)


in one go from one source. As a source I am willing to accept any of the three (or even a fourth notation if necessary).



A solution should be able to handle pi and Euler.





There is the infixtoRPN package that does half of what I want, but does not produce TeX output as far as I know.





Using another programming language might be possible as well. It's just that I don't know where to start.










math-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 17 mins ago







fborchers

















asked Feb 19 at 20:12









fborchersfborchers

687




687








  • 3





    why just rad in the middle one? why not assume the same definition of sin in all three syntax?

    – David Carlisle
    Feb 19 at 20:25











  • What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

    – Werner
    Feb 19 at 22:24











  • @DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

    – fborchers
    15 mins ago













  • you didn't mention pstricks until this comment

    – David Carlisle
    20 secs ago














  • 3





    why just rad in the middle one? why not assume the same definition of sin in all three syntax?

    – David Carlisle
    Feb 19 at 20:25











  • What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

    – Werner
    Feb 19 at 22:24











  • @DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

    – fborchers
    15 mins ago













  • you didn't mention pstricks until this comment

    – David Carlisle
    20 secs ago








3




3





why just rad in the middle one? why not assume the same definition of sin in all three syntax?

– David Carlisle
Feb 19 at 20:25





why just rad in the middle one? why not assume the same definition of sin in all three syntax?

– David Carlisle
Feb 19 at 20:25













What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

– Werner
Feb 19 at 22:24





What would be beneficial is to provide a minimal use case so community members interested in answering the question can figure out what your input would look like, as well as the expected output.

– Werner
Feb 19 at 22:24













@DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

– fborchers
15 mins ago







@DavidCarlisle Because for some reason the definitions do not coincide: infix sin(x) assumes radian, but RPN x sin assumes degrees. At least in pstricks.

– fborchers
15 mins ago















you didn't mention pstricks until this comment

– David Carlisle
20 secs ago





you didn't mention pstricks until this comment

– David Carlisle
20 secs ago










0






active

oldest

votes











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%2f475730%2fmath-functions-both-tex-and-infix-notation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f475730%2fmath-functions-both-tex-and-infix-notation%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

Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

(1602) Indiana Índice Designación y nombre Características orbitales Véase...

Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...