How do I set multiple text styles in an envirnoment defined in a layout file?











up vote
0
down vote

favorite












I'm trying to make the font monospace, bold, and small at the same time in an environment defined in my layout file. This seems like a ridiculously simple thing to do, but I've been struggling with this for a few hours now.



Here's what doesn't work:



newenvironment{ogc_chapter_date}{
raggedright
begin{texttt}
begin{small}
begin{bffamily}
}{
end{bffamily}
end{small}
end{texttt}
par
}


The above is in my Lyx .layout file.



This is what I get in the log when it fails to compile:



! Missing endcsname inserted.
<to be read again>
aftergroup
l.137 begin{ogc_chapter_date}

The control sequence marked <to be read again> should
not appear between csname and endcsname.

! Extra endcsname.
@ifundefined ...dafter ifx csname #1endcsname
relax expandafter @firs...
l.137 begin{ogc_chapter_date}

I'm ignoring this, since I wasn't doing a csname.

! Extra else.
@ifundefined ... expandafter @firstoftwo else
expandafter @secondoftwo...
l.137 begin{ogc_chapter_date}

I'm ignoring this; it doesn't match any if.

! Undefined control sequence.
reserved@a ->@nil

l.137 begin{ogc_chapter_date}

The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Extra }, or forgotten endgroup.
<recently read> egroup

l.137 begin{ogc_chapter_date}

I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.


! LaTeX Error: begin{texttt} on input line 137 ended by end{bffamily}.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.139 end{ogc_chapter_date}

Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.

! Missing } inserted.
<inserted text>
}
l.139 end{ogc_chapter_date}

I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.









share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to make the font monospace, bold, and small at the same time in an environment defined in my layout file. This seems like a ridiculously simple thing to do, but I've been struggling with this for a few hours now.



    Here's what doesn't work:



    newenvironment{ogc_chapter_date}{
    raggedright
    begin{texttt}
    begin{small}
    begin{bffamily}
    }{
    end{bffamily}
    end{small}
    end{texttt}
    par
    }


    The above is in my Lyx .layout file.



    This is what I get in the log when it fails to compile:



    ! Missing endcsname inserted.
    <to be read again>
    aftergroup
    l.137 begin{ogc_chapter_date}

    The control sequence marked <to be read again> should
    not appear between csname and endcsname.

    ! Extra endcsname.
    @ifundefined ...dafter ifx csname #1endcsname
    relax expandafter @firs...
    l.137 begin{ogc_chapter_date}

    I'm ignoring this, since I wasn't doing a csname.

    ! Extra else.
    @ifundefined ... expandafter @firstoftwo else
    expandafter @secondoftwo...
    l.137 begin{ogc_chapter_date}

    I'm ignoring this; it doesn't match any if.

    ! Undefined control sequence.
    reserved@a ->@nil

    l.137 begin{ogc_chapter_date}

    The control sequence at the end of the top line
    of your error message was never def'ed. If you have
    misspelled it (e.g., `hobx'), type `I' and the correct
    spelling (e.g., `Ihbox'). Otherwise just continue,
    and I'll forget about whatever was undefined.

    ! Extra }, or forgotten endgroup.
    <recently read> egroup

    l.137 begin{ogc_chapter_date}

    I've deleted a group-closing symbol because it seems to be
    spurious, as in `$x}$'. But perhaps the } is legitimate and
    you forgot something else, as in `hbox{$x}'. In such cases
    the way to recover is to insert both the forgotten and the
    deleted material, e.g., by typing `I$}'.


    ! LaTeX Error: begin{texttt} on input line 137 ended by end{bffamily}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help.
    ...

    l.139 end{ogc_chapter_date}

    Your command was ignored.
    Type I <command> <return> to replace it with another command,
    or <return> to continue without it.

    ! Missing } inserted.
    <inserted text>
    }
    l.139 end{ogc_chapter_date}

    I've inserted something that you may have forgotten.
    (See the <inserted text> above.)
    With luck, this will get me unwedged. But if you
    really didn't forget anything, try typing `2' now; then
    my insertion and my current dilemma will both disappear.









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to make the font monospace, bold, and small at the same time in an environment defined in my layout file. This seems like a ridiculously simple thing to do, but I've been struggling with this for a few hours now.



      Here's what doesn't work:



      newenvironment{ogc_chapter_date}{
      raggedright
      begin{texttt}
      begin{small}
      begin{bffamily}
      }{
      end{bffamily}
      end{small}
      end{texttt}
      par
      }


      The above is in my Lyx .layout file.



      This is what I get in the log when it fails to compile:



      ! Missing endcsname inserted.
      <to be read again>
      aftergroup
      l.137 begin{ogc_chapter_date}

      The control sequence marked <to be read again> should
      not appear between csname and endcsname.

      ! Extra endcsname.
      @ifundefined ...dafter ifx csname #1endcsname
      relax expandafter @firs...
      l.137 begin{ogc_chapter_date}

      I'm ignoring this, since I wasn't doing a csname.

      ! Extra else.
      @ifundefined ... expandafter @firstoftwo else
      expandafter @secondoftwo...
      l.137 begin{ogc_chapter_date}

      I'm ignoring this; it doesn't match any if.

      ! Undefined control sequence.
      reserved@a ->@nil

      l.137 begin{ogc_chapter_date}

      The control sequence at the end of the top line
      of your error message was never def'ed. If you have
      misspelled it (e.g., `hobx'), type `I' and the correct
      spelling (e.g., `Ihbox'). Otherwise just continue,
      and I'll forget about whatever was undefined.

      ! Extra }, or forgotten endgroup.
      <recently read> egroup

      l.137 begin{ogc_chapter_date}

      I've deleted a group-closing symbol because it seems to be
      spurious, as in `$x}$'. But perhaps the } is legitimate and
      you forgot something else, as in `hbox{$x}'. In such cases
      the way to recover is to insert both the forgotten and the
      deleted material, e.g., by typing `I$}'.


      ! LaTeX Error: begin{texttt} on input line 137 ended by end{bffamily}.

      See the LaTeX manual or LaTeX Companion for explanation.
      Type H <return> for immediate help.
      ...

      l.139 end{ogc_chapter_date}

      Your command was ignored.
      Type I <command> <return> to replace it with another command,
      or <return> to continue without it.

      ! Missing } inserted.
      <inserted text>
      }
      l.139 end{ogc_chapter_date}

      I've inserted something that you may have forgotten.
      (See the <inserted text> above.)
      With luck, this will get me unwedged. But if you
      really didn't forget anything, try typing `2' now; then
      my insertion and my current dilemma will both disappear.









      share|improve this question













      I'm trying to make the font monospace, bold, and small at the same time in an environment defined in my layout file. This seems like a ridiculously simple thing to do, but I've been struggling with this for a few hours now.



      Here's what doesn't work:



      newenvironment{ogc_chapter_date}{
      raggedright
      begin{texttt}
      begin{small}
      begin{bffamily}
      }{
      end{bffamily}
      end{small}
      end{texttt}
      par
      }


      The above is in my Lyx .layout file.



      This is what I get in the log when it fails to compile:



      ! Missing endcsname inserted.
      <to be read again>
      aftergroup
      l.137 begin{ogc_chapter_date}

      The control sequence marked <to be read again> should
      not appear between csname and endcsname.

      ! Extra endcsname.
      @ifundefined ...dafter ifx csname #1endcsname
      relax expandafter @firs...
      l.137 begin{ogc_chapter_date}

      I'm ignoring this, since I wasn't doing a csname.

      ! Extra else.
      @ifundefined ... expandafter @firstoftwo else
      expandafter @secondoftwo...
      l.137 begin{ogc_chapter_date}

      I'm ignoring this; it doesn't match any if.

      ! Undefined control sequence.
      reserved@a ->@nil

      l.137 begin{ogc_chapter_date}

      The control sequence at the end of the top line
      of your error message was never def'ed. If you have
      misspelled it (e.g., `hobx'), type `I' and the correct
      spelling (e.g., `Ihbox'). Otherwise just continue,
      and I'll forget about whatever was undefined.

      ! Extra }, or forgotten endgroup.
      <recently read> egroup

      l.137 begin{ogc_chapter_date}

      I've deleted a group-closing symbol because it seems to be
      spurious, as in `$x}$'. But perhaps the } is legitimate and
      you forgot something else, as in `hbox{$x}'. In such cases
      the way to recover is to insert both the forgotten and the
      deleted material, e.g., by typing `I$}'.


      ! LaTeX Error: begin{texttt} on input line 137 ended by end{bffamily}.

      See the LaTeX manual or LaTeX Companion for explanation.
      Type H <return> for immediate help.
      ...

      l.139 end{ogc_chapter_date}

      Your command was ignored.
      Type I <command> <return> to replace it with another command,
      or <return> to continue without it.

      ! Missing } inserted.
      <inserted text>
      }
      l.139 end{ogc_chapter_date}

      I've inserted something that you may have forgotten.
      (See the <inserted text> above.)
      With luck, this will get me unwedged. But if you
      really didn't forget anything, try typing `2' now; then
      my insertion and my current dilemma will both disappear.






      fonts environments lyx-layouts






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 16 mins ago









      Nick

      1013




      1013



























          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',
          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%2f464927%2fhow-do-i-set-multiple-text-styles-in-an-envirnoment-defined-in-a-layout-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f464927%2fhow-do-i-set-multiple-text-styles-in-an-envirnoment-defined-in-a-layout-file%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

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt