Document Classes ⇒ Help with memsty.sty
Help with memsty.sty
I am using memoir class, plus memsty.sty in developing a manuscript. memsty has four environment that I use in developing my text.
They are:
lcode for listing code
syntax that puts the content between begin and end in a frame
egsource that displays the content between begin/end in sort of verbatim environment with the ability of creating reference and using it later
egresult That puts the content between begin/end in a block of the form bellow and takes two argument a title and a label reference being created by egsource or for that matter, furthermore it adds an entry to a file for creating list of examples, similar to list of figure.
My problem is what I really need is lcode with the capability of egresult, I can get it although not very smart by the following:
\begin{egresult}
\noindent <------ because for some reason egsource indents the first line
\begin{lcode}
my code sniplet
\end{lcode}
\end{egresult}
The problem I have is egresult puts the block of code always very far from where it is defined, it is not really a float. Even if there is nothing on the page it pushes the result at the bottom of the page. However if I use egsoure environment the block of code comes right where I defined it. My personal guess is since egsoures and egresult work together, or it meant to work together, the assumption is that egsresult always should follow the egsource code. It makes sense too.
What I need is to have egresult behave like egsource in three aspects.
1) does not indent the first line
2) puts the block of the code where it is defined or very close to it
3) uses the compactness of lcode in printing the info.
I looked at the code and just could not figure out where the positioning of the block is decided.
I tried to redefine the environment got many errors and even trying to play with the commands that I think deals with positioning did not yield any differences.
Any help would be greatly appreciated.
Artimess
PS:lstlisting does not do the job well as it does not protect keeping the code all together and sometimes I end up getting half in where I defined, then a figure in between and then the rest
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Help with memsty.sty
I would recommend that users should not use memsty for their own projects. If there is something you like in it, steal the code.
memsty is made to typeset the memoir manual, and adds stuff that you might not need. For example it is quite messy with its use of new writes, so users may run short.