Wrong font family in algorithm2eAlgorithm2e - Unwanted semi-colonalgorithm2e noend option produces wrong labelIs algorithm2e available in Spanish?Remove “end” in algorithm2eTitleofalg with algorithm2e packageWhat's wrong with usepackagealgorithm2e?Wrap text in algorithm2eAdjust boxrule of algorithm2e

Can we use a Cryptographic hash function to generate infinite random numbers?

Sleep for 1000 years

Declining a paper review after accepting it and seeing the manuscript

Confused about Autoregressive AR(1) process

Selecting point with maximum value for each polygon

Applying field calculator for multiple layers at once

What are the earliest instances of a virus causing large-scale mutations?

Is using Swiss Francs (CHF) cheaper than Euros (EUR) in Switzerland?

To find number of real roots

C - random password generator

How can I encourage a fellow player to develop a character a bit more?

How to prevent discontent among the players when one player murders the others' characters?

Type of capacitor to bridge X10 signals in household power

Moon's unusual gravity

Secure Implementation of Password Database

How to answer my 5 year old why I can tell her what she has to do, and why she can't tell me what to do

How does a religion based around destroying the world attract followers

What's the greatest number of hands I can have to annoy my mother-in-law with?

What are the downsides of being a debt-free country (no foreign national debt)?

How do I compile something for Linux if I don't have enough space for installing GCC?

Have spacecraft photographed each other beyond Earth orbit?

Command to keep only a portion of JSON data from each line?

Is there any TeX-based engine capable of rendering the colored font?

Why don't all States switch to all postal voting?



Wrong font family in algorithm2e


Algorithm2e - Unwanted semi-colonalgorithm2e noend option produces wrong labelIs algorithm2e available in Spanish?Remove “end” in algorithm2eTitleofalg with algorithm2e packageWhat's wrong with usepackagealgorithm2e?Wrap text in algorithm2eAdjust boxrule of algorithm2e






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









4


















Can you help me on this one?
The word min in the line If $c (mathbfx) < c^textmin $ is coming out in math mode, while in the others, in text mode.





documentclassarticle
usepackageamsmath,amssymb

DeclareMathOperator*argminarg,min
DeclareMathOperator*argmaxarg,max


usepackage[ruled]algorithm2e
begindocument
beginalgorithm
DontPrintSemicolon

KwInBlalalala.
KwOutBlalalala


For$t = 1$ textto $T$

Fit $Psi_t+1$ to $mathcalH_t$\
$mathbfx leftarrow argmax_mathbfx in mathcalX a(mu (Psi_t+1 (mathbfx)) ,sigma(Psi_t+1 (mathbfx)) , J^textmin )$\
Check $c=J(mathbfx)$\
$mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace (mathbfx,c) rightrbrace $\
If $c (mathbfx) < c^textmin $


$mathbfx^textmin,c^textmin leftarrow mathbfx,c $




Return $mathbfx^textmin$

captionTesting


endalgorithm

enddocument









share|improve this question



























  • I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

    – Nepumuk
    Sep 30 at 7:14












  • It cannot be in mathmode since the word “min” has to be in textmode

    – Delan
    Sep 30 at 7:26











  • What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

    – Nepumuk
    Sep 30 at 7:33







  • 2





    @Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

    – BambOo
    Sep 30 at 9:03











  • @BambOo I tried it and it prints min with an accent on i

    – Delan
    Sep 30 at 10:04

















4


















Can you help me on this one?
The word min in the line If $c (mathbfx) < c^textmin $ is coming out in math mode, while in the others, in text mode.





documentclassarticle
usepackageamsmath,amssymb

DeclareMathOperator*argminarg,min
DeclareMathOperator*argmaxarg,max


usepackage[ruled]algorithm2e
begindocument
beginalgorithm
DontPrintSemicolon

KwInBlalalala.
KwOutBlalalala


For$t = 1$ textto $T$

