How to write a definition with variants? The Next CEO of Stack OverflowLaTeX command with...

Chain wire methods together in Lightning Web Components

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

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Bartok - Syncopation (1): Meaning of notes in between Grand Staff

Running a General Election and the European Elections together

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Is French Guiana a (hard) EU border?

Make solar eclipses exceedingly rare, but still have new moons

WOW air has ceased operation, can I get my tickets refunded?

Why do remote US companies require working in the US?

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

How to count occurrences of text in a file?

Newlines in BSD sed vs gsed

How many extra stops do monopods offer for tele photographs?

Rotate a column

Can a Bladesinger Wizard use Bladesong with a Hand Crossbow?

Won the lottery - how do I keep the money?

Dominated convergence theorem - what sequence?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

How to place nodes around a circle from some initial angle?

Why is information "lost" when it got into a black hole?

Why is my new battery behaving weirdly?

Where do students learn to solve polynomial equations these days?

Unclear about dynamic binding



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 6 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

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...