Closed Greenscreener closed 5 years ago
Hey @Greenscreener, just pushed a fix for this. Can you confirm it works on your end?
Now I'm getting this:
Error: Undefined variable: "$at".
on line 3 of pubcss/src/objects/_page.scss, in `page-number'
from line 12 of pubcss/src/objects/_page.scss
from line 24 of pubcss/src/_manifest.scss
from line 5 of styles/pubcss-gjsm.scss
Use --trace for backtrace.
Just pushed another change, hopefully this does the trick.
Error: List index is 4 but list is only 3 items long for `nth'
on line 30 of pubcss/src/tools/_counter.scss, in `generate-counter-content'
from line 38 of pubcss/src/tools/_counter.scss, in `generate-counter-content'
from line 38 of pubcss/src/tools/_counter.scss, in `generate-counter-content'
from line 38 of pubcss/src/tools/_counter.scss, in `generate-counter-content'
from line 5 of pubcss/src/helper/_header-counter.scss, in `header-counter'
from line 9 of pubcss/src/helper/_header-counter.scss
from line 30 of pubcss/src/_manifest.scss
from line 4 of style.scss
Use --trace for backtrace.
Now it's this.
I'm not able to replicate that error. Can you give more details about your setup? What you're using to compile sass, version, which acm/ieee file, etc?
The first error is produced by Ruby Sass 3.7.4
A very similar error is also returned when using sassc:
Error: index out of bounds for `nth($list, $n)`
on line 30:29 of pubcss/src/tools/_counter.scss, in function `nth`
from line 30:29 of pubcss/src/tools/_counter.scss, in mixin `generate-counter-content`
from line 38:14 of pubcss/src/tools/_counter.scss, in mixin `generate-counter-content`
from line 38:14 of pubcss/src/tools/_counter.scss, in mixin `generate-counter-content`
from line 38:14 of pubcss/src/tools/_counter.scss, in mixin `generate-counter-content`
from line 5:14 of pubcss/src/helper/_header-counter.scss, in mixin `header-counter`
from line 9:10 of pubcss/src/helper/_header-counter.scss
from line 30:9 of pubcss/src/_manifest.scss
from line 5:9 of styles/pubcss-gjsm.scss
>> $counter-style: unquote(nth($counter-styles, $i));
----------------------------^
with sassc --version
returning:
sassc: na
libsass: 3.6.1
sass2scss: 1.1.1
sass: 3.5
Before you could react to this issue, I actually implemented everything that I needed myself, so I have to checkout an old commit to try your fixes.
The only two files, that contain my stuff are:
pubcss-gjsm.scss
:
// Import settings
@import "./settings/gjsm.scss";
// Import PubCSS
@import "../pubcss/src/_manifest.scss";
// Custom style overrides
and settings/gjsm.scss
(mostly based on settings/ieee.scss
):
// Layout
$page-width: 210mm;
$page-height: 297mm;
$page-margin: 1cm;
$page-column-count: 1;
$page-column-fill: balance;
$page-column-gap: 0.33in;
$footnote-column-count: $page-column-count;
$footnote-float: prince-column-footnote;
$footnotes-margin-top: 1em;
$footnotes-padding: 3pt;
$footnotes-border: 0.5px solid #000;
$table-margin: 1.667em 0 1em;
$table-cell-padding: 0.333em;
$table-border: 0.5px solid #000;
$figure-margin: 1.333em 0 2.333em;
$caption-margin: 0 0 4pt;
$caption-side: top;
// Typography
$font-family-serif: "Times New Roman", serif;
$font-family-monospace: "Fira Code", monospace;
$font-family-base: $font-family-serif;
$font-size-base: 12pt;
$font-size-small: 10pt;
$font-size-code: 10pt;
$font-size-page-number: $font-size-base;
$line-height-base: 1.5;
$hyphens-base: none;
$text-align-base: justify;
$paragraph-margin: 0 0 6pt;
$paragraph-indent: 1.5em;
$headings-font-family: $font-family-serif;
$headings-font-weight: bold;
$headings-hyphens: none;
$caption-weight: bold;
$figcaption-weight: $caption-weight;
// Counters
$page-number-enabled: true;
$page-number-position: bottom;
$page-number-style: decimal;
$page-number-start: 1;
$header-counter-enabled: true;
$counter-ids:
'section',
'subsection',
'subsubsection',
'subsubsection',
'subsubsubsection',
'subsubsubsubsection';
$counter-styles:
'decimal',//h1
'decimal',//h2
'decimal';//h3
$counter-header-prefix: "";
$counter-header-suffix: "";
$counter-header-separator: ".";
$table-prefix: "Tabulka ";
$table-suffix: ". ";
$figure-prefix: "Obr. ";
$figure-suffix: ". ";
$cite-prefix: "[";
$cite-suffix: "]";
$cites-separator: ", ";
$ref-prefix: $cite-prefix;
$ref-suffix: $cite-suffix;
I didn't have any time to actually finish the full stylesheet.
While writing this I noticed the cause of the issue. I knew I wasn't going to use smaller then h3
headings, so I removed the latter three, which is what broke.
After fixing that, it works. Thank you very much.
Hello,
I need to create my own css, because I need to use a different (and quite obscure) standard than what you have. It is not a problem for me to setup the styles accordingly, but I can't get even your unmodified code to compile. When I first tried to run sass, it returned:
I looked into the source and tried to replace the
escape
function with theunquote
function, which throws this error:I suspect this might be because I don't use Gulp, which I would like to avoid, because from what I understand it is used just for automatic reloading of the css in a browser, which I have my own tools for and don't really need for this project.
Or does this have something to do with Price?
Is there a way I could quickly patch/fix this without too much pain?
Thank you very much, GS