Fit $Psi_t+1$ to $mathcalH_t$\
$mathbfx leftarrow argmax_mathbfx in mathcalX a(mu (Psi_t+1 (mathbfx)) ,sigma(Psi_t+1 (mathbfx)) , J^textmin )$\
Check $c=J(mathbfx)$\
$mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace (mathbfx,c) rightrbrace $\
If $c (mathbfx) < c^textmin $


$mathbfx^textmin,c^textmin leftarrow mathbfx,c $




Return $mathbfx^textmin$

captionTesting


endalgorithm

enddocument









share|improve this question



























  • I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

    – Nepumuk
    Sep 30 at 7:14












  • It cannot be in mathmode since the word “min” has to be in textmode

    – Delan
    Sep 30 at 7:26











  • What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

    – Nepumuk
    Sep 30 at 7:33







  • 2





    @Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

    – BambOo
    Sep 30 at 9:03











  • @BambOo I tried it and it prints min with an accent on i

    – Delan
    Sep 30 at 10:04













4













4









4








Can you help me on this one?
The word min in the line If $c (mathbfx) < c^textmin $ is coming out in math mode, while in the others, in text mode.





documentclassarticle
usepackageamsmath,amssymb

DeclareMathOperator*argminarg,min
DeclareMathOperator*argmaxarg,max


usepackage[ruled]algorithm2e
begindocument
beginalgorithm
DontPrintSemicolon

KwInBlalalala.
KwOutBlalalala


For$t = 1$ textto $T$

Fit $Psi_t+1$ to $mathcalH_t$\
$mathbfx leftarrow argmax_mathbfx in mathcalX a(mu (Psi_t+1 (mathbfx)) ,sigma(Psi_t+1 (mathbfx)) , J^textmin )$\
Check $c=J(mathbfx)$\
$mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace (mathbfx,c) rightrbrace $\
If $c (mathbfx) < c^textmin $


$mathbfx^textmin,c^textmin leftarrow mathbfx,c $




Return $mathbfx^textmin$

captionTesting


endalgorithm

enddocument









share|improve this question
















Can you help me on this one?
The word min in the line If $c (mathbfx) < c^textmin $ is coming out in math mode, while in the others, in text mode.





documentclassarticle
usepackageamsmath,amssymb

DeclareMathOperator*argminarg,min
DeclareMathOperator*argmaxarg,max


usepackage[ruled]algorithm2e
begindocument
beginalgorithm
DontPrintSemicolon

KwInBlalalala.
KwOutBlalalala


For$t = 1$ textto $T$

Fit $Psi_t+1$ to $mathcalH_t$\
$mathbfx leftarrow argmax_mathbfx in mathcalX a(mu (Psi_t+1 (mathbfx)) ,sigma(Psi_t+1 (mathbfx)) , J^textmin )$\
Check $c=J(mathbfx)$\
$mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace (mathbfx,c) rightrbrace $\
If $c (mathbfx) < c^textmin $


$mathbfx^textmin,c^textmin leftarrow mathbfx,c $




Return $mathbfx^textmin$

captionTesting


endalgorithm

enddocument






algorithm2e






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 30 at 10:55







Delan

















asked Sep 30 at 6:48









DelanDelan

8241 silver badge8 bronze badges




8241 silver badge8 bronze badges















  • I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

    – Nepumuk
    Sep 30 at 7:14












  • It cannot be in mathmode since the word “min” has to be in textmode

    – Delan
    Sep 30 at 7:26











  • What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

    – Nepumuk
    Sep 30 at 7:33







  • 2





    @Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

    – BambOo
    Sep 30 at 9:03











  • @BambOo I tried it and it prints min with an accent on i

    – Delan
    Sep 30 at 10:04

















  • I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

    – Nepumuk
    Sep 30 at 7:14












  • It cannot be in mathmode since the word “min” has to be in textmode

    – Delan
    Sep 30 at 7:26











  • What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

    – Nepumuk
    Sep 30 at 7:33







  • 2





    @Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

    – BambOo
    Sep 30 at 9:03











  • @BambOo I tried it and it prints min with an accent on i

    – Delan
    Sep 30 at 10:04
















I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

– Nepumuk
Sep 30 at 7:14






I assume that you need the changes from mathmode to textmode that often, don't you? Did you try to do this algorithm all in one mathmode (defining/substituting the necessary commands, …)?

– Nepumuk
Sep 30 at 7:14














It cannot be in mathmode since the word “min” has to be in textmode

– Delan
Sep 30 at 7:26





It cannot be in mathmode since the word “min” has to be in textmode

– Delan
Sep 30 at 7:26













What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

– Nepumuk
Sep 30 at 7:33






What beginmath before For and endmath after caption gives me. Maybe this helps you further. This probably has something to do with the If statement.

– Nepumuk
Sep 30 at 7:33





2




2





@Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

– BambOo
Sep 30 at 9:03





@Delan, why dont' you replace your textmin with the already existing min operator which seems to provide the desired result ?

– BambOo
Sep 30 at 9:03













@BambOo I tried it and it prints min with an accent on i

– Delan
Sep 30 at 10:04





@BambOo I tried it and it prints min with an accent on i

– Delan
Sep 30 at 10:04










2 Answers
2






active

oldest

votes


















6



















The correct command is mathrm in every case.



documentclassarticle
usepackageamsmath,amssymb
usepackage[ruled]algorithm2e

DeclareMathOperator*argminarg,min
DeclareMathOperator*argmaxarg,max

begindocument

beginalgorithm
DontPrintSemicolon

KwInBlalalala.
KwOutBlalalala

For$t = 1$ to $T$
Fit $Psi_t+1$ to $mathcalH_t$\
$mathbfx leftarrow argmax_mathbfx in mathcalX
a(mu (Psi_t+1 (mathbfx)) , sigma(Psi_t+1 (mathbfx)) , J^textupmin)$\
Check $c=J(mathbfx)$\
$mathcalH_t+1 leftarrow mathcalH_t cup lbrace (mathbfx,c) rbrace $\
If $c (mathbfx) < c^textupmin $
$mathbfx^textupmin,c^textupmin leftarrow mathbfx,c$


Return $mathbfx^textupmin$

captionTesting
endalgorithm

enddocument


You'd get the same result with textup. The problem is that text picks up the font that's current when the formula starts, which is italic in the argument to If.



enter image description here



Side note. Your MWE cannot produce “mín” from min. That happens if you load babel-spanish, for instance.






share|improve this answer
































    2



















    At least, I got a workaround.



    documentclassarticle
    usepackageamsmath,amssymb
    DeclareMathOperator*argminarg,min
    DeclareMathOperator*argmaxarg,max
    usepackage[ruled]algorithm2e
    begindocument
    beginalgorithm
    DontPrintSemicolon
    KwInBlalalala.
    KwOutBlalalala
    For$t = 1$ to $T$
    Fit $Psi_t+1$ to $mathcalH_t$\
    $mathbfxleftarrow argmax_mathbfxinmathcalX a(mu (Psi_t+1 (mathbfx)),sigma(Psi_t+1 (mathbfx)) , J^textmin)$\
    Check $c=J(mathbfx)$\
    $mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace(mathbfx,c)rightrbrace$\
    If $c (mathbfx) < c^mathrmmin $
    $mathbfx^textmin,c^textmin leftarrow mathbfx,c $


    Return $mathbfx^textmin$
    captionTesting
    endalgorithm
    enddocument


    Surely, there are fonts which make a difference between text and mathrm visible to the naked eye, but for this example, I cannot distinguish my output "min"s whether it was created with the further or the latter.






    share|improve this answer



























    • Great! Could you please add a screenshot?

      – Delan
      Sep 30 at 7:50






    • 1





      There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

      – Delan
      Sep 30 at 7:58











    • @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

      – Nepumuk
      Sep 30 at 8:18













    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/4.0/"u003ecc by-sa 4.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%2f510359%2fwrong-font-family-in-algorithm2e%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









    6



















    The correct command is mathrm in every case.



    documentclassarticle
    usepackageamsmath,amssymb
    usepackage[ruled]algorithm2e

    DeclareMathOperator*argminarg,min
    DeclareMathOperator*argmaxarg,max

    begindocument

    beginalgorithm
    DontPrintSemicolon

    KwInBlalalala.
    KwOutBlalalala

    For$t = 1$ to $T$
    Fit $Psi_t+1$ to $mathcalH_t$\
    $mathbfx leftarrow argmax_mathbfx in mathcalX
    a(mu (Psi_t+1 (mathbfx)) , sigma(Psi_t+1 (mathbfx)) , J^textupmin)$\
    Check $c=J(mathbfx)$\
    $mathcalH_t+1 leftarrow mathcalH_t cup lbrace (mathbfx,c) rbrace $\
    If $c (mathbfx) < c^textupmin $
    $mathbfx^textupmin,c^textupmin leftarrow mathbfx,c$


    Return $mathbfx^textupmin$

    captionTesting
    endalgorithm

    enddocument


    You'd get the same result with textup. The problem is that text picks up the font that's current when the formula starts, which is italic in the argument to If.



    enter image description here



    Side note. Your MWE cannot produce “mín” from min. That happens if you load babel-spanish, for instance.






    share|improve this answer





























      6



















      The correct command is mathrm in every case.



      documentclassarticle
      usepackageamsmath,amssymb
      usepackage[ruled]algorithm2e

      DeclareMathOperator*argminarg,min
      DeclareMathOperator*argmaxarg,max

      begindocument

      beginalgorithm
      DontPrintSemicolon

      KwInBlalalala.
      KwOutBlalalala

      For$t = 1$ to $T$
      Fit $Psi_t+1$ to $mathcalH_t$\
      $mathbfx leftarrow argmax_mathbfx in mathcalX
      a(mu (Psi_t+1 (mathbfx)) , sigma(Psi_t+1 (mathbfx)) , J^textupmin)$\
      Check $c=J(mathbfx)$\
      $mathcalH_t+1 leftarrow mathcalH_t cup lbrace (mathbfx,c) rbrace $\
      If $c (mathbfx) < c^textupmin $
      $mathbfx^textupmin,c^textupmin leftarrow mathbfx,c$


      Return $mathbfx^textupmin$

      captionTesting
      endalgorithm

      enddocument


      You'd get the same result with textup. The problem is that text picks up the font that's current when the formula starts, which is italic in the argument to If.



      enter image description here



      Side note. Your MWE cannot produce “mín” from min. That happens if you load babel-spanish, for instance.






      share|improve this answer



























        6















        6











        6









        The correct command is mathrm in every case.



        documentclassarticle
        usepackageamsmath,amssymb
        usepackage[ruled]algorithm2e

        DeclareMathOperator*argminarg,min
        DeclareMathOperator*argmaxarg,max

        begindocument

        beginalgorithm
        DontPrintSemicolon

        KwInBlalalala.
        KwOutBlalalala

        For$t = 1$ to $T$
        Fit $Psi_t+1$ to $mathcalH_t$\
        $mathbfx leftarrow argmax_mathbfx in mathcalX
        a(mu (Psi_t+1 (mathbfx)) , sigma(Psi_t+1 (mathbfx)) , J^textupmin)$\
        Check $c=J(mathbfx)$\
        $mathcalH_t+1 leftarrow mathcalH_t cup lbrace (mathbfx,c) rbrace $\
        If $c (mathbfx) < c^textupmin $
        $mathbfx^textupmin,c^textupmin leftarrow mathbfx,c$


        Return $mathbfx^textupmin$

        captionTesting
        endalgorithm

        enddocument


        You'd get the same result with textup. The problem is that text picks up the font that's current when the formula starts, which is italic in the argument to If.



        enter image description here



        Side note. Your MWE cannot produce “mín” from min. That happens if you load babel-spanish, for instance.






        share|improve this answer














        The correct command is mathrm in every case.



        documentclassarticle
        usepackageamsmath,amssymb
        usepackage[ruled]algorithm2e

        DeclareMathOperator*argminarg,min
        DeclareMathOperator*argmaxarg,max

        begindocument

        beginalgorithm
        DontPrintSemicolon

        KwInBlalalala.
        KwOutBlalalala

        For$t = 1$ to $T$
        Fit $Psi_t+1$ to $mathcalH_t$\
        $mathbfx leftarrow argmax_mathbfx in mathcalX
        a(mu (Psi_t+1 (mathbfx)) , sigma(Psi_t+1 (mathbfx)) , J^textupmin)$\
        Check $c=J(mathbfx)$\
        $mathcalH_t+1 leftarrow mathcalH_t cup lbrace (mathbfx,c) rbrace $\
        If $c (mathbfx) < c^textupmin $
        $mathbfx^textupmin,c^textupmin leftarrow mathbfx,c$


        Return $mathbfx^textupmin$

        captionTesting
        endalgorithm

        enddocument


        You'd get the same result with textup. The problem is that text picks up the font that's current when the formula starts, which is italic in the argument to If.



        enter image description here



        Side note. Your MWE cannot produce “mín” from min. That happens if you load babel-spanish, for instance.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Sep 30 at 10:25









        egregegreg

        789k95 gold badges2057 silver badges3468 bronze badges




        789k95 gold badges2057 silver badges3468 bronze badges


























            2



















            At least, I got a workaround.



            documentclassarticle
            usepackageamsmath,amssymb
            DeclareMathOperator*argminarg,min
            DeclareMathOperator*argmaxarg,max
            usepackage[ruled]algorithm2e
            begindocument
            beginalgorithm
            DontPrintSemicolon
            KwInBlalalala.
            KwOutBlalalala
            For$t = 1$ to $T$
            Fit $Psi_t+1$ to $mathcalH_t$\
            $mathbfxleftarrow argmax_mathbfxinmathcalX a(mu (Psi_t+1 (mathbfx)),sigma(Psi_t+1 (mathbfx)) , J^textmin)$\
            Check $c=J(mathbfx)$\
            $mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace(mathbfx,c)rightrbrace$\
            If $c (mathbfx) < c^mathrmmin $
            $mathbfx^textmin,c^textmin leftarrow mathbfx,c $


            Return $mathbfx^textmin$
            captionTesting
            endalgorithm
            enddocument


            Surely, there are fonts which make a difference between text and mathrm visible to the naked eye, but for this example, I cannot distinguish my output "min"s whether it was created with the further or the latter.






            share|improve this answer



























            • Great! Could you please add a screenshot?

              – Delan
              Sep 30 at 7:50






            • 1





              There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

              – Delan
              Sep 30 at 7:58











            • @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

              – Nepumuk
              Sep 30 at 8:18
















            2



















            At least, I got a workaround.



            documentclassarticle
            usepackageamsmath,amssymb
            DeclareMathOperator*argminarg,min
            DeclareMathOperator*argmaxarg,max
            usepackage[ruled]algorithm2e
            begindocument
            beginalgorithm
            DontPrintSemicolon
            KwInBlalalala.
            KwOutBlalalala
            For$t = 1$ to $T$
            Fit $Psi_t+1$ to $mathcalH_t$\
            $mathbfxleftarrow argmax_mathbfxinmathcalX a(mu (Psi_t+1 (mathbfx)),sigma(Psi_t+1 (mathbfx)) , J^textmin)$\
            Check $c=J(mathbfx)$\
            $mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace(mathbfx,c)rightrbrace$\
            If $c (mathbfx) < c^mathrmmin $
            $mathbfx^textmin,c^textmin leftarrow mathbfx,c $


            Return $mathbfx^textmin$
            captionTesting
            endalgorithm
            enddocument


            Surely, there are fonts which make a difference between text and mathrm visible to the naked eye, but for this example, I cannot distinguish my output "min"s whether it was created with the further or the latter.






            share|improve this answer



























            • Great! Could you please add a screenshot?

              – Delan
              Sep 30 at 7:50






            • 1





              There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

              – Delan
              Sep 30 at 7:58











            • @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

              – Nepumuk
              Sep 30 at 8:18














            2















            2











            2









            At least, I got a workaround.



            documentclassarticle
            usepackageamsmath,amssymb
            DeclareMathOperator*argminarg,min
            DeclareMathOperator*argmaxarg,max
            usepackage[ruled]algorithm2e
            begindocument
            beginalgorithm
            DontPrintSemicolon
            KwInBlalalala.
            KwOutBlalalala
            For$t = 1$ to $T$
            Fit $Psi_t+1$ to $mathcalH_t$\
            $mathbfxleftarrow argmax_mathbfxinmathcalX a(mu (Psi_t+1 (mathbfx)),sigma(Psi_t+1 (mathbfx)) , J^textmin)$\
            Check $c=J(mathbfx)$\
            $mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace(mathbfx,c)rightrbrace$\
            If $c (mathbfx) < c^mathrmmin $
            $mathbfx^textmin,c^textmin leftarrow mathbfx,c $


            Return $mathbfx^textmin$
            captionTesting
            endalgorithm
            enddocument


            Surely, there are fonts which make a difference between text and mathrm visible to the naked eye, but for this example, I cannot distinguish my output "min"s whether it was created with the further or the latter.






            share|improve this answer
















            At least, I got a workaround.



            documentclassarticle
            usepackageamsmath,amssymb
            DeclareMathOperator*argminarg,min
            DeclareMathOperator*argmaxarg,max
            usepackage[ruled]algorithm2e
            begindocument
            beginalgorithm
            DontPrintSemicolon
            KwInBlalalala.
            KwOutBlalalala
            For$t = 1$ to $T$
            Fit $Psi_t+1$ to $mathcalH_t$\
            $mathbfxleftarrow argmax_mathbfxinmathcalX a(mu (Psi_t+1 (mathbfx)),sigma(Psi_t+1 (mathbfx)) , J^textmin)$\
            Check $c=J(mathbfx)$\
            $mathcalH_t+1 leftarrow mathcalH_t cup leftlbrace(mathbfx,c)rightrbrace$\
            If $c (mathbfx) < c^mathrmmin $
            $mathbfx^textmin,c^textmin leftarrow mathbfx,c $


            Return $mathbfx^textmin$
            captionTesting
            endalgorithm
            enddocument


            Surely, there are fonts which make a difference between text and mathrm visible to the naked eye, but for this example, I cannot distinguish my output "min"s whether it was created with the further or the latter.







            share|improve this answer















            share|improve this answer




            share|improve this answer








            edited Sep 30 at 7:53

























            answered Sep 30 at 7:47









            NepumukNepumuk

            3851 silver badge12 bronze badges




            3851 silver badge12 bronze badges















            • Great! Could you please add a screenshot?

              – Delan
              Sep 30 at 7:50






            • 1





              There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

              – Delan
              Sep 30 at 7:58











            • @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

              – Nepumuk
              Sep 30 at 8:18


















            • Great! Could you please add a screenshot?

              – Delan
              Sep 30 at 7:50






            • 1





              There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

              – Delan
              Sep 30 at 7:58











            • @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

              – Nepumuk
              Sep 30 at 8:18

















            Great! Could you please add a screenshot?

            – Delan
            Sep 30 at 7:50





            Great! Could you please add a screenshot?

            – Delan
            Sep 30 at 7:50




            1




            1





            There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

            – Delan
            Sep 30 at 7:58





            There is a problem and I want to find out what’s going on with my OP. Your workaround looks good but yet, one can tell the difference between text and yours

            – Delan
            Sep 30 at 7:58













            @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

            – Nepumuk
            Sep 30 at 8:18






            @Delan I used latexmk -pdf -synctex=1 mwe.tex for this.

            – Nepumuk
            Sep 30 at 8:18



















            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%2f510359%2fwrong-font-family-in-algorithm2e%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

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?