Skip to content
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

try to preserve alignment in cells #3

Open
shriram opened this issue Apr 1, 2020 · 1 comment
Open

try to preserve alignment in cells #3

shriram opened this issue Apr 1, 2020 · 1 comment

Comments

@shriram
Copy link

shriram commented Apr 1, 2020

It appears that columns always have a c directive, which requires manual editing after the table has been translated — which has to then be remembered and done afresh each time the table is re-generated. It would be awfully helpful if each column's alignment

image

could be recorded in the generated table (and cell's alignment adjusted when it diverges from that of the column). Since there are only three forms of alignment (for now) in Sheets, and they each have simple LaTeX counterparts, hopefully this isn't too onerous.

@caenrigen
Copy link
Owner

caenrigen commented Apr 2, 2020

Hi, there!

Thank you for reaching out! That is indeed a pain to have to re-generate and manually edit the column alignment! We found ourselves struggling with that as well, but we have been busy working on our theses.

We have dedicated some hours and implemented a solution under the available time, it is not ideal but is what we achieved without having to due heavy developments, and at the same time still allow for the flexibility of user-defined columns types (more on this below).

Here goes a quick tutorial and some pro tips on the way 🙂
I will keep it short, mostly figure-based, let me know if you have any doubts.

Screenshot 2020-04-02 at 20 31 24

Screenshot 2020-04-02 at 20 31 33

Screenshot 2020-04-02 at 20 32 07

Make sure the Named range ends with .tab!

Screenshot 2020-04-02 at 20 32 57

Screenshot 2020-04-02 at 20 41 43
The tables that are generated from a Named range will have the setting saved on this new sheet and used every time you re-generate a table (or a data export). Note that the output will be files in your Google Drive, by default in a subfolder called tabs. Pro Tip: you can specify the output folder.

Pro Tip: You can explore the available options by putting the mouse on the cells that have a black triangle in the corner and reading the explanations.

Screenshot 2020-04-02 at 20 43 02

We recommend using the Back and sync from Google that allows to sync files and folders from Google Drive into your computer. In this way you can re-generate the table with a click and have it directly available in your LaTeX project.

Pro Tip: You can include files (e.g. files generated by LatexKit) in your main LaTeX file like this:

\begin{table}
    \input{./tabs/MyTable.tex}
    \caption{Caption of my table}
    \label{tab:mytable}
\end{table}

Screenshot 2020-04-02 at 20 45 47

Pro Tip: If, for any reason, you don't want to sync the output files with your computer you can change the output file extension to. .txt and it will be possible to preview the file directly in Google Drive as shown below. Pro Tip Inception: you can change the values for the default row and the settings on the default row will be automatically applied to any new Named range that you add.

Screenshot 2020-04-02 at 22 13 21

Screenshot 2020-04-02 at 22 16 05

Regarding the flexibility that this column alignment interface provides is that user can now use some other LaTeX column types, namely I highly recommend to check out the siunitx package that has the S type column that allows to format numbers and uncertainties (look for tables in the User manual). It is also able to interpret scientific number notation, e.g. 7.7E-10, that you might have in your Spreadsheets tables.

We will keep the issue opened for when we have time to develop some more automagic features.

Happy LatexKitting!

P.S. @shriram Thank you so much for your generous support and awesome Facebook post ❤️

P.P.S Would it be ok if we add your YouTube Demo on our webpage? Feel free to show your friends how to use the new feature as well 🙃

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

No branches or pull requests

2 participants