-
Notifications
You must be signed in to change notification settings - Fork 179
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
Feature request: Draft mode (double spaced, numbered lines) #299
Comments
We've got similar feature requests a few times:
Currently, we create the PDF from the HTML, by essentially printing to PDF. The paged-js library could allow us to add page numbers, but I don't see the line numbering feature. Maybe @vincerubinetti can look into whether it is feasible that we could create a HTML print view that has line numbers. I agree it would be super helpful for submitting documents for review. update see this reddit thread on pagedjs The other option would be to explore whether we can enable line numbers in the DOCX. In general, the DOCX output is not pretty, but it often gets the job done for submission. The final option would be to try to go though LaTeX to create the PDF, but we've already burned a lot of time trying to get this to work in #256 / #249. |
Unfortunately line numbers are the same issue as page numbers. HTML just wasn't designed with pagination in mind. When the browser performs the automatic text wrapping -- and automatic pagination when printing -- it doesn't expose any of the information, like what breaking algorithm to use (or was used) or where things were broken, to the developer. |
Ah I didn't see those! Thanks for pointing them out. I'm surprised that line numbering has the same problems as page numbering, but that makes sense that when the text is reflowed, the HTML didn't know what word was going to start on each line. This was one of those "oh I bet this is easy to add" user moments that turns out to be way more complicated. I'd be happy with a double spaced version as then that is easy to print and write comments on. Would that be possible? |
Try increasing the value in: rootstock/build/themes/default.html Line 503 in 06fb01d
I think you have to do something like This will affect the print output but not the in-browser view. |
Because double spacing is feasible and a common request, should work on an easier way to toggle it on? We could have a copy of |
I think editing But perhaps another option would be to use CSS custom properties, such that we could provide a compact place for users to set commonly modified variables. @vincerubinetti does that make sense? |
I doubt we want to use CSS variables. Things can get messy, on top of the already messy CSS specificity. Yes this is something that has been discussed in other issues. It depends how we decide to handle all of the other theme issues -- like whether to have a core theme that we build other themes on top of or duplicate a lot, how we will handle compact printing modes, etc -- because all of this unfortunately has to be designed and considered as a whole. CSS isn't good with modularity, so we have to think about everything at once, at very carefully, before we make. @dhimmel This might be something we wait until the refactor to implement. |
There was recently a thread about pagedjs on Reddit. I asked about whether pagedjs could support many of the features we're looking for. @julientaq provided a detailed reply. Thanks so much! Copying below:
This is pretty basic pagedmedia specs stuff, we got you covered in the doc. (you may want to read from the top of the page though) https://www.pagedjs.org/documentation/07-generated-content-in-margin-boxes/#page-counter
A solution build by the community: rstudio/pagedown#115 I'll make a post about that. We also have a simple solution to build a baseline grid: https://www.pagedjs.org/img/linecount.png
We do have solutions to do that, but it depends on your content and how you want it to behave. Floating top is pretty much easy to do. But julie, our specialist of specifications wrote quite a good article about that: https://www.pagedjs.org/page-floats/
Yes sir :) We're using the browser and pages are made using css grid and flex, so you can do pretty much what you would do in a browser for screen. I'll try to find some examples in the coming days. @vincerubinetti we should take a deeper look at whether these solutions would work for us. |
👋 i’ll be happy to help if you need anything. we can talk on mattermost.pagedmedia.org if you want, and i’ll keep an eye on this issue :) |
One very convenient feature of the American Physical Society Template (APS) is a preprint/draft mode (see manual section V.3. One-column vs. two-column layouts), which changes to a single-column, double spaced format that makes it very easy to view and edit for collaborators. By changing some of the
\documentclass
parameters (in "Details" below), the paper becomes much more easy on the eyes. Additionally, some journals require lines to be numbered for preprint submissions, so that feature would be helpful as well.Below are some examples of a draft format:
Original APS format
Draft format
Original document class
Preprint document configuration
Would it be possible to add a similar feature to manubot, which would double-space the paper and number lines?
The text was updated successfully, but these errors were encountered: