How to write a definition with variants? The Next CEO of Stack OverflowLaTeX command with optional argumentsDoing def+asdf+texttt#1 where + can be set with a macroHow to write a parameter-driven macro?amstex: operator definition errorExpansion problem with newlistof from tocloft packageProblem in a macro definition (plain TeX)Write an unpar macroLaTeX for plain TeX users?Optional arguments in “families”… When and how?“Missing '' inserted” and “Missing inserted” with aligned environment

How to invert MapIndexed on a ragged structure? How to construct a tree from rules?

Find non-case sensitive string in a mixed list of elements?

Do I need to write [sic] when a number is less than 10 but isn't written out?

Should I tutor a student who I know has cheated on their homework?

Is it convenient to ask the journal's editor for two additional days to complete a review?

Why isn't acceleration always zero whenever velocity is zero, such as the moment a ball bounces off a wall?

How to edit “Name” property in GCI output?

Is French Guiana a (hard) EU border?

What does "Its cash flow is deeply negative" mean?

What did we know about the Kessel run before the prequels?

Unclear about dynamic binding

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Why didn't Khan get resurrected in the Genesis Explosion?

Why is my new battery behaving weirdly?

Is a distribution that is normal, but highly skewed considered Gaussian?

What was the first Unix version to run on a microcomputer?

Why do remote US companies require working in the US?

I want to delete every two lines after 3rd lines in file contain very large number of lines :

Is there always a complete, orthogonal set of unitary matrices?

Would a completely good Muggle be able to use a wand?

Can we say or write : "No, it'sn't"?

Is it professional to write unrelated content in an almost-empty email?

Is it possible to use a NPN BJT as switch, from single power source?

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See



How to write a definition with variants?



The Next CEO of Stack OverflowLaTeX command with optional argumentsDoing def+asdf+texttt#1 where + can be set with a macroHow to write a parameter-driven macro?amstex: operator definition errorExpansion problem with newlistof from tocloft packageProblem in a macro definition (plain TeX)Write an unpar macroLaTeX for plain TeX users?Optional arguments in “families”… When and how?“Missing '' inserted” and “Missing inserted” with aligned environment










0















In TeX I can define, say



def1#1 is #2.#1 & is & #2\



and



def2#1 has #2.#1 & has & #2\



with an easy usage:
1 Jim Jones is a fictional character.
and
2 Tim Smith has two brothers.



Can I write a definition depending on, in this case, is/has so I can write



3 Jim Jones is a fictional character.
and
3 Tim Smith has two brothers.



obtaing the previous results?



Solutions using Lua or expl3 are OK, but I hope that a pure TeX one is also possible.a









share


























    0















    In TeX I can define, say



    def1#1 is #2.#1 & is & #2\



    and



    def2#1 has #2.#1 & has & #2\



    with an easy usage:
    1 Jim Jones is a fictional character.
    and
    2 Tim Smith has two brothers.



    Can I write a definition depending on, in this case, is/has so I can write



    3 Jim Jones is a fictional character.
    and
    3 Tim Smith has two brothers.



    obtaing the previous results?



    Solutions using Lua or expl3 are OK, but I hope that a pure TeX one is also possible.a









    share
























      0












      0








      0








      In TeX I can define, say



      def1#1 is #2.#1 & is & #2\



      and



      def2#1 has #2.#1 & has & #2\



      with an easy usage:
      1 Jim Jones is a fictional character.
      and
      2 Tim Smith has two brothers.



      Can I write a definition depending on, in this case, is/has so I can write



      3 Jim Jones is a fictional character.
      and
      3 Tim Smith has two brothers.



      obtaing the previous results?



      Solutions using Lua or expl3 are OK, but I hope that a pure TeX one is also possible.a









      share














      In TeX I can define, say



      def1#1 is #2.#1 & is & #2\



      and



      def2#1 has #2.#1 & has & #2\



      with an easy usage:
      1 Jim Jones is a fictional character.
      and
      2 Tim Smith has two brothers.



      Can I write a definition depending on, in this case, is/has so I can write



      3 Jim Jones is a fictional character.
      and
      3 Tim Smith has two brothers.



      obtaing the previous results?



      Solutions using Lua or expl3 are OK, but I hope that a pure TeX one is also possible.a







      macros plain-tex





      share












      share










      share



      share










      asked 4 mins ago









      Przemysław ScherwentkePrzemysław Scherwentke

      29.8k54795




      29.8k54795




















          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%2f482357%2fhow-to-write-a-definition-with-variants%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%2f482357%2fhow-to-write-a-definition-with-variants%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

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm