Skip to content

Conversation

@marcosroriz
Copy link
Contributor

I think scope lines (not sure if it is the ‘formal name’) can be used to clarify algorithms. For instance, the screenshot below illustrates two algorithms with this functionality. Hence, I think it can be useful to enable the library to include this functionality. I implemented the changes and I’m doing a pull request for your consideration. The change basically adds an optional argument named scopeLines (false by default) that render the sidelines.

image

Added an optional parameter named scopeLines that renders scope sidelines. To do so, I modified the render logic to include the scope part in the newline() function. I divide the padding in two parts so that the symbol (css border) can be placed in the middle.
@SaswatPadhi SaswatPadhi force-pushed the scopelines branch 2 times, most recently from fc2be28 to 72d117e Compare May 27, 2023 02:40
@SaswatPadhi
Copy link
Owner

Hi @marcosroriz,

Sorry about the delay in getting back to you on this, and many thanks for adding this feature.

I am not aware of a standard name for this either, but algorithm2e seems to expose this via an option called vlined.
(see: http://tug.ctan.org/macros/latex/contrib/algorithm2e/tex/algorithm2e.sty)

The code LGTM. I rebased your addition on to the latest changed, and made some very minor edits.

Thanks again for adding this!

@SaswatPadhi SaswatPadhi merged commit 95c57df into SaswatPadhi:master May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants