Multiple options for PseudonymsEffective way to anonymise interviewee identities for academic researchWhen to...

Why are the 2nd/3rd singular forms of present of « potere » irregular?

Python "triplet" dictionary?

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Normal subgroup of even order whose nontrivial elements form a single conjugacy class is abelian

How to back up a running remote server?

How to delegate to implementing class

Why is current rating for multicore cable lower than single core with the same cross section?

Can fracking help reduce CO2?

When and why did journal article titles become descriptive, rather than creatively allusive?

How to determine the actual or "true" resolution of a digital photograph?

What are the spoon bit of a spoon and fork bit of a fork called?

Pulling the rope with one hand is as heavy as with two hands?

Minimum value of 4 digit number divided by sum of its digits

Can a creature tell when it has been "Portented"?

Is there a way to get a compiler for the original B programming language?

In gnome-terminal only 2 out of 3 zoom keys work

What was the "glowing package" Pym was expecting?

Toggle Overlays shortcut?

Is it possible to measure lightning discharges as Nikola Tesla?

Help, my Death Star suffers from Kessler syndrome!

What word means to make something obsolete?

Single Colour Mastermind Problem

How deep to place a deadman anchor for a slackline?

What is the point of Germany's 299 "party seats" in the Bundestag?



Multiple options for Pseudonyms


Effective way to anonymise interviewee identities for academic researchWhen to use edef, noexpand, and expandafter?Passing a TikZ matrix to a TeX macroRunaway argument error when creating a macro for code that works outside a macroLine break (continuation) for commands (options, arguments)Duplicating EnvironmentsInserting macros mixed with static optionscreating custom function for imagesMultiple Environment OptionsNested macro definition seems to not expand argumentPassing arguments to a macro hidden in the text













1















I'm looking for something fairly similar to this problem, of defining macros to print pseudonyms for people, but I'm not sure how to modify it (or if it is actually the right approach for what I'm after).



What I'm hoping for is to have a macros that are identifiers for people like AnGo



When issued as is it should print a pseudonym, so
AnGo >> "Edwin Smith"



When issued with an option [sh] to print a short form
AnGo[sh] >> "Ted"



Another option [real] to print the actual name...
AnGo[real] >> "Antonio Gonzales"



What would be the best approach here?










share|improve this question



























    1















    I'm looking for something fairly similar to this problem, of defining macros to print pseudonyms for people, but I'm not sure how to modify it (or if it is actually the right approach for what I'm after).



    What I'm hoping for is to have a macros that are identifiers for people like AnGo



    When issued as is it should print a pseudonym, so
    AnGo >> "Edwin Smith"



    When issued with an option [sh] to print a short form
    AnGo[sh] >> "Ted"



    Another option [real] to print the actual name...
    AnGo[real] >> "Antonio Gonzales"



    What would be the best approach here?










    share|improve this question

























      1












      1








      1








      I'm looking for something fairly similar to this problem, of defining macros to print pseudonyms for people, but I'm not sure how to modify it (or if it is actually the right approach for what I'm after).



      What I'm hoping for is to have a macros that are identifiers for people like AnGo



      When issued as is it should print a pseudonym, so
      AnGo >> "Edwin Smith"



      When issued with an option [sh] to print a short form
      AnGo[sh] >> "Ted"



      Another option [real] to print the actual name...
      AnGo[real] >> "Antonio Gonzales"



      What would be the best approach here?










      share|improve this question














      I'm looking for something fairly similar to this problem, of defining macros to print pseudonyms for people, but I'm not sure how to modify it (or if it is actually the right approach for what I'm after).



      What I'm hoping for is to have a macros that are identifiers for people like AnGo



      When issued as is it should print a pseudonym, so
      AnGo >> "Edwin Smith"



      When issued with an option [sh] to print a short form
      AnGo[sh] >> "Ted"



      Another option [real] to print the actual name...
      AnGo[real] >> "Antonio Gonzales"



      What would be the best approach here?







      macros options






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 38 mins ago









      janjan

      1,1651519




      1,1651519






















          1 Answer
          1






          active

          oldest

          votes


















          2














          This is a possible solution:



          documentclass{article}
          usepackage{xparse}

          ExplSyntaxOn
          NewDocumentCommand{definepseudonym}{mmmm}
          {% #1 = command, #2 = pseudonym, #3 = short name, #4 = real name
          NewDocumentCommand{#1}{O{pseudonym}}
          {
          str_case:nn { ##1 }
          {
          {pseudonym}{#2}
          {sh}{#3}
          {real}{#4}
          }
          }
          }
          ExplSyntaxOff

          definepseudonym{AnGo}{Edwin Smith}{Ted}{Antonio Gonzalez}

          begin{document}

          AnGo[real] was known as AnGo abbreviated in AnGo[sh].

          end{document}


          enter image description here






          share|improve this answer
























            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%2f488147%2fmultiple-options-for-pseudonyms%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














            This is a possible solution:



            documentclass{article}
            usepackage{xparse}

            ExplSyntaxOn
            NewDocumentCommand{definepseudonym}{mmmm}
            {% #1 = command, #2 = pseudonym, #3 = short name, #4 = real name
            NewDocumentCommand{#1}{O{pseudonym}}
            {
            str_case:nn { ##1 }
            {
            {pseudonym}{#2}
            {sh}{#3}
            {real}{#4}
            }
            }
            }
            ExplSyntaxOff

            definepseudonym{AnGo}{Edwin Smith}{Ted}{Antonio Gonzalez}

            begin{document}

            AnGo[real] was known as AnGo abbreviated in AnGo[sh].

            end{document}


            enter image description here






            share|improve this answer




























              2














              This is a possible solution:



              documentclass{article}
              usepackage{xparse}

              ExplSyntaxOn
              NewDocumentCommand{definepseudonym}{mmmm}
              {% #1 = command, #2 = pseudonym, #3 = short name, #4 = real name
              NewDocumentCommand{#1}{O{pseudonym}}
              {
              str_case:nn { ##1 }
              {
              {pseudonym}{#2}
              {sh}{#3}
              {real}{#4}
              }
              }
              }
              ExplSyntaxOff

              definepseudonym{AnGo}{Edwin Smith}{Ted}{Antonio Gonzalez}

              begin{document}

              AnGo[real] was known as AnGo abbreviated in AnGo[sh].

              end{document}


              enter image description here






              share|improve this answer


























                2












                2








                2







                This is a possible solution:



                documentclass{article}
                usepackage{xparse}

                ExplSyntaxOn
                NewDocumentCommand{definepseudonym}{mmmm}
                {% #1 = command, #2 = pseudonym, #3 = short name, #4 = real name
                NewDocumentCommand{#1}{O{pseudonym}}
                {
                str_case:nn { ##1 }
                {
                {pseudonym}{#2}
                {sh}{#3}
                {real}{#4}
                }
                }
                }
                ExplSyntaxOff

                definepseudonym{AnGo}{Edwin Smith}{Ted}{Antonio Gonzalez}

                begin{document}

                AnGo[real] was known as AnGo abbreviated in AnGo[sh].

                end{document}


                enter image description here






                share|improve this answer













                This is a possible solution:



                documentclass{article}
                usepackage{xparse}

                ExplSyntaxOn
                NewDocumentCommand{definepseudonym}{mmmm}
                {% #1 = command, #2 = pseudonym, #3 = short name, #4 = real name
                NewDocumentCommand{#1}{O{pseudonym}}
                {
                str_case:nn { ##1 }
                {
                {pseudonym}{#2}
                {sh}{#3}
                {real}{#4}
                }
                }
                }
                ExplSyntaxOff

                definepseudonym{AnGo}{Edwin Smith}{Ted}{Antonio Gonzalez}

                begin{document}

                AnGo[real] was known as AnGo abbreviated in AnGo[sh].

                end{document}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 22 mins ago









                egregegreg

                737k8919393268




                737k8919393268






























                    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%2f488147%2fmultiple-options-for-pseudonyms%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...