<div dir="ltr"><div>Zdravim pan Kuben,</div><div><br></div><div>dakujem velmi pekne za analyzu. Skusim dalej hladat alternativy na webe.</div><div>S pozdravom,</div><div>Peter Knezel<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 4 Jul 2021 at 16:32, Kuben Jaromír <<a href="mailto:jaromir.kuben@unob.cz">jaromir.kuben@unob.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Dobrý den.</p>
    <p>Ani po odstranění zřejmých chyb v definici příkazu \skus, které
      uvádí pan Wagner, to však nefunguje. Hlásí to chybu (jak jste sám
      zjistil)<br>
    </p>
    <p>Runaway argument?<br>
      ! Paragraph ended before \verbatim@start was complete.<br>
      <to be read again> <br>
                         \par <br>
      l.41 \skus{prikaz}{vysledok}<br>
                                  <br>
      atd.</p>
    <p>Důvod je zřejmě možné nalézt v dokumentaci k balíčku
      verbatim.sty. Na str. 3 jsou uvedena omezení. Druhé z nich říká:</p>
    <p>You cannot use the verbatim environment inside user defined
      commands;<br>
      e.g.,<br>
      \newcommand{\verbatimfile}[1]%<br>
      ␣␣␣␣␣␣␣␣␣␣␣{\begin{verbatim}\input{#1}\end{verbatim}}<br>
      does not work; nor does<br>
      \newcommand{\verbatimfile}[1]{\verbatim\input{#1}\endverbatim}</p>
    <p>Protože okolí com a res použitá v těle (opravené) definice
      příkazu \skus právě tohle dělají, uvedená konstrukce zřejmě není
      možná.</p>
    <p>Vámi zmiňované konstrukce</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap">\newcommand{\skus}[2]{#1}{</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap">a</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap">b) \newcommand{\skus}[2]{#1#2}{</p>
    <p>nedávají smysl, jak už psal pan Wagner. Doporučuji podívat se do
      nějaké příručky LaTeXu na syntaxi příkazu \newcommand.<br>
      Základ popsal pan Wagner. To, co bude v té další otevřené závorce,
      tj.</p>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\setlength\topsep{-5pt}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{1, .49, .5}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{com}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">#1</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{com}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{.66, .66, .9}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{res}</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">#2</span></p>
    <span style="font-family:monospace">
    </span>
    <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{res}</span></p>
    <p>nepatří k definici a bude prováděno jedinkrát v místě definice,
      tj. zřejmě před \begin{document}, a vyvolá chybu.<br>
    </p>
    <p>Váš první příkaz \newcommand{\skus}[2]{#1} má dva argumenty a
      jeho tělo je  #1, takže při volání <span style="font-family:monospace">\skus{prikaz}{vysledok} </span>opíše
      argument prikaz a ignoruje argument vysledok.</p>
    <p>Váš druhý příkaz \newcommand{\skus}[2]{#1#2} má dva argumenty a
      jeho tělo je  #1#2, takže při volání <span style="font-family:monospace">\skus{prikaz}{vysledok} </span>opíše
      vedle sebe argumenty prikaz a  vysledok.</p>
    <p>Rozhodně se na argumenty prikaz a vysledok nebude aplikovat
      konstrukce, kterou byste si přál.</p>
    <p>Zdraví</p>
    <p>    Jaromír Kuben</p>
    <p><br>
    </p>
    <div>Dne 4. 7. 2021 v 15:54 peter knezel
      napsal(a):<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div><span style="font-family:monospace">Dobry den pan Wagner,</span></div>
        <div><span style="font-family:monospace"><br>
          </span></div>
        <div><span style="font-family:monospace">vdaka za pripomienky.
            Prepisal som tex subor:</span></div>
        <div><span style="font-family:monospace"><br>
          </span></div>
        <div><span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\documentclass{article}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\usepackage{framed,color,verbatim}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">%...define color of command background for next environment</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\newenvironment{com}%</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">   {\snugshade\verbatim}%</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">   {\endverbatim\endsnugshade}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\newenvironment{res}%</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">   {\snugshade\verbatim}%</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">   {\endverbatim\endsnugshade}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\newcommand{\skus}[2]{</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\setlength\topsep{-5pt}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{1, .49, .5}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{com}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">#1</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{com}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{.66, .66, .9}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{res}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">#2</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{res}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{document}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\skus{prikaz}{vysledok}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\skus{prikazx}{vysledokx}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\\</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">Vzor - priamo zapisany text </span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\setlength\topsep{-5pt}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{1, .49, 0.0}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{com}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">line one</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{com}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\definecolor{shadecolor}{rgb}{.66, .66, .66}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\begin{res}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">res line one</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">res line two</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">res line two</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{res}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">text pisany za tabulkou.</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">\end{document}</span></p>
          <span style="font-family:monospace">
          </span>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="font-family:monospace">
</span></p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">konci chybou:</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">

</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">)</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">Runaway argument?</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">vysledok \end {res} </p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">! Paragraph ended before \verbatim@ was complete.</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap"><to be read again> </p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">                   \par </p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">l.28 \skus{prikaz}{vysledok}</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">a) aspon nieco dostanem na vystupe - aj ked zly vysledok, ak pouzijem v 14. riadku: 

</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">\newcommand{\skus}[2]{#1}{</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">alebo:</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">b) \newcommand{\skus}[2]{#1#2}{</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">S pozdravom,</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">
</p>
          <p style="margin:0px;text-indent:0px;white-space:pre-wrap">PeterKnezel
</p>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
csTeX mailing list
<a href="mailto:csTeX@cs.felk.cvut.cz" target="_blank">csTeX@cs.felk.cvut.cz</a>
<a href="https://lists.felk.cvut.cz/mailman/listinfo/cstex" target="_blank">https://lists.felk.cvut.cz/mailman/listinfo/cstex</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
csTeX mailing list<br>
<a href="mailto:csTeX@cs.felk.cvut.cz" target="_blank">csTeX@cs.felk.cvut.cz</a><br>
<a href="https://lists.felk.cvut.cz/mailman/listinfo/cstex" rel="noreferrer" target="_blank">https://lists.felk.cvut.cz/mailman/listinfo/cstex</a><br>
</blockquote></div>