Restart the numbering of the reference labels in the appendix body in overleaf
I have created a supplementary section in my journal manuscript using the following script:
\appendix
%%%
\renewcommand{\appendixname}{S}
\renewcommand{\thesection}{S}
\renewcommand\thefigure{\thesection.\arabic{figure}}
\setcounter{figure}{0}
\renewcommand*{\thepage}{S\arabic{page}}
\setcounter{page}{1}
%%%
\begin{center}
\section*{Supplementary Material}
\end{center}
%%%
\subsection{Sub-heading1}
A separate bibliography also has been generated for the appendix using the multibib package as follows:
\usepackage[resetlabels]{multibib}
\newcites{supp}{Supplementary References}
and declaring
%% Loading supplementary bibliography style file
\bibliographystylesupp{unsrt}
% Loading supplementary bibliography database
\bibliographysupp{cas-sc-template-refs.bib}
\end{document}
resulting in a reference section that looks like this: Supplmentary References
However, the reference labels in the body text does not change:
S.2. Discussion
S.2.1. Subheading2
The role of the structural of squares and the circles is clearly seen in the interdependence of property on the values of energy and density as shown in Figures S.4a and S.4b. There is a clear clustering of data points based on the primary property as viewed against its dependence on secondary property in Figures S.4c. The high-value compositions are observed to be all apples and the medium value ones are observed to be oranges. The values thus predicted placed most of them in the low– and medium–value range [66].
The reference numbers are still from the main document's bibliography.
I have tried the \DeclareOption{resetlabels}{\continuouslabelsfalse} option
in the multibib package documentation given in http://tug.ctan.org/tex-archive/macros/latex/contrib/multibib/multibib.pdf but to no avail.
Is there any way to renumber these reference labels as well?
do you know?
how many words do you know
See also questions close to this topic
-
Weird behavior of object references, "ghost" object
I was messing around with some sample code to check if I understood how objects behave when referring to one another when I stumbled upon this situation:
public class exampleClass { int testInt; exampleClass pointedObj; public static void main(String args[]) { exampleClass Obj1= new exampleClass(); exampleClass Obj2= new exampleClass(); exampleClass Obj3= new exampleClass(); Obj1.pointedObj= Obj3; Obj2.pointedObj= Obj3; Obj1.testInt= 1; Obj2.testInt= 2; Obj3.testInt= 3; Obj3= Obj2; System.out.println(Obj1.pointedObj.testInt); System.out.println(Obj2.pointedObj.testInt); System.out.println(Obj3.pointedObj.testInt); System.out.println(Obj1.testInt); System.out.println(Obj2.testInt); System.out.println(Obj3.testInt); } }
I expected to see on the console:
2 2 2 1 2 2
But instead I get:
3 3 3 1 2 2
And it's driving me crazy. Why does the pointed objects still hold the value "3" if none of the objects holds said value? I'm sure there is a similar question around, but I don't have the power to search for something this specific.
I'm already grateful for any help.
-
Laravel - Passing id from one page and reference that id for the next page's table data
Good day. I'm having a hard time solving how to pass an id from a table (Region table) and use that id as a reference (idParent) for the table (Province table) on the next page. For context, all regions has an id, and the provinces has an idParent which is an id from regions.
I think I'm missing something in my routing, that's why I can't pass the data. Below are snippets of my blade file, Controller, and web.php. Thank you for helping.
web.php
// Masterlist Region Route::get('region', function () { return view('region');})->middleware(['auth'])->name('region'); Route::get('region', [App\Http\Controllers\FormControllerMasterlistRegion::class, 'viewRecord'])->middleware('auth')->name('region'); Route::post('region.editregion', [App\Http\Controllers\FormControllerMasterlistRegion::class, 'editregion'])->name('region.editregion'); Route::post('region.deleteregion', [App\Http\Controllers\FormControllerMasterlistRegion::class, 'deleteregion'])->name('region.deleteregion'); // Masterlist Province Route::get('province', function () { return view('province');})->middleware(['auth'])->name('province'); Route::get('province', [App\Http\Controllers\FormControllerMasterlistProvince::class, 'viewRecord'])->middleware('auth')->name('province'); Route::post('province.editprovince', [App\Http\Controllers\FormControllerMasterlistProvince::class, 'editprovince'])->name('province.editprovince'); Route::post('province.deleteprovince', [App\Http\Controllers\FormControllerMasterlistProvince::class, 'deleteprovince'])->name('province.deleteprovince');
FormControllerMasterlistProvince.php
// view record public function viewRecord() { $data = DB::table('province')->get(); return view('province',compact('data')); }
region.blade.php
@foreach ($data as $key => $item) <tr> <td class="text-center"> <div class="dropdown"> <button class="btn btn-primary dropdown-toggle me-1" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> ACTION </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a href="{{ route('province') }}"> ㅤProvinceㅤ</a> <a href="#" data-bs-toggle="modal" data-bs-target="#editregion" data-myid="{{$item->id}}" data-mytitle="{{$item->region}}"> Updateㅤ</span> </a> <a href="#" data-bs-toggle="modal" data-bs-target="#deleteregion" data-myid="{{$item->id}}" data-mytitle="{{$item->region}}"> Delete</a> </div> </div> </div> </td> <td class="text text-center">{{ $item->region }}</td> </tr> @endforeach
Should I be passing the id from the region controller to the province controller and also reference the id in the routing? Thank you for helping.
-
Why isn't this HashMap value being updated via reference?
I'm trying to wrap my head around why the value associated with a hashMap isnt updated when the reference is updated. Since Java is
pass-by-value-by-reference
shouldn't thevalue
associated withBIN1
simply point to the new object that now 'curr
points to?class Solution { static class Card{ private final String bin; private final String cardType; private final String cardName; private int trustScore; public Card(String bin, String cardType, String cardName, int trustScore){ this.bin = bin; this.cardType = cardType; this.cardName = cardName; this.trustScore = trustScore; } public String toString(){ return this.bin + " " + this.cardName + " "+ this.cardType + " " + this.trustScore; } } static class CardProcessor{ private Map<String, Card> map; CardProcessor(){ this.map = new HashMap<>(); } public void store(String bin, String cardType, String cardName, int trustScore){ if(!map.containsKey(bin)) map.put(bin, new Card(bin, cardType, cardName, trustScore)); else { Card curr = map.get(bin); if(curr.trustScore < trustScore) { curr = new Card(bin, cardType, cardName, trustScore); map.put(bin, curr); // Why is this line necessary to point BIN1 to the new value of card? Since Curr is a reference to Card shouldn't curr simply point to the new value supplied? } } } } public static void main(String[] args) { CardProcessor cp = new CardProcessor(); cp.store("BIN1", "VISA", "BoA", 1); cp.store("BIN1", "VIEX", "BACU", 5); System.out.println(cp.map.entrySet()); } }
-
R: Labels not displaying at a ggplot2 graph
Given this R script:
library(glue) library(ggplot2) ir.data <- read.csv(file="~/apps/mine/cajueiro_weather_station/sensor_data/temperature_data.csv", header = F) ir.data$V1 <- as.POSIXct(ir.data$V1, format = "%Y-%m-%dT%H:%M:%S", tz = "UTC") ir.data$size <- (ir.data$V2 - ir.data$V3) ggplot(ir.data, aes(x=V1)) + labs(title = "IR-radiation-based sky temperature monitoring.", subtitle = glue("Samples from {ir.data$V1[1]}h to {tail(ir.data$V1, n=1)}h UTC-3."), caption = "Cajueiro Weather Station - fschuindt.githhub.io/blog/weather") + geom_line(aes(y = V2), color = "#6163c2") + geom_line(aes(y = V3), color = "#ad1fa2") + scale_color_discrete(name = "Labels", labels = c("Ambient temperature.", "Sky temperature.")) + xlab("Timestamp") + ylab("Measured temperature in °Celcius")
And this .csv data sample:
2022-04-30T19:47:00,28.03,28.05 2022-04-30T19:47:02,27.99,28.01 2022-04-30T19:47:04,28.07,28.01 2022-04-30T19:47:06,28.05,28.05 2022-04-30T19:47:08,28.05,28.01 2022-04-30T19:47:10,28.03,28.01 2022-04-30T19:47:12,28.05,27.99 2022-04-30T19:47:14,28.07,28.01 2022-04-30T19:47:16,28.07,28.05 2022-04-30T19:47:18,28.05,28.05 2022-04-30T19:47:20,28.09,28.07
That's the plot output (the .csv data is bigger than the example):
Why the labels described at
scale_color_discrete(name = "Labels", labels = c("Ambient temperature.", "Sky temperature."))
are not being displayed? -
Add text annotations at consistent locations in facet_grid when scale = 'free_y' + ggplot2 + r
I need to annotate a set of chats in a facet grid where the y axis is scale is set to
scale = 'free_y'
.As the scales are very different, when I set the y position of the geom_text the text location is also very different for each graph. Is there any method to correct for this so that they are all in the same elate x,y position on each chart in the facet grid?
The example below demonstrates the problem:
library(ggplot2) df <- data.frame(name = c('Jim',"Bob", "Sue",'Jim',"Bob", "Sue",'Jim',"Bob", "Sue"), r = c(1,10,100,2,20,200,3,30,300), z = c(1,10,100,2,20,200,3,30,300)) p <- ggplot(df, aes(z, r)) + geom_line() p <- p + facet_grid(vars(name),scales = "free") dfl <- data.frame(name = c('Jim',"Bob", "Sue"), r = c(-0.2, 0.5, -0.4)) p + geom_text(data = dfl, aes(200, 10,label = r), check_overlap = T)
Ideally, in this example, the labels would all be the same position as the first chart in the facet gris "Bob".
I have reviewed this previous question, which addresses text annotation on a single chart in a facet grid, but not the placement in the case of different y scales per facet - Annotating text on individual facet in ggplot2
-
Add additional labels from a DataFrame to a facet_grid with existing label
I have a set data that I need to add to levels of labels. One on a single chart within the facet grid, and one from a small dataframe with entries for for each chart.
In the example below you'll see that I can add to a single chart no problem but when I try to add from the df I get the error -
Error in FUN(X[[i]], ...) : object 'wt' not found
Preparation:
library(ggplot2) p <- ggplot(mtcars, aes(mpg, wt)) + geom_line() p <- p + facet_grid(. ~ cyl) ann_text <- data.frame(mpg = 30,wt = 5,lab = "Text", cyl = factor(8,levels = c("4","6","8"))) dfl <- data.frame(name = c('Jim',"Bob", "Sue"), r = c(-0.2, 0.5, -0.4))
Single Label:
p + geom_text(data = ann_text,label = "Text")
Multiple Labels:
p + geom_text(data = ann_text,label = "Text") + geom_text(data = dfl, mpg = 30,wt = 5, aes(label = r))
The method I'm using is trying to recreate other examples I've found here on SO and elsewhere but I seem to be missing something.
-
Capitalize journal name in latex
I have a
sample.bib
with amain.tex
as below, using Chicago Style. I was wondering if there is a way to see the journal's name with all capital lettersAmerican Review
rather thanAmerican review
, without changingsample.bib
by hand. Many thanks in advance.main.tex
\documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[english]{babel} \usepackage{csquotes} \usepackage[notes,backend=biber]{biblatex-chicago} \bibliography{sample} \begin{document} \title{The Chicago Citation Style with biblatex} \author{WriteLaTeX} \maketitle \section{Demonstration} Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. \autocite{PP95} Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \printbibliography \end{document}
sample.bib
@article{PP95, author = "Adam Parusi\'nski and Piotr Pragacz", title = "A formula for the {E}uler characteristic of singular hypersurfaces", journal = "American review", volume = 4, year = 1995, pages = "337-351"}
-
LaTeX template based on KOMA script doesn't show the Bibliography with the citations in the generated pdf file
As I am using a template to write a scientific paper, whenever I put a citation in the text, it shows as [?] in the generated pdf. file and it won't appear in the References section. The template uses a KOMA Script. There are 3 different folders that contain the references.bib, the main text file, and the file where the following code appears to be. I tried many things including using the biblatex package, but then the KOMA script disappears, and also the references won't show still. If you have any idea about a possible solution to this situation, it would be a great help for me. Until now I only used LaTeX with one main file and the .bib file. If it is important to note, I am using Overleaf Editor.
\documentclass[bibliography=totoc,listof=totoc,BCOR=5mm,DIV=12]{scrbook} \usepackage{ngerman} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{url} \usepackage{hyperref} \usepackage{float} \begin{document} \mainmatter \input{ chapter1} \input{ chapter2} \backmatter \listoffigures \bibliographystyle{alphadin} \bibliography{./Bib/references} \end{document}
And the following shows how i cite on the references.bib file:
@misc{citation, title = {Title}, author = {Author}, year = {2021}, url = {url} }
In the {} above I put Title, Author, etc. inside just to show the format. In the real document, it contains the exact Names and URLs.
I would be very thankful for any recommendation for this problem. Thanks in advance :)
-
TIPA package for IPA - velar nasal no longer shows up
I typically use the LaTex/overleaf package 'TIPA' to type IPA characters in overleaf and it has always worked great. But recently, no velar nasals will compile in my document. I use the same command that I always have, \ng, but velar nasals are all absent from the document. Does anyone have an idea for how to fix this? Is there another way to type a velar nasal in overleaf?
-
Change section text size in latex
Is it possible to set text size of sections to a particular value, say 11pt?
\documentclass{article} \usepackage[utf8]{inputenc} \begin{document} \section{Introduction} Bla Bla \section{Thank} Bla Bla \end{document}
Here I want to set 'Introduction' & 'Thank' at 11 text-size.
-
Manage the multiple row in Overleaf
I have made a table with multiple columns and rows arguments like this
\begin{table}[H] \centering \begin{tabular}{lccccc} \hline \multirow{2}{*}{Aspects} & Probability & \multicolumn{4}{c}{Methods} \\ \cline{3-6} & for DE Genes & Binomial Test & Tangram & stereoscope & BayesPrism\\ \hline \multirow{3}{*}{AUC} & 0.3 & 0.867 & 0.029 & 0.074 & 0.992 \\ & 0.1 & 0.722 & 0.023 & 0.015 & 0.987\\ & 0.05 & 0.512 & 0.055 & 0.025 & 0.972\\ \hline \multirow{3}{*}{Best Thresholds} & 0.3 & ${0.135$ & 0.029 & 0.072 & $1e-10$ \\ & 0.1 & ${1e-60$ & 0.026 & 0.065 & $1e-10$\\ & 0.05 & $1e-60$ & 0.033 & 0.069 & $1e-10$\\ \hline \end{tabular} \caption{The ROC Curve Summary for Data with 15 Clusters} \label{15 cluster summary} \end{table}
It will give the results like this
I want to make the entries "Best Thresholds" be in two rows (filling 3 rows arguments) so that the table is not too wide. Could anyone helps how to make it?