Partial derivative command with Deltas in lineHow can I put a line above a section heading and prevent a page...

Unidentified signals on FT8 frequencies

Limpar string com Regex

Can I negotiate a patent idea for a raise, under French law?

Why does this boat have a landing pad? (SpaceX's GO Searcher) Any plans for propulsive capsule landings?

Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?

Draw this image in the TIKZ package

What do you call someone who likes to pick fights?

Is the differential, dp, exact or not?

How to recover against Snake as a heavyweight character?

What does *dead* mean in *What do you mean, dead?*?

Professor forcing me to attend a conference, I can't afford even with 50% funding

Why restrict private health insurance?

PTIJ: Sport in the Torah

Is there a logarithm base for which the logarithm becomes an identity function?

How spaceships determine each other's mass in space?

Why is there an extra space when I type "ls" on the Desktop?

A running toilet that stops itself

I am the light that shines in the dark

What can I do if someone tampers with my SSH public key?

Are small insurances worth it?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

Was it really inappropriate to write a pull request for the company I interviewed with?

Why aren't there more Gauls like Obelix?

What is better: yes / no radio, or simple checkbox?



Partial derivative command with Deltas in line


How can I put a line above a section heading and prevent a page break between?Partial derivative macroPutting a function into a new command with optional argumentswrapfig with {R} remains left and keeps white space to the rightHow do I center and scale vertical harpoons?String comparisons not working with textgreekPlace something in the middle of a hphantom (more or less)Choppy equations with tex4htBeamer raggedright unintended for complete line instead of part of the lineMake paired delimiter with prefix for Re and Im













3















I would like to create a new command for partial derivatives. I have something like this in mind:



newcommand{deriv}[2]{frac{partial #1}{partial #2}}


However, the partial commands are unfortunately not horizontally aligned, if I have e.g something like:



deriv{x^alpha}{t},


i.e. if argument #1 has a wider horizontal extent as argument #2. How can I enforce that the partial commands are always horizontally aligned?










share|improve this question




















  • 1





    I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

    – Christian Hupfer
    Jul 29 '17 at 21:49











  • @egreg I want a horizontal slash, accordingly / does not suit well for me.

    – DonkeyKong
    Jul 29 '17 at 22:06






  • 2





    Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

    – GuM
    Jul 29 '17 at 22:41








  • 2





    @GuM - You could add another hfill to the top, just in case.

    – John Kormylo
    Jul 29 '17 at 22:46
















3















I would like to create a new command for partial derivatives. I have something like this in mind:



newcommand{deriv}[2]{frac{partial #1}{partial #2}}


However, the partial commands are unfortunately not horizontally aligned, if I have e.g something like:



deriv{x^alpha}{t},


i.e. if argument #1 has a wider horizontal extent as argument #2. How can I enforce that the partial commands are always horizontally aligned?










share|improve this question




















  • 1





    I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

    – Christian Hupfer
    Jul 29 '17 at 21:49











  • @egreg I want a horizontal slash, accordingly / does not suit well for me.

    – DonkeyKong
    Jul 29 '17 at 22:06






  • 2





    Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

    – GuM
    Jul 29 '17 at 22:41








  • 2





    @GuM - You could add another hfill to the top, just in case.

    – John Kormylo
    Jul 29 '17 at 22:46














3












3








3


1






I would like to create a new command for partial derivatives. I have something like this in mind:



newcommand{deriv}[2]{frac{partial #1}{partial #2}}


However, the partial commands are unfortunately not horizontally aligned, if I have e.g something like:



deriv{x^alpha}{t},


i.e. if argument #1 has a wider horizontal extent as argument #2. How can I enforce that the partial commands are always horizontally aligned?










share|improve this question
















I would like to create a new command for partial derivatives. I have something like this in mind:



newcommand{deriv}[2]{frac{partial #1}{partial #2}}


However, the partial commands are unfortunately not horizontally aligned, if I have e.g something like:



deriv{x^alpha}{t},


i.e. if argument #1 has a wider horizontal extent as argument #2. How can I enforce that the partial commands are always horizontally aligned?







math-mode horizontal-alignment






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 30 '17 at 12:55









Werner

446k699871692




446k699871692










asked Jul 29 '17 at 21:27









DonkeyKongDonkeyKong

587




587








  • 1





    I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

    – Christian Hupfer
    Jul 29 '17 at 21:49











  • @egreg I want a horizontal slash, accordingly / does not suit well for me.

    – DonkeyKong
    Jul 29 '17 at 22:06






  • 2





    Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

    – GuM
    Jul 29 '17 at 22:41








  • 2





    @GuM - You could add another hfill to the top, just in case.

    – John Kormylo
    Jul 29 '17 at 22:46














  • 1





    I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

    – Christian Hupfer
    Jul 29 '17 at 21:49











  • @egreg I want a horizontal slash, accordingly / does not suit well for me.

    – DonkeyKong
    Jul 29 '17 at 22:06






  • 2





    Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

    – GuM
    Jul 29 '17 at 22:41








  • 2





    @GuM - You could add another hfill to the top, just in case.

    – John Kormylo
    Jul 29 '17 at 22:46








1




1





I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

– Christian Hupfer
Jul 29 '17 at 21:49





I am pretty sure, the usual suspects will show up with esdiff solutions etc. ;-)

– Christian Hupfer
Jul 29 '17 at 21:49













@egreg I want a horizontal slash, accordingly / does not suit well for me.

– DonkeyKong
Jul 29 '17 at 22:06





@egreg I want a horizontal slash, accordingly / does not suit well for me.

– DonkeyKong
Jul 29 '17 at 22:06




2




2





Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

– GuM
Jul 29 '17 at 22:41







Like @JohnKormylo, I suspect that, when you say “in line”, you actually mean “vertically aligned” (like what you would get from, say, newcommand*{deriv}[2]{frac{partial #1}{partial #2hfill}}).

– GuM
Jul 29 '17 at 22:41






2




2





@GuM - You could add another hfill to the top, just in case.

– John Kormylo
Jul 29 '17 at 22:46





@GuM - You could add another hfill to the top, just in case.

– John Kormylo
Jul 29 '17 at 22:46










2 Answers
2






active

oldest

votes


















3














Set the numerator and denominator in a box of similar width and ensure they are both [l]eft-aligned. This is easily done using eqparbox and automated below to allow for any number of derivs (using a counter).



enter image description here



documentclass{article}

usepackage{eqparbox}

newcounter{derivcnt}
newcommand{deriv}[2]{%
stepcounter{derivcnt}%
frac
{eqmakebox[deriv-thederivcnt][l]{$partial #1$}}
{eqmakebox[deriv-thederivcnt][l]{$partial #2$}}}

begin{document}

[
deriv{a}{b} + deriv{abc}{d} - deriv{a}{bcd}
]

end{document}


Since this approach uses the .aux files to store the lengths of the boxes, multiple compilations are required with every change in the deriv content.






share|improve this answer































    1














    You can check the diffcoeff package. It has many ready to use commands for a variety of differential operators



    documentclass[]{article}
    usepackage{amsmath}
    usepackage{diffcoeff}
    begin{document}
    [ diff{y}{x} , diffp[2]{f}{t} , diffp{f}{x,y} ]
    end{document}


    enter image description here






    share|improve this answer


























    • I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

      – Jan Filip
      Jul 30 '17 at 13:14











    • You are right I know what you mean. I don't think it will work like this.

      – mac
      Jul 30 '17 at 13:25











    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%2f383913%2fpartial-derivative-command-with-deltas-in-line%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









    3














    Set the numerator and denominator in a box of similar width and ensure they are both [l]eft-aligned. This is easily done using eqparbox and automated below to allow for any number of derivs (using a counter).



    enter image description here



    documentclass{article}

    usepackage{eqparbox}

    newcounter{derivcnt}
    newcommand{deriv}[2]{%
    stepcounter{derivcnt}%
    frac
    {eqmakebox[deriv-thederivcnt][l]{$partial #1$}}
    {eqmakebox[deriv-thederivcnt][l]{$partial #2$}}}

    begin{document}

    [
    deriv{a}{b} + deriv{abc}{d} - deriv{a}{bcd}
    ]

    end{document}


    Since this approach uses the .aux files to store the lengths of the boxes, multiple compilations are required with every change in the deriv content.






    share|improve this answer




























      3














      Set the numerator and denominator in a box of similar width and ensure they are both [l]eft-aligned. This is easily done using eqparbox and automated below to allow for any number of derivs (using a counter).



      enter image description here



      documentclass{article}

      usepackage{eqparbox}

      newcounter{derivcnt}
      newcommand{deriv}[2]{%
      stepcounter{derivcnt}%
      frac
      {eqmakebox[deriv-thederivcnt][l]{$partial #1$}}
      {eqmakebox[deriv-thederivcnt][l]{$partial #2$}}}

      begin{document}

      [
      deriv{a}{b} + deriv{abc}{d} - deriv{a}{bcd}
      ]

      end{document}


      Since this approach uses the .aux files to store the lengths of the boxes, multiple compilations are required with every change in the deriv content.






      share|improve this answer


























        3












        3








        3







        Set the numerator and denominator in a box of similar width and ensure they are both [l]eft-aligned. This is easily done using eqparbox and automated below to allow for any number of derivs (using a counter).



        enter image description here



        documentclass{article}

        usepackage{eqparbox}

        newcounter{derivcnt}
        newcommand{deriv}[2]{%
        stepcounter{derivcnt}%
        frac
        {eqmakebox[deriv-thederivcnt][l]{$partial #1$}}
        {eqmakebox[deriv-thederivcnt][l]{$partial #2$}}}

        begin{document}

        [
        deriv{a}{b} + deriv{abc}{d} - deriv{a}{bcd}
        ]

        end{document}


        Since this approach uses the .aux files to store the lengths of the boxes, multiple compilations are required with every change in the deriv content.






        share|improve this answer













        Set the numerator and denominator in a box of similar width and ensure they are both [l]eft-aligned. This is easily done using eqparbox and automated below to allow for any number of derivs (using a counter).



        enter image description here



        documentclass{article}

        usepackage{eqparbox}

        newcounter{derivcnt}
        newcommand{deriv}[2]{%
        stepcounter{derivcnt}%
        frac
        {eqmakebox[deriv-thederivcnt][l]{$partial #1$}}
        {eqmakebox[deriv-thederivcnt][l]{$partial #2$}}}

        begin{document}

        [
        deriv{a}{b} + deriv{abc}{d} - deriv{a}{bcd}
        ]

        end{document}


        Since this approach uses the .aux files to store the lengths of the boxes, multiple compilations are required with every change in the deriv content.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 30 '17 at 13:00









        WernerWerner

        446k699871692




        446k699871692























            1














            You can check the diffcoeff package. It has many ready to use commands for a variety of differential operators



            documentclass[]{article}
            usepackage{amsmath}
            usepackage{diffcoeff}
            begin{document}
            [ diff{y}{x} , diffp[2]{f}{t} , diffp{f}{x,y} ]
            end{document}


            enter image description here






            share|improve this answer


























            • I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

              – Jan Filip
              Jul 30 '17 at 13:14











            • You are right I know what you mean. I don't think it will work like this.

              – mac
              Jul 30 '17 at 13:25
















            1














            You can check the diffcoeff package. It has many ready to use commands for a variety of differential operators



            documentclass[]{article}
            usepackage{amsmath}
            usepackage{diffcoeff}
            begin{document}
            [ diff{y}{x} , diffp[2]{f}{t} , diffp{f}{x,y} ]
            end{document}


            enter image description here






            share|improve this answer


























            • I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

              – Jan Filip
              Jul 30 '17 at 13:14











            • You are right I know what you mean. I don't think it will work like this.

              – mac
              Jul 30 '17 at 13:25














            1












            1








            1







            You can check the diffcoeff package. It has many ready to use commands for a variety of differential operators



            documentclass[]{article}
            usepackage{amsmath}
            usepackage{diffcoeff}
            begin{document}
            [ diff{y}{x} , diffp[2]{f}{t} , diffp{f}{x,y} ]
            end{document}


            enter image description here






            share|improve this answer















            You can check the diffcoeff package. It has many ready to use commands for a variety of differential operators



            documentclass[]{article}
            usepackage{amsmath}
            usepackage{diffcoeff}
            begin{document}
            [ diff{y}{x} , diffp[2]{f}{t} , diffp{f}{x,y} ]
            end{document}


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 7 mins ago









            quark67

            19615




            19615










            answered Jul 30 '17 at 13:00









            macmac

            695716




            695716













            • I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

              – Jan Filip
              Jul 30 '17 at 13:14











            • You are right I know what you mean. I don't think it will work like this.

              – mac
              Jul 30 '17 at 13:25



















            • I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

              – Jan Filip
              Jul 30 '17 at 13:14











            • You are right I know what you mean. I don't think it will work like this.

              – mac
              Jul 30 '17 at 13:25

















            I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

            – Jan Filip
            Jul 30 '17 at 13:14





            I don't know this package, but I think it's not correctly made. For 2nd partial on should use different spacing like $partial^2!f$

            – Jan Filip
            Jul 30 '17 at 13:14













            You are right I know what you mean. I don't think it will work like this.

            – mac
            Jul 30 '17 at 13:25





            You are right I know what you mean. I don't think it will work like this.

            – mac
            Jul 30 '17 at 13:25


















            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%2f383913%2fpartial-derivative-command-with-deltas-in-line%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

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Castillo d'Acher Características Menú de navegación

            Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...