-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Terminal size 135x34 too small. Need at least 683x1242. #15
Comments
what occured to me too. can someone solve this ? |
+1 |
What OS are you using? If the sample.md has the same issue, it is most likely a problem with the line break recognition. |
@visit1985 I could have mentioned that the As I said:"it should wrap long lines automatically to adjust the size of the terminal when in terminal presentation mode." Platform: Fedora 20, 32-bit |
I too am getting this on Ubuntu 14.04, 32-bit. Basically, it's not wrapping any of the lines, meaning |
For cases where the error message is valid, an additional line in the error output would be helpful: "You may need to add additional slide breaks ('***') to the file, or shorten some lines to fewer columns." |
No issue with sample.md on Mac OSX 10.9. But pointing mdp at other pre-existing .md files pretty much guarantees this message occurring; so we should try to make it as helpful as possible. |
The documentation is not very well until now. But as you can see in sample.md, pages (slides) are split by If you use existing markdown files. You need to ensure, that there are enough of these rulers in your file, so each slide fits in your terminal. As HR is not used very often in general, this may fail for existing markdown files without customization. Another point is, that lines are too long. Line wrapping is not jet implemented. The main difficulty here is, that the terminal size is unknown when the file is parsed. Thus it is necessary to calculate the amount of lines per slide while displaying it which is a bit more difficult. But i'll try my best. The extended error message is a good idea too. I'll add that. For now, you need to reformat your existing markdown files to fit in your terminals lines/columns. |
The new error messages work great. Thanks! |
c6516c7 solves it partially I think. But we need some more logic for correct word division. |
With the |
Forget what I've said. Was my fault. |
Just for reference: 4ebae8b |
Am I just missing the point completely or is the most sensible fix to just have vertical scrolling like a pager? |
I would like to complain about this the other way. The standard terminal size is 80 characters and 24 lines. The sample.md file needs 25 lines for slide number 7. I stripped the URL in the slide and then it fit perfectly. Perhaps it is best that sample.md informs users about the standard terminal size and suggests they abide by it. Slides with other geometry could be permitted as an explicit option. Same for wrapping: out of the box 80 characters per line is the limit, while softwrapping is an option. I think the current error messages and behaviour (exit with error) are okay, but perhaps there could be yet another option: Of the overreaching slides, display only as much as possible and truncate the rest. This is a slideshow program, it should most of all respect the slide markers and display as much as possible within those limits. |
After some testing, I recommend using a hardwrapping text editor to write the source files. The recommended maximum wrapping point is at 76 characters. (It will cause issues with e.g. long URL's and that's yet another thing, in addition to line count, to be observed when composing the source.) Hardwrapping the source text at 76 characters is recommended given the traditional standard terminal geometry: 80 characters and 24 lines. Wrapping at 76 characters leaves a small nice margin. And it is also recommended to include this info in the sample.md file. |
Have the same problem:
MacOS 10.15.2 How to fix it properly? |
Getting this too. |
This is a completely stupid program. This WONT_FIX bug for over 6 years, the maintainer needs to hold his head in shame!! I’m surprised such a glaring bug hasn’t damaged his hireability. If I viewed his GitHub repos, tried his #1 one (this one) and got this error and saw this bug report, I 100% would not hire him. I ended up using mdr, which does exactly what I wanted.
|
this is still an issue |
bump |
How hard can it be to fix this? |
Bro it's open source and you're free to PR it.. It's annoying bug for sure but there's no reason to attack the developer |
Same issue |
I've experienced the same error myself, but was able to fix it by converting the line ending from Windows-style (CRLF) to Linux-style (LF) using dos2unix tool. Not sure if this is the case for all of you, but it is for me. |
fabulous program - very neat idea! i started by copy and paste the sample.md with notepad++ and it continued working as I kept making changes to the .md file to suit my needs. @gpm1982 - thank you |
Based on a lot of the pseudo workarounds mentioned here, the problem seems to be that Thus, a pseudo-solution to use fold -s -w 80 document.md | sed '0~50 s/$/\n\*\*\*/g' | mdp this will
This has some limitations though. If Another limitation is that it will hard-split URL's that are longer than the specified width, and of course anything inside a code-block that might have not been intended to be seen as split (the |
After installation, and
mdp my_own.md
, there are some long lines inmy_own.md
file,it shows:
"Error: Terminal size 135x34 too small. Need at least 683x1242.".
But my terminal is already in fullscreen mode, it should wrap long lines automatically to adjust the size of the terminal when in terminal presentation mode.
FYI:
1366x768 14 Inch Screen Laptop
Update:
I could have mentioned that the
sample.md
is totally fine in my terminal, maybe because the lines in the file are short, and I tried mdp for several other markdown files, all errors with the same message(differentrows x columns
of course).As I said:"it should wrap long lines automatically to adjust the size of the terminal when in terminal presentation mode."
Platform:
Fedora 20, 32-bit
The text was updated successfully, but these errors were encountered: