LaTeX - wrong figure and table numbering in * environment - latex

I have a question related to * environment in LaTeX used for spanning figure/table across two columns. It is well known that in this such figure/table is placed on the top of the page. The problem is that the Fig/Tab numbering is not taken into account so for example the two column figure has caption "Fig.4..." and right below it is one column figure with caption "Fig.3" ... which is the wrong order and in this case the figs and tabs should be automatically renumbered right?problem illutration

I am not sure that I understood the problem, but I would try to put the code for the figure spanning two columns (fig 4 in your image) before the code for the figure that it is called fig 3 in your image. That should fix it.

Related

Erase / Filter rows with info from the ones in blank

I have this data in a Google Sheet, basically is a dynamic table that will have more information or could change in a future with more or less rows, in the same image at the right you will see what I need, I was thinking about use BLANK but is giving me some errors, also I tried with transposeFilter but same problem. Some help or recommendations please! (The only information not dynamic is the blue rows)
try for horizontal erase:
=FILTER(A:D; TRIM(FLATTEN(QUERY(TRANSPOSE(A:D);;9^9)))<>"")
or vertical erase:
=FILTER(A:D; TRIM(QUERY(A:D;;9^9))<>"")

Find a way to increment formula in merged cells and blank cells

It's my first time posting here, I tried to look for something similar to what i am looking for but couldn't find anything, but if I just didn't look enough, I apologize.
My problem is as follows:
https://docs.google.com/spreadsheets/d/10yx-WO_SlOnFLNW83N8wucOrcexfLtt1TE2FDzTAQbc/edit#gid=799857548
I have a data table with information I receive from somebody. I then need to use that information to feel kind of individual product data table on another sheets, and add more to it.
Instead of copy everything of sheets one in sheets 2, I would like it to feel by itself.
I tried with =Cellsadress or =OFFSET and other stuff but couldn't manage to get what I want.
When i put every formula in the green table on sheets 2 and try to increment it by dragging down, the formula values increase by 25 approximately. but i want it to increase by only one, or find another way to show the information in the column of sheets 1 to reflect in different cell of sheets 2.
In my real document i have 100 of lines, so i cant do it manually like i could do with 4 lines.
Is there a way to do that?
If somebody have a solutions i would be gratefull
try this formula for C32 =INDIRECT("'Sheets 1'!F"&(int(row()/25)+2))
when you copy-paste this formula into cell C57 or C82, it will take values from 'Sheets 1'!F4 and 'Sheets 1'!F5, respectively

Google Sheets: How to make a stacked/aggregate chart

I have made a bar chart which aggregates my data, but is there any way I can split each bar based on the data it is aggregating - similar to how a stacked bar chart would look?
Here is a bad artists impression (thick blue lines mine). The idea is that it's important to know from looking at the graph if I sold 5 at £1, or 1 at £5.
Ideally this would work even if the price for each item is variable, but that is not essential (eg: if there is a 'hack' with hardcoding Apple = 3, I can live with that.)
I'm also fine inputting helper columns etc, within reason, but I would want to be able to easily continue to add things to the list on the left without having to add new helper columns each time (calculated ones are fine, of course.)
Thanks in advance.
UPDATE: With thanks to Kin Siang below, I ended up implementing a slightly modified version of their solution, which I am posting here for completeness.
I added a very large (but finite) number of helper columns to the right, with a formula in each cell which would look for the nth occurrence of the item in the main list (wrapped in an iferror to make the unused cells blank).
=iferror(index(FILTER($A:$B,$A:$A=$D2),E$1,2))
Theoretically it could run out of space one day, but I have made it suitably large that this should not be an issue. It has the advantage over the other solution that I do not need to sort or otherwise manipulate the input range and can continue trickling in data to the main list and have the chart automatically update.
Yes, it is possible to display the chart in your case, however need some data transpose in order to do so, let me show you the example with dataset
Assuming this is your original data:
First sort the data by alphabet, and enter this formula in new column
=if(G39="",1,if(G40=G39,I39+1,if(G40<>G39,1)))
Next add new column for categorical purpose, by using concatenate function
="Price"&I40
In the transform data for chart purpose, enter this formula to split all price into different row, different column for different product
=sumifs($H$40:$H$47,$G$40:$G$47,$A41,$J$40:$J$47,B$40)
After that i select stack bar chart and ensure the price in under series, in case in 23 will have some problem to set price at series correctly, you can use 33 data create stack bar chart and update the data range again, it will work also
Here is the cute chart you expected, accept if help :)
*When certain fruit has less price record, it is advised to fill in 0, as the data table need in same column (see the orange price 3), although I didnot test if blank

FastReport CrossView does not calculate column width correctly if column header is printer vertically

I have a FastReport CrossTab report with long column names, which would expand into multiple pages if I were to print it. I thought maybe I can rotate the column headers in order to save some space. But FastReport does not compute column widths correctly, and the generated report looks like this:
Any thoughts?
I have gotten good help from the Fast-Report website by opening a ticket. This seems like the kind of question you might need to ask there.

Subfloat figures in latex

I am inputting a bunch of figures in Latex using
\begin{figure}[h]
\centering
\subfloat
etc.
How do I get the subfloat figures to go to the next page? What I mean is, I'm inputting a ton of figures so it'll definitely be more than one page but if I do separate figures for each the a, b, c, d, etc. for the captions will change, so ideally I'd like one enormous figure with a bunch of subfloats a through z on different pages - how do you do that? Right now, I simply can't see the subfloat figures that stretch over the page, so I'll need to get another page somehow.
Separate the figures into batches that fit on one page and in the figure environments after the first put
\addtocounter{figure}{-1}
which will decrease the figure counter making it the same as for the previous bunch and then also add
\addtocounter{subfigure}{N}
where N is the number of subfigs that you have already placed, which will start the subfig counter from the correct value.
More on the subfigure package here (PDF).

Resources