Change h1, h2, h3

Hi,
Is there any way to change the style of h1, h2, h3 in note of zotero 2.0?
Which part of zotero.jar I need to change?
regards,
stef
  • don't touch Zotero.jar
    There is a great guide out there:
    http://www.condast.com/zotero/index.html
    for more crude instructions by myself, which may be useful for simple changes:
    http://forums.zotero.org/discussion/5104/modifying-word-plugin-using-journal-abbreviation-instead-of-publication-name/#Item_2
  • I believe stef is referring to changing the formatting of rich-text notes, not of citations.

    If so, go to about:config in the Firefox address bar, find extensions.zotero.note.css, double-click it, and set it to, e.g.:

    h1 { color: red; }
    Restart Firefox, and you should see the change reflected in your notes.
  • ah sure - I got mislead by the word "style" and assumed h1-3 referred to Harvard...
  • Hi Dan and Adam,
    Thank you so much for your help. Yes, I am refering to the style in rich text note.
    Dan, modifying in about:config would be difficult, if we want to make some modifications of styles.
    I have tried to change the indent from 30px to 40px in zotero.jar. It works. But, Zotero does not work, when I change h1, h2, h3....

    regards,
    stef
  • Dan, modifying in about:config would be difficult, if we want to make some modifications of styles.
    Why? Do you mean that you're attempting to create a custom build of Zotero for internal distribution?
  • Hi,
    I did modify the style through about:config, and it works perfectly.
    If the code for h1 = h1 { } , how to set the indent to 40px through about:config?
    regards,
    stef
  • p { padding-left: 40px !important; }

    (Hint: You can see the markup used in the notes by clicking the "HTML" button, and then read up on CSS to see what rules you can apply.)
  • edited July 8, 2009
    Hi,
    What I mean is not the whole paragraph, but this one:
    <p style="padding-left: 30px;">
    I want to change it to:
    <p style="padding-left: 40px;">
    when I click indent icon in note.
    regards,
    stef
  • I think the only way to change the value of indentation is through zotero.jar.
  • edited July 8, 2009
    OK, it's a little bit of a hack, but you could try this:

    p[style="padding-left: 30px;"] { padding-left: 40px !important; }
  • It does not work.
  • Are you sure? It works fine for me.

    To make it a bit clearer, try this:
    p[style="padding-left: 30px;"] { color: red; }
    Note that this will only work for the first level of indentation. For others you'd have to use multiples of 30px, e.g.:

    p[style="padding-left: 30px;"] { color: red; }
    p[style="padding-left: 60px;"] { color: blue; }
    p[style="padding-left: 90px;"] { color: orange; }

    (In about:config, separate these with spaces, not newlines.)
  • Also, if you've modified zotero.jar such that it's using something other than style="padding-left: 30px;" (letter for letter) then this won't work.
  • Hi Dan,
    I have tried :
    p[style="padding-left: 30px;"] { padding-left: 40px !important; } - it does not work
    p[style="padding-left: 30px;"] { color: red; } - it works.

    In zotero.jar, I only modified
    style="padding-left: 30px;"

    I do not know why the solution in about:config does not work.
    regards,
    stef

    PS: This is really a great improvement. Great job.
  • Are you sure you're not just not seeing the 10px difference? Try this:
    p[style="padding-left: 30px;"] { padding-left: 150px !important; }
  • Ok. Somehow it is very strange.
    If I make indentation, it still with 30px.
    However, if I close it the note and back to the note, the indent becomes 150px.
    However, if I make another indent in that note, it will be 30px again.
    Thus, for indentation, the best solution is through zotero.jar.

    regards,stef
  • If you want to make this change to zotero.jar every time a new version of Zotero comes out, that's fine with me, but I don't think you're quite understanding how this works.

    First, all changes to the about:config setting require you to open a new Firefox window after making the change.

    Second, when you use the indent button, it changes the hard-coded padding in increments of 30px. So 30px, 60px, 90px, etc. So if you only have a single CSS line that changes the 30px one to 150px, then a second-level indent won't show the change, since you'd be missing a rule that covers 60px.

    You need to add lines for as many levels of indentation as you want to cover, e.g.:
    p[style="padding-left: 30px;"] { padding-left: 40px !important; }
    p[style="padding-left: 60px;"] { padding-left: 80px !important; }
    p[style="padding-left: 90px;"] { padding-left: 120px !important; }

    To make this more visible, use a larger indent:
    p[style="padding-left: 30px;"] { padding-left: 100px !important; }
    p[style="padding-left: 60px;"] { padding-left: 200px !important; }
    p[style="padding-left: 90px;"] { padding-left: 300px !important; }

    I've just tried this, and it works fine.

    Again, feel free to make this to zotero.jar every time if that's easier for you, but please stop suggesting that that's the only way.
  • Hi Dan,
    Thank you so much for all your support. I will try again this solution.
    Actually, everytime I change the value, I have restarted firefox.
    regards,
    stef
Sign In or Register to comment.