- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 11
Add contributing guidelines #112
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
          
     Open
      
      
            T0mstone
  wants to merge
  14
  commits into
  typst:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
T0mstone:conventions
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            14 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      bcd5486
              
                Add conventions document
              
              
                T0mstone 8cb3299
              
                Implement suggestions
              
              
                T0mstone baf9042
              
                Implement suggestions (Part 2)
              
              
                T0mstone 4f204e9
              
                Fix and improve formatting
              
              
                T0mstone 677e67f
              
                Change formatting again
              
              
                T0mstone b6fc5d6
              
                Add last missing example
              
              
                T0mstone 67550cf
              
                Reformat slightly and add intro paragraph
              
              
                T0mstone ceafd2e
              
                Add paragraph for newcomers
              
              
                T0mstone 4262c65
              
                Add note about symbol name length
              
              
                T0mstone 10d2545
              
                Add note about diagonals
              
              
                T0mstone 1d6e351
              
                Re-order modifiers
              
              
                T0mstone 49d8d1b
              
                Fix Typst capitalization
              
              
                T0mstone d23d15d
              
                Fix typo
              
              
                T0mstone a8a9bd4
              
                Add note about US spelling
              
              
                T0mstone File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Conventions | ||
| When adding new modules, symbols or variants, please try to be consistent with | ||
| the following list of conventions. These aren't always hard rules, especially | ||
| because of how messy Unicode can be, but you should adhere to them if possible. | ||
|  | ||
| General conventions: | ||
| - Modifiers are entirely lowercase. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - Modifiers that correspond to symbols (by having the same name) have six established meanings: | ||
| - The symbol is added around the base like an accent or an attachment (smaller than the base), e.g. `eq.quest`. | ||
| - The symbol is stacked below the base, e.g. `gt.lt`. | ||
| - The symbol is stacked to the right of the base, e.g. `colon.eq`. | ||
| - The symbol is overlaid at the center of the base, e.g. `integral.dash`. | ||
| - The symbol surrounds the base, e.g. `plus.square`. | ||
|         
                  T0mstone marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| - The symbol is placed inside the base, e.g. `triangle.stroked.dot`. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| Established generic modifiers: | ||
| - `.l`/`.r`/`.t`/`.b`: The four main directions (left/right/top/bottom). | ||
| - For delimiters, `.l` means opening and `.r` means closing (see [#100](https://github.com/typst/codex/pull/100)). | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.tl`/`.tr`/`.bl`/`.br`: The four corners | ||
| <!-- TODO: Do we have or want to have conventions about when to choose `.tl` vs. `.t.l`? --> | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.double`, `.triple`, `.quad`: A symbol that has 2-4 of something. | ||
| - `.stroked`/`.filled`: A symbol that has an empty/filled interior. | ||
| (They correspond to Unicode's "white"/"black".) | ||
| - `.tiny`/`.small`/`.medium`/`.big`: A geometric shape with a certain size. | ||
| - `.light`/`.heavy`: A shape with a certain stroke weight. | ||
| - `.dotted`: A shape with a dotted line instead of a full stroke. | ||
| Established concrete modifiers: | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.big`: A big (n-ary) version of an operator. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.alt`: An alternative version that is still more or less the same symbol. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.not`: A symbol with a (typically diagonal) line through it. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| - `.o`: A symbol with a circle around it (see [#62](https://github.com/typst/codex/pull/62)) | ||
| - `.sq`: A "squarified" version of a symbol (see [#110](https://github.com/typst/codex/pull/110)) | ||
| - `.rev`: A horizontally mirrored version of a symbol (see [#108](https://github.com/typst/codex/issues/108)) | ||
| - `.inv`: Either vertically mirrored or a 180° rotated version of a symbol (see [#108](https://github.com/typst/codex/issues/108)) | ||
| - `.cw`/`.ccw`: Clockwise/Counterclockwise | ||
| Established exceptions: | ||
| - When `.eq` is used in the second sense (stacked below), it only adds a single line and not two. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| For two lines below, `.equiv` is used. | ||
| - `.not` (see above) does not correspond to the symbol `not` despite having the same name. | ||
|         
                  T0mstone marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.